Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #6487, contrast color was not applied for a justified label on …
…a column.
- Loading branch information
1 parent
dcd3737
commit 27aff13
Showing
5 changed files
with
63 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
... |
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,6 @@ | ||
<script src="https://code.highcharts.com/highcharts.js"></script> | ||
|
||
<div id="qunit"></div> | ||
<div id="qunit-fixture"></div> | ||
|
||
<div id="container"></div> |
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,31 @@ | ||
QUnit.test('#6487: Column\'s data label with contrast after justification.', function (assert) { | ||
var chart = Highcharts.chart('container', { | ||
series: [{ | ||
data: [15, 14.5, 14, 12, 11, 10, 9, 8, 7, 6, 5, 4], | ||
type: 'column', | ||
colorByPoint: true, | ||
dataLabels: { | ||
enabled: true, | ||
inside: false, | ||
style: { | ||
textOutline: null | ||
} | ||
} | ||
}], | ||
yAxis: { | ||
endOnTick: false, | ||
max: 15.3 | ||
} | ||
}), | ||
point = chart.series[0].points[1]; | ||
|
||
assert.strictEqual( | ||
Highcharts.Color( | ||
point.dataLabel.element.children[0].style.color | ||
).get(), | ||
Highcharts.Color( | ||
chart.renderer.getContrast(point.color) | ||
).get(), | ||
'Correct color for justified label on a column.' | ||
); | ||
}); |
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