Skip to content

Commit

Permalink
Remedy for dual axis annotation (apache#4130)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mogball authored and mistercrunch committed Jan 2, 2018
1 parent ee38135 commit 1234bff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions superset/assets/visualizations/nvd3_vis.js
Expand Up @@ -553,7 +553,7 @@ function nvd3Vis(slice, payload) {
} else {
xMin = chart.xAxis.scale().domain()[0].valueOf();
xMax = chart.xAxis.scale().domain()[1].valueOf();
xScale = chart.xScale();
xScale = chart.xScale ? chart.xScale() : d3.scale.linear();
}

if (Array.isArray(formulas) && formulas.length) {
Expand Down Expand Up @@ -591,8 +591,8 @@ function nvd3Vis(slice, payload) {
}));
data.push(...formulaData);
}

const annotationHeight = chart.yAxis.scale().range()[0];
const yAxis = chart.yAxis1 ? chart.yAxis1 : chart.yAxis;
const annotationHeight = yAxis.scale().range()[0];
const tipFactory = layer => d3tip()
.attr('class', 'd3-tip')
.direction('n')
Expand Down

0 comments on commit 1234bff

Please sign in to comment.