stevetracvc commented on code in PR #20353:
URL: https://github.com/apache/superset/pull/20353#discussion_r896913933
##########
superset-frontend/packages/superset-ui-chart-controls/src/utils/getColorFormatters.ts:
##########
@@ -174,10 +176,15 @@ export const getColorFunction = (
const compareResult = comparatorFunction(value, columnValues);
if (compareResult === false) return undefined;
const { cutoffValue, extremeValue } = compareResult;
- return rgbToRgba(
- colorScheme,
- getOpacity(value, cutoffValue, extremeValue, minOpacity, maxOpacity),
+ const opacity = getOpacity(
+ value,
+ cutoffValue,
+ extremeValue,
+ minOpacity,
+ maxOpacity,
+ inverseScale && operator !== COMPARATOR.EQUAL,
);
+ return
`rgba(${colorScheme.r},${colorScheme.g},${colorScheme.b},${opacity})`;
Review Comment:
I thought about moving this to colorUtils since I made an
rgbStringToRgbaObject function, is that useful?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]