highcharts-rails 5.0.14 → 6.0.0
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/CHANGELOG.markdown +60 -0
- data/Rakefile +54 -5
- data/app/assets/images/highcharts/earth.svg +432 -0
- data/app/assets/javascripts/highcharts.js +5103 -3147
- data/app/assets/javascripts/highcharts/highcharts-3d.js +930 -277
- data/app/assets/javascripts/highcharts/highcharts-more.js +1374 -249
- data/app/assets/javascripts/highcharts/lib/canvg.js +3073 -0
- data/app/assets/javascripts/highcharts/lib/jspdf.js +16624 -0
- data/app/assets/javascripts/highcharts/lib/rgbcolor.js +299 -0
- data/app/assets/javascripts/highcharts/lib/svg2pdf.js +3488 -0
- data/app/assets/javascripts/highcharts/modules/accessibility.js +654 -212
- data/app/assets/javascripts/highcharts/modules/annotations.js +1552 -274
- data/app/assets/javascripts/highcharts/modules/boost-canvas.js +773 -0
- data/app/assets/javascripts/highcharts/modules/boost.js +636 -210
- data/app/assets/javascripts/highcharts/modules/broken-axis.js +2 -2
- data/app/assets/javascripts/highcharts/modules/bullet.js +364 -0
- data/app/assets/javascripts/highcharts/modules/data.js +766 -38
- data/app/assets/javascripts/highcharts/modules/drag-panes.js +588 -0
- data/app/assets/javascripts/highcharts/modules/drilldown.js +106 -36
- data/app/assets/javascripts/highcharts/modules/export-data.js +597 -0
- data/app/assets/javascripts/highcharts/modules/exporting.js +424 -162
- data/app/assets/javascripts/highcharts/modules/funnel.js +144 -22
- data/app/assets/javascripts/highcharts/modules/gantt.js +1154 -0
- data/app/assets/javascripts/highcharts/modules/grid-axis.js +1 -1
- data/app/assets/javascripts/highcharts/modules/heatmap.js +406 -80
- data/app/assets/javascripts/highcharts/modules/histogram-bellcurve.js +513 -0
- data/app/assets/javascripts/highcharts/modules/item-series.js +126 -0
- data/app/assets/javascripts/highcharts/modules/no-data-to-display.js +31 -13
- data/app/assets/javascripts/highcharts/modules/offline-exporting.js +179 -57
- data/app/assets/javascripts/highcharts/modules/oldie.js +1378 -0
- data/app/assets/javascripts/highcharts/modules/overlapping-datalabels.js +8 -6
- data/app/assets/javascripts/highcharts/modules/parallel-coordinates.js +494 -0
- data/app/assets/javascripts/highcharts/modules/pareto.js +275 -0
- data/app/assets/javascripts/highcharts/modules/sankey.js +641 -0
- data/app/assets/javascripts/highcharts/modules/series-label.js +355 -145
- data/app/assets/javascripts/highcharts/modules/solid-gauge.js +122 -1
- data/app/assets/javascripts/highcharts/modules/static-scale.js +64 -0
- data/app/assets/javascripts/highcharts/modules/stock.js +1944 -676
- data/app/assets/javascripts/highcharts/modules/streamgraph.js +139 -0
- data/app/assets/javascripts/highcharts/modules/sunburst.js +2403 -0
- data/app/assets/javascripts/highcharts/modules/tilemap.js +1199 -0
- data/app/assets/javascripts/highcharts/modules/treemap.js +538 -134
- data/app/assets/javascripts/highcharts/modules/variable-pie.js +490 -0
- data/app/assets/javascripts/highcharts/modules/variwide.js +283 -0
- data/app/assets/javascripts/highcharts/modules/vector.js +294 -0
- data/app/assets/javascripts/highcharts/modules/windbarb.js +490 -0
- data/app/assets/javascripts/highcharts/modules/wordcloud.js +681 -0
- data/app/assets/javascripts/highcharts/modules/xrange.js +615 -0
- data/app/assets/javascripts/highcharts/themes/avocado.js +54 -0
- data/app/assets/javascripts/highcharts/themes/dark-blue.js +6 -6
- data/app/assets/javascripts/highcharts/themes/dark-green.js +6 -6
- data/app/assets/javascripts/highcharts/themes/dark-unica.js +6 -6
- data/app/assets/javascripts/highcharts/themes/gray.js +14 -10
- data/app/assets/javascripts/highcharts/themes/grid-light.js +6 -6
- data/app/assets/javascripts/highcharts/themes/grid.js +7 -5
- data/app/assets/javascripts/highcharts/themes/sand-signika.js +8 -7
- data/app/assets/javascripts/highcharts/themes/skies.js +15 -9
- data/app/assets/javascripts/highcharts/themes/sunset.js +53 -0
- data/app/assets/stylesheets/highcharts/highcharts.css +802 -0
- data/app/assets/stylesheets/highcharts/highcharts.scss +665 -0
- data/lib/highcharts/version.rb +1 -1
- metadata +31 -1
@@ -0,0 +1,283 @@
|
|
1
|
+
/**
|
2
|
+
* @license Highcharts JS v6.0.0 (2017-10-04)
|
3
|
+
* Highcharts variwide module
|
4
|
+
*
|
5
|
+
* (c) 2010-2017 Torstein Honsi
|
6
|
+
*
|
7
|
+
* License: www.highcharts.com/license
|
8
|
+
*/
|
9
|
+
'use strict';
|
10
|
+
(function(factory) {
|
11
|
+
if (typeof module === 'object' && module.exports) {
|
12
|
+
module.exports = factory;
|
13
|
+
} else {
|
14
|
+
factory(Highcharts);
|
15
|
+
}
|
16
|
+
}(function(Highcharts) {
|
17
|
+
(function(H) {
|
18
|
+
/**
|
19
|
+
* Highcharts variwide module
|
20
|
+
*
|
21
|
+
* (c) 2010-2017 Torstein Honsi
|
22
|
+
*
|
23
|
+
* License: www.highcharts.com/license
|
24
|
+
*/
|
25
|
+
|
26
|
+
/**
|
27
|
+
* To do:
|
28
|
+
* - When X axis is not categorized, the scale should reflect how the z values
|
29
|
+
* increase, like a horizontal stack. But then the actual X values aren't
|
30
|
+
* reflected the the axis.. Should we introduce a Z axis too?
|
31
|
+
*/
|
32
|
+
|
33
|
+
var seriesType = H.seriesType,
|
34
|
+
seriesTypes = H.seriesTypes,
|
35
|
+
each = H.each,
|
36
|
+
pick = H.pick;
|
37
|
+
|
38
|
+
/**
|
39
|
+
* A variwide chart (related to marimekko chart) is a column chart with a
|
40
|
+
* variable width expressing a third dimension.
|
41
|
+
*
|
42
|
+
* @extends {plotOptions.column}
|
43
|
+
* @excluding boostThreshold,crisp,depth,edgeColor,edgeWidth,groupZPadding
|
44
|
+
* @product highcharts
|
45
|
+
* @sample {highcharts} highcharts/demo/variwide/
|
46
|
+
* Variwide chart
|
47
|
+
* @since 6.0.0
|
48
|
+
* @optionparent plotOptions.variwide
|
49
|
+
*/
|
50
|
+
seriesType('variwide', 'column', {
|
51
|
+
/**
|
52
|
+
* In a variwide chart, the point padding is 0 in order to express the
|
53
|
+
* horizontal stacking of items.
|
54
|
+
*/
|
55
|
+
pointPadding: 0,
|
56
|
+
/**
|
57
|
+
* In a variwide chart, the group padding is 0 in order to express the
|
58
|
+
* horizontal stacking of items.
|
59
|
+
*/
|
60
|
+
groupPadding: 0
|
61
|
+
}, {
|
62
|
+
pointArrayMap: ['y', 'z'],
|
63
|
+
parallelArrays: ['x', 'y', 'z'],
|
64
|
+
processData: function() {
|
65
|
+
var series = this;
|
66
|
+
this.totalZ = 0;
|
67
|
+
this.relZ = [];
|
68
|
+
seriesTypes.column.prototype.processData.call(this);
|
69
|
+
|
70
|
+
each(this.zData, function(z, i) {
|
71
|
+
series.relZ[i] = series.totalZ;
|
72
|
+
series.totalZ += z;
|
73
|
+
});
|
74
|
+
|
75
|
+
if (this.xAxis.categories) {
|
76
|
+
this.xAxis.variwide = true;
|
77
|
+
}
|
78
|
+
},
|
79
|
+
|
80
|
+
/**
|
81
|
+
* Translate an x value inside a given category index into the distorted
|
82
|
+
* axis translation.
|
83
|
+
* @param {Number} index The category index
|
84
|
+
* @param {Number} x The X pixel position in undistorted axis pixels
|
85
|
+
* @return {Number} Distorted X position
|
86
|
+
*/
|
87
|
+
postTranslate: function(index, x) {
|
88
|
+
|
89
|
+
var axis = this.xAxis,
|
90
|
+
relZ = this.relZ,
|
91
|
+
i = index,
|
92
|
+
len = axis.len,
|
93
|
+
totalZ = this.totalZ,
|
94
|
+
linearSlotLeft = i / relZ.length * len,
|
95
|
+
linearSlotRight = (i + 1) / relZ.length * len,
|
96
|
+
slotLeft = (pick(relZ[i], totalZ) / totalZ) * len,
|
97
|
+
slotRight = (pick(relZ[i + 1], totalZ) / totalZ) * len,
|
98
|
+
xInsideLinearSlot = x - linearSlotLeft,
|
99
|
+
ret;
|
100
|
+
|
101
|
+
ret = slotLeft +
|
102
|
+
xInsideLinearSlot * (slotRight - slotLeft) /
|
103
|
+
(linearSlotRight - linearSlotLeft);
|
104
|
+
|
105
|
+
return ret;
|
106
|
+
},
|
107
|
+
|
108
|
+
/**
|
109
|
+
* Extend translation by distoring X position based on Z.
|
110
|
+
*/
|
111
|
+
translate: function() {
|
112
|
+
|
113
|
+
// Temporarily disable crisping when computing original shapeArgs
|
114
|
+
var crispOption = this.options.crisp;
|
115
|
+
this.options.crisp = false;
|
116
|
+
|
117
|
+
seriesTypes.column.prototype.translate.call(this);
|
118
|
+
|
119
|
+
// Reset option
|
120
|
+
this.options.crisp = crispOption;
|
121
|
+
|
122
|
+
var inverted = this.chart.inverted,
|
123
|
+
crisp = this.borderWidth % 2 / 2;
|
124
|
+
|
125
|
+
// Distort the points to reflect z dimension
|
126
|
+
each(this.points, function(point, i) {
|
127
|
+
var left = this.postTranslate(
|
128
|
+
i,
|
129
|
+
point.shapeArgs.x
|
130
|
+
),
|
131
|
+
right = this.postTranslate(
|
132
|
+
i,
|
133
|
+
point.shapeArgs.x + point.shapeArgs.width
|
134
|
+
);
|
135
|
+
|
136
|
+
if (this.options.crisp) {
|
137
|
+
left = Math.round(left) - crisp;
|
138
|
+
right = Math.round(right) - crisp;
|
139
|
+
}
|
140
|
+
|
141
|
+
point.shapeArgs.x = left;
|
142
|
+
point.shapeArgs.width = right - left;
|
143
|
+
|
144
|
+
point.tooltipPos[inverted ? 1 : 0] = this.postTranslate(
|
145
|
+
i,
|
146
|
+
point.tooltipPos[inverted ? 1 : 0]
|
147
|
+
);
|
148
|
+
}, this);
|
149
|
+
}
|
150
|
+
|
151
|
+
// Point functions
|
152
|
+
}, {
|
153
|
+
isValid: function() {
|
154
|
+
return H.isNumber(this.y, true) && H.isNumber(this.z, true);
|
155
|
+
}
|
156
|
+
});
|
157
|
+
|
158
|
+
H.Tick.prototype.postTranslate = function(xy, xOrY, index) {
|
159
|
+
xy[xOrY] = this.axis.pos +
|
160
|
+
this.axis.series[0].postTranslate(index, xy[xOrY] - this.axis.pos);
|
161
|
+
};
|
162
|
+
|
163
|
+
H.wrap(H.Tick.prototype, 'getPosition', function(proceed, horiz, pos) {
|
164
|
+
var axis = this.axis,
|
165
|
+
xy = proceed.apply(this, Array.prototype.slice.call(arguments, 1)),
|
166
|
+
xOrY = horiz ? 'x' : 'y';
|
167
|
+
|
168
|
+
if (axis.categories && axis.variwide) {
|
169
|
+
this[xOrY + 'Orig'] = xy[xOrY];
|
170
|
+
this.postTranslate(xy, xOrY, pos);
|
171
|
+
}
|
172
|
+
return xy;
|
173
|
+
});
|
174
|
+
|
175
|
+
H.wrap(H.Tick.prototype, 'getLabelPosition', function(
|
176
|
+
proceed,
|
177
|
+
x,
|
178
|
+
y,
|
179
|
+
label,
|
180
|
+
horiz,
|
181
|
+
labelOptions,
|
182
|
+
tickmarkOffset,
|
183
|
+
index
|
184
|
+
) {
|
185
|
+
var args = Array.prototype.slice.call(arguments, 1),
|
186
|
+
xy,
|
187
|
+
xOrY = horiz ? 'x' : 'y';
|
188
|
+
|
189
|
+
// Replace the x with the original x
|
190
|
+
if (this.axis.variwide && typeof this[xOrY + 'Orig'] === 'number') {
|
191
|
+
args[horiz ? 0 : 1] = this[xOrY + 'Orig'];
|
192
|
+
}
|
193
|
+
|
194
|
+
xy = proceed.apply(this, args);
|
195
|
+
|
196
|
+
// Post-translate
|
197
|
+
if (this.axis.variwide && this.axis.categories) {
|
198
|
+
this.postTranslate(xy, xOrY, index);
|
199
|
+
}
|
200
|
+
return xy;
|
201
|
+
});
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
/**
|
206
|
+
* A `variwide` series. If the [type](#series.variwide.type) option is
|
207
|
+
* not specified, it is inherited from [chart.type](#chart.type).
|
208
|
+
*
|
209
|
+
* For options that apply to multiple series, it is recommended to add
|
210
|
+
* them to the [plotOptions.series](#plotOptions.series) options structure.
|
211
|
+
* To apply to all series of this specific type, apply it to [plotOptions.
|
212
|
+
* variwide](#plotOptions.variwide).
|
213
|
+
*
|
214
|
+
* @type {Object}
|
215
|
+
* @extends series,plotOptions.variwide
|
216
|
+
* @product highcharts
|
217
|
+
* @apioption series.variwide
|
218
|
+
*/
|
219
|
+
|
220
|
+
/**
|
221
|
+
* An array of data points for the series. For the `variwide` series type,
|
222
|
+
* points can be given in the following ways:
|
223
|
+
*
|
224
|
+
* 1. An array of arrays with 3 or 2 values. In this case, the values
|
225
|
+
* correspond to `x,y,z`. If the first value is a string, it is applied
|
226
|
+
* as the name of the point, and the `x` value is inferred. The `x`
|
227
|
+
* value can also be omitted, in which case the inner arrays should
|
228
|
+
* be of length 2\. Then the `x` value is automatically calculated,
|
229
|
+
* either starting at 0 and incremented by 1, or from `pointStart` and
|
230
|
+
* `pointInterval` given in the series options.
|
231
|
+
*
|
232
|
+
* ```js
|
233
|
+
* data: [
|
234
|
+
* [0, 1, 2],
|
235
|
+
* [1, 5, 5],
|
236
|
+
* [2, 0, 2]
|
237
|
+
* ]
|
238
|
+
* ```
|
239
|
+
*
|
240
|
+
* 2. An array of objects with named values. The objects are point
|
241
|
+
* configuration objects as seen below. If the total number of data
|
242
|
+
* points exceeds the series' [turboThreshold](#series.variwide.turboThreshold),
|
243
|
+
* this option is not available.
|
244
|
+
*
|
245
|
+
* ```js
|
246
|
+
* data: [{
|
247
|
+
* x: 1,
|
248
|
+
* y: 1,
|
249
|
+
* z: 1,
|
250
|
+
* name: "Point2",
|
251
|
+
* color: "#00FF00"
|
252
|
+
* }, {
|
253
|
+
* x: 1,
|
254
|
+
* y: 5,
|
255
|
+
* z: 4,
|
256
|
+
* name: "Point1",
|
257
|
+
* color: "#FF00FF"
|
258
|
+
* }]
|
259
|
+
* ```
|
260
|
+
*
|
261
|
+
* @type {Array<Object|Array>}
|
262
|
+
* @extends series.line.data
|
263
|
+
* @excluding marker
|
264
|
+
* @sample {highcharts} highcharts/chart/reflow-true/ Numerical values
|
265
|
+
* @sample {highcharts} highcharts/series/data-array-of-arrays/ Arrays of numeric x and y
|
266
|
+
* @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/ Arrays of datetime x and y
|
267
|
+
* @sample {highcharts} highcharts/series/data-array-of-name-value/ Arrays of point.name and y
|
268
|
+
* @sample {highcharts} highcharts/series/data-array-of-objects/ Config objects
|
269
|
+
* @product highcharts
|
270
|
+
* @apioption series.variwide.data
|
271
|
+
*/
|
272
|
+
|
273
|
+
/**
|
274
|
+
* The relative width for each column. The widths are distributed so they sum
|
275
|
+
* up to the X axis length.
|
276
|
+
*
|
277
|
+
* @type {Number}
|
278
|
+
* @product highcharts
|
279
|
+
* @apioption series.variwide.data.z
|
280
|
+
*/
|
281
|
+
|
282
|
+
}(Highcharts));
|
283
|
+
}));
|
@@ -0,0 +1,294 @@
|
|
1
|
+
/**
|
2
|
+
* @license Highcharts JS v6.0.0 (2017-10-04)
|
3
|
+
* Vector plot series module
|
4
|
+
*
|
5
|
+
* (c) 2010-2017 Torstein Honsi
|
6
|
+
*
|
7
|
+
* License: www.highcharts.com/license
|
8
|
+
*/
|
9
|
+
'use strict';
|
10
|
+
(function(factory) {
|
11
|
+
if (typeof module === 'object' && module.exports) {
|
12
|
+
module.exports = factory;
|
13
|
+
} else {
|
14
|
+
factory(Highcharts);
|
15
|
+
}
|
16
|
+
}(function(Highcharts) {
|
17
|
+
(function(H) {
|
18
|
+
/**
|
19
|
+
* Vector plot series module
|
20
|
+
*
|
21
|
+
* (c) 2010-2017 Torstein Honsi
|
22
|
+
*
|
23
|
+
* License: www.highcharts.com/license
|
24
|
+
*/
|
25
|
+
|
26
|
+
|
27
|
+
var each = H.each,
|
28
|
+
seriesType = H.seriesType;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* A vector plot is a type of cartesian chart where each point has an X and Y
|
32
|
+
* position, a length and a direction. Vectors are drawn as arrows.
|
33
|
+
*
|
34
|
+
* @extends {plotOptions.scatter}
|
35
|
+
* @excluding boostThreshold,marker,connectEnds,connectNulls,cropThreshold,
|
36
|
+
* dashStyle,gapSize,gapUnit,dataGrouping,linecap,shadow,stacking,
|
37
|
+
* step
|
38
|
+
* @product highcharts highstock
|
39
|
+
* @sample {highcharts|highstock} highcharts/demo/vector-plot/
|
40
|
+
* Vector pot
|
41
|
+
* @since 6.0.0
|
42
|
+
* @optionparent plotOptions.vector
|
43
|
+
*/
|
44
|
+
seriesType('vector', 'scatter', {
|
45
|
+
|
46
|
+
/**
|
47
|
+
* The line width for each vector arrow.
|
48
|
+
*/
|
49
|
+
lineWidth: 2,
|
50
|
+
|
51
|
+
/** @ignore */
|
52
|
+
marker: null,
|
53
|
+
/**
|
54
|
+
* What part of the vector it should be rotated around. Can be one of
|
55
|
+
* `start`, `center` and `end`. When `start`, the vectors will start from
|
56
|
+
* the given [x, y] position, and when `end` the vectors will end in the
|
57
|
+
* [x, y] position.
|
58
|
+
*
|
59
|
+
* @sample highcharts/plotoptions/vector-rotationorigin-start/
|
60
|
+
* Rotate from start
|
61
|
+
* @validvalue ["start", "center", "end"]
|
62
|
+
*/
|
63
|
+
rotationOrigin: 'center',
|
64
|
+
states: {
|
65
|
+
hover: {
|
66
|
+
/**
|
67
|
+
* Additonal line width for the vector errors when they are hovered.
|
68
|
+
*/
|
69
|
+
lineWidthPlus: 1
|
70
|
+
}
|
71
|
+
},
|
72
|
+
tooltip: {
|
73
|
+
pointFormat: '<b>[{point.x}, {point.y}]</b><br/>Length: <b>{point.length}</b><br/>Direction: <b>{point.direction}\u00B0</b><br/>'
|
74
|
+
},
|
75
|
+
/**
|
76
|
+
* Maximum length of the arrows in the vector plot. The individual arrow
|
77
|
+
* length is computed between 0 and this value.
|
78
|
+
*/
|
79
|
+
vectorLength: 20
|
80
|
+
|
81
|
+
}, {
|
82
|
+
pointArrayMap: ['y', 'length', 'direction'],
|
83
|
+
parallelArrays: ['x', 'y', 'length', 'direction'],
|
84
|
+
|
85
|
+
/**
|
86
|
+
* Get presentational attributes.
|
87
|
+
*/
|
88
|
+
pointAttribs: function(point, state) {
|
89
|
+
var options = this.options,
|
90
|
+
stroke = this.color,
|
91
|
+
strokeWidth = this.options.lineWidth;
|
92
|
+
|
93
|
+
if (state) {
|
94
|
+
stroke = options.states[state].color || stroke;
|
95
|
+
strokeWidth =
|
96
|
+
(options.states[state].lineWidth || strokeWidth) +
|
97
|
+
(options.states[state].lineWidthPlus || 0);
|
98
|
+
}
|
99
|
+
|
100
|
+
return {
|
101
|
+
'stroke': stroke,
|
102
|
+
'stroke-width': strokeWidth
|
103
|
+
};
|
104
|
+
},
|
105
|
+
markerAttribs: H.noop,
|
106
|
+
getSymbol: H.noop,
|
107
|
+
|
108
|
+
/**
|
109
|
+
* Create a single arrow. It is later rotated around the zero
|
110
|
+
* centerpoint.
|
111
|
+
*/
|
112
|
+
arrow: function(point) {
|
113
|
+
var path,
|
114
|
+
fraction = point.length / this.lengthMax,
|
115
|
+
o = {
|
116
|
+
start: 10,
|
117
|
+
center: 0,
|
118
|
+
end: -10
|
119
|
+
}[this.options.rotationOrigin] || 0,
|
120
|
+
u = fraction * this.options.vectorLength / 20;
|
121
|
+
|
122
|
+
// The stem and the arrow head. Draw the arrow first with rotation 0,
|
123
|
+
// which is the arrow pointing down (vector from north to south).
|
124
|
+
path = [
|
125
|
+
'M', 0, 7 * u + o, // base of arrow
|
126
|
+
'L', -1.5 * u, 7 * u + o,
|
127
|
+
0, 10 * u + o,
|
128
|
+
1.5 * u, 7 * u + o,
|
129
|
+
0, 7 * u + o,
|
130
|
+
0, -10 * u + o // top
|
131
|
+
];
|
132
|
+
|
133
|
+
return path;
|
134
|
+
},
|
135
|
+
|
136
|
+
translate: function() {
|
137
|
+
H.Series.prototype.translate.call(this);
|
138
|
+
|
139
|
+
this.lengthMax = H.arrayMax(this.lengthData);
|
140
|
+
},
|
141
|
+
|
142
|
+
|
143
|
+
drawPoints: function() {
|
144
|
+
each(this.points, function(point) {
|
145
|
+
var plotX = point.plotX,
|
146
|
+
plotY = point.plotY;
|
147
|
+
if (!point.graphic) {
|
148
|
+
point.graphic = this.chart.renderer
|
149
|
+
.path()
|
150
|
+
.add(this.markerGroup);
|
151
|
+
}
|
152
|
+
point.graphic
|
153
|
+
.attr({
|
154
|
+
d: this.arrow(point),
|
155
|
+
translateX: plotX,
|
156
|
+
translateY: plotY,
|
157
|
+
rotation: point.direction
|
158
|
+
})
|
159
|
+
.attr(this.pointAttribs(point));
|
160
|
+
|
161
|
+
}, this);
|
162
|
+
},
|
163
|
+
|
164
|
+
drawGraph: H.noop,
|
165
|
+
|
166
|
+
/*
|
167
|
+
drawLegendSymbol: function (legend, item) {
|
168
|
+
var options = legend.options,
|
169
|
+
symbolHeight = legend.symbolHeight,
|
170
|
+
square = options.squareSymbol,
|
171
|
+
symbolWidth = square ? symbolHeight : legend.symbolWidth,
|
172
|
+
path = this.arrow.call({
|
173
|
+
lengthMax: 1,
|
174
|
+
options: {
|
175
|
+
vectorLength: symbolWidth
|
176
|
+
}
|
177
|
+
}, {
|
178
|
+
length: 1
|
179
|
+
});
|
180
|
+
|
181
|
+
item.legendLine = this.chart.renderer.path(path)
|
182
|
+
.addClass('highcharts-point')
|
183
|
+
.attr({
|
184
|
+
zIndex: 3,
|
185
|
+
translateY: symbolWidth / 2,
|
186
|
+
rotation: 270,
|
187
|
+
'stroke-width': 1,
|
188
|
+
'stroke': 'black'
|
189
|
+
}).add(item.legendGroup);
|
190
|
+
|
191
|
+
},
|
192
|
+
*/
|
193
|
+
|
194
|
+
/**
|
195
|
+
* Fade in the arrows on initiating series.
|
196
|
+
*/
|
197
|
+
animate: function(init) {
|
198
|
+
if (init) {
|
199
|
+
this.markerGroup.attr({
|
200
|
+
opacity: 0.01
|
201
|
+
});
|
202
|
+
} else {
|
203
|
+
this.markerGroup.animate({
|
204
|
+
opacity: 1
|
205
|
+
}, H.animObject(this.options.animation));
|
206
|
+
|
207
|
+
this.animate = null;
|
208
|
+
}
|
209
|
+
}
|
210
|
+
});
|
211
|
+
|
212
|
+
|
213
|
+
/**
|
214
|
+
* A `vector` series. If the [type](#series.vector.type) option is not
|
215
|
+
* specified, it is inherited from [chart.type](#chart.type).
|
216
|
+
*
|
217
|
+
* For options that apply to multiple series, it is recommended to add
|
218
|
+
* them to the [plotOptions.series](#plotOptions.series) options structure.
|
219
|
+
* To apply to all series of this specific type, apply it to [plotOptions.
|
220
|
+
* vector](#plotOptions.vector).
|
221
|
+
*
|
222
|
+
* @type {Object}
|
223
|
+
* @extends series,plotOptions.vector
|
224
|
+
* @excluding dataParser,dataURL
|
225
|
+
* @product highcharts highstock
|
226
|
+
* @apioption series.vector
|
227
|
+
*/
|
228
|
+
|
229
|
+
/**
|
230
|
+
* An array of data points for the series. For the `vector` series type,
|
231
|
+
* points can be given in the following ways:
|
232
|
+
*
|
233
|
+
* 1. An array of arrays with 4 values. In this case, the values correspond
|
234
|
+
* to `x,y,length,direction`. If the first value is a string, it is applied as
|
235
|
+
* the name of the point, and the `x` value is inferred.
|
236
|
+
*
|
237
|
+
* ```js
|
238
|
+
* data: [
|
239
|
+
* [0, 0, 10, 90],
|
240
|
+
* [0, 1, 5, 180],
|
241
|
+
* [1, 1, 2, 270]
|
242
|
+
* ]
|
243
|
+
* ```
|
244
|
+
*
|
245
|
+
* 2. An array of objects with named values. The objects are point
|
246
|
+
* configuration objects as seen below. If the total number of data
|
247
|
+
* points exceeds the series' [turboThreshold](#series.area.turboThreshold),
|
248
|
+
* this option is not available.
|
249
|
+
*
|
250
|
+
* ```js
|
251
|
+
* data: [{
|
252
|
+
* x: 0,
|
253
|
+
* y: 0,
|
254
|
+
* name: "Point2",
|
255
|
+
* length: 10,
|
256
|
+
* direction: 90
|
257
|
+
* }, {
|
258
|
+
* x: 1,
|
259
|
+
* y: 1,
|
260
|
+
* name: "Point1",
|
261
|
+
* direction: 270
|
262
|
+
* }]
|
263
|
+
* ```
|
264
|
+
*
|
265
|
+
* @type {Array<Object|Array|Number>}
|
266
|
+
* @extends series.line.data
|
267
|
+
* @sample {highcharts} highcharts/chart/reflow-true/ Numerical values
|
268
|
+
* @sample {highcharts} highcharts/series/data-array-of-arrays/ Arrays of numeric x and y
|
269
|
+
* @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/ Arrays of datetime x and y
|
270
|
+
* @sample {highcharts} highcharts/series/data-array-of-name-value/ Arrays of point.name and y
|
271
|
+
* @sample {highcharts} highcharts/series/data-array-of-objects/ Config objects
|
272
|
+
* @product highcharts highstock
|
273
|
+
* @apioption series.vector.data
|
274
|
+
*/
|
275
|
+
|
276
|
+
/**
|
277
|
+
* The length of the vector. The rendered length will relate to the
|
278
|
+
* `vectorLength` setting.
|
279
|
+
*
|
280
|
+
* @type {Number}
|
281
|
+
* @product highcharts highstock
|
282
|
+
* @apioption series.vector.data.length
|
283
|
+
*/
|
284
|
+
|
285
|
+
/**
|
286
|
+
* The vector direction in degrees, where 0 is north (pointing towards south).
|
287
|
+
*
|
288
|
+
* @type {Number}
|
289
|
+
* @product highcharts highstock
|
290
|
+
* @apioption series.vector.data.direction
|
291
|
+
*/
|
292
|
+
|
293
|
+
}(Highcharts));
|
294
|
+
}));
|