Skip to content

Commit

Permalink
Highstock: Fixed highcharts#9693, added default groupPixelWidth when …
Browse files Browse the repository at this point in the history
…dataGrouping options were set to all series through plotOptions.series.
  • Loading branch information
KacperMadej authored and TorsteinHonsi committed Jan 3, 2019
1 parent f0e56e3 commit 8b7eb06
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion js/parts/DataGrouping.js
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ Axis.prototype.getGroupPixelWidth = function () {
if (dgOptions) {
groupPixelWidth = Math.max(
groupPixelWidth,
dgOptions.groupPixelWidth
pick(dgOptions.groupPixelWidth, 2) // #9693
);

}
Expand Down
10 changes: 10 additions & 0 deletions samples/unit-tests/series/datagrouping/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,19 @@ QUnit.test('General dataGrouping options', function (assert) {
data: [
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
]
}, {
type: 'scatter',
data: [[1, 1]]
}]
});

assert.strictEqual(
chart.series[0].points[0].y > 1,
true,
'Scatter doesn\'t prevent dataGrouping when ' +
'`plotOptions.series.dataGrouping` is set (#9693)'
);

assert.strictEqual(
chart.series[0].points[0].y,
5,
Expand Down

0 comments on commit 8b7eb06

Please sign in to comment.