Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #6350, Solid gauge series did not have CSS point class.
- Loading branch information
1 parent
77bef5b
commit 71a651b
Showing
4 changed files
with
92 additions
and
1 deletion.
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
6 changes: 6 additions & 0 deletions
6
samples/unit-tests/series-solidgauge/solidgauge-styled-series/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,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 | ||
... |
11 changes: 11 additions & 0 deletions
11
samples/unit-tests/series-solidgauge/solidgauge-styled-series/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,11 @@ | ||
<script src="https://code.highcharts.com/js/highcharts.js"></script> | ||
<script src="https://code.highcharts.com/js/highcharts-more.js"></script> | ||
<script src="https://code.highcharts.com/js/modules/solid-gauge.js"></script> | ||
<style> | ||
@import 'https://code.highcharts.com/css/highcharts.css'; | ||
</style> | ||
|
||
<div id="qunit"></div> | ||
<div id="qunit-fixture"></div> | ||
|
||
<div id="container" style="width: 600px; margin: 0 auto"></div> |
74 changes: 74 additions & 0 deletions
74
samples/unit-tests/series-solidgauge/solidgauge-styled-series/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,74 @@ | ||
QUnit.test('Solid gauge styled series color (#6350)', function (assert) { | ||
|
||
var gaugeOptions = { | ||
chart: { | ||
type: 'solidgauge', | ||
animation: false | ||
}, | ||
|
||
title: null, | ||
|
||
tooltip: { | ||
enabled: false | ||
}, | ||
|
||
pane: { | ||
center: ['50%', '85%'], | ||
size: '140%', | ||
startAngle: -90, | ||
endAngle: 90, | ||
background: { | ||
backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE', | ||
innerRadius: '60%', | ||
outerRadius: '100%', | ||
shape: 'arc' | ||
} | ||
}, | ||
|
||
// the value axis | ||
yAxis: { | ||
stops: [ | ||
[0, '#00ff00'], | ||
[1, '#00ff00'] | ||
], | ||
lineWidth: 0, | ||
minorTickInterval: null, | ||
tickAmount: 2, | ||
title: { | ||
y: -70 | ||
}, | ||
labels: { | ||
y: 16 | ||
} | ||
}, | ||
|
||
plotOptions: { | ||
solidgauge: { | ||
dataLabels: { | ||
y: 5, | ||
borderWidth: 0, | ||
useHTML: true | ||
}, | ||
animation: false | ||
} | ||
} | ||
}; | ||
|
||
// The speed gauge | ||
var chart = Highcharts.chart('container', Highcharts.merge(gaugeOptions, { | ||
yAxis: { | ||
min: 0, | ||
max: 200 | ||
}, | ||
series: [{ | ||
data: [80] | ||
}] | ||
})); | ||
|
||
assert.strictEqual( | ||
chart.series[0].data[0].graphic.element.className.baseVal, | ||
'highcharts-point highcharts-color-0', | ||
'color classes are applied.' | ||
); | ||
|
||
}); |