Skip to content

Commit

Permalink
Fixed regression with wrong higher path on arearange series on invert…
Browse files Browse the repository at this point in the history
…ed chart. Closes #1930.
  • Loading branch information
TorsteinHonsi committed Jun 10, 2013
1 parent c14b9d1 commit 905535d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 4 deletions.
4 changes: 2 additions & 2 deletions js/highcharts-more.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -697,13 +697,13 @@ seriesTypes.arearange = Highcharts.extendClass(seriesTypes.area, {
point.y = null;
} else if (low === null) {
point.plotLow = point.plotY = null;
point.plotHigh = yAxis.toPixels(high, true);
point.plotHigh = yAxis.translate(high, 0, 1, 0, 1);
} else if (high === null) {
point.plotLow = plotY;
point.plotHigh = null;
} else {
point.plotLow = plotY;
point.plotHigh = yAxis.toPixels(high, true);
point.plotHigh = yAxis.translate(high, 0, 1, 0, 1);
}
});
},
Expand Down
4 changes: 2 additions & 2 deletions js/parts-more/AreaRangeSeries.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ seriesTypes.arearange = Highcharts.extendClass(seriesTypes.area, {
point.y = null;
} else if (low === null) {
point.plotLow = point.plotY = null;
point.plotHigh = yAxis.toPixels(high, true);
point.plotHigh = yAxis.translate(high, 0, 1, 0, 1);
} else if (high === null) {
point.plotLow = plotY;
point.plotHigh = null;
} else {
point.plotLow = plotY;
point.plotHigh = yAxis.toPixels(high, true);
point.plotHigh = yAxis.translate(high, 0, 1, 0, 1);
}
});
},
Expand Down
5 changes: 5 additions & 0 deletions samples/highcharts/issues/1930/demo.details
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: Highcharts Demo
authors:
- Torstein Hønsi
...
4 changes: 4 additions & 0 deletions samples/highcharts/issues/1930/demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/highcharts-more.js"></script>

<div id="container" style="height: 300px; width: 400px; margin: 0 auto;"></div>
27 changes: 27 additions & 0 deletions samples/highcharts/issues/1930/demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
$(function () {
var chart = new Highcharts.Chart({

chart: {
renderTo: 'container',
type: 'arearange',
inverted: true
},

xAxis: {
type: 'category'
},

yAxis: {
minTickInterval: 1
},

series: [{
data: [
['Ein', 1, 2],
['To', 2, 3],
['Tre', 3, 4]
]
}]

});
});

0 comments on commit 905535d

Please sign in to comment.