mistercrunch commented on code in PR #35211:
URL: https://github.com/apache/superset/pull/35211#discussion_r2364959083


##########
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx:
##########
@@ -170,12 +171,25 @@ function cellOffset({
 function cellBackground({
   value,
   colorPositiveNegative = false,
+  theme,
 }: {
   value: number;
   colorPositiveNegative: boolean;
+  theme: SupersetTheme;
 }) {
-  const r = colorPositiveNegative && value < 0 ? 150 : 0;
-  return `rgba(${r},0,0,0.2)`;
+  if (!colorPositiveNegative) {

Review Comment:
   We're missing out on writing a nifty utility function here, maybe like 
`themeAdaptiveAlpha(0.3)` or similar... Not sure what the ideal name for it is 
but seems it'd be useful/helpful.
   
   Either that or reuse some of these?
   <img width="1235" height="327" alt="Image" 
src="https://github.com/user-attachments/assets/37323bdf-cc29-4c8a-94e3-9179026f6e7b";
 />



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to