From d9bd3d646006d9e6ddf2ccded21d7984935c98c8 Mon Sep 17 00:00:00 2001 From: yileic Date: Sat, 13 May 2017 15:46:02 -0700 Subject: [PATCH] fix percentage change viz (#2757) --- superset/assets/javascripts/explorev2/stores/visTypes.js | 6 ++++++ superset/assets/visualizations/nvd3_vis.js | 1 + 2 files changed, 7 insertions(+) diff --git a/superset/assets/javascripts/explorev2/stores/visTypes.js b/superset/assets/javascripts/explorev2/stores/visTypes.js index 3acd9a3bc4518..13898269cffe5 100644 --- a/superset/assets/javascripts/explorev2/stores/visTypes.js +++ b/superset/assets/javascripts/explorev2/stores/visTypes.js @@ -203,6 +203,12 @@ const visTypes = { requiresTime: true, controlPanelSections: [ sections.NVD3TimeSeries[0], + { + label: 'Chart Options', + controlSetRows: [ + ['x_axis_format', 'y_axis_format'], + ], + }, sections.NVD3TimeSeries[1], ], }, diff --git a/superset/assets/visualizations/nvd3_vis.js b/superset/assets/visualizations/nvd3_vis.js index 413b6ae857c9f..2a7ec4354a196 100644 --- a/superset/assets/visualizations/nvd3_vis.js +++ b/superset/assets/visualizations/nvd3_vis.js @@ -237,6 +237,7 @@ function nvd3Vis(slice, payload) { case 'compare': chart = nv.models.cumulativeLineChart(); chart.xScale(d3.time.scale.utc()); + chart.useInteractiveGuideline(true); chart.xAxis .showMaxMin(false) .staggerLabels(true);