From fb9662a183091fd12d09cc574b3164657566d8e3 Mon Sep 17 00:00:00 2001 From: michellethomas Date: Fri, 5 Jul 2019 15:31:35 -0700 Subject: [PATCH] fix: fixing tooltip for expanded area chart (#134) --- .../src/NVD3Vis.js | 2 +- .../legacy-preset-chart-nvd3/Area/Stories.jsx | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-nvd3/src/NVD3Vis.js b/superset-frontend/temporary_superset_ui/superset-ui/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-nvd3/src/NVD3Vis.js index 4f78da8e7c393..ad645817c2197 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-nvd3/src/NVD3Vis.js +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-nvd3/src/NVD3Vis.js @@ -559,7 +559,7 @@ function nvd3Vis(element, props) { chart.interactiveLayer.tooltip.contentGenerator(d => generateRichLineTooltipContent(d, smartDateVerboseFormatter, yAxisFormatter), ); - } else { + } else if (areaStackedStyle !== 'expand') { // area chart chart.interactiveLayer.tooltip.contentGenerator(d => generateAreaChartTooltipContent(d, smartDateVerboseFormatter, yAxisFormatter), diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/superset-ui-plugins/packages/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Area/Stories.jsx b/superset-frontend/temporary_superset_ui/superset-ui/plugins/superset-ui-plugins/packages/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Area/Stories.jsx index 578d5066cf94a..c9ae33ed576dc 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/superset-ui-plugins/packages/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Area/Stories.jsx +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/superset-ui-plugins/packages/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Area/Stories.jsx @@ -42,4 +42,42 @@ export default [ storyName: 'Stacked', storyPath: 'legacy-|preset-chart-nvd3|AreaChartPlugin', }, + { + renderStory: () => ( + + ), + storyName: 'Expanded', + storyPath: 'legacy-|preset-chart-nvd3|AreaChartPlugin', + }, ];