highcharts 12.0.2 → 12.1.1
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.
- package/bower.json +1 -1
- package/es-modules/Accessibility/Options/A11yDefaults.js +2 -0
- package/es-modules/Core/Color/Color.js +5 -12
- package/es-modules/Core/Defaults.js +0 -8
- package/es-modules/Core/Globals.js +1 -1
- package/es-modules/Core/Pointer.js +3 -1
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +1 -3
- package/es-modules/Core/Renderer/SVG/SVGElement.js +4 -2
- package/es-modules/Core/Renderer/SVG/SVGLabel.js +11 -12
- package/es-modules/Core/Series/DataLabel.js +1 -0
- package/es-modules/Core/Series/Series.js +13 -15
- package/es-modules/Core/Templating.js +20 -16
- package/es-modules/Core/Time.js +21 -10
- package/es-modules/Core/Utilities.js +1 -1
- package/es-modules/Data/Converters/CSVConverter.js +1 -0
- package/es-modules/Data/Converters/DataConverter.js +31 -0
- package/es-modules/Data/Converters/GoogleSheetsConverter.js +1 -0
- package/es-modules/Data/Converters/HTMLTableConverter.js +1 -0
- package/es-modules/Data/Converters/JSONConverter.js +1 -0
- package/es-modules/Extensions/Boost/BoostSeries.js +13 -7
- package/es-modules/Extensions/DragPanes/AxisResizer.js +1 -1
- package/es-modules/Extensions/Exporting/Exporting.js +16 -8
- package/es-modules/Extensions/SeriesLabel/SeriesLabelDefaults.js +7 -2
- package/es-modules/Series/Bubble/BubbleSeries.js +24 -0
- package/es-modules/Series/Organization/OrganizationSeriesDefaults.js +3 -1
- package/es-modules/Series/Timeline/TimelineSeriesDefaults.js +3 -1
- package/es-modules/Series/Treegraph/TreegraphSeriesDefaults.js +3 -1
- package/es-modules/Series/Treemap/TreemapPoint.js +7 -2
- package/es-modules/Series/Treemap/TreemapSeries.js +154 -53
- package/es-modules/Series/Treemap/TreemapSeriesDefaults.js +126 -4
- package/es-modules/Stock/Indicators/VBP/VBPIndicator.js +1 -0
- package/es-modules/Stock/RangeSelector/RangeSelector.js +75 -71
- package/es-modules/Stock/RangeSelector/RangeSelectorDefaults.js +10 -4
- package/es-modules/masters/indicators/indicators-all.src.js +4 -0
- package/es-modules/tsconfig.tsbuildinfo +1 -1
- package/highcharts-3d.js +2 -2
- package/highcharts-3d.src.js +1 -1
- package/highcharts-gantt.js +5 -5
- package/highcharts-gantt.src.js +174 -164
- package/highcharts-more.js +2 -2
- package/highcharts-more.src.js +25 -1
- package/highcharts.d.ts +301 -764
- package/highcharts.js +3 -3
- package/highcharts.src.d.ts +301 -764
- package/highcharts.src.js +84 -84
- package/highmaps.js +5 -5
- package/highmaps.src.js +111 -87
- package/highstock.js +5 -5
- package/highstock.src.js +174 -164
- package/indicators/acceleration-bands.js +2 -2
- package/indicators/acceleration-bands.src.js +1 -1
- package/indicators/accumulation-distribution.js +2 -2
- package/indicators/accumulation-distribution.src.js +1 -1
- package/indicators/ao.js +2 -2
- package/indicators/ao.src.js +1 -1
- package/indicators/apo.js +2 -2
- package/indicators/apo.src.js +1 -1
- package/indicators/aroon-oscillator.js +2 -2
- package/indicators/aroon-oscillator.src.js +1 -1
- package/indicators/aroon.js +2 -2
- package/indicators/aroon.src.js +1 -1
- package/indicators/atr.js +2 -2
- package/indicators/atr.src.js +1 -1
- package/indicators/bollinger-bands.js +2 -2
- package/indicators/bollinger-bands.src.js +1 -1
- package/indicators/cci.js +2 -2
- package/indicators/cci.src.js +1 -1
- package/indicators/chaikin.js +2 -2
- package/indicators/chaikin.src.js +1 -1
- package/indicators/cmf.js +2 -2
- package/indicators/cmf.src.js +1 -1
- package/indicators/cmo.js +2 -2
- package/indicators/cmo.src.js +1 -1
- package/indicators/dema.js +2 -2
- package/indicators/dema.src.js +1 -1
- package/indicators/disparity-index.js +2 -2
- package/indicators/disparity-index.src.js +1 -1
- package/indicators/dmi.js +2 -2
- package/indicators/dmi.src.js +1 -1
- package/indicators/dpo.js +2 -2
- package/indicators/dpo.src.js +1 -1
- package/indicators/ema.js +1 -1
- package/indicators/ichimoku-kinko-hyo.js +2 -2
- package/indicators/ichimoku-kinko-hyo.src.js +1 -1
- package/indicators/indicators-all.js +2 -2
- package/indicators/indicators-all.src.js +6 -1
- package/indicators/indicators.js +2 -2
- package/indicators/indicators.src.js +1 -1
- package/indicators/keltner-channels.js +2 -2
- package/indicators/keltner-channels.src.js +1 -1
- package/indicators/klinger.js +2 -2
- package/indicators/klinger.src.js +1 -1
- package/indicators/macd.js +2 -2
- package/indicators/macd.src.js +1 -1
- package/indicators/mfi.js +2 -2
- package/indicators/mfi.src.js +1 -1
- package/indicators/momentum.js +2 -2
- package/indicators/momentum.src.js +1 -1
- package/indicators/natr.js +2 -2
- package/indicators/natr.src.js +1 -1
- package/indicators/obv.js +2 -2
- package/indicators/obv.src.js +1 -1
- package/indicators/pivot-points.js +2 -2
- package/indicators/pivot-points.src.js +1 -1
- package/indicators/ppo.js +2 -2
- package/indicators/ppo.src.js +1 -1
- package/indicators/price-channel.js +2 -2
- package/indicators/price-channel.src.js +1 -1
- package/indicators/price-envelopes.js +2 -2
- package/indicators/price-envelopes.src.js +1 -1
- package/indicators/psar.js +2 -2
- package/indicators/psar.src.js +1 -1
- package/indicators/regressions.js +2 -2
- package/indicators/regressions.src.js +1 -1
- package/indicators/roc.js +2 -2
- package/indicators/roc.src.js +1 -1
- package/indicators/rsi.js +2 -2
- package/indicators/rsi.src.js +1 -1
- package/indicators/slow-stochastic.js +2 -2
- package/indicators/slow-stochastic.src.js +1 -1
- package/indicators/stochastic.js +2 -2
- package/indicators/stochastic.src.js +1 -1
- package/indicators/supertrend.js +2 -2
- package/indicators/supertrend.src.js +1 -1
- package/indicators/tema.js +2 -2
- package/indicators/tema.src.js +1 -1
- package/indicators/trendline.js +2 -2
- package/indicators/trendline.src.js +1 -1
- package/indicators/trix.js +2 -2
- package/indicators/trix.src.js +1 -1
- package/indicators/volume-by-price.js +2 -2
- package/indicators/volume-by-price.src.js +2 -1
- package/indicators/vwap.js +2 -2
- package/indicators/vwap.src.js +1 -1
- package/indicators/williams-r.js +2 -2
- package/indicators/williams-r.src.js +1 -1
- package/indicators/wma.js +2 -2
- package/indicators/wma.src.js +1 -1
- package/indicators/zigzag.js +2 -2
- package/indicators/zigzag.src.js +1 -1
- package/modules/accessibility.js +2 -2
- package/modules/accessibility.src.js +3 -1
- package/modules/annotations-advanced.js +3 -3
- package/modules/annotations-advanced.src.js +4 -4
- package/modules/annotations.js +2 -2
- package/modules/annotations.src.js +3 -3
- package/modules/arc-diagram.js +2 -2
- package/modules/arc-diagram.src.js +1 -1
- package/modules/arrow-symbols.js +2 -2
- package/modules/arrow-symbols.src.js +1 -1
- package/modules/boost-canvas.js +2 -2
- package/modules/boost-canvas.src.js +14 -11
- package/modules/boost.js +2 -2
- package/modules/boost.src.js +14 -11
- package/modules/broken-axis.js +2 -2
- package/modules/broken-axis.src.js +1 -1
- package/modules/bullet.js +2 -2
- package/modules/bullet.src.js +1 -1
- package/modules/coloraxis.js +2 -2
- package/modules/coloraxis.src.js +1 -1
- package/modules/current-date-indicator.js +2 -2
- package/modules/current-date-indicator.src.js +1 -1
- package/modules/cylinder.js +2 -2
- package/modules/cylinder.src.js +1 -1
- package/modules/data-tools.js +2 -2
- package/modules/data-tools.src.js +36 -1
- package/modules/data.js +2 -2
- package/modules/data.src.js +1 -1
- package/modules/datagrouping.js +2 -2
- package/modules/datagrouping.src.js +1 -1
- package/modules/debugger.js +2 -2
- package/modules/debugger.src.js +1 -1
- package/modules/dependency-wheel.js +2 -2
- package/modules/dependency-wheel.src.js +1 -1
- package/modules/dotplot.js +2 -2
- package/modules/dotplot.src.js +1 -1
- package/modules/drag-panes.js +2 -2
- package/modules/drag-panes.src.js +2 -2
- package/modules/draggable-points.js +2 -2
- package/modules/draggable-points.src.js +1 -1
- package/modules/drilldown.js +2 -2
- package/modules/drilldown.src.js +1 -1
- package/modules/dumbbell.js +2 -2
- package/modules/dumbbell.src.js +1 -1
- package/modules/export-data.js +2 -2
- package/modules/export-data.src.js +1 -1
- package/modules/exporting.js +2 -2
- package/modules/exporting.src.js +17 -9
- package/modules/flowmap.js +2 -2
- package/modules/flowmap.src.js +1 -1
- package/modules/full-screen.js +2 -2
- package/modules/full-screen.src.js +1 -1
- package/modules/funnel.js +2 -2
- package/modules/funnel.src.js +1 -1
- package/modules/funnel3d.js +2 -2
- package/modules/funnel3d.src.js +1 -1
- package/modules/gantt.js +5 -5
- package/modules/gantt.src.js +89 -79
- package/modules/geoheatmap.js +2 -2
- package/modules/geoheatmap.src.js +1 -1
- package/modules/grid-axis.js +2 -2
- package/modules/grid-axis.src.js +1 -1
- package/modules/heatmap.js +3 -3
- package/modules/heatmap.src.js +2 -2
- package/modules/heikinashi.js +2 -2
- package/modules/heikinashi.src.js +1 -1
- package/modules/histogram-bellcurve.js +2 -2
- package/modules/histogram-bellcurve.src.js +1 -1
- package/modules/hollowcandlestick.js +2 -2
- package/modules/hollowcandlestick.src.js +1 -1
- package/modules/item-series.js +2 -2
- package/modules/item-series.src.js +1 -1
- package/modules/lollipop.js +2 -2
- package/modules/lollipop.src.js +1 -1
- package/modules/map.js +4 -4
- package/modules/map.src.js +26 -2
- package/modules/marker-clusters.js +2 -2
- package/modules/marker-clusters.src.js +1 -1
- package/modules/mouse-wheel-zoom.js +2 -2
- package/modules/mouse-wheel-zoom.src.js +1 -1
- package/modules/navigator.js +2 -2
- package/modules/navigator.src.js +1 -1
- package/modules/networkgraph.js +2 -2
- package/modules/networkgraph.src.js +1 -1
- package/modules/no-data-to-display.js +2 -2
- package/modules/no-data-to-display.src.js +1 -1
- package/modules/offline-exporting.js +2 -2
- package/modules/offline-exporting.src.js +18 -10
- package/modules/organization.js +2 -2
- package/modules/organization.src.js +4 -2
- package/modules/overlapping-datalabels.js +2 -2
- package/modules/overlapping-datalabels.src.js +1 -1
- package/modules/parallel-coordinates.js +2 -2
- package/modules/parallel-coordinates.src.js +1 -1
- package/modules/pareto.js +2 -2
- package/modules/pareto.src.js +1 -1
- package/modules/pathfinder.js +2 -2
- package/modules/pathfinder.src.js +1 -1
- package/modules/pattern-fill.js +2 -2
- package/modules/pattern-fill.src.js +1 -1
- package/modules/pictorial.js +2 -2
- package/modules/pictorial.src.js +1 -1
- package/modules/pointandfigure.js +2 -2
- package/modules/pointandfigure.src.js +1 -1
- package/modules/price-indicator.js +2 -2
- package/modules/price-indicator.src.js +1 -1
- package/modules/pyramid3d.js +2 -2
- package/modules/pyramid3d.src.js +1 -1
- package/modules/renko.js +2 -2
- package/modules/renko.src.js +1 -1
- package/modules/sankey.js +2 -2
- package/modules/sankey.src.js +1 -1
- package/modules/series-label.js +2 -2
- package/modules/series-label.src.js +8 -3
- package/modules/series-on-point.js +2 -2
- package/modules/series-on-point.src.js +1 -1
- package/modules/solid-gauge.js +2 -2
- package/modules/solid-gauge.src.js +1 -1
- package/modules/sonification.js +2 -2
- package/modules/sonification.src.js +1 -1
- package/modules/static-scale.js +2 -2
- package/modules/static-scale.src.js +1 -1
- package/modules/stock-tools.js +2 -2
- package/modules/stock-tools.src.js +3 -3
- package/modules/stock.js +6 -6
- package/modules/stock.src.js +89 -79
- package/modules/streamgraph.js +2 -2
- package/modules/streamgraph.src.js +1 -1
- package/modules/sunburst.js +2 -2
- package/modules/sunburst.src.js +290 -62
- package/modules/textpath.js +2 -2
- package/modules/textpath.src.js +1 -1
- package/modules/tiledwebmap.js +3 -3
- package/modules/tiledwebmap.src.js +1 -1
- package/modules/tilemap.js +2 -2
- package/modules/tilemap.src.js +1 -1
- package/modules/timeline.js +2 -2
- package/modules/timeline.src.js +4 -2
- package/modules/treegraph.js +2 -2
- package/modules/treegraph.src.js +4 -2
- package/modules/treegrid.js +2 -2
- package/modules/treegrid.src.js +1 -1
- package/modules/treemap.js +2 -2
- package/modules/treemap.src.js +288 -60
- package/modules/variable-pie.js +2 -2
- package/modules/variable-pie.src.js +1 -1
- package/modules/variwide.js +2 -2
- package/modules/variwide.src.js +1 -1
- package/modules/vector.js +2 -2
- package/modules/vector.src.js +1 -1
- package/modules/venn.js +2 -2
- package/modules/venn.src.js +1 -1
- package/modules/windbarb.js +2 -2
- package/modules/windbarb.src.js +1 -1
- package/modules/wordcloud.js +2 -2
- package/modules/wordcloud.src.js +1 -1
- package/modules/xrange.js +2 -2
- package/modules/xrange.src.js +1 -1
- package/options/treegraph.d.ts +559 -70
- package/options/treegraph.src.d.ts +559 -70
- package/options/treemap.d.ts +314 -160
- package/options/treemap.src.d.ts +314 -160
- package/options/vbp.d.ts +1 -1
- package/options/vbp.src.d.ts +1 -1
- package/package.json +1 -1
- package/standalone-navigator.js +3 -3
- package/standalone-navigator.src.js +85 -85
- package/themes/avocado.js +2 -2
- package/themes/avocado.src.js +1 -1
- package/themes/brand-dark.js +2 -2
- package/themes/brand-dark.src.js +1 -1
- package/themes/brand-light.js +2 -2
- package/themes/brand-light.src.js +1 -1
- package/themes/dark-blue.js +2 -2
- package/themes/dark-blue.src.js +1 -1
- package/themes/dark-green.js +2 -2
- package/themes/dark-green.src.js +1 -1
- package/themes/dark-unica.js +2 -2
- package/themes/dark-unica.src.js +1 -1
- package/themes/gray.js +2 -2
- package/themes/gray.src.js +1 -1
- package/themes/grid-light.js +2 -2
- package/themes/grid-light.src.js +1 -1
- package/themes/grid.js +2 -2
- package/themes/grid.src.js +1 -1
- package/themes/high-contrast-dark.js +2 -2
- package/themes/high-contrast-dark.src.js +1 -1
- package/themes/high-contrast-light.js +2 -2
- package/themes/high-contrast-light.src.js +1 -1
- package/themes/sand-signika.js +2 -2
- package/themes/sand-signika.src.js +1 -1
- package/themes/skies.js +2 -2
- package/themes/skies.src.js +1 -1
- package/themes/sunset.js +2 -2
- package/themes/sunset.src.js +1 -1
package/highcharts-gantt.src.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Highcharts JS v12.
|
|
2
|
+
* @license Highcharts JS v12.1.1 (2024-12-20)
|
|
3
3
|
* @module highcharts/highcharts
|
|
4
4
|
*
|
|
5
5
|
* (c) 2009-2024 Torstein Honsi
|
|
@@ -74,12 +74,12 @@ var Globals;
|
|
|
74
74
|
* Constants
|
|
75
75
|
*
|
|
76
76
|
* */
|
|
77
|
-
Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '12.
|
|
77
|
+
Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '12.1.1', Globals.win = (typeof window !== 'undefined' ?
|
|
78
78
|
window :
|
|
79
79
|
{}), // eslint-disable-line node/no-unsupported-features/es-builtins
|
|
80
80
|
Globals.doc = Globals.win.document, Globals.svg = (Globals.doc &&
|
|
81
81
|
Globals.doc.createElementNS &&
|
|
82
|
-
!!Globals.doc.createElementNS(Globals.SVG_NS, 'svg').createSVGRect), Globals.userAgent = (Globals.win.navigator && Globals.win.navigator.userAgent) || '', Globals.isChrome = Globals.win.chrome, Globals.isFirefox = Globals.userAgent.indexOf('Firefox') !== -1, Globals.isMS = /(edge|msie|trident)/i.test(Globals.userAgent) && !Globals.win.opera, Globals.isSafari = !Globals.isChrome && Globals.userAgent.indexOf('Safari') !== -1, Globals.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(Globals.userAgent), Globals.isWebKit = Globals.userAgent.indexOf('AppleWebKit') !== -1, Globals.deg2rad = Math.PI * 2 / 360, Globals.marginNames = [
|
|
82
|
+
!!Globals.doc.createElementNS(Globals.SVG_NS, 'svg').createSVGRect), Globals.pageLang = Globals.doc?.body.closest('[lang]')?.lang, Globals.userAgent = (Globals.win.navigator && Globals.win.navigator.userAgent) || '', Globals.isChrome = Globals.win.chrome, Globals.isFirefox = Globals.userAgent.indexOf('Firefox') !== -1, Globals.isMS = /(edge|msie|trident)/i.test(Globals.userAgent) && !Globals.win.opera, Globals.isSafari = !Globals.isChrome && Globals.userAgent.indexOf('Safari') !== -1, Globals.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(Globals.userAgent), Globals.isWebKit = Globals.userAgent.indexOf('AppleWebKit') !== -1, Globals.deg2rad = Math.PI * 2 / 360, Globals.marginNames = [
|
|
83
83
|
'plotTop',
|
|
84
84
|
'marginRight',
|
|
85
85
|
'marginBottom',
|
|
@@ -1275,7 +1275,7 @@ function getNestedProperty(path, parent) {
|
|
|
1275
1275
|
}
|
|
1276
1276
|
return thisProp ?? parent;
|
|
1277
1277
|
}
|
|
1278
|
-
const child = parent[pathElement];
|
|
1278
|
+
const child = parent[pathElement.replace(/[\\'"]/g, '')];
|
|
1279
1279
|
// Filter on the child
|
|
1280
1280
|
if (!defined(child) ||
|
|
1281
1281
|
typeof child === 'function' ||
|
|
@@ -3500,7 +3500,7 @@ const SeriesPalettes = {
|
|
|
3500
3500
|
* */
|
|
3501
3501
|
|
|
3502
3502
|
|
|
3503
|
-
const { win: Time_win } = Core_Globals;
|
|
3503
|
+
const { pageLang, win: Time_win } = Core_Globals;
|
|
3504
3504
|
|
|
3505
3505
|
const { defined: Time_defined, error: Time_error, extend: Time_extend, isNumber: Time_isNumber, isObject: Time_isObject, isString: Time_isString, merge: Time_merge, objectEach: Time_objectEach, pad: Time_pad, splat: Time_splat, timeUnits: Time_timeUnits, ucfirst: Time_ucfirst } = Core_Utilities;
|
|
3506
3506
|
/* *
|
|
@@ -3527,9 +3527,17 @@ const spanishWeekdayIndex = (weekday) => ['D', 'L', 'M', 'X', 'J', 'V', 'S'].ind
|
|
|
3527
3527
|
* `Highcharts.setOptions`, or individually for each Chart item through the
|
|
3528
3528
|
* [time](https://api.highcharts.com/highcharts/time) options set.
|
|
3529
3529
|
*
|
|
3530
|
-
* The Time object is available from {@link Highcharts.Chart#time},
|
|
3531
|
-
*
|
|
3532
|
-
*
|
|
3530
|
+
* The Time object is available from {@link Highcharts.Chart#time}, which refers
|
|
3531
|
+
* to `Highcharts.time` unless individual time settings are applied for each
|
|
3532
|
+
* chart.
|
|
3533
|
+
*
|
|
3534
|
+
* When configuring time settings for individual chart instances, be aware that
|
|
3535
|
+
* using `Highcharts.dateFormat` or `Highcharts.time.dateFormat` within
|
|
3536
|
+
* formatter callbacks relies on the global time object, which applies the
|
|
3537
|
+
* global language and time zone settings. To ensure charts with local time
|
|
3538
|
+
* settings function correctly, use `chart.time.dateFormat? instead. However,
|
|
3539
|
+
* the recommended best practice is to use `setOptions` to define global time
|
|
3540
|
+
* settings unless specific configurations are needed for each chart.
|
|
3533
3541
|
*
|
|
3534
3542
|
* @example
|
|
3535
3543
|
* // Apply time settings globally
|
|
@@ -3567,8 +3575,8 @@ const spanishWeekdayIndex = (weekday) => ['D', 'L', 'M', 'X', 'J', 'V', 'S'].ind
|
|
|
3567
3575
|
* @class
|
|
3568
3576
|
* @name Highcharts.Time
|
|
3569
3577
|
*
|
|
3570
|
-
* @param {Highcharts.TimeOptions} [options]
|
|
3571
|
-
*
|
|
3578
|
+
* @param {Highcharts.TimeOptions} [options] Time options as defined in
|
|
3579
|
+
* [chart.options.time](/highcharts/time).
|
|
3572
3580
|
*/
|
|
3573
3581
|
class Time {
|
|
3574
3582
|
/* *
|
|
@@ -3582,7 +3590,9 @@ class Time {
|
|
|
3582
3590
|
* Properties
|
|
3583
3591
|
*
|
|
3584
3592
|
* */
|
|
3585
|
-
this.options = {
|
|
3593
|
+
this.options = {
|
|
3594
|
+
timezone: 'UTC'
|
|
3595
|
+
};
|
|
3586
3596
|
this.variableTimezone = false;
|
|
3587
3597
|
this.Date = Time_win.Date;
|
|
3588
3598
|
this.update(options);
|
|
@@ -3604,12 +3614,13 @@ class Time {
|
|
|
3604
3614
|
*
|
|
3605
3615
|
*/
|
|
3606
3616
|
update(options = {}) {
|
|
3607
|
-
let timezone = options.timezone ?? 'UTC';
|
|
3608
3617
|
this.dTLCache = {};
|
|
3609
3618
|
this.options = options = Time_merge(true, this.options, options);
|
|
3610
3619
|
const { timezoneOffset, useUTC } = options;
|
|
3611
3620
|
// Allow using a different Date class
|
|
3612
3621
|
this.Date = options.Date || Time_win.Date || Date;
|
|
3622
|
+
// Assign the time zone. Handle the legacy, deprecated `useUTC` option.
|
|
3623
|
+
let timezone = options.timezone;
|
|
3613
3624
|
if (Time_defined(useUTC)) {
|
|
3614
3625
|
timezone = useUTC ? 'UTC' : void 0;
|
|
3615
3626
|
}
|
|
@@ -3685,7 +3696,7 @@ class Time {
|
|
|
3685
3696
|
/**
|
|
3686
3697
|
* Shorthand to get a cached `Intl.DateTimeFormat` instance.
|
|
3687
3698
|
*/
|
|
3688
|
-
dateTimeFormat(options, timestamp, locale = this.options.locale) {
|
|
3699
|
+
dateTimeFormat(options, timestamp, locale = this.options.locale || pageLang) {
|
|
3689
3700
|
const cacheKey = JSON.stringify(options) + locale;
|
|
3690
3701
|
if (Time_isString(options)) {
|
|
3691
3702
|
options = this.str2dtf(options);
|
|
@@ -4052,7 +4063,7 @@ class Time {
|
|
|
4052
4063
|
}
|
|
4053
4064
|
else if (Time_isObject(format)) {
|
|
4054
4065
|
const tzHours = (this.getTimezoneOffset(timestamp) || 0) /
|
|
4055
|
-
(60000 * 60), timeZone = this.
|
|
4066
|
+
(60000 * 60), timeZone = this.timezone || ('Etc/GMT' + (tzHours >= 0 ? '+' : '') + tzHours), { prefix = '', suffix = '' } = format;
|
|
4056
4067
|
format = prefix + this.dateTimeFormat(Time_extend({ timeZone }, format), timestamp) + suffix;
|
|
4057
4068
|
}
|
|
4058
4069
|
// Optionally sentence-case the string and return
|
|
@@ -7063,14 +7074,6 @@ const defaultOptions = {
|
|
|
7063
7074
|
text: 'Highcharts.com'
|
|
7064
7075
|
}
|
|
7065
7076
|
};
|
|
7066
|
-
/* eslint-disable spaced-comment */
|
|
7067
|
-
/*= if (!build.classic) { =*/
|
|
7068
|
-
// Legacy build for styled mode, set the styledMode option to true by default.
|
|
7069
|
-
defaultOptions.chart.styledMode = true;
|
|
7070
|
-
/*= } else { =*/
|
|
7071
|
-
defaultOptions.chart.styledMode = false;
|
|
7072
|
-
/*= } =*/
|
|
7073
|
-
'';
|
|
7074
7077
|
const defaultTime = new Core_Time(defaultOptions.time);
|
|
7075
7078
|
/**
|
|
7076
7079
|
* Get the updated default options. Until 3.0.7, merely exposing defaultOptions
|
|
@@ -7460,18 +7463,11 @@ class Color {
|
|
|
7460
7463
|
}
|
|
7461
7464
|
// Check for has alpha, because rgba colors perform worse due to
|
|
7462
7465
|
// lack of support in WebKit.
|
|
7463
|
-
const hasAlpha = (toRgba[3] !== 1 || fromRgba[3] !== 1);
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
',' +
|
|
7469
|
-
Math.round(toRgba[2] + (fromRgba[2] - toRgba[2]) * (1 - pos)) +
|
|
7470
|
-
(hasAlpha ?
|
|
7471
|
-
(',' +
|
|
7472
|
-
(toRgba[3] + (fromRgba[3] - toRgba[3]) * (1 - pos))) :
|
|
7473
|
-
'') +
|
|
7474
|
-
')';
|
|
7466
|
+
const hasAlpha = (toRgba[3] !== 1 || fromRgba[3] !== 1), channel = (to, i) => to + (fromRgba[i] - to) * (1 - pos), rgba = toRgba.slice(0, 3).map(channel).map(Math.round);
|
|
7467
|
+
if (hasAlpha) {
|
|
7468
|
+
rgba.push(channel(toRgba[3], 3));
|
|
7469
|
+
}
|
|
7470
|
+
return (hasAlpha ? 'rgba(' : 'rgb(') + rgba.join(',') + ')';
|
|
7475
7471
|
}
|
|
7476
7472
|
}
|
|
7477
7473
|
/* *
|
|
@@ -8838,9 +8834,9 @@ AST.bypassHTMLFiltering = false;
|
|
|
8838
8834
|
|
|
8839
8835
|
const { defaultOptions: Templating_defaultOptions, defaultTime: Templating_defaultTime } = Defaults;
|
|
8840
8836
|
|
|
8841
|
-
const {
|
|
8837
|
+
const { pageLang: Templating_pageLang } = Core_Globals;
|
|
8842
8838
|
|
|
8843
|
-
const { extend: Templating_extend, getNestedProperty: Templating_getNestedProperty, isArray: Templating_isArray, isNumber: Templating_isNumber, isObject: Templating_isObject, pick: Templating_pick, ucfirst: Templating_ucfirst } = Core_Utilities;
|
|
8839
|
+
const { extend: Templating_extend, getNestedProperty: Templating_getNestedProperty, isArray: Templating_isArray, isNumber: Templating_isNumber, isObject: Templating_isObject, isString: Templating_isString, pick: Templating_pick, ucfirst: Templating_ucfirst } = Core_Utilities;
|
|
8844
8840
|
const helpers = {
|
|
8845
8841
|
// Built-in helpers
|
|
8846
8842
|
add: (a, b) => a + b,
|
|
@@ -8875,6 +8871,8 @@ const numberFormatCache = {};
|
|
|
8875
8871
|
* Functions
|
|
8876
8872
|
*
|
|
8877
8873
|
* */
|
|
8874
|
+
// Internal convenience function
|
|
8875
|
+
const isQuotedString = (str) => /^["'].+["']$/.test(str);
|
|
8878
8876
|
/**
|
|
8879
8877
|
* Formats a JavaScript date timestamp (milliseconds since Jan 1st 1970) into a
|
|
8880
8878
|
* human readable date string. The format is a subset of the formats for PHP's
|
|
@@ -8952,11 +8950,11 @@ function dateFormat(format, timestamp, upperCaseFirst) {
|
|
|
8952
8950
|
* The formatted string.
|
|
8953
8951
|
*/
|
|
8954
8952
|
function format(str = '', ctx, chart) {
|
|
8955
|
-
const regex = /\{([\p{L}\d:\.,;\-\/<>\[\]%_
|
|
8953
|
+
const regex = /\{([\p{L}\d:\.,;\-\/<>\[\]%_@+"'’= #\(\)]+)\}/gu,
|
|
8956
8954
|
// The sub expression regex is the same as the top expression regex,
|
|
8957
8955
|
// but except parens and block helpers (#), and surrounded by parens
|
|
8958
8956
|
// instead of curly brackets.
|
|
8959
|
-
subRegex = /\(([\p{L}\d:\.,;\-\/<>\[\]%_
|
|
8957
|
+
subRegex = /\(([\p{L}\d:\.,;\-\/<>\[\]%_@+"'= ]+)\)/gu, matches = [], floatRegex = /f$/, decRegex = /\.(\d)/, lang = chart?.options.lang || Templating_defaultOptions.lang, time = chart && chart.time || Templating_defaultTime, numberFormatter = chart && chart.numberFormatter || numberFormat;
|
|
8960
8958
|
/*
|
|
8961
8959
|
* Get a literal or variable value inside a template expression. May be
|
|
8962
8960
|
* extended with other types like string or null if needed, but keep it
|
|
@@ -8974,7 +8972,7 @@ function format(str = '', ctx, chart) {
|
|
|
8974
8972
|
if ((n = Number(key)).toString() === key) {
|
|
8975
8973
|
return n;
|
|
8976
8974
|
}
|
|
8977
|
-
if (
|
|
8975
|
+
if (isQuotedString(key)) {
|
|
8978
8976
|
return key.slice(1, -1);
|
|
8979
8977
|
}
|
|
8980
8978
|
// Variables and constants
|
|
@@ -9087,7 +9085,8 @@ function format(str = '', ctx, chart) {
|
|
|
9087
9085
|
// Simple variable replacement
|
|
9088
9086
|
}
|
|
9089
9087
|
else {
|
|
9090
|
-
const valueAndFormat = expression
|
|
9088
|
+
const valueAndFormat = isQuotedString(expression) ?
|
|
9089
|
+
[expression] : expression.split(':');
|
|
9091
9090
|
replacement = resolveProperty(valueAndFormat.shift() || '');
|
|
9092
9091
|
// Format the replacement
|
|
9093
9092
|
if (valueAndFormat.length && typeof replacement === 'number') {
|
|
@@ -9100,13 +9099,14 @@ function format(str = '', ctx, chart) {
|
|
|
9100
9099
|
}
|
|
9101
9100
|
else {
|
|
9102
9101
|
replacement = time.dateFormat(segment, replacement);
|
|
9103
|
-
// Use string literal in order to be preserved in the outer
|
|
9104
|
-
// expression
|
|
9105
|
-
if (hasSub) {
|
|
9106
|
-
replacement = `"${replacement}"`;
|
|
9107
|
-
}
|
|
9108
9102
|
}
|
|
9109
9103
|
}
|
|
9104
|
+
// Use string literal in order to be preserved in the outer
|
|
9105
|
+
// expression
|
|
9106
|
+
subRegex.lastIndex = 0;
|
|
9107
|
+
if (subRegex.test(match.find) && Templating_isString(replacement)) {
|
|
9108
|
+
replacement = `"${replacement}"`;
|
|
9109
|
+
}
|
|
9110
9110
|
}
|
|
9111
9111
|
str = str.replace(match.find, Templating_pick(replacement, ''));
|
|
9112
9112
|
});
|
|
@@ -9187,16 +9187,16 @@ function numberFormat(number, decimals, decimalPoint, thousandsSep) {
|
|
|
9187
9187
|
}
|
|
9188
9188
|
const hasSeparators = thousandsSep || decimalPoint, locale = hasSeparators ?
|
|
9189
9189
|
'en' :
|
|
9190
|
-
(this?.locale ||
|
|
9191
|
-
lang.locale ||
|
|
9192
|
-
Templating_doc.body.closest('[lang]')?.lang), cacheKey = JSON.stringify(options) + locale, nf = numberFormatCache[cacheKey] ?? (numberFormatCache[cacheKey] = new Intl.NumberFormat(locale, options));
|
|
9190
|
+
(this?.locale || lang.locale || Templating_pageLang), cacheKey = JSON.stringify(options) + locale, nf = numberFormatCache[cacheKey] ?? (numberFormatCache[cacheKey] = new Intl.NumberFormat(locale, options));
|
|
9193
9191
|
ret = nf.format(number);
|
|
9194
9192
|
// If thousandsSep or decimalPoint are set, fall back to using English
|
|
9195
9193
|
// format with string replacement for the separators.
|
|
9196
9194
|
if (hasSeparators) {
|
|
9197
9195
|
ret = ret
|
|
9198
|
-
|
|
9199
|
-
.replace(
|
|
9196
|
+
// Preliminary step to avoid re-swapping (#22402)
|
|
9197
|
+
.replace(/([,\.])/g, '_$1')
|
|
9198
|
+
.replace(/_\,/g, thousandsSep ?? ',')
|
|
9199
|
+
.replace('_.', decimalPoint ?? '.');
|
|
9200
9200
|
}
|
|
9201
9201
|
if (
|
|
9202
9202
|
// Remove signed zero (#20564)
|
|
@@ -9691,7 +9691,7 @@ class SVGElement {
|
|
|
9691
9691
|
* @return {Highcharts.SVGElement} Returns the SVGElement for chaining.
|
|
9692
9692
|
*/
|
|
9693
9693
|
align(alignOptions, alignByTranslate, alignTo, redraw = true) {
|
|
9694
|
-
const
|
|
9694
|
+
const renderer = this.renderer, alignedObjects = renderer.alignedObjects, initialAlignment = Boolean(alignOptions);
|
|
9695
9695
|
// First call on instanciate
|
|
9696
9696
|
if (alignOptions) {
|
|
9697
9697
|
this.alignOptions = alignOptions;
|
|
@@ -9723,7 +9723,9 @@ class SVGElement {
|
|
|
9723
9723
|
// Default: top align
|
|
9724
9724
|
y = (alignToBox.y || 0) + (alignOptions.y || 0) +
|
|
9725
9725
|
((alignToBox.height || 0) - (alignOptions.height || 0)) *
|
|
9726
|
-
SVGElement_getAlignFactor(alignOptions.verticalAlign)
|
|
9726
|
+
SVGElement_getAlignFactor(alignOptions.verticalAlign), attribs = {
|
|
9727
|
+
'text-align': alignOptions?.align
|
|
9728
|
+
};
|
|
9727
9729
|
attribs[alignByTranslate ? 'translateX' : 'x'] = Math.round(x);
|
|
9728
9730
|
attribs[alignByTranslate ? 'translateY' : 'y'] = Math.round(y);
|
|
9729
9731
|
// Animate only if already placed
|
|
@@ -11431,6 +11433,7 @@ class SVGLabel extends SVG_SVGElement {
|
|
|
11431
11433
|
* */
|
|
11432
11434
|
alignSetter(value) {
|
|
11433
11435
|
const alignFactor = SVGLabel_getAlignFactor(value);
|
|
11436
|
+
this.textAlign = value;
|
|
11434
11437
|
if (alignFactor !== this.alignFactor) {
|
|
11435
11438
|
this.alignFactor = alignFactor;
|
|
11436
11439
|
// Bounding box exists, means we're dynamically changing
|
|
@@ -11605,7 +11608,10 @@ class SVGLabel extends SVG_SVGElement {
|
|
|
11605
11608
|
this.boxAttr(key, value);
|
|
11606
11609
|
}
|
|
11607
11610
|
'text-alignSetter'(value) {
|
|
11608
|
-
|
|
11611
|
+
// The text-align variety is for the pre-animation getter. The code
|
|
11612
|
+
// should be unified to either textAlign or text-align.
|
|
11613
|
+
this.textAlign = this['text-align'] = value;
|
|
11614
|
+
this.updateTextPadding();
|
|
11609
11615
|
}
|
|
11610
11616
|
textSetter(text) {
|
|
11611
11617
|
if (typeof text !== 'undefined') {
|
|
@@ -11675,24 +11681,19 @@ class SVGLabel extends SVG_SVGElement {
|
|
|
11675
11681
|
* is changed.
|
|
11676
11682
|
*/
|
|
11677
11683
|
updateTextPadding() {
|
|
11678
|
-
const text = this.text;
|
|
11684
|
+
const text = this.text, textAlign = text.styles.textAlign || this.textAlign;
|
|
11679
11685
|
if (!text.textPath) {
|
|
11680
11686
|
this.updateBoxSize();
|
|
11681
11687
|
// Determine y based on the baseline
|
|
11682
11688
|
const textY = this.baseline ? 0 : this.baselineOffset, textX = (this.paddingLeft ?? this.padding) +
|
|
11683
11689
|
// Compensate for alignment
|
|
11684
|
-
((
|
|
11685
|
-
SVGLabel_getAlignFactor(this.textAlign) *
|
|
11686
|
-
(this.widthSetting - this.bBox.width) :
|
|
11687
|
-
0);
|
|
11690
|
+
SVGLabel_getAlignFactor(textAlign) * (this.widthSetting ?? this.bBox.width);
|
|
11688
11691
|
// Update if anything changed
|
|
11689
11692
|
if (textX !== text.x || textY !== text.y) {
|
|
11690
|
-
text.attr(
|
|
11691
|
-
|
|
11692
|
-
|
|
11693
|
-
|
|
11694
|
-
this.bBox = text.getBBox(true);
|
|
11695
|
-
}
|
|
11693
|
+
text.attr({
|
|
11694
|
+
align: textAlign,
|
|
11695
|
+
x: textX
|
|
11696
|
+
});
|
|
11696
11697
|
if (typeof textY !== 'undefined') {
|
|
11697
11698
|
text.attr('y', textY);
|
|
11698
11699
|
}
|
|
@@ -12637,7 +12638,7 @@ class SVGRenderer {
|
|
|
12637
12638
|
this.url = this.getReferenceURL();
|
|
12638
12639
|
// Add description
|
|
12639
12640
|
const desc = this.createElement('desc').add();
|
|
12640
|
-
desc.element.appendChild(SVGRenderer_doc.createTextNode('Created with Highcharts 12.
|
|
12641
|
+
desc.element.appendChild(SVGRenderer_doc.createTextNode('Created with Highcharts 12.1.1'));
|
|
12641
12642
|
this.defs = this.createElement('defs').add();
|
|
12642
12643
|
this.allowHTML = allowHTML;
|
|
12643
12644
|
this.forExport = forExport;
|
|
@@ -14604,7 +14605,7 @@ class HTMLElement extends SVG_SVGElement {
|
|
|
14604
14605
|
textWidth,
|
|
14605
14606
|
this.textAlign
|
|
14606
14607
|
].join(','), parentPadding = (this.parentGroup?.padding * -1) || 0;
|
|
14607
|
-
let baseline
|
|
14608
|
+
let baseline;
|
|
14608
14609
|
// Update textWidth. Use the memoized textPxLength if possible, to
|
|
14609
14610
|
// avoid the getTextPxLength function using elem.offsetWidth.
|
|
14610
14611
|
// Calling offsetWidth affects rendering time as it forces layout
|
|
@@ -14627,10 +14628,8 @@ class HTMLElement extends SVG_SVGElement {
|
|
|
14627
14628
|
whiteSpace: whiteSpace || 'normal' // #3331
|
|
14628
14629
|
});
|
|
14629
14630
|
this.oldTextWidth = textWidth;
|
|
14630
|
-
hasBoxWidthChanged = true; // #8159
|
|
14631
14631
|
}
|
|
14632
14632
|
}
|
|
14633
|
-
this.hasBoxWidthChanged = hasBoxWidthChanged; // #8159
|
|
14634
14633
|
// Do the calculations and DOM access only if properties changed
|
|
14635
14634
|
if (currentTextTransform !== this.cTT) {
|
|
14636
14635
|
baseline = renderer.fontMetrics(element).b;
|
|
@@ -27480,7 +27479,9 @@ class Pointer {
|
|
|
27480
27479
|
hoverChart !== chart) {
|
|
27481
27480
|
const relatedTargetObj = { relatedTarget: chart.container };
|
|
27482
27481
|
if (e && !e?.relatedTarget) {
|
|
27483
|
-
|
|
27482
|
+
// #17192, Non-enumerable properties of "e" are dropped with
|
|
27483
|
+
// spreading (...e). Using Object.assign ensures integrity.
|
|
27484
|
+
Object.assign({}, e, relatedTargetObj);
|
|
27484
27485
|
}
|
|
27485
27486
|
hoverChart.pointer?.onContainerMouseLeave(e || relatedTargetObj);
|
|
27486
27487
|
}
|
|
@@ -33086,9 +33087,14 @@ class Series {
|
|
|
33086
33087
|
* @private
|
|
33087
33088
|
* @function Highcharts.Series#searchKDTree
|
|
33088
33089
|
*/
|
|
33089
|
-
searchKDTree(point, compareX, e) {
|
|
33090
|
+
searchKDTree(point, compareX, e, suppliedPointEvaluator, suppliedBSideCheckEvaluator) {
|
|
33090
33091
|
const series = this, [kdX, kdY] = this.kdAxisArray, kdComparer = compareX ? 'distX' : 'dist', kdDimensions = (series.options.findNearestPointBy || '')
|
|
33091
|
-
.indexOf('y') > -1 ? 2 : 1, useRadius = !!series.isBubble
|
|
33092
|
+
.indexOf('y') > -1 ? 2 : 1, useRadius = !!series.isBubble, pointEvaluator = suppliedPointEvaluator || ((p1, p2, comparisonProp) => [
|
|
33093
|
+
(p1[comparisonProp] || 0) < (p2[comparisonProp] || 0) ?
|
|
33094
|
+
p1 :
|
|
33095
|
+
p2,
|
|
33096
|
+
false
|
|
33097
|
+
]), bSideCheckEvaluator = suppliedBSideCheckEvaluator || ((a, b) => a < b);
|
|
33092
33098
|
/**
|
|
33093
33099
|
* Set the one and two dimensional distance on the point object.
|
|
33094
33100
|
* @private
|
|
@@ -33103,28 +33109,21 @@ class Series {
|
|
|
33103
33109
|
*/
|
|
33104
33110
|
function doSearch(search, tree, depth, dimensions) {
|
|
33105
33111
|
const point = tree.point, axis = series.kdAxisArray[depth % dimensions];
|
|
33106
|
-
let
|
|
33112
|
+
let ret = point, flip = false;
|
|
33107
33113
|
setDistance(search, point);
|
|
33108
33114
|
// Pick side based on distance to splitting point
|
|
33109
33115
|
const tdist = (search[axis] || 0) - (point[axis] || 0) +
|
|
33110
33116
|
(useRadius ? (point.marker?.radius || 0) : 0), sideA = tdist < 0 ? 'left' : 'right', sideB = tdist < 0 ? 'right' : 'left';
|
|
33111
33117
|
// End of tree
|
|
33112
33118
|
if (tree[sideA]) {
|
|
33113
|
-
|
|
33114
|
-
ret = (nPoint1[kdComparer] <
|
|
33115
|
-
ret[kdComparer] ?
|
|
33116
|
-
nPoint1 :
|
|
33117
|
-
point);
|
|
33119
|
+
[ret, flip] = pointEvaluator(point, doSearch(search, tree[sideA], depth + 1, dimensions), kdComparer);
|
|
33118
33120
|
}
|
|
33119
33121
|
if (tree[sideB]) {
|
|
33122
|
+
const sqrtTDist = Math.sqrt(tdist * tdist), retDist = ret[kdComparer];
|
|
33120
33123
|
// Compare distance to current best to splitting point to decide
|
|
33121
|
-
// whether to check side B or
|
|
33122
|
-
if (
|
|
33123
|
-
|
|
33124
|
-
ret = (nPoint2[kdComparer] <
|
|
33125
|
-
ret[kdComparer] ?
|
|
33126
|
-
nPoint2 :
|
|
33127
|
-
ret);
|
|
33124
|
+
// whether to check side B or no
|
|
33125
|
+
if (bSideCheckEvaluator(sqrtTDist, retDist, flip)) {
|
|
33126
|
+
ret = pointEvaluator(ret, doSearch(search, tree[sideB], depth + 1, dimensions), kdComparer)[0];
|
|
33128
33127
|
}
|
|
33129
33128
|
}
|
|
33130
33129
|
return ret;
|
|
@@ -42633,6 +42632,7 @@ var DataLabel;
|
|
|
42633
42632
|
dataLabel.alignAttr.y += DataLabel_getAlignFactor(options.verticalAlign) *
|
|
42634
42633
|
(unrotatedbBox.height - bBox.height);
|
|
42635
42634
|
dataLabel[dataLabel.placed ? 'animate' : 'attr']({
|
|
42635
|
+
'text-align': dataLabel.alignAttr['text-align'] || 'center',
|
|
42636
42636
|
x: dataLabel.alignAttr.x +
|
|
42637
42637
|
(bBox.width - unrotatedbBox.width) / 2,
|
|
42638
42638
|
y: dataLabel.alignAttr.y +
|
|
@@ -51613,8 +51613,11 @@ const rangeSelector = {
|
|
|
51613
51613
|
* The alignment of the input box. Allowed properties are `left`,
|
|
51614
51614
|
* `center`, `right`.
|
|
51615
51615
|
*
|
|
51616
|
-
* @sample {highstock} stock/rangeselector/input-button-
|
|
51617
|
-
*
|
|
51616
|
+
* @sample {highstock} stock/rangeselector/input-button-opposite-alignment/
|
|
51617
|
+
* Opposite alignment
|
|
51618
|
+
*
|
|
51619
|
+
* @sample {highstock} stock/rangeselector/input-button-same-alignment/
|
|
51620
|
+
* Same alignment for buttons and input
|
|
51618
51621
|
*
|
|
51619
51622
|
* @type {Highcharts.AlignValue}
|
|
51620
51623
|
* @since 6.0.0
|
|
@@ -51654,8 +51657,11 @@ const rangeSelector = {
|
|
|
51654
51657
|
* The alignment of the input box. Allowed properties are `left`,
|
|
51655
51658
|
* `center`, `right`.
|
|
51656
51659
|
*
|
|
51657
|
-
* @sample {highstock} stock/rangeselector/input-button-
|
|
51658
|
-
*
|
|
51660
|
+
* @sample {highstock} stock/rangeselector/input-button-opposite-alignment/
|
|
51661
|
+
* Opposite alignment
|
|
51662
|
+
*
|
|
51663
|
+
* @sample {highstock} stock/rangeselector/input-button-same-alignment/
|
|
51664
|
+
* Same alignment for buttons and input
|
|
51659
51665
|
*
|
|
51660
51666
|
* @type {Highcharts.AlignValue}
|
|
51661
51667
|
* @since 6.0.0
|
|
@@ -53047,6 +53053,7 @@ const { addEvent: RangeSelector_addEvent, createElement: RangeSelector_createEle
|
|
|
53047
53053
|
* @function preferredInputType
|
|
53048
53054
|
*/
|
|
53049
53055
|
function preferredInputType(format) {
|
|
53056
|
+
const hasTimeKey = (char) => new RegExp(`%[[a-zA-Z]*${char}`).test(format);
|
|
53050
53057
|
const ms = RangeSelector_isString(format) ?
|
|
53051
53058
|
format.indexOf('%L') !== -1 :
|
|
53052
53059
|
// Implemented but not typed as of 2024
|
|
@@ -53056,11 +53063,10 @@ function preferredInputType(format) {
|
|
|
53056
53063
|
}
|
|
53057
53064
|
const date = RangeSelector_isString(format) ?
|
|
53058
53065
|
['a', 'A', 'd', 'e', 'w', 'b', 'B', 'm', 'o', 'y', 'Y']
|
|
53059
|
-
.some(
|
|
53066
|
+
.some(hasTimeKey) :
|
|
53060
53067
|
format.dateStyle || format.day || format.month || format.year;
|
|
53061
53068
|
const time = RangeSelector_isString(format) ?
|
|
53062
|
-
['H', 'k', 'I', 'l', 'M', 'S']
|
|
53063
|
-
.some((char) => format.indexOf('%' + char) !== -1) :
|
|
53069
|
+
['H', 'k', 'I', 'l', 'M', 'S'].some(hasTimeKey) :
|
|
53064
53070
|
format.timeStyle || format.hour || format.minute || format.second;
|
|
53065
53071
|
if (date && time) {
|
|
53066
53072
|
return 'datetime-local';
|
|
@@ -53107,6 +53113,16 @@ class RangeSelector {
|
|
|
53107
53113
|
this.isDirty = false;
|
|
53108
53114
|
this.buttonOptions = RangeSelector.prototype.defaultButtons;
|
|
53109
53115
|
this.initialButtonGroupWidth = 0;
|
|
53116
|
+
this.maxButtonWidth = () => {
|
|
53117
|
+
let buttonWidth = 0;
|
|
53118
|
+
this.buttons.forEach((button) => {
|
|
53119
|
+
const bBox = button.getBBox();
|
|
53120
|
+
if (bBox.width > buttonWidth) {
|
|
53121
|
+
buttonWidth = bBox.width;
|
|
53122
|
+
}
|
|
53123
|
+
});
|
|
53124
|
+
return buttonWidth;
|
|
53125
|
+
};
|
|
53110
53126
|
this.init(chart);
|
|
53111
53127
|
}
|
|
53112
53128
|
/* *
|
|
@@ -53400,9 +53416,15 @@ class RangeSelector {
|
|
|
53400
53416
|
if (selectedIndex !== null) {
|
|
53401
53417
|
buttonStates[selectedIndex] = 2;
|
|
53402
53418
|
rangeSelector.setSelected(selectedIndex);
|
|
53419
|
+
if (this.dropdown) {
|
|
53420
|
+
this.dropdown.selectedIndex = selectedIndex + 1;
|
|
53421
|
+
}
|
|
53403
53422
|
}
|
|
53404
53423
|
else {
|
|
53405
53424
|
rangeSelector.setSelected();
|
|
53425
|
+
if (this.dropdown) {
|
|
53426
|
+
this.dropdown.selectedIndex = -1;
|
|
53427
|
+
}
|
|
53406
53428
|
if (dropdownLabel) {
|
|
53407
53429
|
dropdownLabel.setState(0);
|
|
53408
53430
|
dropdownLabel.attr({
|
|
@@ -54021,11 +54043,11 @@ class RangeSelector {
|
|
|
54021
54043
|
const { buttonPosition, inputPosition, verticalAlign } = options;
|
|
54022
54044
|
// Get the X offset required to avoid overlapping with the exporting
|
|
54023
54045
|
// button. This is used both by the buttonGroup and the inputGroup.
|
|
54024
|
-
const getXOffsetForExportButton = (group, position) => {
|
|
54046
|
+
const getXOffsetForExportButton = (group, position, rightAligned) => {
|
|
54025
54047
|
if (navButtonOptions &&
|
|
54026
54048
|
this.titleCollision(chart) &&
|
|
54027
54049
|
verticalAlign === 'top' &&
|
|
54028
|
-
|
|
54050
|
+
rightAligned && ((position.y -
|
|
54029
54051
|
group.getBBox().height - 12) <
|
|
54030
54052
|
((navButtonOptions.y || 0) +
|
|
54031
54053
|
(navButtonOptions.height || 0) +
|
|
@@ -54054,7 +54076,8 @@ class RangeSelector {
|
|
|
54054
54076
|
}
|
|
54055
54077
|
plotLeft -= chart.spacing[3];
|
|
54056
54078
|
// Detect collision between button group and exporting
|
|
54057
|
-
const xOffsetForExportButton = getXOffsetForExportButton(buttonGroup, buttonPosition
|
|
54079
|
+
const xOffsetForExportButton = getXOffsetForExportButton(buttonGroup, buttonPosition, buttonPosition.align === 'right' ||
|
|
54080
|
+
inputPosition.align === 'right');
|
|
54058
54081
|
this.alignButtonGroup(xOffsetForExportButton);
|
|
54059
54082
|
if (this.buttonGroup?.translateY) {
|
|
54060
54083
|
this.dropdownLabel
|
|
@@ -54066,7 +54089,8 @@ class RangeSelector {
|
|
|
54066
54089
|
let xOffsetForExportButton = 0;
|
|
54067
54090
|
if (options.inputEnabled && inputGroup) {
|
|
54068
54091
|
// Detect collision between the input group and exporting button
|
|
54069
|
-
xOffsetForExportButton = getXOffsetForExportButton(inputGroup, inputPosition
|
|
54092
|
+
xOffsetForExportButton = getXOffsetForExportButton(inputGroup, inputPosition, buttonPosition.align === 'right' ||
|
|
54093
|
+
inputPosition.align === 'right');
|
|
54070
54094
|
if (inputPosition.align === 'left') {
|
|
54071
54095
|
translateX = plotLeft;
|
|
54072
54096
|
}
|
|
@@ -54219,16 +54243,35 @@ class RangeSelector {
|
|
|
54219
54243
|
* @param {number} [width]
|
|
54220
54244
|
*/
|
|
54221
54245
|
alignButtonGroup(xOffsetForExportButton, width) {
|
|
54222
|
-
const { chart, options, buttonGroup } = this;
|
|
54246
|
+
const { chart, options, buttonGroup, dropdown, dropdownLabel } = this;
|
|
54223
54247
|
const { buttonPosition } = options;
|
|
54224
54248
|
const plotLeft = chart.plotLeft - chart.spacing[3];
|
|
54225
54249
|
let translateX = buttonPosition.x - chart.spacing[3];
|
|
54250
|
+
let dropdownTranslateX = chart.plotLeft;
|
|
54226
54251
|
if (buttonPosition.align === 'right') {
|
|
54227
54252
|
translateX += xOffsetForExportButton - plotLeft; // #13014
|
|
54253
|
+
if (this.hasVisibleDropdown) {
|
|
54254
|
+
dropdownTranslateX = chart.chartWidth +
|
|
54255
|
+
xOffsetForExportButton -
|
|
54256
|
+
this.maxButtonWidth() - 20;
|
|
54257
|
+
}
|
|
54228
54258
|
}
|
|
54229
54259
|
else if (buttonPosition.align === 'center') {
|
|
54230
54260
|
translateX -= plotLeft / 2;
|
|
54261
|
+
if (this.hasVisibleDropdown) {
|
|
54262
|
+
dropdownTranslateX = chart.chartWidth / 2 -
|
|
54263
|
+
this.maxButtonWidth();
|
|
54264
|
+
}
|
|
54231
54265
|
}
|
|
54266
|
+
if (dropdown) {
|
|
54267
|
+
RangeSelector_css(dropdown, {
|
|
54268
|
+
left: dropdownTranslateX + 'px',
|
|
54269
|
+
top: buttonGroup?.translateY + 'px'
|
|
54270
|
+
});
|
|
54271
|
+
}
|
|
54272
|
+
dropdownLabel?.attr({
|
|
54273
|
+
x: dropdownTranslateX
|
|
54274
|
+
});
|
|
54232
54275
|
if (buttonGroup) {
|
|
54233
54276
|
// Align button group
|
|
54234
54277
|
buttonGroup.align({
|
|
@@ -54280,38 +54323,8 @@ class RangeSelector {
|
|
|
54280
54323
|
* exporting button
|
|
54281
54324
|
*/
|
|
54282
54325
|
handleCollision(xOffsetForExportButton) {
|
|
54283
|
-
const { chart, buttonGroup, inputGroup } = this;
|
|
54326
|
+
const { chart, buttonGroup, inputGroup, initialButtonGroupWidth } = this;
|
|
54284
54327
|
const { buttonPosition, dropdown, inputPosition } = this.options;
|
|
54285
|
-
const maxButtonWidth = () => {
|
|
54286
|
-
let buttonWidth = 0;
|
|
54287
|
-
this.buttons.forEach((button) => {
|
|
54288
|
-
const bBox = button.getBBox();
|
|
54289
|
-
if (bBox.width > buttonWidth) {
|
|
54290
|
-
buttonWidth = bBox.width;
|
|
54291
|
-
}
|
|
54292
|
-
});
|
|
54293
|
-
return buttonWidth;
|
|
54294
|
-
};
|
|
54295
|
-
const groupsOverlap = (buttonGroupWidth) => {
|
|
54296
|
-
if (inputGroup?.alignOptions && buttonGroup) {
|
|
54297
|
-
const inputGroupX = (inputGroup.alignAttr.translateX +
|
|
54298
|
-
inputGroup.alignOptions.x -
|
|
54299
|
-
xOffsetForExportButton +
|
|
54300
|
-
// `getBBox` for detecing left margin
|
|
54301
|
-
inputGroup.getBBox().x +
|
|
54302
|
-
// 2px padding to not overlap input and label
|
|
54303
|
-
2);
|
|
54304
|
-
const inputGroupWidth = inputGroup.alignOptions.width || 0;
|
|
54305
|
-
const buttonGroupX = buttonGroup.alignAttr.translateX +
|
|
54306
|
-
buttonGroup.getBBox().x;
|
|
54307
|
-
return (buttonGroupX + buttonGroupWidth > inputGroupX) &&
|
|
54308
|
-
(inputGroupX + inputGroupWidth > buttonGroupX) &&
|
|
54309
|
-
(buttonPosition.y <
|
|
54310
|
-
(inputPosition.y +
|
|
54311
|
-
inputGroup.getBBox().height));
|
|
54312
|
-
}
|
|
54313
|
-
return false;
|
|
54314
|
-
};
|
|
54315
54328
|
const moveInputsDown = () => {
|
|
54316
54329
|
if (inputGroup && buttonGroup) {
|
|
54317
54330
|
inputGroup.attr({
|
|
@@ -54323,47 +54336,51 @@ class RangeSelector {
|
|
|
54323
54336
|
});
|
|
54324
54337
|
}
|
|
54325
54338
|
};
|
|
54326
|
-
if (buttonGroup) {
|
|
54327
|
-
if (dropdown === 'always') {
|
|
54328
|
-
this.collapseButtons();
|
|
54329
|
-
if (groupsOverlap(maxButtonWidth())) {
|
|
54330
|
-
// Move the inputs down if there is still a collision
|
|
54331
|
-
// after collapsing the buttons
|
|
54332
|
-
moveInputsDown();
|
|
54333
|
-
}
|
|
54334
|
-
return;
|
|
54335
|
-
}
|
|
54336
|
-
if (dropdown === 'never') {
|
|
54337
|
-
this.expandButtons();
|
|
54338
|
-
}
|
|
54339
|
-
}
|
|
54340
54339
|
// Detect collision
|
|
54341
54340
|
if (inputGroup && buttonGroup) {
|
|
54342
|
-
if (
|
|
54343
|
-
|
|
54344
|
-
|
|
54341
|
+
if (inputPosition.align === buttonPosition.align) {
|
|
54342
|
+
moveInputsDown();
|
|
54343
|
+
if (initialButtonGroupWidth >
|
|
54344
|
+
chart.plotWidth + xOffsetForExportButton - 20) {
|
|
54345
|
+
this.collapseButtons();
|
|
54346
|
+
}
|
|
54347
|
+
else {
|
|
54348
|
+
this.expandButtons();
|
|
54349
|
+
}
|
|
54350
|
+
}
|
|
54351
|
+
else if (initialButtonGroupWidth -
|
|
54352
|
+
xOffsetForExportButton +
|
|
54353
|
+
inputGroup.getBBox().width >
|
|
54354
|
+
chart.plotWidth) {
|
|
54345
54355
|
if (dropdown === 'responsive') {
|
|
54346
54356
|
this.collapseButtons();
|
|
54347
|
-
if (groupsOverlap(maxButtonWidth())) {
|
|
54348
|
-
moveInputsDown();
|
|
54349
|
-
}
|
|
54350
54357
|
}
|
|
54351
54358
|
else {
|
|
54352
54359
|
moveInputsDown();
|
|
54353
54360
|
}
|
|
54354
54361
|
}
|
|
54355
|
-
else
|
|
54362
|
+
else {
|
|
54356
54363
|
this.expandButtons();
|
|
54357
54364
|
}
|
|
54358
54365
|
}
|
|
54359
54366
|
else if (buttonGroup && dropdown === 'responsive') {
|
|
54360
|
-
if (
|
|
54367
|
+
if (initialButtonGroupWidth > chart.plotWidth) {
|
|
54361
54368
|
this.collapseButtons();
|
|
54362
54369
|
}
|
|
54363
54370
|
else {
|
|
54364
54371
|
this.expandButtons();
|
|
54365
54372
|
}
|
|
54366
54373
|
}
|
|
54374
|
+
// Forced states
|
|
54375
|
+
if (buttonGroup) {
|
|
54376
|
+
if (dropdown === 'always') {
|
|
54377
|
+
this.collapseButtons();
|
|
54378
|
+
}
|
|
54379
|
+
if (dropdown === 'never') {
|
|
54380
|
+
this.expandButtons();
|
|
54381
|
+
}
|
|
54382
|
+
}
|
|
54383
|
+
this.alignButtonGroup(xOffsetForExportButton);
|
|
54367
54384
|
}
|
|
54368
54385
|
/**
|
|
54369
54386
|
* Collapse the buttons and show the select element.
|
|
@@ -54406,17 +54423,10 @@ class RangeSelector {
|
|
|
54406
54423
|
* @function Highcharts.RangeSelector#showDropdown
|
|
54407
54424
|
*/
|
|
54408
54425
|
showDropdown() {
|
|
54409
|
-
const { buttonGroup,
|
|
54426
|
+
const { buttonGroup, dropdownLabel, dropdown } = this;
|
|
54410
54427
|
if (buttonGroup && dropdown) {
|
|
54411
|
-
|
|
54412
|
-
|
|
54413
|
-
.attr({ x: left, y: top })
|
|
54414
|
-
.show();
|
|
54415
|
-
RangeSelector_css(dropdown, {
|
|
54416
|
-
left: left + 'px',
|
|
54417
|
-
top: top + 'px',
|
|
54418
|
-
visibility: 'inherit'
|
|
54419
|
-
});
|
|
54428
|
+
dropdownLabel.show();
|
|
54429
|
+
RangeSelector_css(dropdown, { visibility: 'inherit' });
|
|
54420
54430
|
this.hasVisibleDropdown = true;
|
|
54421
54431
|
}
|
|
54422
54432
|
}
|
|
@@ -56395,7 +56405,7 @@ Pathfinder.prototype.algorithms = PathfinderAlgorithms;
|
|
|
56395
56405
|
|
|
56396
56406
|
;// ./code/es-modules/masters/modules/pathfinder.src.js
|
|
56397
56407
|
/**
|
|
56398
|
-
* @license Highcharts Gantt JS v12.
|
|
56408
|
+
* @license Highcharts Gantt JS v12.1.1 (2024-12-20)
|
|
56399
56409
|
* @module highcharts/modules/pathfinder
|
|
56400
56410
|
* @requires highcharts
|
|
56401
56411
|
*
|
|
@@ -56523,7 +56533,7 @@ const StaticScale = {
|
|
|
56523
56533
|
|
|
56524
56534
|
;// ./code/es-modules/masters/modules/static-scale.src.js
|
|
56525
56535
|
/**
|
|
56526
|
-
* @license Highcharts Gantt JS v12.
|
|
56536
|
+
* @license Highcharts Gantt JS v12.1.1 (2024-12-20)
|
|
56527
56537
|
* @module highcharts/modules/static-scale
|
|
56528
56538
|
* @requires highcharts
|
|
56529
56539
|
*
|
|
@@ -57334,7 +57344,7 @@ Series_SeriesRegistry.registerSeriesType('xrange', XRangeSeries);
|
|
|
57334
57344
|
|
|
57335
57345
|
;// ./code/es-modules/masters/modules/xrange.src.js
|
|
57336
57346
|
/**
|
|
57337
|
-
* @license Highcharts JS v12.
|
|
57347
|
+
* @license Highcharts JS v12.1.1 (2024-12-20)
|
|
57338
57348
|
* @module highcharts/modules/xrange
|
|
57339
57349
|
* @requires highcharts
|
|
57340
57350
|
*
|
|
@@ -60882,7 +60892,7 @@ Series_SeriesRegistry.registerSeriesType('gantt', GanttSeries);
|
|
|
60882
60892
|
|
|
60883
60893
|
;// ./code/es-modules/masters/modules/gantt.src.js
|
|
60884
60894
|
/**
|
|
60885
|
-
* @license Highcharts Gantt JS v12.
|
|
60895
|
+
* @license Highcharts Gantt JS v12.1.1 (2024-12-20)
|
|
60886
60896
|
* @module highcharts/modules/gantt
|
|
60887
60897
|
* @requires highcharts
|
|
60888
60898
|
*
|
|
@@ -60926,7 +60936,7 @@ gantt_src_G.Scrollbar.compose(gantt_src_G.Axis);
|
|
|
60926
60936
|
|
|
60927
60937
|
;// ./code/es-modules/masters/highcharts-gantt.src.js
|
|
60928
60938
|
/**
|
|
60929
|
-
* @license Highcharts Gantt JS v12.
|
|
60939
|
+
* @license Highcharts Gantt JS v12.1.1 (2024-12-20)
|
|
60930
60940
|
* @module highcharts/highcharts-gantt
|
|
60931
60941
|
*
|
|
60932
60942
|
* (c) 2017-2024 Lars Cabrera, Torstein Honsi, Jon Arild Nygard & Oystein Moseng
|