From cb651fad6097a8392070ff1d0f961377960b298a Mon Sep 17 00:00:00 2001 From: Michelle Thomas Date: Tue, 2 Jul 2019 09:54:56 -0700 Subject: [PATCH] fix: fixing tooltip for expanded area chart --- .../src/NVD3Vis.js | 2 +- .../legacy-preset-chart-nvd3/Area/Stories.jsx | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/packages/superset-ui-legacy-preset-chart-nvd3/src/NVD3Vis.js b/packages/superset-ui-legacy-preset-chart-nvd3/src/NVD3Vis.js index 4f78da8e7..ad645817c 100644 --- a/packages/superset-ui-legacy-preset-chart-nvd3/src/NVD3Vis.js +++ b/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/packages/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Area/Stories.jsx b/packages/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Area/Stories.jsx index 578d5066c..c9ae33ed5 100644 --- a/packages/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Area/Stories.jsx +++ b/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', + }, ];