Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Commit

Permalink
fix: ignore disabled series in stacked bar values
Browse files Browse the repository at this point in the history
  • Loading branch information
erik_ritter committed Jun 10, 2019
1 parent facd4ca commit 6a136b0
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 907 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
],
"license": "Apache-2.0",
"devDependencies": {
"@superset-ui/build-config": "^0.0.9",
"@superset-ui/build-config": "^0.0.11",
"@superset-ui/commit-config": "^0.0.9",
"@superset-ui/chart": "^0.11.8",
"@superset-ui/chart-composition": "^0.11.9",
Expand Down
4 changes: 1 addition & 3 deletions packages/superset-ui-legacy-preset-chart-nvd3/src/NVD3Vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -769,9 +769,7 @@ function nvd3Vis(element, props) {
key,
color: a.color,
strokeWidth: a.width,
classed: `${a.opacity} ${a.style} nv-timeseries-annotation-layer showMarkers${
a.showMarkers
} hideLine${a.hideLine}`,
classed: `${a.opacity} ${a.style} nv-timeseries-annotation-layer showMarkers${a.showMarkers} hideLine${a.hideLine}`,
};
}),
),
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-legacy-preset-chart-nvd3/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function drawBarValues(svg, data, stacked, axisFormat) {
const totalStackedValues =
stacked && data.length !== 0
? data[0].values.map((bar, iBar) => {
const bars = data.map(series => series.values[iBar]);
const bars = data.filter(series => !series.disabled).map(series => series.values[iBar]);

return d3.sum(bars, d => d.y);
})
Expand Down
Loading

0 comments on commit 6a136b0

Please sign in to comment.