Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #4870, column width calculation not correct on logarithmic X axis.
- Loading branch information
1 parent
3869e88
commit 2d5d73c
Showing
8 changed files
with
104 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
samples/issues/highcharts-4.2.1/4870-log-xaxis-pointwidth/demo.details
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
resources: | ||
- https://code.jquery.com/qunit/qunit-1.19.0.js | ||
- https://code.jquery.com/qunit/qunit-1.19.0.css | ||
... |
8 changes: 8 additions & 0 deletions
8
samples/issues/highcharts-4.2.1/4870-log-xaxis-pointwidth/demo.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<script src="https://code.highcharts.com/highcharts.js"></script> | ||
<script src="https://code.highcharts.com/highcharts-3d.js"></script> | ||
|
||
<div id="qunit"></div> | ||
<div id="qunit-fixture"></div> | ||
|
||
|
||
<div id="container" style="width: 600px; margin: 0 auto;"></div> |
59 changes: 59 additions & 0 deletions
59
samples/issues/highcharts-4.2.1/4870-log-xaxis-pointwidth/demo.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
|
||
$(function () { | ||
QUnit.test('Automatic column width on log X axis', function (assert) { | ||
var chart = Highcharts.chart('container', { | ||
|
||
"xAxis": { | ||
type: 'logarithmic' | ||
}, | ||
"series": [{ | ||
|
||
"type": "column", | ||
//"pointWidth": 10, | ||
"data": [{ | ||
"x": 1, | ||
"y": 1 | ||
}, { | ||
|
||
"x": 2, | ||
"y": 2 | ||
}, { | ||
|
||
"x": 3, | ||
"y": 3 | ||
}, { | ||
|
||
"x": 4, | ||
"y": 4 | ||
}, { | ||
|
||
"x": 5, | ||
"y": 5 | ||
}] | ||
}] | ||
}); | ||
|
||
var bBox3 = chart.series[0].points[3].graphic.getBBox(), | ||
bBox4 = chart.series[0].points[4].graphic.getBBox(); | ||
|
||
assert.strictEqual( | ||
typeof bBox3.x, | ||
'number', | ||
'Box is ok' | ||
); | ||
assert.strictEqual( | ||
typeof bBox3.width, | ||
'number', | ||
'Box is ok' | ||
); | ||
assert.strictEqual( | ||
typeof bBox4.x, | ||
'number', | ||
'Box is ok' | ||
); | ||
assert.ok( | ||
bBox3.x + bBox3.width < bBox4.x, | ||
'No overlapping points' | ||
); | ||
}); | ||
}); |