-
Notifications
You must be signed in to change notification settings - Fork 142
/
highcharts-more.src.js
12312 lines (12046 loc) · 437 KB
/
highcharts-more.src.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* @license Highcharts JS v12.0.1 (2024-11-28)
* @module highcharts/highcharts-more
* @requires highcharts
*
* (c) 2009-2024 Torstein Honsi
*
* License: www.highcharts.com/license
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("highcharts"), require("highcharts")["SeriesRegistry"], require("highcharts")["Series"], require("highcharts")["Series"]["types"]["column"], require("highcharts")["Color"], require("highcharts")["Templating"], require("highcharts")["Point"], require("highcharts")["Chart"], require("highcharts")["SVGElement"], require("highcharts")["StackItem"]);
else if(typeof define === 'function' && define.amd)
define("highcharts/highcharts-more", [["highcharts/highcharts"], ["highcharts/highcharts","SeriesRegistry"], ["highcharts/highcharts","Series"], ["highcharts/highcharts","Series","types","column"], ["highcharts/highcharts","Color"], ["highcharts/highcharts","Templating"], ["highcharts/highcharts","Point"], ["highcharts/highcharts","Chart"], ["highcharts/highcharts","SVGElement"], ["highcharts/highcharts","StackItem"]], factory);
else if(typeof exports === 'object')
exports["highcharts/highcharts-more"] = factory(require("highcharts"), require("highcharts")["SeriesRegistry"], require("highcharts")["Series"], require("highcharts")["Series"]["types"]["column"], require("highcharts")["Color"], require("highcharts")["Templating"], require("highcharts")["Point"], require("highcharts")["Chart"], require("highcharts")["SVGElement"], require("highcharts")["StackItem"]);
else
root["Highcharts"] = factory(root["Highcharts"], root["Highcharts"]["SeriesRegistry"], root["Highcharts"]["Series"], root["Highcharts"]["Series"]["types"]["column"], root["Highcharts"]["Color"], root["Highcharts"]["Templating"], root["Highcharts"]["Point"], root["Highcharts"]["Chart"], root["Highcharts"]["SVGElement"], root["Highcharts"]["StackItem"]);
})(this, (__WEBPACK_EXTERNAL_MODULE__944__, __WEBPACK_EXTERNAL_MODULE__512__, __WEBPACK_EXTERNAL_MODULE__820__, __WEBPACK_EXTERNAL_MODULE__448__, __WEBPACK_EXTERNAL_MODULE__620__, __WEBPACK_EXTERNAL_MODULE__984__, __WEBPACK_EXTERNAL_MODULE__260__, __WEBPACK_EXTERNAL_MODULE__960__, __WEBPACK_EXTERNAL_MODULE__28__, __WEBPACK_EXTERNAL_MODULE__184__) => {
return /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ 960:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__960__;
/***/ }),
/***/ 620:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__620__;
/***/ }),
/***/ 260:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__260__;
/***/ }),
/***/ 28:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__28__;
/***/ }),
/***/ 448:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__448__;
/***/ }),
/***/ 820:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__820__;
/***/ }),
/***/ 512:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__512__;
/***/ }),
/***/ 184:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__184__;
/***/ }),
/***/ 984:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__984__;
/***/ }),
/***/ 944:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__944__;
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": () => (/* binding */ highcharts_more_src)
});
// EXTERNAL MODULE: external {"amd":["highcharts/highcharts"],"commonjs":["highcharts"],"commonjs2":["highcharts"],"root":["Highcharts"]}
var highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_ = __webpack_require__(944);
var highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default = /*#__PURE__*/__webpack_require__.n(highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_);
// EXTERNAL MODULE: external {"amd":["highcharts/highcharts","SeriesRegistry"],"commonjs":["highcharts","SeriesRegistry"],"commonjs2":["highcharts","SeriesRegistry"],"root":["Highcharts","SeriesRegistry"]}
var highcharts_SeriesRegistry_commonjs_highcharts_SeriesRegistry_commonjs2_highcharts_SeriesRegistry_root_Highcharts_SeriesRegistry_ = __webpack_require__(512);
var highcharts_SeriesRegistry_commonjs_highcharts_SeriesRegistry_commonjs2_highcharts_SeriesRegistry_root_Highcharts_SeriesRegistry_default = /*#__PURE__*/__webpack_require__.n(highcharts_SeriesRegistry_commonjs_highcharts_SeriesRegistry_commonjs2_highcharts_SeriesRegistry_root_Highcharts_SeriesRegistry_);
// EXTERNAL MODULE: external {"amd":["highcharts/highcharts","Series"],"commonjs":["highcharts","Series"],"commonjs2":["highcharts","Series"],"root":["Highcharts","Series"]}
var highcharts_Series_commonjs_highcharts_Series_commonjs2_highcharts_Series_root_Highcharts_Series_ = __webpack_require__(820);
var highcharts_Series_commonjs_highcharts_Series_commonjs2_highcharts_Series_root_Highcharts_Series_default = /*#__PURE__*/__webpack_require__.n(highcharts_Series_commonjs_highcharts_Series_commonjs2_highcharts_Series_root_Highcharts_Series_);
;// ./code/es-modules/Series/CenteredUtilities.js
/* *
*
* (c) 2010-2024 Torstein Honsi
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
const { deg2rad } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
const { fireEvent, isNumber, pick, relativeLength } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
/**
* @private
*/
var CenteredUtilities;
(function (CenteredUtilities) {
/* *
*
* Declarations
*
* */
/* *
*
* Functions
*
* */
/* eslint-disable valid-jsdoc */
/**
* Get the center of the pie based on the size and center options relative
* to the plot area. Borrowed by the polar and gauge series types.
*
* @private
* @function Highcharts.CenteredSeriesMixin.getCenter
*/
function getCenter() {
const options = this.options, chart = this.chart, slicingRoom = 2 * (options.slicedOffset || 0), plotWidth = chart.plotWidth - 2 * slicingRoom, plotHeight = chart.plotHeight - 2 * slicingRoom, centerOption = options.center, smallestSize = Math.min(plotWidth, plotHeight), thickness = options.thickness;
let handleSlicingRoom, size = options.size, innerSize = options.innerSize || 0, i, value;
if (typeof size === 'string') {
size = parseFloat(size);
}
if (typeof innerSize === 'string') {
innerSize = parseFloat(innerSize);
}
const positions = [
pick(centerOption?.[0], '50%'),
pick(centerOption?.[1], '50%'),
// Prevent from negative values
pick(size && size < 0 ? void 0 : options.size, '100%'),
pick(innerSize && innerSize < 0 ? void 0 : options.innerSize || 0, '0%')
];
// No need for inner size in angular (gauges) series but still required
// for pie series
if (chart.angular && !(this instanceof (highcharts_Series_commonjs_highcharts_Series_commonjs2_highcharts_Series_root_Highcharts_Series_default()))) {
positions[3] = 0;
}
for (i = 0; i < 4; ++i) {
value = positions[i];
handleSlicingRoom = i < 2 || (i === 2 && /%$/.test(value));
// I == 0: centerX, relative to width
// i == 1: centerY, relative to height
// i == 2: size, relative to smallestSize
// i == 3: innerSize, relative to size
positions[i] = relativeLength(value, [plotWidth, plotHeight, smallestSize, positions[2]][i]) + (handleSlicingRoom ? slicingRoom : 0);
}
// Inner size cannot be larger than size (#3632)
if (positions[3] > positions[2]) {
positions[3] = positions[2];
}
// Thickness overrides innerSize, need to be less than pie size (#6647)
if (isNumber(thickness) &&
thickness * 2 < positions[2] && thickness > 0) {
positions[3] = positions[2] - thickness * 2;
}
fireEvent(this, 'afterGetCenter', { positions });
return positions;
}
CenteredUtilities.getCenter = getCenter;
/**
* GetStartAndEndRadians - Calculates start and end angles in radians.
* Used in series types such as pie and sunburst.
*
* @private
* @function Highcharts.CenteredSeriesMixin.getStartAndEndRadians
*
* @param {number} [start]
* Start angle in degrees.
*
* @param {number} [end]
* Start angle in degrees.
*
* @return {Highcharts.RadianAngles}
* Returns an object containing start and end angles as radians.
*/
function getStartAndEndRadians(start, end) {
const startAngle = isNumber(start) ? start : 0, // Must be a number
endAngle = ((isNumber(end) && // Must be a number
end > startAngle && // Must be larger than the start angle
// difference must be less than 360 degrees
(end - startAngle) < 360) ?
end :
startAngle + 360), correction = -90;
return {
start: deg2rad * (startAngle + correction),
end: deg2rad * (endAngle + correction)
};
}
CenteredUtilities.getStartAndEndRadians = getStartAndEndRadians;
})(CenteredUtilities || (CenteredUtilities = {}));
/* *
*
* Default Export
*
* */
/* harmony default export */ const Series_CenteredUtilities = (CenteredUtilities);
/* *
*
* API Declarations
*
* */
/**
* @private
* @interface Highcharts.RadianAngles
*/ /**
* @name Highcharts.RadianAngles#end
* @type {number}
*/ /**
* @name Highcharts.RadianAngles#start
* @type {number}
*/
''; // Keeps doclets above in JS file
;// ./code/es-modules/Extensions/Pane/PaneComposition.js
/* *
*
* Imports
*
* */
const { addEvent, correctFloat, defined, pick: PaneComposition_pick } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
/* *
*
* Functions
*
* */
/** @private */
function chartGetHoverPane(eventArgs) {
const chart = this;
let hoverPane;
if (eventArgs) {
chart.pane.forEach((pane) => {
const x = eventArgs.chartX - chart.plotLeft, y = eventArgs.chartY - chart.plotTop;
if (isInsidePane(x, y, pane.center)) {
hoverPane = pane;
}
});
}
return hoverPane;
}
/** @private */
function compose(ChartClass, PointerClass) {
const chartProto = ChartClass.prototype;
if (!chartProto.getHoverPane) {
chartProto.collectionsWithUpdate.push('pane');
chartProto.getHoverPane = chartGetHoverPane;
addEvent(ChartClass, 'afterIsInsidePlot', onChartAfterIsInsiderPlot);
addEvent(PointerClass, 'afterGetHoverData', onPointerAfterGetHoverData);
addEvent(PointerClass, 'beforeGetHoverData', onPointerBeforeGetHoverData);
}
}
/**
* Check whether element is inside or outside pane.
* @private
* @param {number} x
* Element's x coordinate
* @param {number} y
* Element's y coordinate
* @param {Array<number>} center
* Pane's center (x, y) and diameter
* @param {number} startAngle
* Pane's normalized start angle in radians (<-PI, PI>)
* @param {number} endAngle
* Pane's normalized end angle in radians (<-PI, PI>)
*/
function isInsidePane(x, y, center, startAngle, endAngle) {
let insideSlice = true;
const cx = center[0], cy = center[1];
const distance = Math.sqrt(Math.pow(x - cx, 2) + Math.pow(y - cy, 2));
if (defined(startAngle) && defined(endAngle)) {
// Round angle to N-decimals to avoid numeric errors
const angle = Math.atan2(correctFloat(y - cy, 8), correctFloat(x - cx, 8));
// Ignore full circle panes:
if (endAngle !== startAngle) {
// If normalized start angle is bigger than normalized end,
// it means angles have different signs. In such situation we
// check the <-PI, startAngle> and <endAngle, PI> ranges.
if (startAngle > endAngle) {
insideSlice = (angle >= startAngle &&
angle <= Math.PI) || (angle <= endAngle &&
angle >= -Math.PI);
}
else {
// In this case, we simple check if angle is within the
// <startAngle, endAngle> range
insideSlice = angle >= startAngle &&
angle <= correctFloat(endAngle, 8);
}
}
}
// Round up radius because x and y values are rounded
return distance <= Math.ceil(center[2] / 2) && insideSlice;
}
/**
* Check if (x, y) position is within pane for polar.
* @private
*/
function onChartAfterIsInsiderPlot(e) {
const chart = this;
if (chart.polar) {
if (e.options.inverted) {
[e.x, e.y] = [e.y, e.x];
}
e.isInsidePlot = chart.pane.some((pane) => isInsidePane(e.x, e.y, pane.center, pane.axis && pane.axis.normalizedStartAngleRad, pane.axis && pane.axis.normalizedEndAngleRad));
}
}
/**
*
*/
function onPointerAfterGetHoverData(eventArgs) {
const chart = this.chart;
if (eventArgs.hoverPoint &&
eventArgs.hoverPoint.plotX &&
eventArgs.hoverPoint.plotY &&
chart.hoverPane &&
!isInsidePane(eventArgs.hoverPoint.plotX, eventArgs.hoverPoint.plotY, chart.hoverPane.center)) {
eventArgs.hoverPoint = void 0;
}
}
/** @private */
function onPointerBeforeGetHoverData(eventArgs) {
const chart = this.chart;
if (chart.polar) {
// Find pane we are currently hovering over.
chart.hoverPane = chart.getHoverPane(eventArgs);
// Edit filter method to handle polar
eventArgs.filter = function (s) {
return (s.visible &&
!(!eventArgs.shared && s.directTouch) && // #3821
PaneComposition_pick(s.options.enableMouseTracking, true) &&
(!chart.hoverPane || s.xAxis.pane === chart.hoverPane));
};
}
else {
chart.hoverPane = void 0;
}
}
/* *
*
* Default Export
*
* */
const PaneComposition = {
compose
};
/* harmony default export */ const Pane_PaneComposition = (PaneComposition);
;// ./code/es-modules/Extensions/Pane/PaneDefaults.js
/* *
*
* (c) 2010-2024 Torstein Honsi
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
/* *
*
* API Options
*
* */
/**
* An array of background items for the pane.
*
* @sample {highcharts} highcharts/demo/gauge-speedometer/
* Speedometer gauge with multiple backgrounds
*
* @type {Array<*>}
* @optionparent pane.background
*/
const background = {
/**
* The class name for this background.
*
* @sample {highcharts} highcharts/css/pane/
* Panes styled by CSS
* @sample {highstock} highcharts/css/pane/
* Panes styled by CSS
* @sample {highmaps} highcharts/css/pane/
* Panes styled by CSS
*
* @type {string}
* @default highcharts-pane
* @since 5.0.0
* @apioption pane.background.className
*/
/**
* The shape of the pane background. When `solid`, the background
* is circular. When `arc`, the background extends only from the min
* to the max of the value axis.
*
* @type {Highcharts.PaneBackgroundShapeValue}
* @since 2.3.0
* @product highcharts
*/
shape: 'circle',
/**
* The border radius of the pane background when the shape is `arc`. Can be
* a number (pixels) or a percentage string.
*
* @since 11.4.2
* @sample highcharts/series-solidgauge/pane-borderradius
* Circular gauge and pane with equal border radius
* @product highcharts
* @type {number|string}
*/
borderRadius: 0,
/**
* The pixel border width of the pane background.
*
* @since 2.3.0
* @product highcharts
*/
borderWidth: 1,
/**
* The pane background border color.
*
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
* @since 2.3.0
* @product highcharts
*/
borderColor: "#cccccc" /* Palette.neutralColor20 */,
/**
* The background color or gradient for the pane.
*
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
* @default { linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 }, stops: [[0, #ffffff], [1, #e6e6e6]] }
* @since 2.3.0
* @product highcharts
*/
backgroundColor: {
/** @ignore-option */
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
/** @ignore-option */
stops: [
[0, "#ffffff" /* Palette.backgroundColor */],
[1, "#e6e6e6" /* Palette.neutralColor10 */]
]
},
/** @ignore-option */
from: -Number.MAX_VALUE, // Corrected to axis min
/**
* The inner radius of the pane background. Can be either numeric
* (pixels) or a percentage string.
*
* @type {number|string}
* @since 2.3.0
* @product highcharts
*/
innerRadius: 0,
/** @ignore-option */
to: Number.MAX_VALUE, // Corrected to axis max
/**
* The outer radius of the circular pane background. Can be either
* numeric (pixels) or a percentage string.
*
* @type {number|string}
* @since 2.3.0
* @product highcharts
*/
outerRadius: '105%'
};
/**
* The pane serves as a container for axes and backgrounds for circular
* gauges and polar charts.
*
* @type {*|Array<*>}
* @since 2.3.0
* @product highcharts
* @requires highcharts-more
* @optionparent pane
*/
const pane = {
/**
* The end angle of the polar X axis or gauge value axis, given in
* degrees where 0 is north. Defaults to [startAngle](#pane.startAngle)
* + 360.
*
* @sample {highcharts} highcharts/demo/gauge-vu-meter/
* VU-meter with custom start and end angle
*
* @type {number}
* @since 2.3.0
* @product highcharts
* @apioption pane.endAngle
*/
/**
* The center of a polar chart or angular gauge, given as an array
* of [x, y] positions. Positions can be given as integers that
* transform to pixels, or as percentages of the plot area size.
*
* @sample {highcharts} highcharts/demo/gauge-vu-meter/
* Two gauges with different center
*
* @type {Array<string|number>}
* @default ["50%", "50%"]
* @since 2.3.0
* @product highcharts
*/
center: ['50%', '50%'],
/**
* The size of the pane, either as a number defining pixels, or a
* percentage defining a percentage of the available plot area (the
* smallest of the plot height or plot width).
*
* @sample {highcharts} highcharts/demo/gauge-vu-meter/
* Smaller size
*
* @type {number|string}
* @product highcharts
*/
size: '85%',
/**
* The inner size of the pane, either as a number defining pixels, or a
* percentage defining a percentage of the pane's size.
*
* @sample {highcharts} highcharts/series-polar/column-inverted-inner
* The inner size set to 20%
*
* @type {number|string}
* @product highcharts
*/
innerSize: '0%',
/**
* The start angle of the polar X axis or gauge axis, given in degrees
* where 0 is north. Defaults to 0.
*
* @sample {highcharts} highcharts/demo/gauge-vu-meter/
* VU-meter with custom start and end angle
*
* @since 2.3.0
* @product highcharts
*/
startAngle: 0
};
/* *
*
* Default Export
*
* */
const PaneDefaults = {
pane,
background
};
/* harmony default export */ const Pane_PaneDefaults = (PaneDefaults);
;// ./code/es-modules/Extensions/Pane/Pane.js
/* *
*
* (c) 2010-2024 Torstein Honsi
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
const { extend, merge, splat } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
/* *
*
* Class
*
* */
/**
* The Pane object allows options that are common to a set of X and Y axes.
*
* In the future, this can be extended to basic Highcharts and Highcharts Stock.
*
* @private
* @class
* @name Highcharts.Pane
* @param {Highcharts.PaneOptions} options
* @param {Highcharts.Chart} chart
*/
class Pane {
/* *
*
* Constructor
*
* */
constructor(options, chart) {
this.coll = 'pane'; // Member of chart.pane
this.init(options, chart);
}
/* *
*
* Functions
*
* */
/**
* Initialize the Pane object
*
* @private
* @function Highcharts.Pane#init
*
* @param {Highcharts.PaneOptions} options
*
* @param {Highcharts.Chart} chart
*/
init(options, chart) {
this.chart = chart;
this.background = [];
chart.pane.push(this);
this.setOptions(options);
}
/**
* @private
* @function Highcharts.Pane#setOptions
*
* @param {Highcharts.PaneOptions} options
*/
setOptions(options) {
// Set options. Angular charts have a default background (#3318)
this.options = options = merge(Pane_PaneDefaults.pane, this.chart.angular ? { background: {} } : void 0, options);
}
/**
* Render the pane with its backgrounds.
*
* @private
* @function Highcharts.Pane#render
*/
render() {
const options = this.options, renderer = this.chart.renderer;
if (!this.group) {
this.group = renderer.g('pane-group')
.attr({ zIndex: options.zIndex || 0 })
.add();
}
this.updateCenter();
let backgroundOption = this.options.background;
// Render the backgrounds
if (backgroundOption) {
backgroundOption = splat(backgroundOption);
const len = Math.max(backgroundOption.length, this.background.length || 0);
for (let i = 0; i < len; i++) {
// #6641 - if axis exists, chart is circular and apply
// background
if (backgroundOption[i] && this.axis) {
this.renderBackground(merge(Pane_PaneDefaults.background, backgroundOption[i]), i);
}
else if (this.background[i]) {
this.background[i] = this.background[i].destroy();
this.background.splice(i, 1);
}
}
}
}
/**
* Render an individual pane background.
*
* @private
* @function Highcharts.Pane#renderBackground
*
* @param {Highcharts.PaneBackgroundOptions} backgroundOptions
* Background options
*
* @param {number} i
* The index of the background in this.backgrounds
*/
renderBackground(backgroundOptions, i) {
const attribs = {
'class': 'highcharts-pane ' + (backgroundOptions.className || '')
};
let method = 'animate';
if (!this.chart.styledMode) {
extend(attribs, {
'fill': backgroundOptions.backgroundColor,
'stroke': backgroundOptions.borderColor,
'stroke-width': backgroundOptions.borderWidth
});
}
if (!this.background[i]) {
this.background[i] = this.chart.renderer
.path()
.add(this.group);
method = 'attr';
}
this.background[i][method]({
'd': this.axis.getPlotBandPath(backgroundOptions.from, backgroundOptions.to, backgroundOptions)
}).attr(attribs);
}
/**
* Gets the center for the pane and its axis.
*
* @private
* @function Highcharts.Pane#updateCenter
* @param {Highcharts.Axis} [axis]
*/
updateCenter(axis) {
this.center = (axis ||
this.axis ||
{}).center = Series_CenteredUtilities.getCenter.call(this);
}
/**
* Destroy the pane item
*
* @ignore
* @private
* @function Highcharts.Pane#destroy
* /
destroy: function () {
erase(this.chart.pane, this);
this.background.forEach(function (background) {
background.destroy();
});
this.background.length = 0;
this.group = this.group.destroy();
},
*/
/**
* Update the pane item with new options
*
* @private
* @function Highcharts.Pane#update
* @param {Highcharts.PaneOptions} options
* New pane options
* @param {boolean} [redraw]
*/
update(options, redraw) {
merge(true, this.options, options);
this.setOptions(this.options);
this.render();
this.chart.axes.forEach(function (axis) {
if (axis.pane === this) {
axis.pane = null;
axis.update({}, redraw);
}
}, this);
}
}
/* *
*
* Static Properties
*
* */
Pane.compose = Pane_PaneComposition.compose;
/* *
*
* Default Export
*
* */
/* harmony default export */ const Pane_Pane = (Pane);
/* *
*
* API Declarations
*
* */
/**
* @typedef {"arc"|"circle"|"solid"} Highcharts.PaneBackgroundShapeValue
*/
''; // Keeps doclets above in JS file
;// ./code/es-modules/Series/AreaRange/AreaRangePoint.js
/* *
*
* (c) 2010-2024 Torstein Honsi
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
const { area: { prototype: { pointClass: AreaPoint, pointClass: { prototype: areaProto } } } } = (highcharts_SeriesRegistry_commonjs_highcharts_SeriesRegistry_commonjs2_highcharts_SeriesRegistry_root_Highcharts_SeriesRegistry_default()).seriesTypes;
const { defined: AreaRangePoint_defined, isNumber: AreaRangePoint_isNumber } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
/* *
*
* Class
*
* */
class AreaRangePoint extends AreaPoint {
/**
* Range series only. The high or maximum value for each data point.
* @name Highcharts.Point#high
* @type {number|undefined}
*/
/**
* Range series only. The low or minimum value for each data point.
* @name Highcharts.Point#low
* @type {number|undefined}
*/
/* *
*
* Functions
*
* */
/**
* @private
*/
setState() {
const prevState = this.state, series = this.series, isPolar = series.chart.polar;
if (!AreaRangePoint_defined(this.plotHigh)) {
// Boost doesn't calculate plotHigh
this.plotHigh = series.yAxis.toPixels(this.high, true);
}
if (!AreaRangePoint_defined(this.plotLow)) {
// Boost doesn't calculate plotLow
this.plotLow = this.plotY = series.yAxis.toPixels(this.low, true);
}
series.lowerStateMarkerGraphic = series.stateMarkerGraphic;
series.stateMarkerGraphic = series.upperStateMarkerGraphic;
// Change state also for the top marker
this.graphic = this.graphics && this.graphics[1];
this.plotY = this.plotHigh;
if (isPolar && AreaRangePoint_isNumber(this.plotHighX)) {
this.plotX = this.plotHighX;
}
// Top state:
areaProto.setState.apply(this, arguments);
this.state = prevState;
// Now restore defaults
this.plotY = this.plotLow;
this.graphic = this.graphics && this.graphics[0];
if (isPolar && AreaRangePoint_isNumber(this.plotLowX)) {
this.plotX = this.plotLowX;
}
series.upperStateMarkerGraphic = series.stateMarkerGraphic;
series.stateMarkerGraphic = series.lowerStateMarkerGraphic;
// Lower marker is stored at stateMarkerGraphic
// to avoid reference duplication (#7021)
series.lowerStateMarkerGraphic = void 0;
const originalSettings = series.modifyMarkerSettings();
// Bottom state
areaProto.setState.apply(this, arguments);
// Restore previous state
series.restoreMarkerSettings(originalSettings);
}
haloPath() {
const isPolar = this.series.chart.polar;
let path = [];
// Bottom halo
this.plotY = this.plotLow;
if (isPolar && AreaRangePoint_isNumber(this.plotLowX)) {
this.plotX = this.plotLowX;
}
if (this.isInside) {
path = areaProto.haloPath.apply(this, arguments);
}
// Top halo
this.plotY = this.plotHigh;
if (isPolar && AreaRangePoint_isNumber(this.plotHighX)) {
this.plotX = this.plotHighX;
}
if (this.isTopInside) {
path = path.concat(areaProto.haloPath.apply(this, arguments));
}
return path;
}
isValid() {
return AreaRangePoint_isNumber(this.low) && AreaRangePoint_isNumber(this.high);
}
}
/* *
*
* Default Export
*
* */
/* harmony default export */ const AreaRange_AreaRangePoint = (AreaRangePoint);
;// ./code/es-modules/Series/AreaRange/AreaRangeSeries.js
/* *
*
* (c) 2010-2024 Torstein Honsi
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
const { noop } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
const { area: AreaSeries, area: { prototype: AreaRangeSeries_areaProto }, column: { prototype: columnProto } } = (highcharts_SeriesRegistry_commonjs_highcharts_SeriesRegistry_commonjs2_highcharts_SeriesRegistry_root_Highcharts_SeriesRegistry_default()).seriesTypes;
const { addEvent: AreaRangeSeries_addEvent, defined: AreaRangeSeries_defined, extend: AreaRangeSeries_extend, isArray, isNumber: AreaRangeSeries_isNumber, pick: AreaRangeSeries_pick, merge: AreaRangeSeries_merge } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());
/* *
*
* Constants
*
* */
/**
* The area range series is a carteseian series with higher and lower values for
* each point along an X axis, where the area between the values is shaded.
*
* @sample {highcharts} highcharts/demo/arearange/
* Area range chart
* @sample {highstock} stock/demo/arearange/
* Area range chart
*
* @extends plotOptions.area
* @product highcharts highstock
* @excluding stack, stacking
* @requires highcharts-more
* @optionparent plotOptions.arearange
*
* @private
*/
const areaRangeSeriesOptions = {
/**
* @see [fillColor](#plotOptions.arearange.fillColor)
* @see [fillOpacity](#plotOptions.arearange.fillOpacity)