Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fixed #6650, Boost module failed with styled mode and heatmap.
- Loading branch information
1 parent
7b180b1
commit d66ec28
Showing
5 changed files
with
112 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 @@ | ||
@import 'https://code.highcharts.com/css/highcharts.css'; |
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,9 @@ | ||
<script src="https://code.highcharts.com/js/highcharts.js"></script> | ||
<script src="https://code.highcharts.com/js/modules/heatmap.js"></script> | ||
<script src="https://code.highcharts.com/js/modules/boost.js"></script> | ||
|
||
|
||
<div id="qunit"></div> | ||
<div id="qunit-fixture"></div> | ||
|
||
<div id="container" style="width: 600px; height: 250px; margin: 0 auto"></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,89 @@ | ||
QUnit.test('Boosted heatmap with styled mode (#6650)', function (assert) { | ||
|
||
assert.expect(0); | ||
var xsize = 26; | ||
var ysize = 100; | ||
// Add some random data | ||
var data = new Array(xsize * ysize); | ||
for (var i = 0; i < xsize * ysize; i++) { | ||
var row = new Array(3); | ||
row[0] = Math.floor(i / ysize); | ||
row[1] = -i % ysize; | ||
|
||
|
||
row[2] = ((row[1] / ysize) * 125); | ||
// row[2] = Math.random() * -125; | ||
data[i] = row; | ||
} | ||
|
||
Highcharts.chart('container', { | ||
chart: { | ||
type: 'heatmap', | ||
margin: [60, 10, 80, 50] | ||
}, | ||
|
||
boost: { | ||
useGPUTranslations: true | ||
}, | ||
|
||
title: { | ||
text: 'Swept Spectrogram', | ||
align: 'left', | ||
x: 40 | ||
}, | ||
|
||
xAxis: { | ||
type: 'number', | ||
title: { | ||
text: 'Channel' | ||
}, | ||
min: 0, | ||
max: 25, | ||
showLastLabel: true | ||
}, | ||
|
||
yAxis: { | ||
title: { | ||
text: null | ||
}, | ||
labels: { | ||
format: '{value}s' | ||
}, | ||
minPadding: 0, | ||
maxPadding: 0, | ||
startOnTick: false, | ||
endOnTick: false, | ||
min: -99, | ||
max: 0, | ||
reversed: true | ||
}, | ||
|
||
colorAxis: { | ||
stops: [ | ||
[0, '#FF0000'], | ||
[0.25, '#FFFF00'], | ||
[0.5, '#00FF00'], | ||
[0.75, '#00FFFF'], | ||
[1, '#0000FF'] | ||
], | ||
min: -125, | ||
max: 0, | ||
startOnTick: false, | ||
endOnTick: false, | ||
reversed: true, | ||
labels: { | ||
format: '{value} dBm' | ||
} | ||
}, | ||
|
||
series: [{ | ||
boostThreshold: 100, | ||
borderWidth: 0, | ||
// nullColor: '#000000', | ||
// colsize: 100*26, // one full buffer ? no idea... | ||
data: data | ||
}] | ||
}); | ||
|
||
|
||
}); |