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
|
* Boost module
|
4
4
|
*
|
5
5
|
* (c) 2010-2017 Highsoft AS
|
@@ -135,12 +135,7 @@
|
|
135
135
|
}
|
136
136
|
};
|
137
137
|
|
138
|
-
target.boostClipRect = chart.renderer.clipRect(
|
139
|
-
chart.plotLeft,
|
140
|
-
chart.plotTop,
|
141
|
-
chart.plotWidth,
|
142
|
-
chart.chartHeight
|
143
|
-
);
|
138
|
+
target.boostClipRect = chart.renderer.clipRect();
|
144
139
|
|
145
140
|
target.renderTarget.clip(target.boostClipRect);
|
146
141
|
|
@@ -165,12 +160,7 @@
|
|
165
160
|
href: ''
|
166
161
|
});
|
167
162
|
|
168
|
-
target.boostClipRect.attr(
|
169
|
-
x: chart.plotLeft,
|
170
|
-
y: chart.plotTop,
|
171
|
-
width: chart.plotWidth,
|
172
|
-
height: chart.chartHeight
|
173
|
-
});
|
163
|
+
target.boostClipRect.attr(chart.getBoostClipRect(target));
|
174
164
|
|
175
165
|
return ctx;
|
176
166
|
},
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v6.0.
|
2
|
+
* @license Highcharts JS v6.0.3 (2017-11-14)
|
3
3
|
* Boost module
|
4
4
|
*
|
5
5
|
* (c) 2010-2017 Highsoft AS
|
@@ -548,6 +548,32 @@
|
|
548
548
|
shouldForceChartSeriesBoosting(this);
|
549
549
|
};
|
550
550
|
|
551
|
+
/*
|
552
|
+
* Get the clip rectangle for a target, either a series or the chart. For the
|
553
|
+
* chart, we need to consider the maximum extent of its Y axes, in case of
|
554
|
+
* Highstock panes and navigator.
|
555
|
+
*/
|
556
|
+
Chart.prototype.getBoostClipRect = function(target) {
|
557
|
+
var clipBox = {
|
558
|
+
x: this.plotLeft,
|
559
|
+
y: this.plotTop,
|
560
|
+
width: this.plotWidth,
|
561
|
+
height: this.plotHeight
|
562
|
+
};
|
563
|
+
|
564
|
+
if (target === this) {
|
565
|
+
each(this.yAxis, function(yAxis) {
|
566
|
+
clipBox.y = Math.min(yAxis.pos, clipBox.y);
|
567
|
+
clipBox.height = Math.max(
|
568
|
+
yAxis.pos - this.plotTop + yAxis.len,
|
569
|
+
clipBox.height
|
570
|
+
);
|
571
|
+
}, this);
|
572
|
+
}
|
573
|
+
|
574
|
+
return clipBox;
|
575
|
+
};
|
576
|
+
|
551
577
|
/*
|
552
578
|
* Returns true if the series is in boost mode
|
553
579
|
* @param series {Highchart.Series} - the series to check
|
@@ -2395,12 +2421,7 @@
|
|
2395
2421
|
}
|
2396
2422
|
};
|
2397
2423
|
|
2398
|
-
target.boostClipRect = chart.renderer.clipRect(
|
2399
|
-
chart.plotLeft,
|
2400
|
-
chart.plotTop,
|
2401
|
-
chart.plotWidth,
|
2402
|
-
chart.chartHeight
|
2403
|
-
);
|
2424
|
+
target.boostClipRect = chart.renderer.clipRect();
|
2404
2425
|
|
2405
2426
|
(target.renderTargetFo || target.renderTarget).clip(target.boostClipRect);
|
2406
2427
|
|
@@ -2414,12 +2435,7 @@
|
|
2414
2435
|
target.canvas.width = width;
|
2415
2436
|
target.canvas.height = height;
|
2416
2437
|
|
2417
|
-
target.boostClipRect.attr(
|
2418
|
-
x: chart.plotLeft,
|
2419
|
-
y: chart.plotTop,
|
2420
|
-
width: chart.plotWidth,
|
2421
|
-
height: chart.chartHeight
|
2422
|
-
});
|
2438
|
+
target.boostClipRect.attr(chart.getBoostClipRect(target));
|
2423
2439
|
|
2424
2440
|
target.boostResizeTarget();
|
2425
2441
|
target.boostClear();
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v6.0.
|
2
|
+
* @license Highcharts JS v6.0.3 (2017-11-14)
|
3
3
|
* Data module
|
4
4
|
*
|
5
5
|
* (c) 2012-2017 Torstein Honsi
|
@@ -132,13 +132,13 @@
|
|
132
132
|
*
|
133
133
|
* Valid options include:
|
134
134
|
*
|
135
|
-
* * `YYYY
|
135
|
+
* * `YYYY/mm/dd`
|
136
136
|
* * `dd/mm/YYYY`
|
137
137
|
* * `mm/dd/YYYY`
|
138
138
|
* * `dd/mm/YY`
|
139
139
|
* * `mm/dd/YY`
|
140
140
|
*
|
141
|
-
* @validvalue [undefined, "YYYY
|
141
|
+
* @validvalue [undefined, "YYYY/mm/dd", "dd/mm/YYYY", "mm/dd/YYYY", "dd/mm/YYYY", "dd/mm/YY", "mm/dd/YY"]
|
142
142
|
* @type {String}
|
143
143
|
* @see [data.parseDate](#data.parseDate)
|
144
144
|
* @sample {highcharts} highcharts/data/dateformat-auto/ Best guess date format
|
@@ -781,7 +781,7 @@
|
|
781
781
|
* data is the data to deduce a format based on
|
782
782
|
*/
|
783
783
|
function deduceDateFormat(data, limit) {
|
784
|
-
var format = 'YYYY
|
784
|
+
var format = 'YYYY/mm/dd',
|
785
785
|
thing,
|
786
786
|
guessedFormat,
|
787
787
|
calculatedFormat,
|
@@ -1225,7 +1225,7 @@
|
|
1225
1225
|
* custom date formats.
|
1226
1226
|
*/
|
1227
1227
|
dateFormats: {
|
1228
|
-
'YYYY
|
1228
|
+
'YYYY/mm/dd': {
|
1229
1229
|
regex: /^([0-9]{4})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{1,2})$/,
|
1230
1230
|
parser: function(match) {
|
1231
1231
|
return Date.UTC(+match[1], match[2] - 1, +match[3]);
|
@@ -1302,7 +1302,7 @@
|
|
1302
1302
|
|
1303
1303
|
if (!format) {
|
1304
1304
|
// The selected format is invalid
|
1305
|
-
format = this.dateFormats['YYYY
|
1305
|
+
format = this.dateFormats['YYYY/mm/dd'];
|
1306
1306
|
}
|
1307
1307
|
|
1308
1308
|
match = val.match(format.regex);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v6.0.
|
2
|
+
* @license Highcharts JS v6.0.3 (2017-11-14)
|
3
3
|
* Exporting module
|
4
4
|
*
|
5
5
|
* (c) 2010-2017 Torstein Honsi
|
@@ -118,16 +118,14 @@
|
|
118
118
|
});
|
119
119
|
|
120
120
|
// Add an event listener to handle the showTable option
|
121
|
-
Highcharts.Chart.prototype
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
)
|
128
|
-
|
129
|
-
}
|
130
|
-
});
|
121
|
+
Highcharts.addEvent(Highcharts.Chart.prototype, 'render', function() {
|
122
|
+
if (
|
123
|
+
this.options &&
|
124
|
+
this.options.exporting &&
|
125
|
+
this.options.exporting.showTable
|
126
|
+
) {
|
127
|
+
this.viewData();
|
128
|
+
}
|
131
129
|
});
|
132
130
|
|
133
131
|
// Set up key-to-axis bindings. This is used when the Y axis is datetime or
|
@@ -453,7 +451,7 @@
|
|
453
451
|
|
454
452
|
if (this.options.exporting.filename) {
|
455
453
|
name = this.options.exporting.filename;
|
456
|
-
} else if (this.title) {
|
454
|
+
} else if (this.title && this.title.textStr) {
|
457
455
|
name = this.title.textStr.replace(/ /g, '-').toLowerCase();
|
458
456
|
} else {
|
459
457
|
name = 'chart';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v6.0.
|
2
|
+
* @license Highcharts JS v6.0.3 (2017-11-14)
|
3
3
|
* Gantt series
|
4
4
|
*
|
5
5
|
* (c) 2016 Lars A. V. Cabrera
|
@@ -623,7 +623,8 @@
|
|
623
623
|
headerFormat: '<span style="font-size: 0.85em">{point.x} - {point.x2}</span><br/>',
|
624
624
|
pointFormat: '<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.yCategory}</b><br/>'
|
625
625
|
},
|
626
|
-
borderRadius: 3
|
626
|
+
borderRadius: 3,
|
627
|
+
pointRange: 0
|
627
628
|
/**
|
628
629
|
* A partial fill for each point, typically used to visualize how much of
|
629
630
|
* a task is performed. The partial fill object can be set either on series
|
@@ -646,7 +647,6 @@
|
|
646
647
|
|
647
648
|
}, {
|
648
649
|
type: 'xrange',
|
649
|
-
forceDL: true,
|
650
650
|
parallelArrays: ['x', 'x2', 'y'],
|
651
651
|
requireSorting: false,
|
652
652
|
animate: seriesTypes.line.prototype.animate,
|
@@ -708,7 +708,10 @@
|
|
708
708
|
partialFill,
|
709
709
|
inverted = this.chart.inverted,
|
710
710
|
borderWidth = pick(series.options.borderWidth, 1),
|
711
|
-
crisper = borderWidth % 2 / 2
|
711
|
+
crisper = borderWidth % 2 / 2,
|
712
|
+
dlLeft,
|
713
|
+
dlRight,
|
714
|
+
dlWidth;
|
712
715
|
|
713
716
|
if (minPointLength) {
|
714
717
|
widthDifference = minPointLength - length;
|
@@ -730,6 +733,23 @@
|
|
730
733
|
r: series.options.borderRadius
|
731
734
|
};
|
732
735
|
|
736
|
+
// Align data labels inside the shape and inside the plot area
|
737
|
+
dlLeft = point.shapeArgs.x;
|
738
|
+
dlRight = dlLeft + point.shapeArgs.width;
|
739
|
+
if (dlLeft < 0 || dlRight > xAxis.len) {
|
740
|
+
dlLeft = Math.min(xAxis.len, Math.max(0, dlLeft));
|
741
|
+
dlRight = Math.max(0, Math.min(dlRight, xAxis.len));
|
742
|
+
dlWidth = dlRight - dlLeft;
|
743
|
+
point.dlBox = merge(point.shapeArgs, {
|
744
|
+
x: dlLeft,
|
745
|
+
width: dlRight - dlLeft,
|
746
|
+
centerX: dlWidth ? dlWidth / 2 : null
|
747
|
+
});
|
748
|
+
|
749
|
+
} else {
|
750
|
+
point.dlBox = null;
|
751
|
+
}
|
752
|
+
|
733
753
|
// Tooltip position
|
734
754
|
point.tooltipPos[0] += inverted ? 0 : length / 2;
|
735
755
|
point.tooltipPos[1] -= inverted ? length / 2 : metrics.width / 2;
|
@@ -769,78 +789,6 @@
|
|
769
789
|
}, this);
|
770
790
|
},
|
771
791
|
|
772
|
-
/**
|
773
|
-
* Aligns an individual dataLabel.
|
774
|
-
*
|
775
|
-
* TODO: Do we need this for inside datalabels? Seems to work.
|
776
|
-
*
|
777
|
-
* @param {Object} point the point belonging to the dataLabel
|
778
|
-
* @param {Object} dataLabel the dataLabel configuration object
|
779
|
-
* @param {Object} options dataLabel options for the series
|
780
|
-
* @param {Object} alignTo
|
781
|
-
* @param {Boolean} isNew Wheter the label is new or already existed
|
782
|
-
* @return {void}
|
783
|
-
* /
|
784
|
-
alignDataLabel: function (point, dataLabel, options, alignTo, isNew) {
|
785
|
-
var chart = this.chart,
|
786
|
-
align = options.align,
|
787
|
-
inverted = chart.inverted,
|
788
|
-
plotX = pick(point.plotX, -9999),
|
789
|
-
plotY = pick(point.plotY, -9999),
|
790
|
-
verticalAlign = options.verticalAlign,
|
791
|
-
inside = options.inside,
|
792
|
-
pointBox = point.shapeArgs,
|
793
|
-
labelBox = dataLabel.getBBox(),
|
794
|
-
labelTextBox = dataLabel.text.getBBox(),
|
795
|
-
attr = {},
|
796
|
-
visible =
|
797
|
-
this.visible &&
|
798
|
-
(
|
799
|
-
labelTextBox.width <= pointBox.width &&
|
800
|
-
labelTextBox.height <= pointBox.height
|
801
|
-
) &&
|
802
|
-
(
|
803
|
-
this.forceDL ||
|
804
|
-
chart.isInsidePlot(plotX, Math.round(plotY), inverted)
|
805
|
-
);
|
806
|
-
|
807
|
-
if (visible) {
|
808
|
-
if (align === 'right') {
|
809
|
-
if (inside) {
|
810
|
-
attr.x = pointBox.x + pointBox.width - labelBox.width;
|
811
|
-
} else {
|
812
|
-
attr.x = pointBox.x - labelBox.width;
|
813
|
-
}
|
814
|
-
} else if (align === 'left') {
|
815
|
-
if (inside) {
|
816
|
-
attr.x = pointBox.x;
|
817
|
-
} else {
|
818
|
-
attr.x = pointBox.x + pointBox.width + labelBox.x;
|
819
|
-
}
|
820
|
-
} else { // Center
|
821
|
-
attr.x = pointBox.x + pointBox.width / 2 - labelBox.width / 2;
|
822
|
-
}
|
823
|
-
|
824
|
-
if (verticalAlign === 'bottom') {
|
825
|
-
if (inside) {
|
826
|
-
attr.y = pointBox.y + pointBox.height - labelBox.height;
|
827
|
-
} else {
|
828
|
-
attr.y = pointBox.y - labelBox.height;
|
829
|
-
}
|
830
|
-
} else if (verticalAlign === 'top') {
|
831
|
-
if (inside) {
|
832
|
-
attr.y = pointBox.y;
|
833
|
-
} else {
|
834
|
-
attr.y = pointBox.y + pointBox.height;
|
835
|
-
}
|
836
|
-
} else { // Middle
|
837
|
-
attr.y = pointBox.y + pointBox.height / 2 - labelBox.height / 2;
|
838
|
-
}
|
839
|
-
|
840
|
-
dataLabel[isNew ? 'attr' : 'animate'](attr);
|
841
|
-
}
|
842
|
-
},
|
843
|
-
*/
|
844
792
|
/**
|
845
793
|
* Draws a single point in the series. Needed for partial fill.
|
846
794
|
*
|
@@ -1142,7 +1090,7 @@
|
|
1142
1090
|
*/
|
1143
1091
|
|
1144
1092
|
}(Highcharts));
|
1145
|
-
(function(
|
1093
|
+
(function() {
|
1146
1094
|
/**
|
1147
1095
|
* (c) 2016 Highsoft AS
|
1148
1096
|
* Authors: Lars A. V. Cabrera
|
@@ -1150,5 +1098,5 @@
|
|
1150
1098
|
* License: www.highcharts.com/license
|
1151
1099
|
*/
|
1152
1100
|
//
|
1153
|
-
}(
|
1101
|
+
}());
|
1154
1102
|
}));
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v6.0.
|
2
|
+
* @license Highcharts JS v6.0.3 (2017-11-14)
|
3
3
|
* Plugin for displaying a message when there is no data visible in chart.
|
4
4
|
*
|
5
5
|
* (c) 2010-2017 Highsoft AS
|
@@ -228,23 +228,14 @@
|
|
228
228
|
};
|
229
229
|
|
230
230
|
/**
|
231
|
-
*
|
231
|
+
* Add event listener to handle automatic show or hide no-data message
|
232
232
|
*/
|
233
|
-
function handleNoData() {
|
234
|
-
|
235
|
-
|
236
|
-
chart.hideNoData();
|
233
|
+
H.addEvent(chartPrototype, 'render', function handleNoData() {
|
234
|
+
if (this.hasData()) {
|
235
|
+
this.hideNoData();
|
237
236
|
} else {
|
238
|
-
|
237
|
+
this.showNoData();
|
239
238
|
}
|
240
|
-
}
|
241
|
-
|
242
|
-
/**
|
243
|
-
* Add event listener to handle automatic display of no-data message
|
244
|
-
*/
|
245
|
-
chartPrototype.callbacks.push(function(chart) {
|
246
|
-
H.addEvent(chart, 'load', handleNoData);
|
247
|
-
H.addEvent(chart, 'redraw', handleNoData);
|
248
239
|
});
|
249
240
|
|
250
241
|
}(Highcharts));
|