michael-s-molina commented on code in PR #24477:
URL: https://github.com/apache/superset/pull/24477#discussion_r1238953705
##########
superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts:
##########
@@ -52,20 +57,24 @@ export function extractDataTotalValues(
stack: StackType;
percentageThreshold: number;
xAxisCol: string;
+ legendState?: LegendState;
},
): {
totalStackedValues: number[];
thresholdValues: number[];
} {
const totalStackedValues: number[] = [];
const thresholdValues: number[] = [];
- const { stack, percentageThreshold, xAxisCol } = opts;
+ const { stack, percentageThreshold, xAxisCol, legendState } = opts;
if (stack) {
data.forEach(datum => {
const values = Object.keys(datum).reduce((prev, curr) => {
if (curr === xAxisCol) {
return prev;
}
+ if (legendState && !legendState[curr]) {
Review Comment:
If there's no `legendState` then it should skip this statement. It should
only enter if `legendState` is defined and the value is not there.
--
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]