highcharts-rails 5.0.12 → 5.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +59 -0
- data/app/assets/javascripts/highcharts.js +6250 -788
- data/app/assets/javascripts/highcharts/highcharts-3d.js +210 -25
- data/app/assets/javascripts/highcharts/highcharts-more.js +908 -22
- data/app/assets/javascripts/highcharts/modules/accessibility.js +272 -64
- data/app/assets/javascripts/highcharts/modules/annotations.js +1 -1
- data/app/assets/javascripts/highcharts/modules/boost.js +89 -66
- data/app/assets/javascripts/highcharts/modules/broken-axis.js +65 -4
- data/app/assets/javascripts/highcharts/modules/data.js +1 -1
- data/app/assets/javascripts/highcharts/modules/drilldown.js +234 -17
- data/app/assets/javascripts/highcharts/modules/exporting.js +508 -69
- data/app/assets/javascripts/highcharts/modules/funnel.js +129 -8
- data/app/assets/javascripts/highcharts/modules/grid-axis.js +1 -1
- data/app/assets/javascripts/highcharts/modules/heatmap.js +361 -44
- data/app/assets/javascripts/highcharts/modules/no-data-to-display.js +64 -1
- data/app/assets/javascripts/highcharts/modules/offline-exporting.js +44 -44
- data/app/assets/javascripts/highcharts/modules/overlapping-datalabels.js +26 -3
- data/app/assets/javascripts/highcharts/modules/series-label.js +19 -1
- data/app/assets/javascripts/highcharts/modules/solid-gauge.js +14 -5
- data/app/assets/javascripts/highcharts/modules/stock.js +1122 -86
- data/app/assets/javascripts/highcharts/modules/treemap.js +265 -43
- data/app/assets/javascripts/highcharts/modules/xrange-series.js +1 -1
- data/lib/highcharts/version.rb +1 -1
- metadata +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v5.0.
|
2
|
+
* @license Highcharts JS v5.0.13 (2017-07-27)
|
3
3
|
* Boost module
|
4
4
|
*
|
5
5
|
* (c) 2010-2017 Highsoft AS
|
@@ -19,7 +19,7 @@
|
|
19
19
|
/**
|
20
20
|
* License: www.highcharts.com/license
|
21
21
|
* Author: Christer Vasseng, Torstein Honsi
|
22
|
-
*
|
22
|
+
*
|
23
23
|
* This is an experimental Highcharts module that draws long data series on a canvas
|
24
24
|
* in order to increase performance of the initial load time and tooltip responsiveness.
|
25
25
|
*
|
@@ -41,6 +41,7 @@
|
|
41
41
|
* - Area lines are not drawn
|
42
42
|
* - Lines are not drawn on scatter charts
|
43
43
|
* - Zones and negativeColor don't work
|
44
|
+
* - Dash styles are not rendered on lines.
|
44
45
|
* - Columns are always one pixel wide. Don't set the threshold too low.
|
45
46
|
* - Disable animations
|
46
47
|
* - Marker shapes are not supported: markers will always be circles
|
@@ -49,7 +50,7 @@
|
|
49
50
|
* - Set extremes (min, max) explicitly on the axes in order for Highcharts to avoid computing extremes.
|
50
51
|
* - Set enableMouseTracking to false on the series to improve total rendering time.
|
51
52
|
* - The default threshold is set based on one series. If you have multiple, dense series, the combined
|
52
|
-
* number of points drawn gets higher, and you may want to set the threshold lower in order to
|
53
|
+
* number of points drawn gets higher, and you may want to set the threshold lower in order to
|
53
54
|
* use optimizations.
|
54
55
|
* - If drawing large scatter charts, it's beneficial to set the marker radius to a value
|
55
56
|
* less than 1. This is to add additional spacing to make the chart more readable.
|
@@ -62,11 +63,11 @@
|
|
62
63
|
* Settings
|
63
64
|
* There are two ways of setting the boost threshold:
|
64
65
|
* - Per. series: boost based on number of points in individual series
|
65
|
-
* - Per. chart: boost based on the number of series
|
66
|
+
* - Per. chart: boost based on the number of series
|
66
67
|
*
|
67
68
|
* To set the series boost threshold, set seriesBoostThreshold on the chart object.
|
68
69
|
* To set the series-specific threshold, set boostThreshold on the series object.
|
69
|
-
*
|
70
|
+
*
|
70
71
|
* In addition, the following can be set in the boost object:
|
71
72
|
* {
|
72
73
|
* //Wether or not to use alpha blending
|
@@ -93,10 +94,10 @@
|
|
93
94
|
*
|
94
95
|
* Setting to e.g. 20 will cause the whole chart to enter boost mode
|
95
96
|
* if there are 20 or more series active. When the chart is in boost mode,
|
96
|
-
* every series in it will be rendered to a common canvas. This offers
|
97
|
+
* every series in it will be rendered to a common canvas. This offers
|
97
98
|
* a significant speed improvment in charts with a very high
|
98
99
|
* amount of series.
|
99
|
-
*
|
100
|
+
*
|
100
101
|
* Note: only available when including the boost module.
|
101
102
|
*
|
102
103
|
* @default null
|
@@ -359,7 +360,7 @@
|
|
359
360
|
////////////////////////////////////////////////////////////////////////////////
|
360
361
|
// START OF WEBGL ABSTRACTIONS
|
361
362
|
|
362
|
-
/*
|
363
|
+
/*
|
363
364
|
* A static shader mimicing axis translation functions found in parts/Axis
|
364
365
|
* @param gl {WebGLContext} - the context in which the shader is active
|
365
366
|
*/
|
@@ -665,7 +666,7 @@
|
|
665
666
|
|
666
667
|
////////////////////////////////////////////////////////////////////////////
|
667
668
|
|
668
|
-
/*
|
669
|
+
/*
|
669
670
|
* Enable/disable circle drawing
|
670
671
|
*/
|
671
672
|
function setDrawAsCircle(flag) {
|
@@ -680,7 +681,7 @@
|
|
680
681
|
gl.uniform1i(isCircleUniform, 0);
|
681
682
|
}
|
682
683
|
|
683
|
-
/*
|
684
|
+
/*
|
684
685
|
* Set bubble uniforms
|
685
686
|
* @param series {Highcharts.Series} - the series to use
|
686
687
|
*/
|
@@ -737,7 +738,7 @@
|
|
737
738
|
|
738
739
|
/*
|
739
740
|
* Set the perspective matrix
|
740
|
-
* @param m {Matrix4x4} - the matrix
|
741
|
+
* @param m {Matrix4x4} - the matrix
|
741
742
|
*/
|
742
743
|
function setPMatrix(m) {
|
743
744
|
gl.uniformMatrix4fv(pUniform, false, m);
|
@@ -790,8 +791,8 @@
|
|
790
791
|
};
|
791
792
|
}
|
792
793
|
|
793
|
-
/*
|
794
|
-
* Vertex Buffer abstraction
|
794
|
+
/*
|
795
|
+
* Vertex Buffer abstraction
|
795
796
|
* A vertex buffer is a set of vertices which are passed to the GPU
|
796
797
|
* in a single call.
|
797
798
|
* @param gl {WebGLContext} - the context in which to create the buffer
|
@@ -813,8 +814,8 @@
|
|
813
814
|
}
|
814
815
|
}
|
815
816
|
|
816
|
-
/*
|
817
|
-
* Build the buffer
|
817
|
+
/*
|
818
|
+
* Build the buffer
|
818
819
|
* @param dataIn {Array<float>} - a 0 padded array of indices
|
819
820
|
* @param attrib {String} - the name of the Attribute to bind the buffer to
|
820
821
|
* @param dataComponents {Integer} - the number of components per. indice
|
@@ -850,7 +851,7 @@
|
|
850
851
|
return true;
|
851
852
|
}
|
852
853
|
|
853
|
-
/*
|
854
|
+
/*
|
854
855
|
* Bind the buffer
|
855
856
|
*/
|
856
857
|
function bind() {
|
@@ -865,8 +866,8 @@
|
|
865
866
|
//gl.enableVertexAttribArray(vertAttribute);
|
866
867
|
}
|
867
868
|
|
868
|
-
/*
|
869
|
-
* Render the buffer
|
869
|
+
/*
|
870
|
+
* Render the buffer
|
870
871
|
* @param from {Integer} - the start indice
|
871
872
|
* @param to {Integer} - the end indice
|
872
873
|
* @param drawMode {String} - the draw mode
|
@@ -902,7 +903,7 @@
|
|
902
903
|
}
|
903
904
|
|
904
905
|
function push(x, y, a, b) {
|
905
|
-
if (preAllocated) { // && iterator <= preAllocated.length - 4) {
|
906
|
+
if (preAllocated) { // && iterator <= preAllocated.length - 4) {
|
906
907
|
preAllocated[++iterator] = x;
|
907
908
|
preAllocated[++iterator] = y;
|
908
909
|
preAllocated[++iterator] = a;
|
@@ -918,7 +919,7 @@
|
|
918
919
|
size *= 4;
|
919
920
|
iterator = -1;
|
920
921
|
|
921
|
-
//if (!preAllocated || (preAllocated && preAllocated.length !== size)) {
|
922
|
+
//if (!preAllocated || (preAllocated && preAllocated.length !== size)) {
|
922
923
|
preAllocated = new Float32Array(size);
|
923
924
|
//}
|
924
925
|
}
|
@@ -1053,7 +1054,7 @@
|
|
1053
1054
|
vbuffer.allocate(s);
|
1054
1055
|
}
|
1055
1056
|
|
1056
|
-
/*
|
1057
|
+
/*
|
1057
1058
|
* Returns an orthographic perspective matrix
|
1058
1059
|
* @param {number} width - the width of the viewport in pixels
|
1059
1060
|
* @param {number} height - the height of the viewport in pixels
|
@@ -1086,7 +1087,7 @@
|
|
1086
1087
|
|
1087
1088
|
/*
|
1088
1089
|
* Push data for a single series
|
1089
|
-
* This calculates additional vertices and transforms the data to be
|
1090
|
+
* This calculates additional vertices and transforms the data to be
|
1090
1091
|
* aligned correctly in memory
|
1091
1092
|
*/
|
1092
1093
|
function pushSeriesData(series, inst) {
|
@@ -1112,12 +1113,12 @@
|
|
1112
1113
|
// yBottom = chart.yAxis[0].getThreshold(threshold),
|
1113
1114
|
// hasThreshold = isNumber(threshold),
|
1114
1115
|
// colorByPoint = series.options.colorByPoint,
|
1115
|
-
// This is required for color by point, so make sure this is
|
1116
|
+
// This is required for color by point, so make sure this is
|
1116
1117
|
// uncommented if enabling that
|
1117
1118
|
// colorIndex = 0,
|
1118
1119
|
// Required for color axis support
|
1119
|
-
// caxis,
|
1120
|
-
// connectNulls = options.connectNulls,
|
1120
|
+
// caxis,
|
1121
|
+
// connectNulls = options.connectNulls,
|
1121
1122
|
// For some reason eslint doesn't pick up that this is actually used
|
1122
1123
|
maxVal, //eslint-disable-line no-unused-vars
|
1123
1124
|
points = series.points || false,
|
@@ -1210,7 +1211,7 @@
|
|
1210
1211
|
swidth,
|
1211
1212
|
pointAttr;
|
1212
1213
|
|
1213
|
-
if (plotY !== undefined && !isNaN(plotY) && point.y !== null) {
|
1214
|
+
if (typeof plotY !== 'undefined' && !isNaN(plotY) && point.y !== null) {
|
1214
1215
|
shapeArgs = point.shapeArgs;
|
1215
1216
|
|
1216
1217
|
|
@@ -1225,10 +1226,10 @@
|
|
1225
1226
|
color[2] /= 255.0;
|
1226
1227
|
|
1227
1228
|
// So there are two ways of doing this. Either we can
|
1228
|
-
// create a rectangle of two triangles, or we can do a
|
1229
|
-
// point and use point size. Latter is faster, but
|
1229
|
+
// create a rectangle of two triangles, or we can do a
|
1230
|
+
// point and use point size. Latter is faster, but
|
1230
1231
|
// only supports squares. So we're doing triangles.
|
1231
|
-
// We could also use one color per. vertice to get
|
1232
|
+
// We could also use one color per. vertice to get
|
1232
1233
|
// better color interpolation.
|
1233
1234
|
|
1234
1235
|
// If there's stroking, we do an additional rect
|
@@ -1255,6 +1256,18 @@
|
|
1255
1256
|
// swidth = 0;
|
1256
1257
|
// }
|
1257
1258
|
|
1259
|
+
// Fixes issues with inverted heatmaps (see #6981)
|
1260
|
+
// The root cause is that the coordinate system is flipped.
|
1261
|
+
// In other words, instead of [0,0] being top-left, it's bottom-right.
|
1262
|
+
// This causes a vertical and horizontal flip in the resulting image,
|
1263
|
+
// making it rotated 180 degrees.
|
1264
|
+
if (series.type === 'heatmap' && chart.inverted) {
|
1265
|
+
shapeArgs.x = xAxis.len - shapeArgs.x;
|
1266
|
+
shapeArgs.y = yAxis.len - shapeArgs.y;
|
1267
|
+
shapeArgs.width = -shapeArgs.width;
|
1268
|
+
shapeArgs.height = -shapeArgs.height;
|
1269
|
+
}
|
1270
|
+
|
1258
1271
|
pushRect(
|
1259
1272
|
shapeArgs.x + swidth,
|
1260
1273
|
shapeArgs.y + swidth,
|
@@ -1273,7 +1286,7 @@
|
|
1273
1286
|
// if (H.ColorAxis && a instanceof H.ColorAxis) {
|
1274
1287
|
// caxis = a;
|
1275
1288
|
// }
|
1276
|
-
// });
|
1289
|
+
// });
|
1277
1290
|
|
1278
1291
|
each(sdata, function(d, i) {
|
1279
1292
|
var x,
|
@@ -1462,7 +1475,7 @@
|
|
1462
1475
|
);
|
1463
1476
|
|
1464
1477
|
// Uncomment this to support color axis.
|
1465
|
-
// if (caxis) {
|
1478
|
+
// if (caxis) {
|
1466
1479
|
// color = H.color(caxis.toColor(y)).rgba;
|
1467
1480
|
|
1468
1481
|
// inst.colorData.push(color[0] / 255.0);
|
@@ -1515,7 +1528,7 @@
|
|
1515
1528
|
}
|
1516
1529
|
|
1517
1530
|
if (settings.timeSeriesProcessing) {
|
1518
|
-
console.time('building ' + s.type + ' series'); //eslint-disable-line no-console
|
1531
|
+
console.time('building ' + s.type + ' series'); //eslint-disable-line no-console
|
1519
1532
|
}
|
1520
1533
|
|
1521
1534
|
series.push({
|
@@ -1547,7 +1560,7 @@
|
|
1547
1560
|
pushSeriesData(s, series[series.length - 1]);
|
1548
1561
|
|
1549
1562
|
if (settings.timeSeriesProcessing) {
|
1550
|
-
console.timeEnd('building ' + s.type + ' series'); //eslint-disable-line no-console
|
1563
|
+
console.timeEnd('building ' + s.type + ' series'); //eslint-disable-line no-console
|
1551
1564
|
}
|
1552
1565
|
}
|
1553
1566
|
|
@@ -1598,7 +1611,7 @@
|
|
1598
1611
|
shader.setUniform('yAxisCVSCoord', !axis.horiz);
|
1599
1612
|
}
|
1600
1613
|
|
1601
|
-
/*
|
1614
|
+
/*
|
1602
1615
|
* Set the translation threshold
|
1603
1616
|
* @param has {boolean} - has threshold flag
|
1604
1617
|
* @param translation {Float} - the threshold
|
@@ -1608,8 +1621,8 @@
|
|
1608
1621
|
shader.setUniform('translatedThreshold', translation);
|
1609
1622
|
}
|
1610
1623
|
|
1611
|
-
/*
|
1612
|
-
* Render the data
|
1624
|
+
/*
|
1625
|
+
* Render the data
|
1613
1626
|
* This renders all pushed series.
|
1614
1627
|
*/
|
1615
1628
|
function render(chart) {
|
@@ -1768,7 +1781,7 @@
|
|
1768
1781
|
}
|
1769
1782
|
}
|
1770
1783
|
|
1771
|
-
/*
|
1784
|
+
/*
|
1772
1785
|
* Render the data when ready
|
1773
1786
|
*/
|
1774
1787
|
function renderWhenReady(chart) {
|
@@ -1787,7 +1800,7 @@
|
|
1787
1800
|
}
|
1788
1801
|
}
|
1789
1802
|
|
1790
|
-
/*
|
1803
|
+
/*
|
1791
1804
|
* Set the viewport size in pixels
|
1792
1805
|
* Creates an orthographic perspective matrix and applies it.
|
1793
1806
|
* @param w {Integer} - the width of the viewport
|
@@ -1806,8 +1819,8 @@
|
|
1806
1819
|
shader.setPMatrix(orthoMatrix(width, height));
|
1807
1820
|
}
|
1808
1821
|
|
1809
|
-
/*
|
1810
|
-
* Init OpenGL
|
1822
|
+
/*
|
1823
|
+
* Init OpenGL
|
1811
1824
|
* @param canvas {HTMLCanvas} - the canvas to render to
|
1812
1825
|
*/
|
1813
1826
|
function init(canvas, noFlush) {
|
@@ -1826,7 +1839,7 @@
|
|
1826
1839
|
}
|
1827
1840
|
|
1828
1841
|
if (settings.timeSetup) {
|
1829
|
-
console.time('gl setup'); //eslint-disable-line no-console
|
1842
|
+
console.time('gl setup'); //eslint-disable-line no-console
|
1830
1843
|
}
|
1831
1844
|
|
1832
1845
|
for (; i < contexts.length; i++) {
|
@@ -1850,7 +1863,7 @@
|
|
1850
1863
|
gl.disable(gl.DEPTH_TEST);
|
1851
1864
|
gl.depthMask(gl.FALSE);
|
1852
1865
|
|
1853
|
-
shader = GLShader(gl); //eslint-disable-line new-cap
|
1866
|
+
shader = GLShader(gl); //eslint-disable-line new-cap
|
1854
1867
|
vbuffer = GLVertexBuffer(gl, shader); //eslint-disable-line new-cap
|
1855
1868
|
|
1856
1869
|
textureIsReady = false;
|
@@ -1901,8 +1914,8 @@
|
|
1901
1914
|
return true;
|
1902
1915
|
}
|
1903
1916
|
|
1904
|
-
/*
|
1905
|
-
* Check if we have a valid OGL context
|
1917
|
+
/*
|
1918
|
+
* Check if we have a valid OGL context
|
1906
1919
|
* @returns {Boolean} - true if the context is valid
|
1907
1920
|
*/
|
1908
1921
|
function valid() {
|
@@ -1921,7 +1934,11 @@
|
|
1921
1934
|
vbuffer.destroy();
|
1922
1935
|
shader.destroy();
|
1923
1936
|
if (gl) {
|
1924
|
-
|
1937
|
+
if (circleTextureHandle) {
|
1938
|
+
gl.deleteTexture(circleTextureHandle);
|
1939
|
+
}
|
1940
|
+
gl.canvas.width = 1;
|
1941
|
+
gl.canvas.height = 1;
|
1925
1942
|
}
|
1926
1943
|
}
|
1927
1944
|
|
@@ -1953,7 +1970,7 @@
|
|
1953
1970
|
// END OF WEBGL ABSTRACTIONS
|
1954
1971
|
////////////////////////////////////////////////////////////////////////////////
|
1955
1972
|
|
1956
|
-
/*
|
1973
|
+
/*
|
1957
1974
|
* Create a canvas + context and attach it to the target
|
1958
1975
|
* @param target {Highcharts.Chart|Highcharts.Series} - the canvas target
|
1959
1976
|
* @param chart {Highcharts.Chart} - the chart
|
@@ -1997,7 +2014,7 @@
|
|
1997
2014
|
|
1998
2015
|
target.image.clip(target.boostClipRect);
|
1999
2016
|
|
2000
|
-
if (target.inverted) {
|
2017
|
+
if (target.inverted || (target.chart && target.chart.inverted)) {
|
2001
2018
|
each(['moveTo', 'lineTo', 'rect', 'arc'], function(fn) {
|
2002
2019
|
wrap(false, fn, swapXY);
|
2003
2020
|
});
|
@@ -2035,6 +2052,10 @@
|
|
2035
2052
|
target.image.attr({
|
2036
2053
|
href: target.canvas.toDataURL('image/png')
|
2037
2054
|
});
|
2055
|
+
|
2056
|
+
// Destroy gl context when we're done with it
|
2057
|
+
target.ogl.destroy();
|
2058
|
+
target.ogl = false;
|
2038
2059
|
}); //eslint-disable-line new-cap
|
2039
2060
|
|
2040
2061
|
target.ogl.init(target.canvas);
|
@@ -2052,7 +2073,7 @@
|
|
2052
2073
|
}
|
2053
2074
|
|
2054
2075
|
/*
|
2055
|
-
* Performs the actual render if the renderer is
|
2076
|
+
* Performs the actual render if the renderer is
|
2056
2077
|
* attached to the series.
|
2057
2078
|
* @param renderer {OGLRenderer} - the renderer
|
2058
2079
|
* @param series {Highcharts.Series} - the series
|
@@ -2085,7 +2106,7 @@
|
|
2085
2106
|
* @param finalFunc {Function} - the callback to call when done
|
2086
2107
|
* @param chunkSize {Number} - the number of iterations per. timeout
|
2087
2108
|
* @param i {Number} - the current index
|
2088
|
-
* @param noTimeout {Boolean} - set to true to skip timeouts
|
2109
|
+
* @param noTimeout {Boolean} - set to true to skip timeouts
|
2089
2110
|
*/
|
2090
2111
|
function eachAsync(arr, fn, finalFunc, chunkSize, i, noTimeout) {
|
2091
2112
|
i = i || 0;
|
@@ -2104,7 +2125,7 @@
|
|
2104
2125
|
if (noTimeout) {
|
2105
2126
|
eachAsync(arr, fn, finalFunc, chunkSize, i, noTimeout);
|
2106
2127
|
} else if (win.requestAnimationFrame) {
|
2107
|
-
//If available, do requestAnimationFrame - shaves off a few ms
|
2128
|
+
//If available, do requestAnimationFrame - shaves off a few ms
|
2108
2129
|
win.requestAnimationFrame(function() {
|
2109
2130
|
eachAsync(arr, fn, finalFunc, chunkSize, i);
|
2110
2131
|
});
|
@@ -2124,7 +2145,7 @@
|
|
2124
2145
|
// Following is the parts of the boost that's common between OGL/Legacy
|
2125
2146
|
|
2126
2147
|
/**
|
2127
|
-
* Return a full Point object based on the index.
|
2148
|
+
* Return a full Point object based on the index.
|
2128
2149
|
* The boost module uses stripped point objects for performance reasons.
|
2129
2150
|
* @param {Number} boostPoint A stripped-down point object
|
2130
2151
|
* @returns {Object} A Point object as per http://api.highcharts.com/highcharts#Point
|
@@ -2162,8 +2183,8 @@
|
|
2162
2183
|
});
|
2163
2184
|
|
2164
2185
|
/**
|
2165
|
-
* Extend series.destroy to also remove the fake k-d-tree points (#5137).
|
2166
|
-
* Normally this is handled by Series.destroy that calls Point.destroy,
|
2186
|
+
* Extend series.destroy to also remove the fake k-d-tree points (#5137).
|
2187
|
+
* Normally this is handled by Series.destroy that calls Point.destroy,
|
2167
2188
|
* but the fake search points are not registered like that.
|
2168
2189
|
*/
|
2169
2190
|
wrap(Series.prototype, 'destroy', function(proceed) {
|
@@ -2189,7 +2210,7 @@
|
|
2189
2210
|
|
2190
2211
|
/**
|
2191
2212
|
* Do not compute extremes when min and max are set.
|
2192
|
-
* If we use this in the core, we can add the hook
|
2213
|
+
* If we use this in the core, we can add the hook
|
2193
2214
|
* to hasExtremes to the methods directly.
|
2194
2215
|
*/
|
2195
2216
|
wrap(Series.prototype, 'getExtremes', function(proceed) {
|
@@ -2219,8 +2240,8 @@
|
|
2219
2240
|
);
|
2220
2241
|
|
2221
2242
|
/**
|
2222
|
-
* Override a bunch of methods the same way. If the number of points is
|
2223
|
-
* below the threshold, run the original method. If not, check for a
|
2243
|
+
* Override a bunch of methods the same way. If the number of points is
|
2244
|
+
* below the threshold, run the original method. If not, check for a
|
2224
2245
|
* canvas version or do nothing.
|
2225
2246
|
*
|
2226
2247
|
* Note that we're not overriding any of these for heatmaps.
|
@@ -2273,6 +2294,10 @@
|
|
2273
2294
|
if (seriesTypes.treemap) {
|
2274
2295
|
wrap(seriesTypes.treemap.prototype, method, branch);
|
2275
2296
|
}
|
2297
|
+
|
2298
|
+
if (seriesTypes.heatmap) {
|
2299
|
+
wrap(seriesTypes.heatmap.prototype, method, branch);
|
2300
|
+
}
|
2276
2301
|
}
|
2277
2302
|
});
|
2278
2303
|
|
@@ -2320,14 +2345,12 @@
|
|
2320
2345
|
renderIfNotSeriesBoosting(renderer, this);
|
2321
2346
|
}
|
2322
2347
|
|
2323
|
-
|
2324
|
-
|
2325
2348
|
////////////////////////////////////////////////////////////////////////////////
|
2326
2349
|
// We're wrapped in a closure, so just return if there's no webgl support
|
2327
2350
|
|
2328
2351
|
if (!hasWebGLSupport()) {
|
2329
2352
|
if (typeof H.initCanvasBoost !== 'undefined') {
|
2330
|
-
// Fallback to canvas boost
|
2353
|
+
// Fallback to canvas boost
|
2331
2354
|
H.initCanvasBoost();
|
2332
2355
|
} else {
|
2333
2356
|
H.error(26);
|
@@ -2338,7 +2361,7 @@
|
|
2338
2361
|
// GL-SPECIFIC WRAPPINGS FOLLOWS
|
2339
2362
|
|
2340
2363
|
/** If the series is a heatmap or treemap, or if the series is not boosting
|
2341
|
-
* do the default behaviour. Otherwise, process if the series has no
|
2364
|
+
* do the default behaviour. Otherwise, process if the series has no
|
2342
2365
|
* extremes.
|
2343
2366
|
*/
|
2344
2367
|
wrap(Series.prototype, 'processData', function(proceed) {
|
@@ -2357,7 +2380,7 @@
|
|
2357
2380
|
H.extend(Series.prototype, {
|
2358
2381
|
pointRange: 0,
|
2359
2382
|
directTouch: false,
|
2360
|
-
allowDG: false, // No data grouping, let boost handle large data
|
2383
|
+
allowDG: false, // No data grouping, let boost handle large data
|
2361
2384
|
hasExtremes: function(checkX) {
|
2362
2385
|
var options = this.options,
|
2363
2386
|
data = options.data,
|
@@ -2370,7 +2393,7 @@
|
|
2370
2393
|
},
|
2371
2394
|
|
2372
2395
|
/**
|
2373
|
-
* If implemented in the core, parts of this can probably be
|
2396
|
+
* If implemented in the core, parts of this can probably be
|
2374
2397
|
* shared with other similar methods in Highcharts.
|
2375
2398
|
*/
|
2376
2399
|
destroyGraphics: function() {
|
@@ -2436,8 +2459,8 @@
|
|
2436
2459
|
//Shaves off about 60ms compared to repeated concatination
|
2437
2460
|
index = clientX + ',' + plotY;
|
2438
2461
|
|
2439
|
-
// The k-d tree requires series points.
|
2440
|
-
// Reduce the amount of points, since the time to build the
|
2462
|
+
// The k-d tree requires series points.
|
2463
|
+
// Reduce the amount of points, since the time to build the
|
2441
2464
|
// tree increases exponentially.
|
2442
2465
|
if (enableMouseTracking && !pointTaken[index]) {
|
2443
2466
|
pointTaken[index] = true;
|
@@ -2491,7 +2514,7 @@
|
|
2491
2514
|
|
2492
2515
|
points = this.points = [];
|
2493
2516
|
|
2494
|
-
// Do not start building while drawing
|
2517
|
+
// Do not start building while drawing
|
2495
2518
|
series.buildKDTree = noop;
|
2496
2519
|
|
2497
2520
|
if (renderer) {
|
@@ -2589,7 +2612,7 @@
|
|
2589
2612
|
|
2590
2613
|
function doneProcessing() {
|
2591
2614
|
fireEvent(series, 'renderedCanvas');
|
2592
|
-
// Pass tests in Pointer.
|
2615
|
+
// Pass tests in Pointer.
|
2593
2616
|
// Replace this with a single property, and replace when zooming
|
2594
2617
|
// in below boostThreshold.
|
2595
2618
|
series.directTouch = false;
|