Permalink
Browse files

Fixed #6895, wrong clipping rectangle after setting extremes when boo…

…sting series.
  • Loading branch information...
pawelfus committed Oct 31, 2017
1 parent 7ef636d commit 1bc801ccfe34f94355d30ce703cb46af90cd73c4
@@ -129,7 +129,7 @@ H.initCanvasBoost = function () {
chart.plotLeft,
chart.plotTop,
chart.plotWidth,
chart.chartHeight
chart.plotHeight
);
target.renderTarget.clip(target.boostClipRect);
@@ -159,7 +159,7 @@ H.initCanvasBoost = function () {
x: chart.plotLeft,
y: chart.plotTop,
width: chart.plotWidth,
height: chart.chartHeight
height: chart.plotHeight
});
return ctx;
@@ -2386,7 +2386,7 @@ function createAndAttachRenderer(chart, series) {
chart.plotLeft,
chart.plotTop,
chart.plotWidth,
chart.chartHeight
chart.plotHeight
);
(target.renderTargetFo || target.renderTarget).clip(target.boostClipRect);
@@ -2405,7 +2405,7 @@ function createAndAttachRenderer(chart, series) {
x: chart.plotLeft,
y: chart.plotTop,
width: chart.plotWidth,
height: chart.chartHeight
height: chart.plotHeight
});
target.boostResizeTarget();
@@ -0,0 +1,6 @@
---
resources:
- https://code.jquery.com/qunit/qunit-2.0.1.js
- https://code.jquery.com/qunit/qunit-2.0.1.css
js_wrap: b
...
@@ -0,0 +1,8 @@
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/boost.js"></script>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<div id="container"></div>
@@ -0,0 +1,27 @@
(function () {
QUnit.test("#6895 - clipping rectangle after set extremes.", function (assert) {
var chart = Highcharts.chart('container', {
chart: {
type: 'column'
},
series: [{
boostThreshold: 1,
data: [
[0, 0],
[0, 1],
[0, 2],
[0, 3],
[0, 4]
]
}]
});
chart.yAxis[0].setExtremes(1, 2);
assert.strictEqual(
chart.series[0].boostClipRect.getBBox(true).height,
chart.plotHeight,
'Correct height of the clipping box.'
);
});
}());

2 comments on commit 1bc801c

@TorsteinHonsi

This comment has been minimized.

Collaborator

TorsteinHonsi replied Oct 31, 2017

Sorry mate, this will clip away the navigator on boosted stock charts...

@pawelfus

This comment has been minimized.

Contributor

pawelfus replied Oct 31, 2017

You are right! It's not as easy as I expected.

Please sign in to comment.