highcharts-rails 6.0.2 → 6.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CCBYNC-LICENSE +103 -0
- data/CHANGELOG.markdown +31 -0
- data/Highsoft-LICENSE +1 -0
- data/{LICENSE → MIT-LICENSE} +0 -0
- data/README.markdown +6 -6
- data/app/assets/javascripts/highcharts.js +1635 -498
- data/app/assets/javascripts/highcharts/highcharts-3d.js +1 -1
- data/app/assets/javascripts/highcharts/highcharts-more.js +2 -2
- data/app/assets/javascripts/highcharts/modules/accessibility.js +1072 -824
- data/app/assets/javascripts/highcharts/modules/annotations.js +1 -1
- data/app/assets/javascripts/highcharts/modules/boost-canvas.js +3 -13
- data/app/assets/javascripts/highcharts/modules/boost.js +29 -13
- data/app/assets/javascripts/highcharts/modules/broken-axis.js +1 -1
- data/app/assets/javascripts/highcharts/modules/bullet.js +1 -1
- data/app/assets/javascripts/highcharts/modules/data.js +6 -6
- data/app/assets/javascripts/highcharts/modules/drag-panes.js +1 -1
- data/app/assets/javascripts/highcharts/modules/drilldown.js +1 -1
- data/app/assets/javascripts/highcharts/modules/export-data.js +10 -12
- data/app/assets/javascripts/highcharts/modules/exporting.js +1 -1
- data/app/assets/javascripts/highcharts/modules/funnel.js +1 -1
- data/app/assets/javascripts/highcharts/modules/gantt.js +26 -78
- data/app/assets/javascripts/highcharts/modules/grid-axis.js +1 -1
- data/app/assets/javascripts/highcharts/modules/heatmap.js +1 -1
- data/app/assets/javascripts/highcharts/modules/histogram-bellcurve.js +1 -1
- data/app/assets/javascripts/highcharts/modules/item-series.js +1 -1
- data/app/assets/javascripts/highcharts/modules/no-data-to-display.js +6 -15
- data/app/assets/javascripts/highcharts/modules/offline-exporting.js +2 -2
- data/app/assets/javascripts/highcharts/modules/oldie.js +2 -2
- data/app/assets/javascripts/highcharts/modules/overlapping-datalabels.js +41 -47
- data/app/assets/javascripts/highcharts/modules/parallel-coordinates.js +10 -6
- data/app/assets/javascripts/highcharts/modules/pareto.js +9 -1
- data/app/assets/javascripts/highcharts/modules/sankey.js +1 -1
- data/app/assets/javascripts/highcharts/modules/series-label.js +1 -1
- data/app/assets/javascripts/highcharts/modules/solid-gauge.js +1 -1
- data/app/assets/javascripts/highcharts/modules/static-scale.js +2 -6
- data/app/assets/javascripts/highcharts/modules/stock.js +96 -30
- data/app/assets/javascripts/highcharts/modules/streamgraph.js +1 -1
- data/app/assets/javascripts/highcharts/modules/sunburst.js +82 -50
- data/app/assets/javascripts/highcharts/modules/tilemap.js +1 -1
- data/app/assets/javascripts/highcharts/modules/treemap.js +10 -2
- data/app/assets/javascripts/highcharts/modules/variable-pie.js +1 -1
- data/app/assets/javascripts/highcharts/modules/variwide.js +1 -1
- data/app/assets/javascripts/highcharts/modules/vector.js +1 -1
- data/app/assets/javascripts/highcharts/modules/windbarb.js +1 -1
- data/app/assets/javascripts/highcharts/modules/wordcloud.js +7 -3
- data/app/assets/javascripts/highcharts/modules/xrange.js +24 -76
- data/app/assets/javascripts/highcharts/themes/avocado.js +1 -1
- data/app/assets/javascripts/highcharts/themes/dark-blue.js +1 -1
- data/app/assets/javascripts/highcharts/themes/dark-green.js +1 -1
- data/app/assets/javascripts/highcharts/themes/dark-unica.js +1 -1
- data/app/assets/javascripts/highcharts/themes/gray.js +1 -1
- data/app/assets/javascripts/highcharts/themes/grid-light.js +1 -1
- data/app/assets/javascripts/highcharts/themes/grid.js +1 -1
- data/app/assets/javascripts/highcharts/themes/sand-signika.js +1 -1
- data/app/assets/javascripts/highcharts/themes/skies.js +1 -1
- data/app/assets/javascripts/highcharts/themes/sunset.js +1 -1
- data/highcharts-rails.gemspec +1 -0
- data/lib/highcharts/version.rb +1 -1
- metadata +9 -4
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v6.0.
|
2
|
+
* @license Highcharts JS v6.0.3 (2017-11-14)
|
3
3
|
*
|
4
4
|
* (c) 2016 Highsoft AS
|
5
5
|
* Authors: Jon Arild Nygard
|
@@ -128,6 +128,9 @@
|
|
128
128
|
}
|
129
129
|
});
|
130
130
|
}
|
131
|
+
if (graphic) {
|
132
|
+
graphic.addClass(point.getClassName(), true);
|
133
|
+
}
|
131
134
|
};
|
132
135
|
return draw;
|
133
136
|
}());
|
@@ -209,6 +212,7 @@
|
|
209
212
|
point,
|
210
213
|
level,
|
211
214
|
colorByPoint,
|
215
|
+
colorIndexByPoint,
|
212
216
|
color,
|
213
217
|
colorIndex;
|
214
218
|
|
@@ -236,9 +240,14 @@
|
|
236
240
|
!!series.options.colorByPoint
|
237
241
|
)
|
238
242
|
);
|
243
|
+
|
239
244
|
if (getColorByPoint) {
|
240
|
-
|
245
|
+
colorIndexByPoint = point.index %
|
246
|
+
(colors ? colors.length : series.chart.options.chart.colorCount);
|
247
|
+
colorByPoint = colors && colors[colorIndexByPoint];
|
241
248
|
}
|
249
|
+
|
250
|
+
|
242
251
|
// Select either point color, level color or inherited color.
|
243
252
|
color = pick(
|
244
253
|
point && point.options.color,
|
@@ -247,9 +256,11 @@
|
|
247
256
|
parentColor && variation(parentColor),
|
248
257
|
series.color
|
249
258
|
);
|
259
|
+
|
250
260
|
colorIndex = pick(
|
251
261
|
point && point.options.colorIndex,
|
252
262
|
level && level.colorIndex,
|
263
|
+
colorIndexByPoint,
|
253
264
|
parentColorIndex,
|
254
265
|
options.colorIndex
|
255
266
|
);
|
@@ -1896,51 +1907,6 @@
|
|
1896
1907
|
};
|
1897
1908
|
};
|
1898
1909
|
|
1899
|
-
var setShapeArgs = function setShapeArgs(parent, parentValues) {
|
1900
|
-
var childrenValues = [],
|
1901
|
-
// Collect all children which should be included
|
1902
|
-
children = grep(parent.children, function(n) {
|
1903
|
-
return n.visible;
|
1904
|
-
});
|
1905
|
-
childrenValues = layoutAlgorithm(parentValues, children);
|
1906
|
-
each(children, function(child, index) {
|
1907
|
-
var values = childrenValues[index],
|
1908
|
-
angle = values.start + ((values.end - values.start) / 2),
|
1909
|
-
radius = values.innerR + ((values.r - values.innerR) / 2),
|
1910
|
-
isCircle = (
|
1911
|
-
values.innerR === 0 &&
|
1912
|
-
(values.end - values.start) > 6.28
|
1913
|
-
),
|
1914
|
-
center = (
|
1915
|
-
isCircle ? {
|
1916
|
-
x: values.x,
|
1917
|
-
y: values.y
|
1918
|
-
} :
|
1919
|
-
getEndPoint(values.x, values.y, angle, radius)
|
1920
|
-
),
|
1921
|
-
val = (
|
1922
|
-
child.val ?
|
1923
|
-
(
|
1924
|
-
child.childrenTotal > child.val ?
|
1925
|
-
child.childrenTotal :
|
1926
|
-
child.val
|
1927
|
-
) :
|
1928
|
-
child.childrenTotal
|
1929
|
-
);
|
1930
|
-
child.shapeArgs = merge(values, {
|
1931
|
-
plotX: center.x,
|
1932
|
-
plotY: center.y
|
1933
|
-
});
|
1934
|
-
child.values = merge(values, {
|
1935
|
-
val: val
|
1936
|
-
});
|
1937
|
-
// If node has children, then call method recursively
|
1938
|
-
if (child.children.length) {
|
1939
|
-
setShapeArgs(child, child.values);
|
1940
|
-
}
|
1941
|
-
});
|
1942
|
-
};
|
1943
|
-
|
1944
1910
|
var getDrillId = function getDrillId(point, idRoot, mapIdToNode) {
|
1945
1911
|
var drillId,
|
1946
1912
|
node = point.node,
|
@@ -2185,7 +2151,6 @@
|
|
2185
2151
|
level = levelMap[node.levelDynamic],
|
2186
2152
|
shapeExisting = point.shapeExisting || {},
|
2187
2153
|
shape = node.shapeArgs || {},
|
2188
|
-
attrStyle = series.pointAttribs(point, point.selected && 'select'),
|
2189
2154
|
animationInfo,
|
2190
2155
|
onComplete,
|
2191
2156
|
visible = !!(node.visible && node.shapeArgs);
|
@@ -2231,7 +2196,13 @@
|
|
2231
2196
|
}
|
2232
2197
|
point.draw({
|
2233
2198
|
animate: animationInfo.to,
|
2234
|
-
attr: extend(
|
2199
|
+
attr: extend(
|
2200
|
+
animationInfo.from,
|
2201
|
+
series.pointAttribs && series.pointAttribs(
|
2202
|
+
point,
|
2203
|
+
point.selected && 'select'
|
2204
|
+
)
|
2205
|
+
),
|
2235
2206
|
onComplete: onComplete,
|
2236
2207
|
group: group,
|
2237
2208
|
renderer: renderer,
|
@@ -2255,7 +2226,68 @@
|
|
2255
2226
|
Series.prototype.drawDataLabels.call(series);
|
2256
2227
|
}
|
2257
2228
|
},
|
2229
|
+
|
2258
2230
|
pointAttribs: seriesTypes.column.prototype.pointAttribs,
|
2231
|
+
|
2232
|
+
|
2233
|
+
/*
|
2234
|
+
* Set the shape arguments on the nodes. Recursive from root down.
|
2235
|
+
*/
|
2236
|
+
setShapeArgs: function(parent, parentValues) {
|
2237
|
+
var childrenValues = [],
|
2238
|
+
// Collect all children which should be included
|
2239
|
+
children = grep(parent.children, function(n) {
|
2240
|
+
return n.visible;
|
2241
|
+
});
|
2242
|
+
childrenValues = layoutAlgorithm(parentValues, children);
|
2243
|
+
each(children, function(child, index) {
|
2244
|
+
var values = childrenValues[index],
|
2245
|
+
angle = values.start + ((values.end - values.start) / 2),
|
2246
|
+
radius = values.innerR + ((values.r - values.innerR) / 2),
|
2247
|
+
isCircle = (
|
2248
|
+
values.innerR === 0 &&
|
2249
|
+
(values.end - values.start) > 6.28
|
2250
|
+
),
|
2251
|
+
center = (
|
2252
|
+
isCircle ? {
|
2253
|
+
x: values.x,
|
2254
|
+
y: values.y
|
2255
|
+
} :
|
2256
|
+
getEndPoint(values.x, values.y, angle, radius)
|
2257
|
+
),
|
2258
|
+
val = (
|
2259
|
+
child.val ?
|
2260
|
+
(
|
2261
|
+
child.childrenTotal > child.val ?
|
2262
|
+
child.childrenTotal :
|
2263
|
+
child.val
|
2264
|
+
) :
|
2265
|
+
child.childrenTotal
|
2266
|
+
),
|
2267
|
+
innerArcFraction = (values.end - values.start) / (2 * Math.PI),
|
2268
|
+
perimeter = 2 * Math.PI * values.innerR;
|
2269
|
+
|
2270
|
+
// The inner arc length is a convenience for data label filters.
|
2271
|
+
if (this.points[child.i]) {
|
2272
|
+
this.points[child.i].innerArcLength =
|
2273
|
+
innerArcFraction * perimeter;
|
2274
|
+
}
|
2275
|
+
|
2276
|
+
child.shapeArgs = merge(values, {
|
2277
|
+
plotX: center.x,
|
2278
|
+
plotY: center.y
|
2279
|
+
});
|
2280
|
+
child.values = merge(values, {
|
2281
|
+
val: val
|
2282
|
+
});
|
2283
|
+
// If node has children, then call method recursively
|
2284
|
+
if (child.children.length) {
|
2285
|
+
this.setShapeArgs(child, child.values);
|
2286
|
+
}
|
2287
|
+
}, this);
|
2288
|
+
},
|
2289
|
+
|
2290
|
+
|
2259
2291
|
translate: function translate() {
|
2260
2292
|
var series = this,
|
2261
2293
|
options = series.options,
|
@@ -2309,7 +2341,7 @@
|
|
2309
2341
|
x: positions[0],
|
2310
2342
|
y: positions[1]
|
2311
2343
|
};
|
2312
|
-
setShapeArgs(nodeTop, values);
|
2344
|
+
this.setShapeArgs(nodeTop, values);
|
2313
2345
|
},
|
2314
2346
|
|
2315
2347
|
/**
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v6.0.
|
2
|
+
* @license Highcharts JS v6.0.3 (2017-11-14)
|
3
3
|
*
|
4
4
|
* (c) 2014 Highsoft AS
|
5
5
|
* Authors: Jon Arild Nygard / Oystein Moseng
|
@@ -92,6 +92,7 @@
|
|
92
92
|
point,
|
93
93
|
level,
|
94
94
|
colorByPoint,
|
95
|
+
colorIndexByPoint,
|
95
96
|
color,
|
96
97
|
colorIndex;
|
97
98
|
|
@@ -119,9 +120,14 @@
|
|
119
120
|
!!series.options.colorByPoint
|
120
121
|
)
|
121
122
|
);
|
123
|
+
|
122
124
|
if (getColorByPoint) {
|
123
|
-
|
125
|
+
colorIndexByPoint = point.index %
|
126
|
+
(colors ? colors.length : series.chart.options.chart.colorCount);
|
127
|
+
colorByPoint = colors && colors[colorIndexByPoint];
|
124
128
|
}
|
129
|
+
|
130
|
+
|
125
131
|
// Select either point color, level color or inherited color.
|
126
132
|
color = pick(
|
127
133
|
point && point.options.color,
|
@@ -130,9 +136,11 @@
|
|
130
136
|
parentColor && variation(parentColor),
|
131
137
|
series.color
|
132
138
|
);
|
139
|
+
|
133
140
|
colorIndex = pick(
|
134
141
|
point && point.options.colorIndex,
|
135
142
|
level && level.colorIndex,
|
143
|
+
colorIndexByPoint,
|
136
144
|
parentColorIndex,
|
137
145
|
options.colorIndex
|
138
146
|
);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v6.0.
|
2
|
+
* @license Highcharts JS v6.0.3 (2017-11-14)
|
3
3
|
*
|
4
4
|
* (c) 2016 Highsoft AS
|
5
5
|
* Authors: Jon Arild Nygard
|
@@ -51,6 +51,9 @@
|
|
51
51
|
}
|
52
52
|
});
|
53
53
|
}
|
54
|
+
if (graphic) {
|
55
|
+
graphic.addClass(point.getClassName(), true);
|
56
|
+
}
|
54
57
|
};
|
55
58
|
return draw;
|
56
59
|
}());
|
@@ -468,7 +471,8 @@
|
|
468
471
|
fontFamily: 'Impact, sans-serif'
|
469
472
|
},
|
470
473
|
tooltip: {
|
471
|
-
followPointer: true
|
474
|
+
followPointer: true,
|
475
|
+
pointFormat: '<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.weight}</b><br/>'
|
472
476
|
}
|
473
477
|
};
|
474
478
|
|
@@ -530,7 +534,7 @@
|
|
530
534
|
each(data, function(point) {
|
531
535
|
var relativeWeight = 1 / maxWeight * point.weight,
|
532
536
|
css = extend({
|
533
|
-
fontSize: series.deriveFontSize(relativeWeight),
|
537
|
+
fontSize: series.deriveFontSize(relativeWeight) + 'px',
|
534
538
|
fill: point.color
|
535
539
|
}, options.style),
|
536
540
|
placement = placementStrategy(point, {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v6.0.
|
2
|
+
* @license Highcharts JS v6.0.3 (2017-11-14)
|
3
3
|
* X-range series
|
4
4
|
*
|
5
5
|
* (c) 2010-2017 Torstein Honsi, Lars A. V. Cabrera
|
@@ -93,7 +93,8 @@
|
|
93
93
|
headerFormat: '<span style="font-size: 0.85em">{point.x} - {point.x2}</span><br/>',
|
94
94
|
pointFormat: '<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.yCategory}</b><br/>'
|
95
95
|
},
|
96
|
-
borderRadius: 3
|
96
|
+
borderRadius: 3,
|
97
|
+
pointRange: 0
|
97
98
|
/**
|
98
99
|
* A partial fill for each point, typically used to visualize how much of
|
99
100
|
* a task is performed. The partial fill object can be set either on series
|
@@ -116,7 +117,6 @@
|
|
116
117
|
|
117
118
|
}, {
|
118
119
|
type: 'xrange',
|
119
|
-
forceDL: true,
|
120
120
|
parallelArrays: ['x', 'x2', 'y'],
|
121
121
|
requireSorting: false,
|
122
122
|
animate: seriesTypes.line.prototype.animate,
|
@@ -178,7 +178,10 @@
|
|
178
178
|
partialFill,
|
179
179
|
inverted = this.chart.inverted,
|
180
180
|
borderWidth = pick(series.options.borderWidth, 1),
|
181
|
-
crisper = borderWidth % 2 / 2
|
181
|
+
crisper = borderWidth % 2 / 2,
|
182
|
+
dlLeft,
|
183
|
+
dlRight,
|
184
|
+
dlWidth;
|
182
185
|
|
183
186
|
if (minPointLength) {
|
184
187
|
widthDifference = minPointLength - length;
|
@@ -200,6 +203,23 @@
|
|
200
203
|
r: series.options.borderRadius
|
201
204
|
};
|
202
205
|
|
206
|
+
// Align data labels inside the shape and inside the plot area
|
207
|
+
dlLeft = point.shapeArgs.x;
|
208
|
+
dlRight = dlLeft + point.shapeArgs.width;
|
209
|
+
if (dlLeft < 0 || dlRight > xAxis.len) {
|
210
|
+
dlLeft = Math.min(xAxis.len, Math.max(0, dlLeft));
|
211
|
+
dlRight = Math.max(0, Math.min(dlRight, xAxis.len));
|
212
|
+
dlWidth = dlRight - dlLeft;
|
213
|
+
point.dlBox = merge(point.shapeArgs, {
|
214
|
+
x: dlLeft,
|
215
|
+
width: dlRight - dlLeft,
|
216
|
+
centerX: dlWidth ? dlWidth / 2 : null
|
217
|
+
});
|
218
|
+
|
219
|
+
} else {
|
220
|
+
point.dlBox = null;
|
221
|
+
}
|
222
|
+
|
203
223
|
// Tooltip position
|
204
224
|
point.tooltipPos[0] += inverted ? 0 : length / 2;
|
205
225
|
point.tooltipPos[1] -= inverted ? length / 2 : metrics.width / 2;
|
@@ -239,78 +259,6 @@
|
|
239
259
|
}, this);
|
240
260
|
},
|
241
261
|
|
242
|
-
/**
|
243
|
-
* Aligns an individual dataLabel.
|
244
|
-
*
|
245
|
-
* TODO: Do we need this for inside datalabels? Seems to work.
|
246
|
-
*
|
247
|
-
* @param {Object} point the point belonging to the dataLabel
|
248
|
-
* @param {Object} dataLabel the dataLabel configuration object
|
249
|
-
* @param {Object} options dataLabel options for the series
|
250
|
-
* @param {Object} alignTo
|
251
|
-
* @param {Boolean} isNew Wheter the label is new or already existed
|
252
|
-
* @return {void}
|
253
|
-
* /
|
254
|
-
alignDataLabel: function (point, dataLabel, options, alignTo, isNew) {
|
255
|
-
var chart = this.chart,
|
256
|
-
align = options.align,
|
257
|
-
inverted = chart.inverted,
|
258
|
-
plotX = pick(point.plotX, -9999),
|
259
|
-
plotY = pick(point.plotY, -9999),
|
260
|
-
verticalAlign = options.verticalAlign,
|
261
|
-
inside = options.inside,
|
262
|
-
pointBox = point.shapeArgs,
|
263
|
-
labelBox = dataLabel.getBBox(),
|
264
|
-
labelTextBox = dataLabel.text.getBBox(),
|
265
|
-
attr = {},
|
266
|
-
visible =
|
267
|
-
this.visible &&
|
268
|
-
(
|
269
|
-
labelTextBox.width <= pointBox.width &&
|
270
|
-
labelTextBox.height <= pointBox.height
|
271
|
-
) &&
|
272
|
-
(
|
273
|
-
this.forceDL ||
|
274
|
-
chart.isInsidePlot(plotX, Math.round(plotY), inverted)
|
275
|
-
);
|
276
|
-
|
277
|
-
if (visible) {
|
278
|
-
if (align === 'right') {
|
279
|
-
if (inside) {
|
280
|
-
attr.x = pointBox.x + pointBox.width - labelBox.width;
|
281
|
-
} else {
|
282
|
-
attr.x = pointBox.x - labelBox.width;
|
283
|
-
}
|
284
|
-
} else if (align === 'left') {
|
285
|
-
if (inside) {
|
286
|
-
attr.x = pointBox.x;
|
287
|
-
} else {
|
288
|
-
attr.x = pointBox.x + pointBox.width + labelBox.x;
|
289
|
-
}
|
290
|
-
} else { // Center
|
291
|
-
attr.x = pointBox.x + pointBox.width / 2 - labelBox.width / 2;
|
292
|
-
}
|
293
|
-
|
294
|
-
if (verticalAlign === 'bottom') {
|
295
|
-
if (inside) {
|
296
|
-
attr.y = pointBox.y + pointBox.height - labelBox.height;
|
297
|
-
} else {
|
298
|
-
attr.y = pointBox.y - labelBox.height;
|
299
|
-
}
|
300
|
-
} else if (verticalAlign === 'top') {
|
301
|
-
if (inside) {
|
302
|
-
attr.y = pointBox.y;
|
303
|
-
} else {
|
304
|
-
attr.y = pointBox.y + pointBox.height;
|
305
|
-
}
|
306
|
-
} else { // Middle
|
307
|
-
attr.y = pointBox.y + pointBox.height / 2 - labelBox.height / 2;
|
308
|
-
}
|
309
|
-
|
310
|
-
dataLabel[isNew ? 'attr' : 'animate'](attr);
|
311
|
-
}
|
312
|
-
},
|
313
|
-
*/
|
314
262
|
/**
|
315
263
|
* Draws a single point in the series. Needed for partial fill.
|
316
264
|
*
|