highcharts 8.1.0 → 8.2.2
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/css/highcharts.css +12 -0
- package/css/highcharts.scss +12 -0
- package/css/themes/dark-unica.css +12 -0
- package/css/themes/grid-light.css +12 -0
- package/css/themes/sand-signika.css +12 -0
- package/es-modules/{modules/accessibility/a11y-i18n.js → Accessibility/A11yI18n.js} +2 -2
- package/es-modules/{modules/accessibility/accessibility.js → Accessibility/Accessibility.js} +24 -21
- package/es-modules/{modules/accessibility → Accessibility}/AccessibilityComponent.js +73 -17
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/AnnotationsA11y.js +2 -4
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/ContainerComponent.js +8 -9
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/InfoRegionsComponent.js +9 -12
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/LegendComponent.js +60 -22
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/MenuComponent.js +4 -11
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/RangeSelectorComponent.js +8 -7
- package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +171 -0
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/SeriesComponent/NewDataAnnouncer.js +8 -7
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/SeriesComponent/SeriesComponent.js +5 -5
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/SeriesComponent/SeriesDescriber.js +6 -6
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/SeriesComponent/SeriesKeyboardNavigation.js +22 -20
- package/es-modules/{modules/accessibility/components → Accessibility/Components}/ZoomComponent.js +9 -8
- package/es-modules/{modules/accessibility/focusBorder.js → Accessibility/FocusBorder.js} +13 -10
- package/es-modules/{modules/accessibility/high-contrast-mode.js → Accessibility/HighContrastMode.js} +3 -2
- package/es-modules/{modules/accessibility/high-contrast-theme.js → Accessibility/HighContrastTheme.js} +0 -0
- package/es-modules/{modules/accessibility → Accessibility}/KeyboardNavigation.js +35 -22
- package/es-modules/{modules/accessibility → Accessibility}/KeyboardNavigationHandler.js +1 -1
- package/es-modules/{modules/accessibility/options/deprecatedOptions.js → Accessibility/Options/DeprecatedOptions.js} +10 -20
- package/es-modules/{modules/accessibility/options/langOptions.js → Accessibility/Options/LangOptions.js} +1 -1
- package/es-modules/{modules/accessibility/options/options.js → Accessibility/Options/Options.js} +1 -2
- package/es-modules/{modules/accessibility/utils → Accessibility/Utils}/Announcer.js +2 -2
- package/es-modules/{modules/accessibility/utils/chartUtilities.js → Accessibility/Utils/ChartUtilities.js} +8 -9
- package/es-modules/{modules/accessibility/utils → Accessibility/Utils}/DOMElementProvider.js +5 -5
- package/es-modules/{modules/accessibility/utils → Accessibility/Utils}/EventProvider.js +2 -2
- package/es-modules/{modules/accessibility/utils/htmlUtilities.js → Accessibility/Utils/HTMLUtilities.js} +3 -4
- package/es-modules/Core/Animation/AnimationUtilities.js +193 -0
- package/es-modules/Core/Animation/Fx.js +378 -0
- package/es-modules/{parts → Core/Axis}/Axis.js +153 -89
- package/es-modules/{parts-3d → Core/Axis}/Axis3D.js +12 -7
- package/es-modules/{modules/broken-axis.src.js → Core/Axis/BrokenAxis.js} +6 -8
- package/es-modules/{parts-map → Core/Axis}/ColorAxis.js +28 -31
- package/es-modules/{parts → Core/Axis}/DateTimeAxis.js +1 -1
- package/es-modules/{parts-gantt → Core/Axis}/GridAxis.js +136 -39
- package/es-modules/{parts-more → Core/Axis}/HiddenAxis.js +0 -0
- package/es-modules/{parts → Core/Axis}/LogarithmicAxis.js +1 -1
- package/es-modules/{parts-map → Core/Axis}/MapAxis.js +2 -2
- package/es-modules/{parts → Core/Axis}/NavigatorAxis.js +2 -2
- package/es-modules/{parts → Core/Axis}/OrdinalAxis.js +241 -224
- package/es-modules/{parts → Core/Axis}/PlotLineOrBand.js +24 -15
- package/es-modules/{parts-more → Core/Axis}/RadialAxis.js +34 -27
- package/es-modules/{parts → Core/Axis}/ScrollbarAxis.js +2 -2
- package/es-modules/{parts → Core/Axis}/StackingAxis.js +11 -2
- package/es-modules/{parts → Core/Axis}/Tick.js +14 -14
- package/es-modules/{parts-3d → Core/Axis}/Tick3D.js +1 -1
- package/es-modules/{parts-gantt → Core/Axis}/TreeGridAxis.js +81 -15
- package/es-modules/{parts-gantt → Core/Axis}/TreeGridTick.js +1 -1
- package/es-modules/{parts-3d → Core/Axis}/ZAxis.js +2 -2
- package/es-modules/{parts → Core/Chart}/Chart.js +225 -227
- package/es-modules/Core/Chart/Chart3D.js +1674 -0
- package/es-modules/{parts-gantt → Core/Chart}/GanttChart.js +13 -12
- package/es-modules/{parts → Core/Chart}/StockChart.js +26 -25
- package/es-modules/Core/Color/Color.js +419 -0
- package/es-modules/Core/Color/ColorType.js +9 -0
- package/es-modules/{parts → Core}/Color.js +1 -1
- package/es-modules/{parts → Core}/Dynamics.js +91 -61
- package/es-modules/{parts → Core}/Globals.js +9 -1
- package/es-modules/{parts → Core}/Interaction.js +27 -20
- package/es-modules/{parts → Core}/Legend.js +26 -11
- package/es-modules/{parts → Core}/MSPointer.js +2 -2
- package/es-modules/{parts → Core}/Navigator.js +24 -14
- package/es-modules/{parts → Core}/Options.js +157 -69
- package/es-modules/{parts → Core}/Pointer.js +50 -27
- package/es-modules/Core/Renderer/DOMElementType.js +9 -0
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +220 -0
- package/es-modules/{parts/Html.js → Core/Renderer/HTML/HTMLRenderer.js} +16 -207
- package/es-modules/{parts → Core/Renderer/SVG}/SVGElement.js +186 -32
- package/es-modules/Core/Renderer/SVG/SVGLabel.js +410 -0
- package/es-modules/{parts/SvgRenderer.js → Core/Renderer/SVG/SVGRenderer.js} +426 -886
- package/es-modules/{parts-3d/SVGRenderer.js → Core/Renderer/SVG/SVGRenderer3D.js} +31 -23
- package/es-modules/{parts → Core}/Responsive.js +24 -14
- package/es-modules/{parts → Core}/Scrollbar.js +5 -4
- package/es-modules/Core/Series/BaseSeries.js +157 -0
- package/es-modules/{parts/Series.js → Core/Series/CartesianSeries.js} +119 -55
- package/es-modules/{parts → Core/Series}/DataLabels.js +40 -36
- package/es-modules/{parts → Core/Series}/Point.js +8 -10
- package/es-modules/Core/Series/Series.js +158 -0
- package/es-modules/{parts-3d/Series.js → Core/Series/Series3D.js} +5 -3
- package/es-modules/{parts → Core}/Time.js +11 -133
- package/es-modules/{parts → Core}/Tooltip.js +30 -27
- package/es-modules/{parts → Core}/Utilities.js +103 -562
- package/es-modules/{mixins/ajax.js → Extensions/Ajax.js} +9 -4
- package/es-modules/{annotations/annotations.src.js → Extensions/Annotations/Annotations.js} +901 -709
- package/es-modules/{annotations → Extensions/Annotations}/ControlPoint.js +2 -2
- package/es-modules/Extensions/Annotations/Controllables/ControllableCircle.js +117 -0
- package/es-modules/Extensions/Annotations/Controllables/ControllableImage.js +111 -0
- package/es-modules/{annotations/controllable → Extensions/Annotations/Controllables}/ControllableLabel.js +186 -146
- package/es-modules/{annotations/controllable → Extensions/Annotations/Controllables}/ControllablePath.js +81 -42
- package/es-modules/Extensions/Annotations/Controllables/ControllableRect.js +121 -0
- package/es-modules/{annotations/controllable/controllableMixin.js → Extensions/Annotations/Mixins/ControllableMixin.js} +8 -9
- package/es-modules/{annotations/eventEmitterMixin.js → Extensions/Annotations/Mixins/EventEmitterMixin.js} +7 -7
- package/es-modules/{annotations/controllable/markerMixin.js → Extensions/Annotations/Mixins/MarkerMixin.js} +10 -8
- package/es-modules/{annotations → Extensions/Annotations}/MockPoint.js +6 -6
- package/es-modules/{annotations/navigationBindings.js → Extensions/Annotations/NavigationBindings.js} +27 -16
- package/es-modules/{annotations/popup.js → Extensions/Annotations/Popup.js} +9 -9
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/BasicAnnotation.js +68 -20
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/CrookedLine.js +46 -19
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/ElliottWave.js +33 -12
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/Fibonacci.js +54 -22
- package/es-modules/Extensions/Annotations/Types/InfinityLine.js +147 -0
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/Measure.js +82 -52
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/Pitchfork.js +69 -32
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/Tunnel.js +58 -30
- package/es-modules/{annotations/types → Extensions/Annotations/Types}/VerticalLine.js +64 -33
- package/es-modules/{parts-gantt → Extensions}/ArrowSymbols.js +9 -11
- package/es-modules/{modules/boost/boost.js → Extensions/Boost/Boost.js} +8 -8
- package/es-modules/{modules/boost/boost-attach.js → Extensions/Boost/BoostAttach.js} +10 -8
- package/es-modules/{modules/boost/boost-init.js → Extensions/Boost/BoostInit.js} +7 -6
- package/es-modules/{modules/boost/boost-options.js → Extensions/Boost/BoostOptions.js} +1 -1
- package/es-modules/{modules/boost/boost-overrides.js → Extensions/Boost/BoostOverrides.js} +14 -11
- package/es-modules/{modules/boost/boost-utils.js → Extensions/Boost/BoostUtils.js} +6 -6
- package/es-modules/{modules/boost/boostable-map.js → Extensions/Boost/BoostableMap.js} +1 -1
- package/es-modules/{modules/boost/boostables.js → Extensions/Boost/Boostables.js} +0 -0
- package/es-modules/{modules/boost/named-colors.js → Extensions/Boost/NamedColors.js} +1 -1
- package/es-modules/{modules/boost/wgl-renderer.js → Extensions/Boost/WGLRenderer.js} +9 -9
- package/es-modules/{modules/boost/wgl-shader.js → Extensions/Boost/WGLShader.js} +3 -4
- package/es-modules/{modules/boost/wgl-vbuffer.js → Extensions/Boost/WGLVBuffer.js} +0 -0
- package/es-modules/{modules/boost-canvas.src.js → Extensions/BoostCanvas.js} +13 -9
- package/es-modules/{parts-gantt/CurrentDateIndicator.js → Extensions/CurrentDateIndication.js} +5 -7
- package/es-modules/{modules/data.src.js → Extensions/Data.js} +14 -16
- package/es-modules/{parts → Extensions}/DataGrouping.js +12 -9
- package/es-modules/{modules/debugger.src.js → Extensions/Debugger.js} +6 -6
- package/es-modules/{mixins/download-url.js → Extensions/DownloadURL.js} +15 -7
- package/es-modules/{modules/drag-panes.src.js → Extensions/DragPanes.js} +6 -6
- package/es-modules/{modules/draggable-points.src.js → Extensions/DraggablePoints.js} +21 -32
- package/es-modules/{modules/drilldown.src.js → Extensions/Drilldown.js} +64 -43
- package/es-modules/{modules/export-data.src.js → Extensions/ExportData.js} +126 -26
- package/es-modules/{modules/exporting.src.js → Extensions/Exporting.js} +26 -12
- package/es-modules/{modules/full-screen.src.js → Extensions/FullScreen.js} +5 -3
- package/es-modules/{parts-map → Extensions}/GeoJSON.js +112 -7
- package/es-modules/{modules/marker-clusters.src.js → Extensions/MarkerClusters.js} +29 -39
- package/es-modules/{parts-3d/Math.js → Extensions/Math3D.js} +17 -9
- package/es-modules/{modules/no-data-to-display.src.js → Extensions/NoDataToDisplay.js} +14 -15
- package/es-modules/{modules/offline-exporting.src.js → Extensions/OfflineExporting.js} +39 -35
- package/es-modules/{modules/oldie.src.js → Extensions/Oldie/Oldie.js} +19 -12
- package/es-modules/{parts-3d → Extensions/Oldie}/VMLAxis3D.js +1 -1
- package/es-modules/Extensions/Oldie/VMLRenderer3D.js +46 -0
- package/es-modules/{modules/oldie-polyfills.src.js → Extensions/OldiePolyfills.js} +5 -0
- package/es-modules/{modules/overlapping-datalabels.src.js → Extensions/OverlappingDataLabels.js} +14 -13
- package/es-modules/{parts-more → Extensions}/Pane.js +13 -12
- package/es-modules/{modules/parallel-coordinates.src.js → Extensions/ParallelCoordinates.js} +140 -138
- package/es-modules/{modules/pattern-fill.src.js → Extensions/PatternFill.js} +23 -15
- package/es-modules/{parts-more → Extensions}/Polar.js +15 -12
- package/es-modules/{modules/price-indicator.src.js → Extensions/PriceIndication.js} +5 -3
- package/es-modules/{parts → Extensions}/RangeSelector.js +112 -79
- package/es-modules/{parts → Extensions}/ScrollablePlotArea.js +19 -9
- package/es-modules/{modules/series-label.src.js → Extensions/SeriesLabel.js} +14 -10
- package/es-modules/{modules/sonification/chartSonify.js → Extensions/Sonification/ChartSonify.js} +212 -41
- package/es-modules/{modules/sonification → Extensions/Sonification}/Earcon.js +3 -7
- package/es-modules/{modules/sonification → Extensions/Sonification}/Instrument.js +35 -11
- package/es-modules/{modules/sonification/instrumentDefinitions.js → Extensions/Sonification/InstrumentDefinitions.js} +1 -1
- package/es-modules/{modules/sonification/musicalFrequencies.js → Extensions/Sonification/MusicalFrequencies.js} +0 -0
- package/es-modules/Extensions/Sonification/Options.js +34 -0
- package/es-modules/{modules/sonification/pointSonify.js → Extensions/Sonification/PointSonify.js} +43 -28
- package/es-modules/{modules/sonification/sonification.js → Extensions/Sonification/Sonification.js} +16 -12
- package/es-modules/{modules/sonification → Extensions/Sonification}/Timeline.js +25 -6
- package/es-modules/{modules/sonification/utilities.js → Extensions/Sonification/Utilities.js} +8 -5
- package/es-modules/{parts → Extensions}/Stacking.js +57 -18
- package/es-modules/{modules/static-scale.src.js → Extensions/StaticScale.js} +4 -4
- package/es-modules/{themes/avocado.js → Extensions/Themes/Avocado.js} +5 -4
- package/es-modules/{themes/dark-blue.js → Extensions/Themes/DarkBlue.js} +4 -2
- package/es-modules/{themes/dark-green.js → Extensions/Themes/DarkGreen.js} +4 -2
- package/es-modules/{themes/dark-unica.js → Extensions/Themes/DarkUnica.js} +6 -6
- package/es-modules/{themes/gray.js → Extensions/Themes/Gray.js} +5 -4
- package/es-modules/{themes/grid.js → Extensions/Themes/Grid.js} +4 -2
- package/es-modules/{themes/grid-light.js → Extensions/Themes/GridLight.js} +4 -2
- package/es-modules/{themes/high-contrast-dark.js → Extensions/Themes/HighContrastDark.js} +5 -4
- package/es-modules/{themes/high-contrast-light.js → Extensions/Themes/HighContrastLight.js} +4 -2
- package/es-modules/{themes/sand-signika.js → Extensions/Themes/SandSignika.js} +4 -2
- package/es-modules/{themes/skies.js → Extensions/Themes/Skies.js} +5 -3
- package/es-modules/{themes/sunset.js → Extensions/Themes/Sunset.js} +5 -4
- package/es-modules/{parts-gantt/Pathfinder.js → Gantt/Connection.js} +41 -284
- package/es-modules/Gantt/Pathfinder.js +816 -0
- package/es-modules/Gantt/PathfinderAlgorithms.js +659 -0
- package/es-modules/{parts-gantt → Gantt}/Tree.js +1 -1
- package/es-modules/{parts-map → Maps}/Map.js +24 -15
- package/es-modules/{parts-map → Maps}/MapNavigation.js +4 -5
- package/es-modules/{parts-map → Maps}/MapPointer.js +2 -4
- package/es-modules/{mixins/centered-series.js → Mixins/CenteredSeries.js} +7 -5
- package/es-modules/{parts-map/ColorMapSeriesMixin.js → Mixins/ColorMapSeries.js} +10 -6
- package/es-modules/{parts-map/ColorSeriesMixin.js → Mixins/ColorSeries.js} +12 -4
- package/es-modules/{mixins/derived-series.js → Mixins/DerivedSeries.js} +3 -3
- package/es-modules/{mixins/draw-point.js → Mixins/DrawPoint.js} +6 -1
- package/es-modules/{mixins/geometry.js → Mixins/Geometry.js} +0 -0
- package/es-modules/{mixins/geometry-circles.js → Mixins/GeometryCircles.js} +2 -2
- package/es-modules/{mixins/indicator-required.js → Mixins/IndicatorRequired.js} +1 -1
- package/es-modules/{mixins/legend-symbol.js → Mixins/LegendSymbol.js} +6 -10
- package/es-modules/{mixins/multipe-lines.js → Mixins/MultipleLines.js} +2 -2
- package/es-modules/{mixins/navigation.js → Mixins/Navigation.js} +0 -0
- package/es-modules/{mixins/nelder-mead.js → Mixins/NelderMead.js} +2 -2
- package/es-modules/{mixins/nodes.js → Mixins/Nodes.js} +7 -5
- package/es-modules/{mixins/on-series.js → Mixins/OnSeries.js} +3 -2
- package/es-modules/{mixins/polygon.js → Mixins/Polygon.js} +2 -2
- package/es-modules/{mixins/reduce-array.js → Mixins/ReduceArray.js} +1 -1
- package/es-modules/{mixins/tree-series.js → Mixins/TreeSeries.js} +2 -2
- package/es-modules/{parts-more → Series}/AreaRangeSeries.js +75 -38
- package/es-modules/{parts → Series}/AreaSeries.js +43 -25
- package/es-modules/{parts-more → Series}/AreaSplineRangeSeries.js +47 -10
- package/es-modules/{parts → Series}/AreaSplineSeries.js +49 -10
- package/es-modules/{parts → Series}/BarSeries.js +2 -5
- package/es-modules/{modules/bellcurve.src.js → Series/BellcurveSeries.js} +47 -7
- package/es-modules/{parts-more → Series}/BoxPlotSeries.js +18 -13
- package/es-modules/{parts-more → Series/Bubble}/BubbleLegend.js +11 -9
- package/es-modules/{parts-more → Series/Bubble}/BubbleSeries.js +25 -27
- package/es-modules/{modules/bullet.src.js → Series/BulletSeries.js} +9 -8
- package/es-modules/{parts → Series}/CandlestickSeries.js +11 -8
- package/es-modules/{parts-3d/Column.js → Series/Column3DSeries.js} +108 -28
- package/es-modules/{parts-more → Series}/ColumnPyramidSeries.js +9 -9
- package/es-modules/{parts-more → Series}/ColumnRangeSeries.js +21 -18
- package/es-modules/{parts → Series}/ColumnSeries.js +119 -41
- package/es-modules/{modules/cylinder.src.js → Series/CylinderSeries.js} +14 -14
- package/es-modules/{modules/dependency-wheel.src.js → Series/DependencyWheelSeries.js} +14 -12
- package/es-modules/{modules/dotplot.src.js → Series/DotplotSeries.js} +7 -15
- package/es-modules/{modules/dumbbell.src.js → Series/DumbbellSeries.js} +16 -10
- package/es-modules/{parts-more → Series}/ErrorBarSeries.js +8 -8
- package/es-modules/{parts → Series}/FlagsSeries.js +18 -12
- package/es-modules/{modules/funnel3d.src.js → Series/Funnel3DSeries.js} +14 -16
- package/es-modules/{modules/funnel.src.js → Series/FunnelSeries.js} +16 -14
- package/es-modules/{parts-gantt → Series}/GanttSeries.js +21 -20
- package/es-modules/{parts-more → Series}/GaugeSeries.js +14 -12
- package/es-modules/{parts-map → Series}/HeatmapSeries.js +23 -16
- package/es-modules/{modules/histogram.src.js → Series/HistogramSeries.js} +13 -9
- package/es-modules/{modules/item-series.src.js → Series/ItemSeries.js} +22 -14
- package/es-modules/Series/LineSeries.js +13 -0
- package/es-modules/{modules/lollipop.src.js → Series/LollipopSeries.js} +34 -10
- package/es-modules/{parts-map → Series}/MapBubbleSeries.js +8 -9
- package/es-modules/{parts-map → Series}/MapLineSeries.js +5 -7
- package/es-modules/{parts-map → Series}/MapPointSeries.js +9 -8
- package/es-modules/{parts-map → Series}/MapSeries.js +22 -18
- package/es-modules/{modules/networkgraph/draggable-nodes.js → Series/Networkgraph/DraggableNodes.js} +15 -30
- package/es-modules/{modules/networkgraph/integrations.js → Series/Networkgraph/Integrations.js} +1 -1
- package/es-modules/{modules/networkgraph/layouts.js → Series/Networkgraph/Layouts.js} +43 -13
- package/es-modules/{modules/networkgraph/networkgraph.src.js → Series/Networkgraph/Networkgraph.js} +29 -23
- package/es-modules/{modules/networkgraph → Series/Networkgraph}/QuadTree.js +2 -2
- package/es-modules/{parts → Series}/OHLCSeries.js +5 -7
- package/es-modules/{modules/organization.src.js → Series/OrganizationSeries.js} +10 -7
- package/es-modules/{parts-more → Series}/PackedBubbleSeries.js +104 -28
- package/es-modules/{modules/pareto.src.js → Series/ParetoSeries.js} +10 -9
- package/es-modules/{parts-3d/Pie.js → Series/Pie3DSeries.js} +5 -4
- package/es-modules/{parts → Series}/PieSeries.js +66 -31
- package/es-modules/{parts-more → Series}/PolygonSeries.js +13 -13
- package/es-modules/{modules/pyramid3d.src.js → Series/Pyramid3DSeries.js} +5 -7
- package/es-modules/{modules/sankey.src.js → Series/SankeySeries.js} +23 -21
- package/es-modules/{parts-3d/Scatter.js → Series/Scatter3DSeries.js} +10 -9
- package/es-modules/{parts → Series}/ScatterSeries.js +15 -10
- package/es-modules/{modules/solid-gauge.src.js → Series/SolidGaugeSeries.js} +112 -78
- package/es-modules/{parts → Series}/SplineSeries.js +9 -7
- package/es-modules/{modules/streamgraph.src.js → Series/StreamgraphSeries.js} +42 -6
- package/es-modules/{modules/sunburst.src.js → Series/SunburstSeries.js} +20 -13
- package/es-modules/{modules/tilemap.src.js → Series/TilemapSeries.js} +12 -9
- package/es-modules/{modules/timeline.src.js → Series/TimelineSeries.js} +16 -11
- package/es-modules/{modules/treemap.src.js → Series/TreemapSeries.js} +47 -40
- package/es-modules/{modules/variable-pie.src.js → Series/VariablePieSeries.js} +11 -8
- package/es-modules/{modules/variwide.src.js → Series/VariwideSeries.js} +12 -10
- package/es-modules/{modules/vector.src.js → Series/VectorSeries.js} +11 -7
- package/es-modules/{modules/venn.src.js → Series/VennSeries.js} +29 -20
- package/es-modules/{parts-more → Series}/WaterfallSeries.js +145 -66
- package/es-modules/{modules/windbarb.src.js → Series/WindbarbSeries.js} +13 -9
- package/es-modules/{modules/wordcloud.src.js → Series/WordcloudSeries.js} +17 -13
- package/es-modules/{modules/xrange.src.js → Series/XRangeSeries.js} +16 -12
- package/es-modules/{indicators/acceleration-bands.src.js → Stock/Indicators/ABIndicator.js} +8 -8
- package/es-modules/{indicators/accumulation-distribution.src.js → Stock/Indicators/ADIndicator.js} +5 -4
- package/es-modules/{indicators/ao.src.js → Stock/Indicators/AOIndicator.js} +6 -5
- package/es-modules/{indicators/apo.src.js → Stock/Indicators/APOIndicator.js} +8 -8
- package/es-modules/{indicators/atr.src.js → Stock/Indicators/ATRIndicator.js} +6 -6
- package/es-modules/{indicators/aroon.src.js → Stock/Indicators/AroonIndicator.js} +7 -6
- package/es-modules/{indicators/aroon-oscillator.src.js → Stock/Indicators/AroonOscillatorIndicator.js} +8 -8
- package/es-modules/{indicators/bollinger-bands.src.js → Stock/Indicators/BBIndicator.js} +8 -8
- package/es-modules/{indicators/cci.src.js → Stock/Indicators/CCIIndicator.js} +5 -4
- package/es-modules/{indicators/cmf.src.js → Stock/Indicators/CMFIndicator.js} +3 -4
- package/es-modules/{indicators/chaikin.src.js → Stock/Indicators/ChaikinIndicator.js} +10 -9
- package/es-modules/{indicators/dema.src.js → Stock/Indicators/DEMAIndicator.js} +8 -8
- package/es-modules/{indicators/dpo.src.js → Stock/Indicators/DPOIndicator.js} +5 -4
- package/es-modules/{indicators/ema.src.js → Stock/Indicators/EMAIndicator.js} +4 -4
- package/es-modules/{indicators/ichimoku-kinko-hyo.src.js → Stock/Indicators/IKHIndicator.js} +23 -20
- package/es-modules/{indicators/keltner-channels.src.js → Stock/Indicators/KeltnerChannelsIndicator.js} +11 -8
- package/es-modules/{indicators/macd.src.js → Stock/Indicators/MACDIndicator.js} +9 -6
- package/es-modules/{indicators/mfi.src.js → Stock/Indicators/MFIIndicator.js} +5 -4
- package/es-modules/{indicators/momentum.src.js → Stock/Indicators/MomentumIndicator.js} +5 -4
- package/es-modules/{indicators/natr.src.js → Stock/Indicators/NATRIndicator.js} +4 -6
- package/es-modules/{indicators/price-channel.src.js → Stock/Indicators/PCIndicator.js} +9 -8
- package/es-modules/{indicators/ppo.src.js → Stock/Indicators/PPOIndicator.js} +8 -8
- package/es-modules/{indicators/psar.src.js → Stock/Indicators/PSARIndicator.js} +3 -4
- package/es-modules/{indicators/pivot-points.src.js → Stock/Indicators/PivotPointsIndicator.js} +6 -6
- package/es-modules/{indicators/price-envelopes.src.js → Stock/Indicators/PriceEnvelopesIndicator.js} +6 -6
- package/es-modules/{indicators/roc.src.js → Stock/Indicators/ROCIndicator.js} +5 -4
- package/es-modules/{indicators/rsi.src.js → Stock/Indicators/RSIIndicator.js} +5 -4
- package/es-modules/{indicators/regressions.src.js → Stock/Indicators/RegressionIndicators.js} +8 -7
- package/es-modules/{indicators/indicators.src.js → Stock/Indicators/SMAIndicator.js} +12 -8
- package/es-modules/{indicators/slow-stochastic.src.js → Stock/Indicators/SlowStochasticIndicator.js} +6 -8
- package/es-modules/{indicators/stochastic.src.js → Stock/Indicators/StochasticIndicator.js} +9 -9
- package/es-modules/{indicators/supertrend.src.js → Stock/Indicators/SupertrendIndicator.js} +8 -7
- package/es-modules/{indicators/tema.src.js → Stock/Indicators/TEMAIndicator.js} +8 -8
- package/es-modules/{indicators/trix.src.js → Stock/Indicators/TRIXIndicator.js} +8 -8
- package/es-modules/{indicators/trendline.src.js → Stock/Indicators/TrendLineIndicator.js} +5 -4
- package/es-modules/{indicators/volume-by-price.src.js → Stock/Indicators/VBPIndicator.js} +10 -7
- package/es-modules/{indicators/vwap.src.js → Stock/Indicators/VWAPIndicator.js} +5 -4
- package/es-modules/{indicators/wma.src.js → Stock/Indicators/WMAIndicator.js} +5 -4
- package/es-modules/{indicators/williams-r.src.js → Stock/Indicators/WilliamsRIndicator.js} +7 -6
- package/es-modules/{indicators/zigzag.src.js → Stock/Indicators/ZigzagIndicator.js} +5 -7
- package/es-modules/{modules/stock-tools-bindings.js → Stock/StockToolsBindings.js} +22 -7
- package/es-modules/{modules/stock-tools-gui.js → Stock/StockToolsGui.js} +17 -17
- package/es-modules/error-messages.js +7 -2
- package/es-modules/highcharts.src.js +19853 -0
- package/es-modules/masters/highcharts-3d.src.js +11 -12
- package/es-modules/masters/highcharts-gantt.src.js +1 -1
- package/es-modules/masters/highcharts-more.src.js +15 -15
- package/es-modules/masters/highcharts.src.js +28 -27
- package/es-modules/masters/highmaps.src.js +1 -1
- package/es-modules/masters/highstock.src.js +1 -1
- package/es-modules/masters/indicators/acceleration-bands.src.js +2 -2
- package/es-modules/masters/indicators/accumulation-distribution.src.js +2 -2
- package/es-modules/masters/indicators/ao.src.js +2 -2
- package/es-modules/masters/indicators/apo.src.js +2 -2
- package/es-modules/masters/indicators/aroon-oscillator.src.js +2 -2
- package/es-modules/masters/indicators/aroon.src.js +2 -2
- package/es-modules/masters/indicators/atr.src.js +2 -2
- package/es-modules/masters/indicators/bollinger-bands.src.js +2 -2
- package/es-modules/masters/indicators/cci.src.js +2 -2
- package/es-modules/masters/indicators/chaikin.src.js +2 -2
- package/es-modules/masters/indicators/cmf.src.js +2 -2
- package/es-modules/masters/indicators/dema.src.js +2 -2
- package/es-modules/masters/indicators/dpo.src.js +2 -2
- package/es-modules/masters/indicators/ema.src.js +2 -2
- package/es-modules/masters/indicators/ichimoku-kinko-hyo.src.js +2 -2
- package/es-modules/masters/indicators/indicators-all.src.js +41 -41
- package/es-modules/masters/indicators/indicators.src.js +2 -2
- package/es-modules/masters/indicators/keltner-channels.src.js +2 -2
- package/es-modules/masters/indicators/macd.src.js +2 -2
- package/es-modules/masters/indicators/mfi.src.js +2 -2
- package/es-modules/masters/indicators/momentum.src.js +2 -2
- package/es-modules/masters/indicators/natr.src.js +2 -2
- package/es-modules/masters/indicators/pivot-points.src.js +2 -2
- package/es-modules/masters/indicators/ppo.src.js +2 -2
- package/es-modules/masters/indicators/price-channel.src.js +2 -2
- package/es-modules/masters/indicators/price-envelopes.src.js +2 -2
- package/es-modules/masters/indicators/psar.src.js +2 -2
- package/es-modules/masters/indicators/regressions.src.js +2 -2
- package/es-modules/masters/indicators/roc.src.js +2 -2
- package/es-modules/masters/indicators/rsi.src.js +2 -2
- package/es-modules/masters/indicators/slow-stochastic.src.js +2 -2
- package/es-modules/masters/indicators/stochastic.src.js +2 -2
- package/es-modules/masters/indicators/supertrend.src.js +2 -2
- package/es-modules/masters/indicators/tema.src.js +2 -2
- package/es-modules/masters/indicators/trendline.src.js +2 -2
- package/es-modules/masters/indicators/trix.src.js +2 -2
- package/es-modules/masters/indicators/volume-by-price.src.js +2 -2
- package/es-modules/masters/indicators/vwap.src.js +2 -2
- package/es-modules/masters/indicators/williams-r.src.js +2 -2
- package/es-modules/masters/indicators/wma.src.js +2 -2
- package/es-modules/masters/indicators/zigzag.src.js +2 -2
- package/es-modules/masters/modules/accessibility.src.js +2 -2
- package/es-modules/masters/modules/annotations-advanced.src.js +13 -13
- package/es-modules/masters/modules/annotations.src.js +4 -4
- package/es-modules/masters/modules/arrow-symbols.src.js +2 -2
- package/es-modules/masters/modules/boost-canvas.src.js +2 -2
- package/es-modules/masters/modules/boost.src.js +2 -2
- package/es-modules/masters/modules/broken-axis.src.js +2 -2
- package/es-modules/masters/modules/bullet.src.js +2 -2
- package/es-modules/masters/modules/coloraxis.src.js +2 -2
- package/es-modules/masters/modules/current-date-indicator.src.js +2 -2
- package/es-modules/masters/modules/cylinder.src.js +2 -2
- package/es-modules/masters/modules/data.src.js +2 -2
- package/es-modules/masters/modules/datagrouping.src.js +2 -2
- package/es-modules/masters/modules/debugger.src.js +2 -2
- package/es-modules/masters/modules/dependency-wheel.src.js +2 -2
- package/es-modules/masters/modules/dotplot.src.js +2 -2
- package/es-modules/masters/modules/drag-panes.src.js +2 -2
- package/es-modules/masters/modules/draggable-points.src.js +2 -2
- package/es-modules/masters/modules/drilldown.src.js +2 -2
- package/es-modules/masters/modules/dumbbell.src.js +2 -2
- package/es-modules/masters/modules/export-data.src.js +2 -2
- package/es-modules/masters/modules/exporting.src.js +3 -3
- package/es-modules/masters/modules/full-screen.src.js +2 -2
- package/es-modules/masters/modules/funnel.src.js +2 -2
- package/es-modules/masters/modules/funnel3d.src.js +2 -2
- package/es-modules/masters/modules/gantt.src.js +6 -6
- package/es-modules/masters/modules/grid-axis.src.js +2 -2
- package/es-modules/masters/modules/heatmap.src.js +4 -4
- package/es-modules/masters/modules/histogram-bellcurve.src.js +3 -3
- package/es-modules/masters/modules/item-series.src.js +2 -2
- package/es-modules/masters/modules/lollipop.src.js +2 -2
- package/es-modules/masters/modules/map.src.js +13 -13
- package/es-modules/masters/modules/marker-clusters.src.js +2 -2
- package/es-modules/masters/modules/networkgraph.src.js +2 -2
- package/es-modules/masters/modules/no-data-to-display.src.js +2 -2
- package/es-modules/masters/modules/offline-exporting.src.js +2 -2
- package/es-modules/masters/modules/oldie-polyfills.src.js +2 -2
- package/es-modules/masters/modules/oldie.src.js +2 -2
- package/es-modules/masters/modules/organization.src.js +2 -2
- package/es-modules/masters/modules/overlapping-datalabels.src.js +2 -2
- package/es-modules/masters/modules/parallel-coordinates.src.js +2 -2
- package/es-modules/masters/modules/pareto.src.js +2 -2
- package/es-modules/masters/modules/pathfinder.src.js +2 -2
- package/es-modules/masters/modules/pattern-fill.src.js +2 -2
- package/es-modules/masters/modules/price-indicator.src.js +2 -2
- package/es-modules/masters/modules/pyramid3d.src.js +2 -2
- package/es-modules/masters/modules/sankey.src.js +2 -2
- package/es-modules/masters/modules/series-label.src.js +2 -2
- package/es-modules/masters/modules/solid-gauge.src.js +2 -2
- package/es-modules/masters/modules/sonification.src.js +2 -2
- package/es-modules/masters/modules/static-scale.src.js +2 -2
- package/es-modules/masters/modules/stock-tools.src.js +3 -3
- package/es-modules/masters/modules/stock.src.js +10 -10
- package/es-modules/masters/modules/streamgraph.src.js +2 -2
- package/es-modules/masters/modules/sunburst.src.js +2 -2
- package/es-modules/masters/modules/tilemap.src.js +2 -2
- package/es-modules/masters/modules/timeline.src.js +2 -2
- package/es-modules/masters/modules/treegrid.src.js +2 -2
- package/es-modules/masters/modules/treemap.src.js +2 -2
- package/es-modules/masters/modules/variable-pie.src.js +2 -2
- package/es-modules/masters/modules/variwide.src.js +2 -2
- package/es-modules/masters/modules/vector.src.js +2 -2
- package/es-modules/masters/modules/venn.src.js +2 -2
- package/es-modules/masters/modules/windbarb.src.js +2 -2
- package/es-modules/masters/modules/wordcloud.src.js +2 -2
- package/es-modules/masters/modules/xrange.src.js +2 -2
- package/es-modules/masters/themes/avocado.src.js +2 -2
- package/es-modules/masters/themes/dark-blue.src.js +2 -2
- package/es-modules/masters/themes/dark-green.src.js +2 -2
- package/es-modules/masters/themes/dark-unica.src.js +2 -2
- package/es-modules/masters/themes/gray.src.js +2 -2
- package/es-modules/masters/themes/grid-light.src.js +2 -2
- package/es-modules/masters/themes/grid.src.js +2 -2
- package/es-modules/masters/themes/high-contrast-dark.src.js +2 -2
- package/es-modules/masters/themes/high-contrast-light.src.js +2 -2
- package/es-modules/masters/themes/sand-signika.src.js +2 -2
- package/es-modules/masters/themes/skies.src.js +2 -2
- package/es-modules/masters/themes/sunset.src.js +2 -2
- package/highcharts-3d.js +86 -88
- package/highcharts-3d.js.map +1 -1
- package/highcharts-3d.src.js +1713 -1615
- package/highcharts-gantt.js +730 -697
- package/highcharts-gantt.js.map +1 -1
- package/highcharts-gantt.src.js +11747 -10110
- package/highcharts-more.js +164 -161
- package/highcharts-more.js.map +1 -1
- package/highcharts-more.src.js +766 -523
- package/highcharts.d.ts +7728 -1337
- package/highcharts.js +538 -515
- package/highcharts.js.map +1 -1
- package/highcharts.src.d.ts +7728 -1337
- package/highcharts.src.js +8517 -7691
- package/highmaps.js +636 -612
- package/highmaps.js.map +1 -1
- package/highmaps.src.js +9151 -8209
- package/highstock.js +697 -671
- package/highstock.js.map +1 -1
- package/highstock.src.js +8919 -8049
- package/indicators/acceleration-bands.js +8 -8
- package/indicators/acceleration-bands.js.map +1 -1
- package/indicators/acceleration-bands.src.js +8 -8
- package/indicators/accumulation-distribution.js +4 -4
- package/indicators/accumulation-distribution.js.map +1 -1
- package/indicators/accumulation-distribution.src.js +5 -5
- package/indicators/ao.js +5 -5
- package/indicators/ao.js.map +1 -1
- package/indicators/ao.src.js +6 -6
- package/indicators/apo.js +5 -5
- package/indicators/apo.js.map +1 -1
- package/indicators/apo.src.js +8 -9
- package/indicators/aroon-oscillator.js +8 -8
- package/indicators/aroon-oscillator.js.map +1 -1
- package/indicators/aroon-oscillator.src.js +8 -9
- package/indicators/aroon.js +7 -7
- package/indicators/aroon.js.map +1 -1
- package/indicators/aroon.src.js +7 -7
- package/indicators/atr.js +4 -4
- package/indicators/atr.js.map +1 -1
- package/indicators/atr.src.js +6 -14
- package/indicators/bollinger-bands.js +8 -8
- package/indicators/bollinger-bands.js.map +1 -1
- package/indicators/bollinger-bands.src.js +8 -8
- package/indicators/cci.js +4 -4
- package/indicators/cci.js.map +1 -1
- package/indicators/cci.src.js +5 -5
- package/indicators/chaikin.js +6 -6
- package/indicators/chaikin.js.map +1 -1
- package/indicators/chaikin.src.js +75 -75
- package/indicators/cmf.js +4 -4
- package/indicators/cmf.js.map +1 -1
- package/indicators/cmf.src.js +4 -4
- package/indicators/dema.js +5 -5
- package/indicators/dema.js.map +1 -1
- package/indicators/dema.src.js +8 -9
- package/indicators/dpo.js +4 -4
- package/indicators/dpo.js.map +1 -1
- package/indicators/dpo.src.js +5 -5
- package/indicators/ema.js +4 -4
- package/indicators/ema.js.map +1 -1
- package/indicators/ema.src.js +4 -5
- package/indicators/ichimoku-kinko-hyo.js +13 -13
- package/indicators/ichimoku-kinko-hyo.js.map +1 -1
- package/indicators/ichimoku-kinko-hyo.src.js +21 -20
- package/indicators/indicators-all.js +119 -118
- package/indicators/indicators-all.js.map +1 -1
- package/indicators/indicators-all.src.js +231 -240
- package/indicators/indicators.js +9 -9
- package/indicators/indicators.js.map +1 -1
- package/indicators/indicators.src.js +9 -9
- package/indicators/keltner-channels.js +8 -8
- package/indicators/keltner-channels.js.map +1 -1
- package/indicators/keltner-channels.src.js +13 -10
- package/indicators/macd.js +10 -10
- package/indicators/macd.js.map +1 -1
- package/indicators/macd.src.js +8 -7
- package/indicators/mfi.js +4 -4
- package/indicators/mfi.js.map +1 -1
- package/indicators/mfi.src.js +5 -5
- package/indicators/momentum.js +4 -4
- package/indicators/momentum.js.map +1 -1
- package/indicators/momentum.src.js +5 -5
- package/indicators/natr.js +3 -3
- package/indicators/natr.js.map +1 -1
- package/indicators/natr.src.js +5 -5
- package/indicators/pivot-points.js +8 -8
- package/indicators/pivot-points.js.map +1 -1
- package/indicators/pivot-points.src.js +6 -6
- package/indicators/ppo.js +5 -5
- package/indicators/ppo.js.map +1 -1
- package/indicators/ppo.src.js +8 -9
- package/indicators/price-channel.js +8 -8
- package/indicators/price-channel.js.map +1 -1
- package/indicators/price-channel.src.js +66 -66
- package/indicators/price-envelopes.js +6 -6
- package/indicators/price-envelopes.js.map +1 -1
- package/indicators/price-envelopes.src.js +6 -6
- package/indicators/psar.js +3 -3
- package/indicators/psar.js.map +1 -1
- package/indicators/psar.src.js +4 -4
- package/indicators/regressions.js +6 -6
- package/indicators/regressions.js.map +1 -1
- package/indicators/regressions.src.js +8 -8
- package/indicators/roc.js +3 -3
- package/indicators/roc.js.map +1 -1
- package/indicators/roc.src.js +5 -5
- package/indicators/rsi.js +4 -4
- package/indicators/rsi.js.map +1 -1
- package/indicators/rsi.src.js +5 -5
- package/indicators/slow-stochastic.js +5 -5
- package/indicators/slow-stochastic.js.map +1 -1
- package/indicators/slow-stochastic.src.js +7 -7
- package/indicators/stochastic.js +9 -9
- package/indicators/stochastic.js.map +1 -1
- package/indicators/stochastic.src.js +67 -67
- package/indicators/supertrend.js +9 -9
- package/indicators/supertrend.js.map +1 -1
- package/indicators/supertrend.src.js +9 -7
- package/indicators/tema.js +6 -6
- package/indicators/tema.js.map +1 -1
- package/indicators/tema.src.js +8 -9
- package/indicators/trendline.js +3 -3
- package/indicators/trendline.js.map +1 -1
- package/indicators/trendline.src.js +5 -5
- package/indicators/trix.js +4 -4
- package/indicators/trix.js.map +1 -1
- package/indicators/trix.src.js +8 -8
- package/indicators/volume-by-price.js +13 -13
- package/indicators/volume-by-price.js.map +1 -1
- package/indicators/volume-by-price.src.js +7 -8
- package/indicators/vwap.js +4 -4
- package/indicators/vwap.js.map +1 -1
- package/indicators/vwap.src.js +5 -5
- package/indicators/williams-r.js +4 -4
- package/indicators/williams-r.js.map +1 -1
- package/indicators/williams-r.src.js +7 -7
- package/indicators/wma.js +4 -4
- package/indicators/wma.js.map +1 -1
- package/indicators/wma.src.js +5 -5
- package/indicators/zigzag.js +4 -4
- package/indicators/zigzag.js.map +1 -1
- package/indicators/zigzag.src.js +6 -7
- package/modules/accessibility.d.ts +0 -35
- package/modules/accessibility.js +171 -168
- package/modules/accessibility.js.map +1 -1
- package/modules/accessibility.src.d.ts +0 -35
- package/modules/accessibility.src.js +369 -252
- package/modules/annotations-advanced.js +158 -136
- package/modules/annotations-advanced.js.map +1 -1
- package/modules/annotations-advanced.src.js +1929 -1263
- package/modules/annotations.js +105 -94
- package/modules/annotations.js.map +1 -1
- package/modules/annotations.src.js +1485 -1101
- package/modules/arrow-symbols.js +4 -4
- package/modules/arrow-symbols.js.map +1 -1
- package/modules/arrow-symbols.src.js +10 -12
- package/modules/boost-canvas.js +15 -15
- package/modules/boost-canvas.js.map +1 -1
- package/modules/boost-canvas.src.js +17 -17
- package/modules/boost.d.ts +4 -0
- package/modules/boost.js +77 -64
- package/modules/boost.js.map +1 -1
- package/modules/boost.src.d.ts +4 -0
- package/modules/boost.src.js +581 -33
- package/modules/broken-axis.js +10 -10
- package/modules/broken-axis.js.map +1 -1
- package/modules/broken-axis.src.js +4 -5
- package/modules/bullet.js +6 -6
- package/modules/bullet.js.map +1 -1
- package/modules/bullet.src.js +8 -8
- package/modules/coloraxis.js +22 -21
- package/modules/coloraxis.js.map +1 -1
- package/modules/coloraxis.src.js +67 -59
- package/modules/current-date-indicator.js +3 -3
- package/modules/current-date-indicator.js.map +1 -1
- package/modules/current-date-indicator.src.js +4 -5
- package/modules/cylinder.js +8 -8
- package/modules/cylinder.js.map +1 -1
- package/modules/cylinder.src.js +21 -23
- package/modules/data.d.ts +2 -2
- package/modules/data.js +32 -32
- package/modules/data.js.map +1 -1
- package/modules/data.src.d.ts +2 -2
- package/modules/data.src.js +26 -25
- package/modules/datagrouping.js +17 -17
- package/modules/datagrouping.js.map +1 -1
- package/modules/datagrouping.src.js +6 -7
- package/modules/debugger.js +5 -5
- package/modules/debugger.js.map +1 -1
- package/modules/debugger.src.js +13 -8
- package/modules/dependency-wheel.js +8 -8
- package/modules/dependency-wheel.js.map +1 -1
- package/modules/dependency-wheel.src.js +10 -10
- package/modules/dotplot.js +5 -5
- package/modules/dotplot.js.map +1 -1
- package/modules/dotplot.src.js +6 -14
- package/modules/drag-panes.js +10 -10
- package/modules/drag-panes.js.map +1 -1
- package/modules/drag-panes.src.js +4 -6
- package/modules/draggable-points.js +33 -33
- package/modules/draggable-points.js.map +1 -1
- package/modules/draggable-points.src.js +22 -35
- package/modules/drilldown.d.ts +1 -1
- package/modules/drilldown.js +23 -22
- package/modules/drilldown.js.map +1 -1
- package/modules/drilldown.src.d.ts +1 -1
- package/modules/drilldown.src.js +66 -53
- package/modules/dumbbell.d.ts +4 -0
- package/modules/dumbbell.js +24 -9
- package/modules/dumbbell.js.map +1 -1
- package/modules/dumbbell.src.d.ts +4 -0
- package/modules/dumbbell.src.js +1029 -104
- package/modules/export-data.d.ts +4 -29
- package/modules/export-data.js +21 -21
- package/modules/export-data.js.map +1 -1
- package/modules/export-data.src.d.ts +4 -29
- package/modules/export-data.src.js +155 -189
- package/modules/exporting.d.ts +2 -0
- package/modules/exporting.js +33 -33
- package/modules/exporting.js.map +1 -1
- package/modules/exporting.src.d.ts +2 -0
- package/modules/exporting.src.js +40 -30
- package/modules/full-screen.js +7 -7
- package/modules/full-screen.js.map +1 -1
- package/modules/full-screen.src.js +4 -3
- package/modules/funnel.js +9 -9
- package/modules/funnel.js.map +1 -1
- package/modules/funnel.src.js +14 -15
- package/modules/funnel3d.js +17 -17
- package/modules/funnel3d.js.map +1 -1
- package/modules/funnel3d.src.js +12 -14
- package/modules/gantt.js +194 -183
- package/modules/gantt.js.map +1 -1
- package/modules/gantt.src.js +2071 -1260
- package/modules/grid-axis.js +22 -19
- package/modules/grid-axis.js.map +1 -1
- package/modules/grid-axis.src.js +149 -43
- package/modules/heatmap.js +33 -32
- package/modules/heatmap.js.map +1 -1
- package/modules/heatmap.src.js +130 -114
- package/modules/histogram-bellcurve.js +10 -10
- package/modules/histogram-bellcurve.js.map +1 -1
- package/modules/histogram-bellcurve.src.js +57 -16
- package/modules/item-series.js +9 -9
- package/modules/item-series.js.map +1 -1
- package/modules/item-series.src.js +20 -13
- package/modules/lollipop.d.ts +20 -1
- package/modules/lollipop.js +26 -4
- package/modules/lollipop.js.map +1 -1
- package/modules/lollipop.src.d.ts +20 -1
- package/modules/lollipop.src.js +1452 -10
- package/modules/map.d.ts +2 -2
- package/modules/map.js +99 -98
- package/modules/map.js.map +1 -1
- package/modules/map.src.d.ts +2 -2
- package/modules/map.src.js +1442 -1326
- package/modules/marker-clusters.js +35 -36
- package/modules/marker-clusters.js.map +1 -1
- package/modules/marker-clusters.src.js +31 -51
- package/modules/networkgraph.js +47 -46
- package/modules/networkgraph.js.map +1 -1
- package/modules/networkgraph.src.js +98 -81
- package/modules/no-data-to-display.js +4 -4
- package/modules/no-data-to-display.js.map +1 -1
- package/modules/no-data-to-display.src.js +17 -13
- package/modules/offline-exporting.js +15 -15
- package/modules/offline-exporting.js.map +1 -1
- package/modules/offline-exporting.src.js +63 -46
- package/modules/oldie-polyfills.js +6 -6
- package/modules/oldie-polyfills.js.map +1 -1
- package/modules/oldie-polyfills.src.js +7 -2
- package/modules/oldie.js +52 -26
- package/modules/oldie.js.map +1 -1
- package/modules/oldie.src.js +1411 -34
- package/modules/organization.js +11 -11
- package/modules/organization.js.map +1 -1
- package/modules/organization.src.js +7 -6
- package/modules/overlapping-datalabels.js +1 -1
- package/modules/overlapping-datalabels.src.js +1 -1
- package/modules/parallel-coordinates.js +11 -11
- package/modules/parallel-coordinates.js.map +1 -1
- package/modules/parallel-coordinates.src.js +144 -136
- package/modules/pareto.js +5 -5
- package/modules/pareto.js.map +1 -1
- package/modules/pareto.src.js +8 -9
- package/modules/pathfinder.js +31 -27
- package/modules/pathfinder.js.map +1 -1
- package/modules/pathfinder.src.js +1589 -985
- package/modules/pattern-fill.js +13 -13
- package/modules/pattern-fill.js.map +1 -1
- package/modules/pattern-fill.src.js +25 -21
- package/modules/price-indicator.js +4 -4
- package/modules/price-indicator.js.map +1 -1
- package/modules/price-indicator.src.js +5 -3
- package/modules/pyramid3d.js +3 -3
- package/modules/pyramid3d.js.map +1 -1
- package/modules/pyramid3d.src.js +4 -5
- package/modules/sankey.js +25 -26
- package/modules/sankey.js.map +1 -1
- package/modules/sankey.src.js +39 -36
- package/modules/series-label.js +17 -17
- package/modules/series-label.js.map +1 -1
- package/modules/series-label.src.js +17 -17
- package/modules/solid-gauge.js +8 -8
- package/modules/solid-gauge.js.map +1 -1
- package/modules/solid-gauge.src.js +123 -91
- package/modules/sonification.d.ts +33 -16
- package/modules/sonification.js +55 -49
- package/modules/sonification.js.map +1 -1
- package/modules/sonification.src.d.ts +33 -16
- package/modules/sonification.src.js +361 -115
- package/modules/static-scale.js +4 -4
- package/modules/static-scale.js.map +1 -1
- package/modules/static-scale.src.js +3 -4
- package/modules/stock-tools.d.ts +23 -1
- package/modules/stock-tools.js +150 -84
- package/modules/stock-tools.js.map +1 -1
- package/modules/stock-tools.src.d.ts +23 -1
- package/modules/stock-tools.src.js +3792 -44
- package/modules/stock.js +161 -158
- package/modules/stock.js.map +1 -1
- package/modules/stock.src.js +456 -412
- package/modules/streamgraph.js +2 -2
- package/modules/streamgraph.js.map +1 -1
- package/modules/streamgraph.src.js +42 -5
- package/modules/sunburst.js +51 -49
- package/modules/sunburst.js.map +1 -1
- package/modules/sunburst.src.js +152 -52
- package/modules/tilemap.js +14 -14
- package/modules/tilemap.js.map +1 -1
- package/modules/tilemap.src.js +12 -11
- package/modules/timeline.js +14 -14
- package/modules/timeline.js.map +1 -1
- package/modules/timeline.src.js +19 -18
- package/modules/treegrid.js +57 -52
- package/modules/treegrid.js.map +1 -1
- package/modules/treegrid.src.js +236 -60
- package/modules/treemap.js +35 -34
- package/modules/treemap.js.map +1 -1
- package/modules/treemap.src.js +213 -118
- package/modules/variable-pie.js +8 -8
- package/modules/variable-pie.js.map +1 -1
- package/modules/variable-pie.src.js +12 -10
- package/modules/variwide.js +8 -8
- package/modules/variwide.js.map +1 -1
- package/modules/variwide.src.js +8 -8
- package/modules/vector.js +6 -6
- package/modules/vector.js.map +1 -1
- package/modules/vector.src.js +9 -9
- package/modules/venn.js +26 -26
- package/modules/venn.js.map +1 -1
- package/modules/venn.src.js +49 -37
- package/modules/windbarb.js +11 -11
- package/modules/windbarb.js.map +1 -1
- package/modules/windbarb.src.js +11 -12
- package/modules/wordcloud.js +19 -19
- package/modules/wordcloud.js.map +1 -1
- package/modules/wordcloud.src.js +26 -18
- package/modules/xrange.js +12 -12
- package/modules/xrange.js.map +1 -1
- package/modules/xrange.src.js +19 -20
- package/package.json +1 -1
- package/themes/avocado.js +3 -3
- package/themes/avocado.js.map +1 -1
- package/themes/avocado.src.js +5 -4
- package/themes/dark-blue.js +3 -3
- package/themes/dark-blue.js.map +1 -1
- package/themes/dark-blue.src.js +4 -3
- package/themes/dark-green.js +3 -3
- package/themes/dark-green.js.map +1 -1
- package/themes/dark-green.src.js +4 -3
- package/themes/dark-unica.js +7 -7
- package/themes/dark-unica.js.map +1 -1
- package/themes/dark-unica.src.js +6 -6
- package/themes/gray.js +3 -3
- package/themes/gray.js.map +1 -1
- package/themes/gray.src.js +5 -4
- package/themes/grid-light.js +4 -4
- package/themes/grid-light.js.map +1 -1
- package/themes/grid-light.src.js +4 -3
- package/themes/grid.js +3 -3
- package/themes/grid.js.map +1 -1
- package/themes/grid.src.js +4 -3
- package/themes/high-contrast-dark.js +6 -6
- package/themes/high-contrast-dark.js.map +1 -1
- package/themes/high-contrast-dark.src.js +5 -4
- package/themes/high-contrast-light.js +3 -3
- package/themes/high-contrast-light.js.map +1 -1
- package/themes/high-contrast-light.src.js +4 -3
- package/themes/sand-signika.js +5 -5
- package/themes/sand-signika.js.map +1 -1
- package/themes/sand-signika.src.js +4 -3
- package/themes/skies.js +4 -4
- package/themes/skies.js.map +1 -1
- package/themes/skies.src.js +5 -4
- package/themes/sunset.js +3 -3
- package/themes/sunset.js.map +1 -1
- package/themes/sunset.src.js +5 -4
- package/es-modules/annotations/controllable/ControllableCircle.js +0 -79
- package/es-modules/annotations/controllable/ControllableImage.js +0 -79
- package/es-modules/annotations/controllable/ControllableRect.js +0 -82
- package/es-modules/annotations/types/InfinityLine.js +0 -110
- package/es-modules/masters/modules/map-parser.src.js +0 -12
- package/es-modules/modules/accessibility/components/InfoRegionsComponent/AnnotationsA11y.js +0 -80
- package/es-modules/modules/accessibility/components/InfoRegionsComponent/InfoRegionsComponent.js +0 -499
- package/es-modules/modules/accessibility/components/SeriesComponent/forcedMarkers.js +0 -147
- package/es-modules/modules/map-parser.src.js +0 -365
- package/es-modules/modules/sonification/options.js +0 -36
- package/es-modules/parts-3d/Chart.js +0 -1577
- package/es-modules/parts-3d/VMLRenderer.js +0 -35
- package/es-modules/parts-gantt/PathfinderAlgorithms.js +0 -656
- package/modules/map-parser.d.ts +0 -17
- package/modules/map-parser.js +0 -17
- package/modules/map-parser.js.map +0 -1
- package/modules/map-parser.src.d.ts +0 -17
- package/modules/map-parser.src.js +0 -421
|
@@ -7,85 +7,12 @@
|
|
|
7
7
|
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
8
8
|
*
|
|
9
9
|
* */
|
|
10
|
-
|
|
11
|
-
import
|
|
12
|
-
var color = Color.parse;
|
|
13
|
-
import H from './Globals.js';
|
|
10
|
+
import Color from '../../Color/Color.js';
|
|
11
|
+
import H from '../../Globals.js';
|
|
14
12
|
import SVGElement from './SVGElement.js';
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* The horizontal alignment of an element.
|
|
19
|
-
*
|
|
20
|
-
* @typedef {"center"|"left"|"right"} Highcharts.AlignValue
|
|
21
|
-
*/
|
|
22
|
-
/**
|
|
23
|
-
* Options to align the element relative to the chart or another box.
|
|
24
|
-
*
|
|
25
|
-
* @interface Highcharts.AlignObject
|
|
26
|
-
*/ /**
|
|
27
|
-
* Horizontal alignment. Can be one of `left`, `center` and `right`.
|
|
28
|
-
*
|
|
29
|
-
* @name Highcharts.AlignObject#align
|
|
30
|
-
* @type {Highcharts.AlignValue|undefined}
|
|
31
|
-
*
|
|
32
|
-
* @default left
|
|
33
|
-
*/ /**
|
|
34
|
-
* Vertical alignment. Can be one of `top`, `middle` and `bottom`.
|
|
35
|
-
*
|
|
36
|
-
* @name Highcharts.AlignObject#verticalAlign
|
|
37
|
-
* @type {Highcharts.VerticalAlignValue|undefined}
|
|
38
|
-
*
|
|
39
|
-
* @default top
|
|
40
|
-
*/ /**
|
|
41
|
-
* Horizontal pixel offset from alignment.
|
|
42
|
-
*
|
|
43
|
-
* @name Highcharts.AlignObject#x
|
|
44
|
-
* @type {number|undefined}
|
|
45
|
-
*
|
|
46
|
-
* @default 0
|
|
47
|
-
*/ /**
|
|
48
|
-
* Vertical pixel offset from alignment.
|
|
49
|
-
*
|
|
50
|
-
* @name Highcharts.AlignObject#y
|
|
51
|
-
* @type {number|undefined}
|
|
52
|
-
*
|
|
53
|
-
* @default 0
|
|
54
|
-
*/ /**
|
|
55
|
-
* Use the `transform` attribute with translateX and translateY custom
|
|
56
|
-
* attributes to align this elements rather than `x` and `y` attributes.
|
|
57
|
-
*
|
|
58
|
-
* @name Highcharts.AlignObject#alignByTranslate
|
|
59
|
-
* @type {boolean|undefined}
|
|
60
|
-
*
|
|
61
|
-
* @default false
|
|
62
|
-
*/
|
|
63
|
-
/**
|
|
64
|
-
* Bounding box of an element.
|
|
65
|
-
*
|
|
66
|
-
* @interface Highcharts.BBoxObject
|
|
67
|
-
* @extends Highcharts.PositionObject
|
|
68
|
-
*/ /**
|
|
69
|
-
* Height of the bounding box.
|
|
70
|
-
*
|
|
71
|
-
* @name Highcharts.BBoxObject#height
|
|
72
|
-
* @type {number}
|
|
73
|
-
*/ /**
|
|
74
|
-
* Width of the bounding box.
|
|
75
|
-
*
|
|
76
|
-
* @name Highcharts.BBoxObject#width
|
|
77
|
-
* @type {number}
|
|
78
|
-
*/ /**
|
|
79
|
-
* Horizontal position of the bounding box.
|
|
80
|
-
*
|
|
81
|
-
* @name Highcharts.BBoxObject#x
|
|
82
|
-
* @type {number}
|
|
83
|
-
*/ /**
|
|
84
|
-
* Vertical position of the bounding box.
|
|
85
|
-
*
|
|
86
|
-
* @name Highcharts.BBoxObject#y
|
|
87
|
-
* @type {number}
|
|
88
|
-
*/
|
|
13
|
+
import SVGLabel from './SVGLabel.js';
|
|
14
|
+
import U from '../../Utilities.js';
|
|
15
|
+
var addEvent = U.addEvent, attr = U.attr, createElement = U.createElement, css = U.css, defined = U.defined, destroyObjectProperties = U.destroyObjectProperties, extend = U.extend, isArray = U.isArray, isNumber = U.isNumber, isObject = U.isObject, isString = U.isString, merge = U.merge, objectEach = U.objectEach, pick = U.pick, pInt = U.pInt, splat = U.splat, uniqueKey = U.uniqueKey;
|
|
89
16
|
/**
|
|
90
17
|
* A clipping rectangle that can be applied to one or more {@link SVGElement}
|
|
91
18
|
* instances. It is instanciated with the {@link SVGRenderer#clipRect} function
|
|
@@ -197,69 +124,6 @@ var addEvent = U.addEvent, attr = U.attr, createElement = U.createElement, css =
|
|
|
197
124
|
* @name Highcharts.SizeObject#width
|
|
198
125
|
* @type {number}
|
|
199
126
|
*/
|
|
200
|
-
/**
|
|
201
|
-
* An object of key-value pairs for SVG attributes. Attributes in Highcharts
|
|
202
|
-
* elements for the most parts correspond to SVG, but some are specific to
|
|
203
|
-
* Highcharts, like `zIndex`, `rotation`, `rotationOriginX`,
|
|
204
|
-
* `rotationOriginY`, `translateX`, `translateY`, `scaleX` and `scaleY`. SVG
|
|
205
|
-
* attributes containing a hyphen are _not_ camel-cased, they should be
|
|
206
|
-
* quoted to preserve the hyphen.
|
|
207
|
-
*
|
|
208
|
-
* @example
|
|
209
|
-
* {
|
|
210
|
-
* 'stroke': '#ff0000', // basic
|
|
211
|
-
* 'stroke-width': 2, // hyphenated
|
|
212
|
-
* 'rotation': 45 // custom
|
|
213
|
-
* 'd': ['M', 10, 10, 'L', 30, 30, 'z'] // path definition, note format
|
|
214
|
-
* }
|
|
215
|
-
*
|
|
216
|
-
* @interface Highcharts.SVGAttributes
|
|
217
|
-
*/ /**
|
|
218
|
-
* @name Highcharts.SVGAttributes#[key:string]
|
|
219
|
-
* @type {*}
|
|
220
|
-
*/ /**
|
|
221
|
-
* @name Highcharts.SVGAttributes#d
|
|
222
|
-
* @type {string|Highcharts.SVGPathArray|undefined}
|
|
223
|
-
*/ /**
|
|
224
|
-
* @name Highcharts.SVGAttributes#fill
|
|
225
|
-
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject|undefined}
|
|
226
|
-
*/ /**
|
|
227
|
-
* @name Highcharts.SVGAttributes#inverted
|
|
228
|
-
* @type {boolean|undefined}
|
|
229
|
-
*/ /**
|
|
230
|
-
* @name Highcharts.SVGAttributes#matrix
|
|
231
|
-
* @type {Array<number>|undefined}
|
|
232
|
-
*/ /**
|
|
233
|
-
* @name Highcharts.SVGAttributes#rotation
|
|
234
|
-
* @type {number|undefined}
|
|
235
|
-
*/ /**
|
|
236
|
-
* @name Highcharts.SVGAttributes#rotationOriginX
|
|
237
|
-
* @type {number|undefined}
|
|
238
|
-
*/ /**
|
|
239
|
-
* @name Highcharts.SVGAttributes#rotationOriginY
|
|
240
|
-
* @type {number|undefined}
|
|
241
|
-
*/ /**
|
|
242
|
-
* @name Highcharts.SVGAttributes#scaleX
|
|
243
|
-
* @type {number|undefined}
|
|
244
|
-
*/ /**
|
|
245
|
-
* @name Highcharts.SVGAttributes#scaleY
|
|
246
|
-
* @type {number|undefined}
|
|
247
|
-
*/ /**
|
|
248
|
-
* @name Highcharts.SVGAttributes#stroke
|
|
249
|
-
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject|undefined}
|
|
250
|
-
*/ /**
|
|
251
|
-
* @name Highcharts.SVGAttributes#style
|
|
252
|
-
* @type {string|Highcharts.CSSObject|undefined}
|
|
253
|
-
*/ /**
|
|
254
|
-
* @name Highcharts.SVGAttributes#translateX
|
|
255
|
-
* @type {number|undefined}
|
|
256
|
-
*/ /**
|
|
257
|
-
* @name Highcharts.SVGAttributes#translateY
|
|
258
|
-
* @type {number|undefined}
|
|
259
|
-
*/ /**
|
|
260
|
-
* @name Highcharts.SVGAttributes#zIndex
|
|
261
|
-
* @type {number|undefined}
|
|
262
|
-
*/
|
|
263
127
|
/**
|
|
264
128
|
* Serialized form of an SVG definition, including children. Some key
|
|
265
129
|
* property names are reserved: tagName, textContent, and children.
|
|
@@ -278,22 +142,15 @@ var addEvent = U.addEvent, attr = U.attr, createElement = U.createElement, css =
|
|
|
278
142
|
* @name Highcharts.SVGDefinitionObject#textContent
|
|
279
143
|
* @type {string|undefined}
|
|
280
144
|
*/
|
|
281
|
-
/**
|
|
282
|
-
* An SVG DOM element. The type is a reference to the regular SVGElement in the
|
|
283
|
-
* global scope.
|
|
284
|
-
*
|
|
285
|
-
* @typedef {globals.GlobalSVGElement} Highcharts.SVGDOMElement
|
|
286
|
-
*
|
|
287
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/SVGElement
|
|
288
|
-
*/
|
|
289
145
|
/**
|
|
290
146
|
* Array of path commands, that will go into the `d` attribute of an SVG
|
|
291
147
|
* element.
|
|
292
148
|
*
|
|
293
|
-
* @typedef {Array<number
|
|
149
|
+
* @typedef {Array<(Array<Highcharts.SVGPathCommand>|Array<Highcharts.SVGPathCommand,number>|Array<Highcharts.SVGPathCommand,number,number>|Array<Highcharts.SVGPathCommand,number,number,number,number>|Array<Highcharts.SVGPathCommand,number,number,number,number,number,number>|Array<Highcharts.SVGPathCommand,number,number,number,number,number,number,number>)>} Highcharts.SVGPathArray
|
|
294
150
|
*/
|
|
295
151
|
/**
|
|
296
|
-
* Possible path commands in
|
|
152
|
+
* Possible path commands in an SVG path array. Valid values are `A`, `C`, `H`,
|
|
153
|
+
* `L`, `M`, `Q`, `S`, `T`, `V`, `Z`.
|
|
297
154
|
*
|
|
298
155
|
* @typedef {string} Highcharts.SVGPathCommand
|
|
299
156
|
* @validvalue ["a","c","h","l","m","q","s","t","v","z","A","C","H","L","M","Q","S","T","V","Z"]
|
|
@@ -371,13 +228,8 @@ var addEvent = U.addEvent, attr = U.attr, createElement = U.createElement, css =
|
|
|
371
228
|
* @name Highcharts.SymbolOptionsObject#start
|
|
372
229
|
* @type {number|undefined}
|
|
373
230
|
*/
|
|
374
|
-
/**
|
|
375
|
-
* The vertical alignment of an element.
|
|
376
|
-
*
|
|
377
|
-
* @typedef {"bottom"|"middle"|"top"} Highcharts.VerticalAlignValue
|
|
378
|
-
*/
|
|
379
231
|
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
380
|
-
var
|
|
232
|
+
var charts = H.charts, deg2rad = H.deg2rad, doc = H.doc, isFirefox = H.isFirefox, isMS = H.isMS, isWebKit = H.isWebKit, noop = H.noop, svg = H.svg, SVG_NS = H.SVG_NS, symbolSizes = H.symbolSizes, win = H.win;
|
|
381
233
|
/**
|
|
382
234
|
* Allows direct access to the Highcharts rendering layer in order to draw
|
|
383
235
|
* primitive shapes like circles, rectangles, paths or text directly on a chart,
|
|
@@ -425,19 +277,65 @@ var SVGRenderer, charts = H.charts, deg2rad = H.deg2rad, doc = H.doc, hasTouch =
|
|
|
425
277
|
* some cases, but not when set explicitly through `.attr` and `.css`
|
|
426
278
|
* etc.
|
|
427
279
|
*/
|
|
428
|
-
SVGRenderer =
|
|
429
|
-
|
|
430
|
-
};
|
|
431
|
-
extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
432
|
-
/**
|
|
433
|
-
* A pointer to the renderer's associated Element class. The VMLRenderer
|
|
434
|
-
* will have a pointer to VMLElement here.
|
|
280
|
+
var SVGRenderer = /** @class */ (function () {
|
|
281
|
+
/* *
|
|
435
282
|
*
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
*/
|
|
439
|
-
|
|
440
|
-
|
|
283
|
+
* Constructors
|
|
284
|
+
*
|
|
285
|
+
* */
|
|
286
|
+
function SVGRenderer(container, width, height, style, forExport, allowHTML, styledMode) {
|
|
287
|
+
/* *
|
|
288
|
+
*
|
|
289
|
+
* Properties
|
|
290
|
+
*
|
|
291
|
+
* */
|
|
292
|
+
this.alignedObjects = void 0;
|
|
293
|
+
/**
|
|
294
|
+
* The root `svg` node of the renderer.
|
|
295
|
+
*
|
|
296
|
+
* @name Highcharts.SVGRenderer#box
|
|
297
|
+
* @type {Highcharts.SVGDOMElement}
|
|
298
|
+
*/
|
|
299
|
+
this.box = void 0;
|
|
300
|
+
/**
|
|
301
|
+
* The wrapper for the root `svg` node of the renderer.
|
|
302
|
+
*
|
|
303
|
+
* @name Highcharts.SVGRenderer#boxWrapper
|
|
304
|
+
* @type {Highcharts.SVGElement}
|
|
305
|
+
*/
|
|
306
|
+
this.boxWrapper = void 0;
|
|
307
|
+
this.cache = void 0;
|
|
308
|
+
this.cacheKeys = void 0;
|
|
309
|
+
this.chartIndex = void 0;
|
|
310
|
+
/**
|
|
311
|
+
* A pointer to the `defs` node of the root SVG.
|
|
312
|
+
*
|
|
313
|
+
* @name Highcharts.SVGRenderer#defs
|
|
314
|
+
* @type {Highcharts.SVGElement}
|
|
315
|
+
*/
|
|
316
|
+
this.defs = void 0;
|
|
317
|
+
this.globalAnimation = void 0;
|
|
318
|
+
this.gradients = void 0;
|
|
319
|
+
this.height = void 0;
|
|
320
|
+
this.imgCount = void 0;
|
|
321
|
+
this.isSVG = void 0;
|
|
322
|
+
this.style = void 0;
|
|
323
|
+
/**
|
|
324
|
+
* Page url used for internal references.
|
|
325
|
+
*
|
|
326
|
+
* @private
|
|
327
|
+
* @name Highcharts.SVGRenderer#url
|
|
328
|
+
* @type {string}
|
|
329
|
+
*/
|
|
330
|
+
this.url = void 0;
|
|
331
|
+
this.width = void 0;
|
|
332
|
+
this.init(container, width, height, style, forExport, allowHTML, styledMode);
|
|
333
|
+
}
|
|
334
|
+
/* *
|
|
335
|
+
*
|
|
336
|
+
* Functions
|
|
337
|
+
*
|
|
338
|
+
* */
|
|
441
339
|
/**
|
|
442
340
|
* Initialize the SVGRenderer. Overridable initializer function that takes
|
|
443
341
|
* the same parameters as the constructor.
|
|
@@ -445,33 +343,30 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
445
343
|
* @function Highcharts.SVGRenderer#init
|
|
446
344
|
*
|
|
447
345
|
* @param {Highcharts.HTMLDOMElement} container
|
|
448
|
-
*
|
|
346
|
+
* Where to put the SVG in the web page.
|
|
449
347
|
*
|
|
450
348
|
* @param {number} width
|
|
451
|
-
*
|
|
349
|
+
* The width of the SVG.
|
|
452
350
|
*
|
|
453
351
|
* @param {number} height
|
|
454
|
-
*
|
|
352
|
+
* The height of the SVG.
|
|
455
353
|
*
|
|
456
354
|
* @param {Highcharts.CSSObject} [style]
|
|
457
|
-
*
|
|
355
|
+
* The box style, if not in styleMode
|
|
458
356
|
*
|
|
459
357
|
* @param {boolean} [forExport=false]
|
|
460
|
-
*
|
|
358
|
+
* Whether the rendered content is intended for export.
|
|
461
359
|
*
|
|
462
360
|
* @param {boolean} [allowHTML=true]
|
|
463
|
-
*
|
|
464
|
-
*
|
|
361
|
+
* Whether the renderer is allowed to include HTML text, which will be
|
|
362
|
+
* projected on top of the SVG.
|
|
465
363
|
*
|
|
466
364
|
* @param {boolean} [styledMode=false]
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
* etc.
|
|
471
|
-
*
|
|
472
|
-
* @return {void}
|
|
365
|
+
* Whether the renderer belongs to a chart that is in styled mode. If it
|
|
366
|
+
* does, it will avoid setting presentational attributes in some cases, but
|
|
367
|
+
* not when set explicitly through `.attr` and `.css` etc.
|
|
473
368
|
*/
|
|
474
|
-
init
|
|
369
|
+
SVGRenderer.prototype.init = function (container, width, height, style, forExport, allowHTML, styledMode) {
|
|
475
370
|
var renderer = this, boxWrapper, element, desc;
|
|
476
371
|
boxWrapper = renderer.createElement('svg')
|
|
477
372
|
.attr({
|
|
@@ -492,28 +387,9 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
492
387
|
}
|
|
493
388
|
// object properties
|
|
494
389
|
renderer.isSVG = true;
|
|
495
|
-
/**
|
|
496
|
-
* The root `svg` node of the renderer.
|
|
497
|
-
*
|
|
498
|
-
* @name Highcharts.SVGRenderer#box
|
|
499
|
-
* @type {Highcharts.SVGDOMElement}
|
|
500
|
-
*/
|
|
501
390
|
this.box = element;
|
|
502
|
-
/**
|
|
503
|
-
* The wrapper for the root `svg` node of the renderer.
|
|
504
|
-
*
|
|
505
|
-
* @name Highcharts.SVGRenderer#boxWrapper
|
|
506
|
-
* @type {Highcharts.SVGElement}
|
|
507
|
-
*/
|
|
508
391
|
this.boxWrapper = boxWrapper;
|
|
509
392
|
renderer.alignedObjects = [];
|
|
510
|
-
/**
|
|
511
|
-
* Page url used for internal references.
|
|
512
|
-
*
|
|
513
|
-
* @private
|
|
514
|
-
* @name Highcharts.SVGRenderer#url
|
|
515
|
-
* @type {string}
|
|
516
|
-
*/
|
|
517
393
|
// #24, #672, #1070
|
|
518
394
|
this.url = ((isFirefox || isWebKit) &&
|
|
519
395
|
doc.getElementsByTagName('base').length) ?
|
|
@@ -527,13 +403,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
527
403
|
'';
|
|
528
404
|
// Add description
|
|
529
405
|
desc = this.createElement('desc').add();
|
|
530
|
-
desc.element.appendChild(doc.createTextNode('Created with Highcharts 8.
|
|
531
|
-
/**
|
|
532
|
-
* A pointer to the `defs` node of the root SVG.
|
|
533
|
-
*
|
|
534
|
-
* @name Highcharts.SVGRenderer#defs
|
|
535
|
-
* @type {Highcharts.SVGElement}
|
|
536
|
-
*/
|
|
406
|
+
desc.element.appendChild(doc.createTextNode('Created with Highcharts 8.2.2'));
|
|
537
407
|
renderer.defs = this.createElement('defs').add();
|
|
538
408
|
renderer.allowHTML = allowHTML;
|
|
539
409
|
renderer.forExport = forExport;
|
|
@@ -565,7 +435,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
565
435
|
// run it on resize
|
|
566
436
|
renderer.unSubPixelFix = addEvent(win, 'resize', subPixelFix);
|
|
567
437
|
}
|
|
568
|
-
}
|
|
438
|
+
};
|
|
569
439
|
/**
|
|
570
440
|
* General method for adding a definition to the SVG `defs` tag. Can be used
|
|
571
441
|
* for gradients, fills, filters etc. Styled mode only. A hook for adding
|
|
@@ -577,12 +447,12 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
577
447
|
* @function Highcharts.SVGRenderer#definition
|
|
578
448
|
*
|
|
579
449
|
* @param {Highcharts.SVGDefinitionObject} def
|
|
580
|
-
*
|
|
450
|
+
* A serialized form of an SVG definition, including children.
|
|
581
451
|
*
|
|
582
452
|
* @return {Highcharts.SVGElement}
|
|
583
|
-
*
|
|
453
|
+
* The inserted node.
|
|
584
454
|
*/
|
|
585
|
-
definition
|
|
455
|
+
SVGRenderer.prototype.definition = function (def) {
|
|
586
456
|
var ren = this;
|
|
587
457
|
/**
|
|
588
458
|
* @private
|
|
@@ -616,7 +486,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
616
486
|
return ret;
|
|
617
487
|
}
|
|
618
488
|
return recurse(def);
|
|
619
|
-
}
|
|
489
|
+
};
|
|
620
490
|
/**
|
|
621
491
|
* Get the global style setting for the renderer.
|
|
622
492
|
*
|
|
@@ -624,30 +494,30 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
624
494
|
* @function Highcharts.SVGRenderer#getStyle
|
|
625
495
|
*
|
|
626
496
|
* @param {Highcharts.CSSObject} style
|
|
627
|
-
*
|
|
497
|
+
* Style settings.
|
|
628
498
|
*
|
|
629
499
|
* @return {Highcharts.CSSObject}
|
|
630
|
-
*
|
|
500
|
+
* The style settings mixed with defaults.
|
|
631
501
|
*/
|
|
632
|
-
getStyle
|
|
502
|
+
SVGRenderer.prototype.getStyle = function (style) {
|
|
633
503
|
this.style = extend({
|
|
634
504
|
fontFamily: '"Lucida Grande", "Lucida Sans Unicode", ' +
|
|
635
505
|
'Arial, Helvetica, sans-serif',
|
|
636
506
|
fontSize: '12px'
|
|
637
507
|
}, style);
|
|
638
508
|
return this.style;
|
|
639
|
-
}
|
|
509
|
+
};
|
|
640
510
|
/**
|
|
641
511
|
* Apply the global style on the renderer, mixed with the default styles.
|
|
642
512
|
*
|
|
643
513
|
* @function Highcharts.SVGRenderer#setStyle
|
|
644
514
|
*
|
|
645
515
|
* @param {Highcharts.CSSObject} style
|
|
646
|
-
*
|
|
516
|
+
* CSS to apply.
|
|
647
517
|
*/
|
|
648
|
-
setStyle
|
|
518
|
+
SVGRenderer.prototype.setStyle = function (style) {
|
|
649
519
|
this.boxWrapper.css(this.getStyle(style));
|
|
650
|
-
}
|
|
520
|
+
};
|
|
651
521
|
/**
|
|
652
522
|
* Detect whether the renderer is hidden. This happens when one of the
|
|
653
523
|
* parent elements has `display: none`. Used internally to detect when we
|
|
@@ -657,11 +527,11 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
657
527
|
* @function Highcharts.SVGRenderer#isHidden
|
|
658
528
|
*
|
|
659
529
|
* @return {boolean}
|
|
660
|
-
*
|
|
530
|
+
* True if it is hidden.
|
|
661
531
|
*/
|
|
662
|
-
isHidden
|
|
532
|
+
SVGRenderer.prototype.isHidden = function () {
|
|
663
533
|
return !this.boxWrapper.getBBox().width;
|
|
664
|
-
}
|
|
534
|
+
};
|
|
665
535
|
/**
|
|
666
536
|
* Destroys the renderer and its allocated members.
|
|
667
537
|
*
|
|
@@ -669,7 +539,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
669
539
|
*
|
|
670
540
|
* @return {null}
|
|
671
541
|
*/
|
|
672
|
-
destroy
|
|
542
|
+
SVGRenderer.prototype.destroy = function () {
|
|
673
543
|
var renderer = this, rendererDefs = renderer.defs;
|
|
674
544
|
renderer.box = null;
|
|
675
545
|
renderer.boxWrapper = renderer.boxWrapper.destroy();
|
|
@@ -687,7 +557,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
687
557
|
}
|
|
688
558
|
renderer.alignedObjects = null;
|
|
689
559
|
return null;
|
|
690
|
-
}
|
|
560
|
+
};
|
|
691
561
|
/**
|
|
692
562
|
* Create a wrapper for an SVG element. Serves as a factory for
|
|
693
563
|
* {@link SVGElement}, but this function is itself mostly called from
|
|
@@ -697,24 +567,16 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
697
567
|
* @function Highcharts.SVGRenderer#createElement
|
|
698
568
|
*
|
|
699
569
|
* @param {string} nodeName
|
|
700
|
-
*
|
|
570
|
+
* The node name, for example `rect`, `g` etc.
|
|
701
571
|
*
|
|
702
572
|
* @return {Highcharts.SVGElement}
|
|
703
|
-
*
|
|
573
|
+
* The generated SVGElement.
|
|
704
574
|
*/
|
|
705
|
-
createElement
|
|
575
|
+
SVGRenderer.prototype.createElement = function (nodeName) {
|
|
706
576
|
var wrapper = new this.Element();
|
|
707
577
|
wrapper.init(this, nodeName);
|
|
708
578
|
return wrapper;
|
|
709
|
-
}
|
|
710
|
-
/**
|
|
711
|
-
* Dummy function for plugins, called every time the renderer is updated.
|
|
712
|
-
* Prior to Highcharts 5, this was used for the canvg renderer.
|
|
713
|
-
*
|
|
714
|
-
* @deprecated
|
|
715
|
-
* @function Highcharts.SVGRenderer#draw
|
|
716
|
-
*/
|
|
717
|
-
draw: noop,
|
|
579
|
+
};
|
|
718
580
|
/**
|
|
719
581
|
* Get converted radial gradient attributes according to the radial
|
|
720
582
|
* reference. Used internally from the {@link SVGElement#colorGradient}
|
|
@@ -722,14 +584,8 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
722
584
|
*
|
|
723
585
|
* @private
|
|
724
586
|
* @function Highcharts.SVGRenderer#getRadialAttr
|
|
725
|
-
*
|
|
726
|
-
* @param {Array<number>} radialReference
|
|
727
|
-
*
|
|
728
|
-
* @param {Highcharts.SVGAttributes} gradAttr
|
|
729
|
-
*
|
|
730
|
-
* @return {Highcharts.SVGAttributes}
|
|
731
587
|
*/
|
|
732
|
-
getRadialAttr
|
|
588
|
+
SVGRenderer.prototype.getRadialAttr = function (radialReference, gradAttr) {
|
|
733
589
|
return {
|
|
734
590
|
cx: (radialReference[0] - radialReference[2] / 2) +
|
|
735
591
|
gradAttr.cx * radialReference[2],
|
|
@@ -737,7 +593,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
737
593
|
gradAttr.cy * radialReference[2],
|
|
738
594
|
r: gradAttr.r * radialReference[2]
|
|
739
595
|
};
|
|
740
|
-
}
|
|
596
|
+
};
|
|
741
597
|
/**
|
|
742
598
|
* Truncate the text node contents to a given length. Used when the css
|
|
743
599
|
* width is set. If the `textOverflow` is `ellipsis`, the text is truncated
|
|
@@ -747,24 +603,10 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
747
603
|
* @private
|
|
748
604
|
* @function Highcharts.SVGRenderer#truncate
|
|
749
605
|
*
|
|
750
|
-
* @param {Highcharts.SVGElement} wrapper
|
|
751
|
-
*
|
|
752
|
-
* @param {Highcharts.HTMLDOMElement} tspan
|
|
753
|
-
*
|
|
754
|
-
* @param {string|undefined} text
|
|
755
|
-
*
|
|
756
|
-
* @param {Array<string>|undefined} words
|
|
757
|
-
*
|
|
758
|
-
* @param {number} startAt
|
|
759
|
-
*
|
|
760
|
-
* @param {number} width
|
|
761
|
-
*
|
|
762
|
-
* @param {Function} getString
|
|
763
|
-
*
|
|
764
606
|
* @return {boolean}
|
|
765
|
-
*
|
|
607
|
+
* True if tspan is too long.
|
|
766
608
|
*/
|
|
767
|
-
truncate
|
|
609
|
+
SVGRenderer.prototype.truncate = function (wrapper, tspan, text, words, startAt, width, getString) {
|
|
768
610
|
var renderer = this, rotation = wrapper.rotation, str,
|
|
769
611
|
// Word wrap can not be truncated to shorter than one word, ellipsis
|
|
770
612
|
// text can be completely blank.
|
|
@@ -853,27 +695,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
853
695
|
wrapper.actualWidth = actualWidth;
|
|
854
696
|
wrapper.rotation = rotation; // Apply rotation again.
|
|
855
697
|
return truncated;
|
|
856
|
-
}
|
|
857
|
-
/**
|
|
858
|
-
* A collection of characters mapped to HTML entities. When `useHTML` on an
|
|
859
|
-
* element is true, these entities will be rendered correctly by HTML. In
|
|
860
|
-
* the SVG pseudo-HTML, they need to be unescaped back to simple characters,
|
|
861
|
-
* so for example `<` will render as `<`.
|
|
862
|
-
*
|
|
863
|
-
* @example
|
|
864
|
-
* // Add support for unescaping quotes
|
|
865
|
-
* Highcharts.SVGRenderer.prototype.escapes['"'] = '"';
|
|
866
|
-
*
|
|
867
|
-
* @name Highcharts.SVGRenderer#escapes
|
|
868
|
-
* @type {Highcharts.Dictionary<string>}
|
|
869
|
-
*/
|
|
870
|
-
escapes: {
|
|
871
|
-
'&': '&',
|
|
872
|
-
'<': '<',
|
|
873
|
-
'>': '>',
|
|
874
|
-
"'": ''',
|
|
875
|
-
'"': '"'
|
|
876
|
-
},
|
|
698
|
+
};
|
|
877
699
|
/**
|
|
878
700
|
* Parse a simple HTML string into SVG tspans. Called internally when text
|
|
879
701
|
* is set on an SVGElement. The function supports a subset of HTML tags, CSS
|
|
@@ -884,11 +706,9 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
884
706
|
* @function Highcharts.SVGRenderer#buildText
|
|
885
707
|
*
|
|
886
708
|
* @param {Highcharts.SVGElement} wrapper
|
|
887
|
-
*
|
|
888
|
-
*
|
|
889
|
-
* @return {void}
|
|
709
|
+
* The parent SVGElement.
|
|
890
710
|
*/
|
|
891
|
-
buildText
|
|
711
|
+
SVGRenderer.prototype.buildText = function (wrapper) {
|
|
892
712
|
var textNode = wrapper.element, renderer = this, forExport = renderer.forExport, textStr = pick(wrapper.textStr, '').toString(), hasMarkup = textStr.indexOf('<') !== -1, lines, childNodes = textNode.childNodes, truncated, parentX = attr(textNode, 'x'), textStyles = wrapper.styles, width = wrapper.textWidth, textLineHeight = textStyles && textStyles.lineHeight, textOutline = textStyles && textStyles.textOutline, ellipsis = textStyles && textStyles.textOverflow === 'ellipsis', noWrap = textStyles && textStyles.whiteSpace === 'nowrap', fontSize = textStyles && textStyles.fontSize, textCache, isSubsequentLine, i = childNodes.length, tempParent = width && !wrapper.added && this.box, getLineHeight = function (tspan) {
|
|
893
713
|
var fontSizeStyle;
|
|
894
714
|
if (!renderer.styledMode) {
|
|
@@ -989,7 +809,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
989
809
|
spans = line.split('|||');
|
|
990
810
|
spans.forEach(function buildTextSpans(span) {
|
|
991
811
|
if (span !== '' || spans.length === 1) {
|
|
992
|
-
var attributes = {}, tspan = doc.createElementNS(renderer.SVG_NS, 'tspan'), classAttribute, styleAttribute, // #390
|
|
812
|
+
var attributes = {}, tspan = doc.createElementNS(renderer.SVG_NS, 'tspan'), a, classAttribute, styleAttribute, // #390
|
|
993
813
|
hrefAttribute;
|
|
994
814
|
classAttribute = parseAttribute(span, 'class');
|
|
995
815
|
if (classAttribute) {
|
|
@@ -1000,13 +820,22 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1000
820
|
styleAttribute = styleAttribute.replace(/(;| |^)color([ :])/, '$1fill$2');
|
|
1001
821
|
attr(tspan, 'style', styleAttribute);
|
|
1002
822
|
}
|
|
1003
|
-
//
|
|
823
|
+
// For anchors, wrap the tspan in an <a> tag and apply
|
|
824
|
+
// the href attribute as is (#13559). Not for export
|
|
825
|
+
// (#1529)
|
|
1004
826
|
hrefAttribute = parseAttribute(span, 'href');
|
|
1005
827
|
if (hrefAttribute && !forExport) {
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
828
|
+
if (
|
|
829
|
+
// Stop JavaScript links, vulnerable to XSS
|
|
830
|
+
hrefAttribute.split(':')[0].toLowerCase()
|
|
831
|
+
.indexOf('javascript') === -1) {
|
|
832
|
+
a = doc.createElementNS(renderer.SVG_NS, 'a');
|
|
833
|
+
attr(a, 'href', hrefAttribute);
|
|
834
|
+
attr(tspan, 'class', 'highcharts-anchor');
|
|
835
|
+
a.appendChild(tspan);
|
|
836
|
+
if (!renderer.styledMode) {
|
|
837
|
+
css(tspan, { cursor: 'pointer' });
|
|
838
|
+
}
|
|
1010
839
|
}
|
|
1011
840
|
}
|
|
1012
841
|
// Strip away unsupported HTML tags (#7126)
|
|
@@ -1028,7 +857,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1028
857
|
// add attributes
|
|
1029
858
|
attr(tspan, attributes);
|
|
1030
859
|
// Append it
|
|
1031
|
-
textNode.appendChild(tspan);
|
|
860
|
+
textNode.appendChild(a || tspan);
|
|
1032
861
|
// first span on subsequent line, add the line
|
|
1033
862
|
// height
|
|
1034
863
|
if (!spanNo && isSubsequentLine) {
|
|
@@ -1106,31 +935,31 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1106
935
|
textNode.childNodes.length);
|
|
1107
936
|
});
|
|
1108
937
|
if (ellipsis && truncated) {
|
|
1109
|
-
wrapper.attr('title', unescapeEntities(wrapper.textStr, ['<', '>']) // #7179
|
|
938
|
+
wrapper.attr('title', unescapeEntities(wrapper.textStr || '', ['<', '>']) // #7179
|
|
1110
939
|
);
|
|
1111
940
|
}
|
|
1112
941
|
if (tempParent) {
|
|
1113
942
|
tempParent.removeChild(textNode);
|
|
1114
943
|
}
|
|
1115
944
|
// Apply the text outline
|
|
1116
|
-
if (textOutline && wrapper.applyTextOutline) {
|
|
945
|
+
if (isString(textOutline) && wrapper.applyTextOutline) {
|
|
1117
946
|
wrapper.applyTextOutline(textOutline);
|
|
1118
947
|
}
|
|
1119
948
|
}
|
|
1120
|
-
}
|
|
949
|
+
};
|
|
1121
950
|
/**
|
|
1122
951
|
* Returns white for dark colors and black for bright colors.
|
|
1123
952
|
*
|
|
1124
953
|
* @function Highcharts.SVGRenderer#getContrast
|
|
1125
954
|
*
|
|
1126
955
|
* @param {Highcharts.ColorString} rgba
|
|
1127
|
-
*
|
|
956
|
+
* The color to get the contrast for.
|
|
1128
957
|
*
|
|
1129
958
|
* @return {Highcharts.ColorString}
|
|
1130
|
-
*
|
|
959
|
+
* The contrast color, either `#000000` or `#FFFFFF`.
|
|
1131
960
|
*/
|
|
1132
|
-
getContrast
|
|
1133
|
-
rgba =
|
|
961
|
+
SVGRenderer.prototype.getContrast = function (rgba) {
|
|
962
|
+
rgba = Color.parse(rgba).rgba;
|
|
1134
963
|
// The threshold may be discussed. Here's a proposal for adding
|
|
1135
964
|
// different weight to the color channels (#6216)
|
|
1136
965
|
rgba[0] *= 1; // red
|
|
@@ -1140,47 +969,54 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1140
969
|
1.8 * 255 ?
|
|
1141
970
|
'#000000' :
|
|
1142
971
|
'#FFFFFF';
|
|
1143
|
-
}
|
|
972
|
+
};
|
|
1144
973
|
/**
|
|
1145
974
|
* Create a button with preset states.
|
|
1146
975
|
*
|
|
1147
976
|
* @function Highcharts.SVGRenderer#button
|
|
1148
977
|
*
|
|
1149
978
|
* @param {string} text
|
|
1150
|
-
*
|
|
979
|
+
* The text or HTML to draw.
|
|
1151
980
|
*
|
|
1152
981
|
* @param {number} x
|
|
1153
|
-
*
|
|
982
|
+
* The x position of the button's left side.
|
|
1154
983
|
*
|
|
1155
984
|
* @param {number} y
|
|
1156
|
-
*
|
|
985
|
+
* The y position of the button's top side.
|
|
1157
986
|
*
|
|
1158
987
|
* @param {Highcharts.EventCallbackFunction<Highcharts.SVGElement>} callback
|
|
1159
|
-
*
|
|
988
|
+
* The function to execute on button click or touch.
|
|
1160
989
|
*
|
|
1161
990
|
* @param {Highcharts.SVGAttributes} [normalState]
|
|
1162
|
-
*
|
|
991
|
+
* SVG attributes for the normal state.
|
|
1163
992
|
*
|
|
1164
993
|
* @param {Highcharts.SVGAttributes} [hoverState]
|
|
1165
|
-
*
|
|
994
|
+
* SVG attributes for the hover state.
|
|
1166
995
|
*
|
|
1167
996
|
* @param {Highcharts.SVGAttributes} [pressedState]
|
|
1168
|
-
*
|
|
997
|
+
* SVG attributes for the pressed state.
|
|
1169
998
|
*
|
|
1170
999
|
* @param {Highcharts.SVGAttributes} [disabledState]
|
|
1171
|
-
*
|
|
1000
|
+
* SVG attributes for the disabled state.
|
|
1172
1001
|
*
|
|
1173
1002
|
* @param {Highcharts.SymbolKeyValue} [shape=rect]
|
|
1174
|
-
*
|
|
1003
|
+
* The shape type.
|
|
1175
1004
|
*
|
|
1176
1005
|
* @param {boolean} [useHTML=false]
|
|
1177
|
-
*
|
|
1006
|
+
* Wether to use HTML to render the label.
|
|
1178
1007
|
*
|
|
1179
1008
|
* @return {Highcharts.SVGElement}
|
|
1180
|
-
*
|
|
1009
|
+
* The button element.
|
|
1181
1010
|
*/
|
|
1182
|
-
button
|
|
1183
|
-
var label = this.label(text, x, y, shape, void 0, void 0, useHTML, void 0, 'button'), curState = 0, styledMode = this.styledMode
|
|
1011
|
+
SVGRenderer.prototype.button = function (text, x, y, callback, normalState, hoverState, pressedState, disabledState, shape, useHTML) {
|
|
1012
|
+
var label = this.label(text, x, y, shape, void 0, void 0, useHTML, void 0, 'button'), curState = 0, styledMode = this.styledMode,
|
|
1013
|
+
// Make a copy of normalState (#13798)
|
|
1014
|
+
// (reference to options.rangeSelector.buttonTheme)
|
|
1015
|
+
normalState = normalState ? merge(normalState) : normalState, userNormalStyle = normalState && normalState.style || {};
|
|
1016
|
+
// Remove stylable attributes
|
|
1017
|
+
if (normalState && normalState.style) {
|
|
1018
|
+
delete normalState.style;
|
|
1019
|
+
}
|
|
1184
1020
|
// Default, non-stylable attributes
|
|
1185
1021
|
label.attr(merge({ padding: 8, r: 2 }, normalState));
|
|
1186
1022
|
if (!styledMode) {
|
|
@@ -1196,6 +1032,8 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1196
1032
|
cursor: 'pointer',
|
|
1197
1033
|
fontWeight: 'normal'
|
|
1198
1034
|
}
|
|
1035
|
+
}, {
|
|
1036
|
+
style: userNormalStyle
|
|
1199
1037
|
}, normalState);
|
|
1200
1038
|
normalStyle = normalState.style;
|
|
1201
1039
|
delete normalState.style;
|
|
@@ -1274,7 +1112,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1274
1112
|
callback.call(label, e);
|
|
1275
1113
|
}
|
|
1276
1114
|
});
|
|
1277
|
-
}
|
|
1115
|
+
};
|
|
1278
1116
|
/**
|
|
1279
1117
|
* Make a straight line crisper by not spilling out to neighbour pixels.
|
|
1280
1118
|
*
|
|
@@ -1293,7 +1131,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1293
1131
|
* @return {Highcharts.SVGPathArray}
|
|
1294
1132
|
* The original points array, but modified to render crisply.
|
|
1295
1133
|
*/
|
|
1296
|
-
crispLine
|
|
1134
|
+
SVGRenderer.prototype.crispLine = function (points, width, roundingFunction) {
|
|
1297
1135
|
if (roundingFunction === void 0) { roundingFunction = 'round'; }
|
|
1298
1136
|
var start = points[0];
|
|
1299
1137
|
var end = points[1];
|
|
@@ -1309,7 +1147,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1309
1147
|
Math[roundingFunction](start[2]) + (width % 2 / 2);
|
|
1310
1148
|
}
|
|
1311
1149
|
return points;
|
|
1312
|
-
}
|
|
1150
|
+
};
|
|
1313
1151
|
/**
|
|
1314
1152
|
* Draw a path, wraps the SVG `path` element.
|
|
1315
1153
|
*
|
|
@@ -1326,10 +1164,10 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1326
1164
|
* @function Highcharts.SVGRenderer#path
|
|
1327
1165
|
*
|
|
1328
1166
|
* @param {Highcharts.SVGPathArray} [path]
|
|
1329
|
-
*
|
|
1167
|
+
* An SVG path definition in array form.
|
|
1330
1168
|
*
|
|
1331
1169
|
* @return {Highcharts.SVGElement}
|
|
1332
|
-
*
|
|
1170
|
+
* The generated wrapper element.
|
|
1333
1171
|
*
|
|
1334
1172
|
*/ /**
|
|
1335
1173
|
* Draw a path, wraps the SVG `path` element.
|
|
@@ -1337,12 +1175,12 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1337
1175
|
* @function Highcharts.SVGRenderer#path
|
|
1338
1176
|
*
|
|
1339
1177
|
* @param {Highcharts.SVGAttributes} [attribs]
|
|
1340
|
-
*
|
|
1178
|
+
* The initial attributes.
|
|
1341
1179
|
*
|
|
1342
1180
|
* @return {Highcharts.SVGElement}
|
|
1343
|
-
*
|
|
1181
|
+
* The generated wrapper element.
|
|
1344
1182
|
*/
|
|
1345
|
-
path
|
|
1183
|
+
SVGRenderer.prototype.path = function (path) {
|
|
1346
1184
|
var attribs = (this.styledMode ? {} : {
|
|
1347
1185
|
fill: 'none'
|
|
1348
1186
|
});
|
|
@@ -1353,7 +1191,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1353
1191
|
extend(attribs, path);
|
|
1354
1192
|
}
|
|
1355
1193
|
return this.createElement('path').attr(attribs);
|
|
1356
|
-
}
|
|
1194
|
+
};
|
|
1357
1195
|
/**
|
|
1358
1196
|
* Draw a circle, wraps the SVG `circle` element.
|
|
1359
1197
|
*
|
|
@@ -1363,28 +1201,28 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1363
1201
|
* @function Highcharts.SVGRenderer#circle
|
|
1364
1202
|
*
|
|
1365
1203
|
* @param {number} [x]
|
|
1366
|
-
*
|
|
1204
|
+
* The center x position.
|
|
1367
1205
|
*
|
|
1368
1206
|
* @param {number} [y]
|
|
1369
|
-
*
|
|
1207
|
+
* The center y position.
|
|
1370
1208
|
*
|
|
1371
1209
|
* @param {number} [r]
|
|
1372
|
-
*
|
|
1210
|
+
* The radius.
|
|
1373
1211
|
*
|
|
1374
1212
|
* @return {Highcharts.SVGElement}
|
|
1375
|
-
*
|
|
1213
|
+
* The generated wrapper element.
|
|
1376
1214
|
*/ /**
|
|
1377
1215
|
* Draw a circle, wraps the SVG `circle` element.
|
|
1378
1216
|
*
|
|
1379
1217
|
* @function Highcharts.SVGRenderer#circle
|
|
1380
1218
|
*
|
|
1381
1219
|
* @param {Highcharts.SVGAttributes} [attribs]
|
|
1382
|
-
*
|
|
1220
|
+
* The initial attributes.
|
|
1383
1221
|
*
|
|
1384
1222
|
* @return {Highcharts.SVGElement}
|
|
1385
|
-
*
|
|
1223
|
+
* The generated wrapper element.
|
|
1386
1224
|
*/
|
|
1387
|
-
circle
|
|
1225
|
+
SVGRenderer.prototype.circle = function (x, y, r) {
|
|
1388
1226
|
var attribs = (isObject(x) ?
|
|
1389
1227
|
x :
|
|
1390
1228
|
typeof x === 'undefined' ? {} : { x: x, y: y, r: r }), wrapper = this.createElement('circle');
|
|
@@ -1393,7 +1231,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1393
1231
|
element.setAttribute('c' + key, value);
|
|
1394
1232
|
};
|
|
1395
1233
|
return wrapper.attr(attribs);
|
|
1396
|
-
}
|
|
1234
|
+
};
|
|
1397
1235
|
/**
|
|
1398
1236
|
* Draw and return an arc.
|
|
1399
1237
|
*
|
|
@@ -1403,39 +1241,39 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1403
1241
|
* @function Highcharts.SVGRenderer#arc
|
|
1404
1242
|
*
|
|
1405
1243
|
* @param {number} [x=0]
|
|
1406
|
-
*
|
|
1244
|
+
* Center X position.
|
|
1407
1245
|
*
|
|
1408
1246
|
* @param {number} [y=0]
|
|
1409
|
-
*
|
|
1247
|
+
* Center Y position.
|
|
1410
1248
|
*
|
|
1411
1249
|
* @param {number} [r=0]
|
|
1412
|
-
*
|
|
1250
|
+
* The outer radius' of the arc.
|
|
1413
1251
|
*
|
|
1414
1252
|
* @param {number} [innerR=0]
|
|
1415
|
-
*
|
|
1253
|
+
* Inner radius like used in donut charts.
|
|
1416
1254
|
*
|
|
1417
1255
|
* @param {number} [start=0]
|
|
1418
|
-
*
|
|
1419
|
-
*
|
|
1256
|
+
* The starting angle of the arc in radians, where 0 is to the right and
|
|
1257
|
+
* `-Math.PI/2` is up.
|
|
1420
1258
|
*
|
|
1421
1259
|
* @param {number} [end=0]
|
|
1422
|
-
*
|
|
1423
|
-
*
|
|
1260
|
+
* The ending angle of the arc in radians, where 0 is to the right and
|
|
1261
|
+
* `-Math.PI/2` is up.
|
|
1424
1262
|
*
|
|
1425
1263
|
* @return {Highcharts.SVGElement}
|
|
1426
|
-
*
|
|
1264
|
+
* The generated wrapper element.
|
|
1427
1265
|
*/ /**
|
|
1428
1266
|
* Draw and return an arc. Overloaded function that takes arguments object.
|
|
1429
1267
|
*
|
|
1430
1268
|
* @function Highcharts.SVGRenderer#arc
|
|
1431
1269
|
*
|
|
1432
1270
|
* @param {Highcharts.SVGAttributes} attribs
|
|
1433
|
-
*
|
|
1271
|
+
* Initial SVG attributes.
|
|
1434
1272
|
*
|
|
1435
1273
|
* @return {Highcharts.SVGElement}
|
|
1436
|
-
*
|
|
1274
|
+
* The generated wrapper element.
|
|
1437
1275
|
*/
|
|
1438
|
-
arc
|
|
1276
|
+
SVGRenderer.prototype.arc = function (x, y, r, innerR, start, end) {
|
|
1439
1277
|
var arc, options;
|
|
1440
1278
|
if (isObject(x)) {
|
|
1441
1279
|
options = x;
|
|
@@ -1458,32 +1296,32 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1458
1296
|
arc = this.symbol('arc', x, y, r, r, options);
|
|
1459
1297
|
arc.r = r; // #959
|
|
1460
1298
|
return arc;
|
|
1461
|
-
}
|
|
1299
|
+
};
|
|
1462
1300
|
/**
|
|
1463
1301
|
* Draw and return a rectangle.
|
|
1464
1302
|
*
|
|
1465
1303
|
* @function Highcharts.SVGRenderer#rect
|
|
1466
1304
|
*
|
|
1467
1305
|
* @param {number} [x]
|
|
1468
|
-
*
|
|
1306
|
+
* Left position.
|
|
1469
1307
|
*
|
|
1470
1308
|
* @param {number} [y]
|
|
1471
|
-
*
|
|
1309
|
+
* Top position.
|
|
1472
1310
|
*
|
|
1473
1311
|
* @param {number} [width]
|
|
1474
|
-
*
|
|
1312
|
+
* Width of the rectangle.
|
|
1475
1313
|
*
|
|
1476
1314
|
* @param {number} [height]
|
|
1477
|
-
*
|
|
1315
|
+
* Height of the rectangle.
|
|
1478
1316
|
*
|
|
1479
1317
|
* @param {number} [r]
|
|
1480
|
-
*
|
|
1318
|
+
* Border corner radius.
|
|
1481
1319
|
*
|
|
1482
1320
|
* @param {number} [strokeWidth]
|
|
1483
|
-
*
|
|
1321
|
+
* A stroke width can be supplied to allow crisp drawing.
|
|
1484
1322
|
*
|
|
1485
1323
|
* @return {Highcharts.SVGElement}
|
|
1486
|
-
*
|
|
1324
|
+
* The generated wrapper element.
|
|
1487
1325
|
*/ /**
|
|
1488
1326
|
* Draw and return a rectangle.
|
|
1489
1327
|
*
|
|
@@ -1495,12 +1333,12 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1495
1333
|
* @function Highcharts.SVGRenderer#rect
|
|
1496
1334
|
*
|
|
1497
1335
|
* @param {Highcharts.SVGAttributes} [attributes]
|
|
1498
|
-
*
|
|
1336
|
+
* General SVG attributes for the rectangle.
|
|
1499
1337
|
*
|
|
1500
1338
|
* @return {Highcharts.SVGElement}
|
|
1501
|
-
*
|
|
1339
|
+
* The generated wrapper element.
|
|
1502
1340
|
*/
|
|
1503
|
-
rect
|
|
1341
|
+
SVGRenderer.prototype.rect = function (x, y, width, height, r, strokeWidth) {
|
|
1504
1342
|
r = isObject(x) ? x.r : r;
|
|
1505
1343
|
var wrapper = this.createElement('rect'), attribs = isObject(x) ?
|
|
1506
1344
|
x :
|
|
@@ -1533,7 +1371,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1533
1371
|
return wrapper.r;
|
|
1534
1372
|
};
|
|
1535
1373
|
return wrapper.attr(attribs);
|
|
1536
|
-
}
|
|
1374
|
+
};
|
|
1537
1375
|
/**
|
|
1538
1376
|
* Resize the {@link SVGRenderer#box} and re-align all aligned child
|
|
1539
1377
|
* elements.
|
|
@@ -1544,17 +1382,15 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1544
1382
|
* @function Highcharts.SVGRenderer#setSize
|
|
1545
1383
|
*
|
|
1546
1384
|
* @param {number} width
|
|
1547
|
-
*
|
|
1385
|
+
* The new pixel width.
|
|
1548
1386
|
*
|
|
1549
1387
|
* @param {number} height
|
|
1550
|
-
*
|
|
1388
|
+
* The new pixel height.
|
|
1551
1389
|
*
|
|
1552
|
-
* @param {boolean|Highcharts.AnimationOptionsObject} [animate=true]
|
|
1553
|
-
*
|
|
1554
|
-
*
|
|
1555
|
-
* @return {void}
|
|
1390
|
+
* @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animate=true]
|
|
1391
|
+
* Whether and how to animate.
|
|
1556
1392
|
*/
|
|
1557
|
-
setSize
|
|
1393
|
+
SVGRenderer.prototype.setSize = function (width, height, animate) {
|
|
1558
1394
|
var renderer = this, alignedObjects = renderer.alignedObjects, i = alignedObjects.length;
|
|
1559
1395
|
renderer.width = width;
|
|
1560
1396
|
renderer.height = height;
|
|
@@ -1573,7 +1409,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1573
1409
|
while (i--) {
|
|
1574
1410
|
alignedObjects[i].align();
|
|
1575
1411
|
}
|
|
1576
|
-
}
|
|
1412
|
+
};
|
|
1577
1413
|
/**
|
|
1578
1414
|
* Create and return an svg group element. Child
|
|
1579
1415
|
* {@link Highcharts.SVGElement} objects are added to the group by using the
|
|
@@ -1588,12 +1424,12 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1588
1424
|
* @return {Highcharts.SVGElement}
|
|
1589
1425
|
* The generated wrapper element.
|
|
1590
1426
|
*/
|
|
1591
|
-
g
|
|
1427
|
+
SVGRenderer.prototype.g = function (name) {
|
|
1592
1428
|
var elem = this.createElement('g');
|
|
1593
1429
|
return name ?
|
|
1594
1430
|
elem.attr({ 'class': 'highcharts-' + name }) :
|
|
1595
1431
|
elem;
|
|
1596
|
-
}
|
|
1432
|
+
};
|
|
1597
1433
|
/**
|
|
1598
1434
|
* Display an image.
|
|
1599
1435
|
*
|
|
@@ -1626,7 +1462,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1626
1462
|
* @return {Highcharts.SVGElement}
|
|
1627
1463
|
* The generated wrapper element.
|
|
1628
1464
|
*/
|
|
1629
|
-
image
|
|
1465
|
+
SVGRenderer.prototype.image = function (src, x, y, width, height, onload) {
|
|
1630
1466
|
var attribs = { preserveAspectRatio: 'none' }, elemWrapper, dummy, setSVGImageSource = function (el, src) {
|
|
1631
1467
|
// Set the href in the xlink namespace
|
|
1632
1468
|
if (el.setAttributeNS) {
|
|
@@ -1669,7 +1505,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1669
1505
|
setSVGImageSource(elemWrapper.element, src);
|
|
1670
1506
|
}
|
|
1671
1507
|
return elemWrapper;
|
|
1672
|
-
}
|
|
1508
|
+
};
|
|
1673
1509
|
/**
|
|
1674
1510
|
* Draw a symbol out of pre-defined shape paths from
|
|
1675
1511
|
* {@link SVGRenderer#symbols}.
|
|
@@ -1679,33 +1515,33 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1679
1515
|
* @function Highcharts.SVGRenderer#symbol
|
|
1680
1516
|
*
|
|
1681
1517
|
* @param {string} symbol
|
|
1682
|
-
*
|
|
1518
|
+
* The symbol name.
|
|
1683
1519
|
*
|
|
1684
1520
|
* @param {number} [x]
|
|
1685
|
-
*
|
|
1521
|
+
* The X coordinate for the top left position.
|
|
1686
1522
|
*
|
|
1687
1523
|
* @param {number} [y]
|
|
1688
|
-
*
|
|
1524
|
+
* The Y coordinate for the top left position.
|
|
1689
1525
|
*
|
|
1690
1526
|
* @param {number} [width]
|
|
1691
|
-
*
|
|
1527
|
+
* The pixel width.
|
|
1692
1528
|
*
|
|
1693
1529
|
* @param {number} [height]
|
|
1694
|
-
*
|
|
1530
|
+
* The pixel height.
|
|
1695
1531
|
*
|
|
1696
1532
|
* @param {Highcharts.SymbolOptionsObject} [options]
|
|
1697
|
-
*
|
|
1533
|
+
* Additional options, depending on the actual symbol drawn.
|
|
1698
1534
|
*
|
|
1699
1535
|
* @return {Highcharts.SVGElement}
|
|
1700
1536
|
*/
|
|
1701
|
-
symbol
|
|
1537
|
+
SVGRenderer.prototype.symbol = function (symbol, x, y, width, height, options) {
|
|
1702
1538
|
var ren = this, obj, imageRegex = /^url\((.*?)\)$/, isImage = imageRegex.test(symbol), sym = (!isImage && (this.symbols[symbol] ? symbol : 'circle')),
|
|
1703
1539
|
// get the symbol definition function
|
|
1704
1540
|
symbolFn = (sym && this.symbols[sym]), path, imageSrc, centerImage;
|
|
1705
1541
|
if (symbolFn) {
|
|
1706
1542
|
// Check if there's a path defined for this symbol
|
|
1707
1543
|
if (typeof x === 'number') {
|
|
1708
|
-
path = symbolFn.call(this.symbols, Math.round(x || 0), Math.round(y || 0), width, height, options);
|
|
1544
|
+
path = symbolFn.call(this.symbols, Math.round(x || 0), Math.round(y || 0), width || 0, height || 0, options);
|
|
1709
1545
|
}
|
|
1710
1546
|
obj = this.path(path);
|
|
1711
1547
|
if (!ren.styledMode) {
|
|
@@ -1828,166 +1664,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
1828
1664
|
}
|
|
1829
1665
|
}
|
|
1830
1666
|
return obj;
|
|
1831
|
-
}
|
|
1832
|
-
/**
|
|
1833
|
-
* An extendable collection of functions for defining symbol paths.
|
|
1834
|
-
*
|
|
1835
|
-
* @name Highcharts.SVGRenderer#symbols
|
|
1836
|
-
* @type {Highcharts.SymbolDictionary}
|
|
1837
|
-
*/
|
|
1838
|
-
symbols: {
|
|
1839
|
-
circle: function (x, y, w, h) {
|
|
1840
|
-
// Return a full arc
|
|
1841
|
-
return this.arc(x + w / 2, y + h / 2, w / 2, h / 2, {
|
|
1842
|
-
start: Math.PI * 0.5,
|
|
1843
|
-
end: Math.PI * 2.5,
|
|
1844
|
-
open: false
|
|
1845
|
-
});
|
|
1846
|
-
},
|
|
1847
|
-
square: function (x, y, w, h) {
|
|
1848
|
-
return [
|
|
1849
|
-
['M', x, y],
|
|
1850
|
-
['L', x + w, y],
|
|
1851
|
-
['L', x + w, y + h],
|
|
1852
|
-
['L', x, y + h],
|
|
1853
|
-
['Z']
|
|
1854
|
-
];
|
|
1855
|
-
},
|
|
1856
|
-
triangle: function (x, y, w, h) {
|
|
1857
|
-
return [
|
|
1858
|
-
['M', x + w / 2, y],
|
|
1859
|
-
['L', x + w, y + h],
|
|
1860
|
-
['L', x, y + h],
|
|
1861
|
-
['Z']
|
|
1862
|
-
];
|
|
1863
|
-
},
|
|
1864
|
-
'triangle-down': function (x, y, w, h) {
|
|
1865
|
-
return [
|
|
1866
|
-
['M', x, y],
|
|
1867
|
-
['L', x + w, y],
|
|
1868
|
-
['L', x + w / 2, y + h],
|
|
1869
|
-
['Z']
|
|
1870
|
-
];
|
|
1871
|
-
},
|
|
1872
|
-
diamond: function (x, y, w, h) {
|
|
1873
|
-
return [
|
|
1874
|
-
['M', x + w / 2, y],
|
|
1875
|
-
['L', x + w, y + h / 2],
|
|
1876
|
-
['L', x + w / 2, y + h],
|
|
1877
|
-
['L', x, y + h / 2],
|
|
1878
|
-
['Z']
|
|
1879
|
-
];
|
|
1880
|
-
},
|
|
1881
|
-
arc: function (x, y, w, h, options) {
|
|
1882
|
-
var start = options.start, rx = options.r || w, ry = options.r || h || w, proximity = 0.001, fullCircle = Math.abs(options.end - options.start - 2 * Math.PI) <
|
|
1883
|
-
proximity,
|
|
1884
|
-
// Substract a small number to prevent cos and sin of start and
|
|
1885
|
-
// end from becoming equal on 360 arcs (related: #1561)
|
|
1886
|
-
end = options.end - proximity, innerRadius = options.innerR, open = pick(options.open, fullCircle), cosStart = Math.cos(start), sinStart = Math.sin(start), cosEnd = Math.cos(end), sinEnd = Math.sin(end),
|
|
1887
|
-
// Proximity takes care of rounding errors around PI (#6971)
|
|
1888
|
-
longArc = pick(options.longArc, options.end - start - Math.PI < proximity ? 0 : 1), arc;
|
|
1889
|
-
arc = [
|
|
1890
|
-
[
|
|
1891
|
-
'M',
|
|
1892
|
-
x + rx * cosStart,
|
|
1893
|
-
y + ry * sinStart
|
|
1894
|
-
],
|
|
1895
|
-
[
|
|
1896
|
-
'A',
|
|
1897
|
-
rx,
|
|
1898
|
-
ry,
|
|
1899
|
-
0,
|
|
1900
|
-
longArc,
|
|
1901
|
-
pick(options.clockwise, 1),
|
|
1902
|
-
x + rx * cosEnd,
|
|
1903
|
-
y + ry * sinEnd
|
|
1904
|
-
]
|
|
1905
|
-
];
|
|
1906
|
-
if (defined(innerRadius)) {
|
|
1907
|
-
arc.push(open ?
|
|
1908
|
-
[
|
|
1909
|
-
'M',
|
|
1910
|
-
x + innerRadius * cosEnd,
|
|
1911
|
-
y + innerRadius * sinEnd
|
|
1912
|
-
] : [
|
|
1913
|
-
'L',
|
|
1914
|
-
x + innerRadius * cosEnd,
|
|
1915
|
-
y + innerRadius * sinEnd
|
|
1916
|
-
], [
|
|
1917
|
-
'A',
|
|
1918
|
-
innerRadius,
|
|
1919
|
-
innerRadius,
|
|
1920
|
-
0,
|
|
1921
|
-
longArc,
|
|
1922
|
-
// Clockwise - opposite to the outer arc clockwise
|
|
1923
|
-
defined(options.clockwise) ? 1 - options.clockwise : 0,
|
|
1924
|
-
x + innerRadius * cosStart,
|
|
1925
|
-
y + innerRadius * sinStart
|
|
1926
|
-
]);
|
|
1927
|
-
}
|
|
1928
|
-
if (!open) {
|
|
1929
|
-
arc.push(['Z']);
|
|
1930
|
-
}
|
|
1931
|
-
return arc;
|
|
1932
|
-
},
|
|
1933
|
-
/**
|
|
1934
|
-
* Callout shape used for default tooltips, also used for rounded
|
|
1935
|
-
* rectangles in VML
|
|
1936
|
-
*/
|
|
1937
|
-
callout: function (x, y, w, h, options) {
|
|
1938
|
-
var arrowLength = 6, halfDistance = 6, r = Math.min((options && options.r) || 0, w, h), safeDistance = r + halfDistance, anchorX = options && options.anchorX, anchorY = options && options.anchorY, path;
|
|
1939
|
-
path = [
|
|
1940
|
-
['M', x + r, y],
|
|
1941
|
-
['L', x + w - r, y],
|
|
1942
|
-
['C', x + w, y, x + w, y, x + w, y + r],
|
|
1943
|
-
['L', x + w, y + h - r],
|
|
1944
|
-
['C', x + w, y + h, x + w, y + h, x + w - r, y + h],
|
|
1945
|
-
['L', x + r, y + h],
|
|
1946
|
-
['C', x, y + h, x, y + h, x, y + h - r],
|
|
1947
|
-
['L', x, y + r],
|
|
1948
|
-
['C', x, y, x, y, x + r, y] // top-left corner
|
|
1949
|
-
];
|
|
1950
|
-
// Anchor on right side
|
|
1951
|
-
if (anchorX && anchorX > w) {
|
|
1952
|
-
// Chevron
|
|
1953
|
-
if (anchorY > y + safeDistance &&
|
|
1954
|
-
anchorY < y + h - safeDistance) {
|
|
1955
|
-
path.splice(3, 1, ['L', x + w, anchorY - halfDistance], ['L', x + w + arrowLength, anchorY], ['L', x + w, anchorY + halfDistance], ['L', x + w, y + h - r]);
|
|
1956
|
-
// Simple connector
|
|
1957
|
-
}
|
|
1958
|
-
else {
|
|
1959
|
-
path.splice(3, 1, ['L', x + w, h / 2], ['L', anchorX, anchorY], ['L', x + w, h / 2], ['L', x + w, y + h - r]);
|
|
1960
|
-
}
|
|
1961
|
-
// Anchor on left side
|
|
1962
|
-
}
|
|
1963
|
-
else if (anchorX && anchorX < 0) {
|
|
1964
|
-
// Chevron
|
|
1965
|
-
if (anchorY > y + safeDistance &&
|
|
1966
|
-
anchorY < y + h - safeDistance) {
|
|
1967
|
-
path.splice(7, 1, ['L', x, anchorY + halfDistance], ['L', x - arrowLength, anchorY], ['L', x, anchorY - halfDistance], ['L', x, y + r]);
|
|
1968
|
-
// Simple connector
|
|
1969
|
-
}
|
|
1970
|
-
else {
|
|
1971
|
-
path.splice(7, 1, ['L', x, h / 2], ['L', anchorX, anchorY], ['L', x, h / 2], ['L', x, y + r]);
|
|
1972
|
-
}
|
|
1973
|
-
}
|
|
1974
|
-
else if ( // replace bottom
|
|
1975
|
-
anchorY &&
|
|
1976
|
-
anchorY > h &&
|
|
1977
|
-
anchorX > x + safeDistance &&
|
|
1978
|
-
anchorX < x + w - safeDistance) {
|
|
1979
|
-
path.splice(5, 1, ['L', anchorX + halfDistance, y + h], ['L', anchorX, y + h + arrowLength], ['L', anchorX - halfDistance, y + h], ['L', x + r, y + h]);
|
|
1980
|
-
}
|
|
1981
|
-
else if ( // replace top
|
|
1982
|
-
anchorY &&
|
|
1983
|
-
anchorY < 0 &&
|
|
1984
|
-
anchorX > x + safeDistance &&
|
|
1985
|
-
anchorX < x + w - safeDistance) {
|
|
1986
|
-
path.splice(1, 1, ['L', anchorX - halfDistance, y], ['L', anchorX, y - arrowLength], ['L', anchorX + halfDistance, y], ['L', w - r, y]);
|
|
1987
|
-
}
|
|
1988
|
-
return path;
|
|
1989
|
-
}
|
|
1990
|
-
},
|
|
1667
|
+
};
|
|
1991
1668
|
/**
|
|
1992
1669
|
* Define a clipping rectangle. The clipping rectangle is later applied
|
|
1993
1670
|
* to {@link SVGElement} objects through the {@link SVGElement#clip}
|
|
@@ -2015,7 +1692,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
2015
1692
|
* @return {Highcharts.ClipRectElement}
|
|
2016
1693
|
* A clipping rectangle.
|
|
2017
1694
|
*/
|
|
2018
|
-
clipRect
|
|
1695
|
+
SVGRenderer.prototype.clipRect = function (x, y, width, height) {
|
|
2019
1696
|
var wrapper,
|
|
2020
1697
|
// Add a hyphen at the end to avoid confusion in testing indexes
|
|
2021
1698
|
// -1 and -10, -11 etc (#6550)
|
|
@@ -2027,7 +1704,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
2027
1704
|
wrapper.clipPath = clipPath;
|
|
2028
1705
|
wrapper.count = 0;
|
|
2029
1706
|
return wrapper;
|
|
2030
|
-
}
|
|
1707
|
+
};
|
|
2031
1708
|
/**
|
|
2032
1709
|
* Draw text. The text can contain a subset of HTML, like spans and anchors
|
|
2033
1710
|
* and some basic text styling of these. For more advanced features like
|
|
@@ -2044,21 +1721,21 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
2044
1721
|
* @function Highcharts.SVGRenderer#text
|
|
2045
1722
|
*
|
|
2046
1723
|
* @param {string} [str]
|
|
2047
|
-
*
|
|
1724
|
+
* The text of (subset) HTML to draw.
|
|
2048
1725
|
*
|
|
2049
1726
|
* @param {number} [x]
|
|
2050
|
-
*
|
|
1727
|
+
* The x position of the text's lower left corner.
|
|
2051
1728
|
*
|
|
2052
1729
|
* @param {number} [y]
|
|
2053
|
-
*
|
|
1730
|
+
* The y position of the text's lower left corner.
|
|
2054
1731
|
*
|
|
2055
1732
|
* @param {boolean} [useHTML=false]
|
|
2056
|
-
*
|
|
1733
|
+
* Use HTML to render the text.
|
|
2057
1734
|
*
|
|
2058
1735
|
* @return {Highcharts.SVGElement}
|
|
2059
|
-
*
|
|
1736
|
+
* The text object.
|
|
2060
1737
|
*/
|
|
2061
|
-
text
|
|
1738
|
+
SVGRenderer.prototype.text = function (str, x, y, useHTML) {
|
|
2062
1739
|
// declare variables
|
|
2063
1740
|
var renderer = this, wrapper, attribs = {};
|
|
2064
1741
|
if (useHTML && (renderer.allowHTML || !renderer.forExport)) {
|
|
@@ -2088,7 +1765,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
2088
1765
|
};
|
|
2089
1766
|
}
|
|
2090
1767
|
return wrapper;
|
|
2091
|
-
}
|
|
1768
|
+
};
|
|
2092
1769
|
/**
|
|
2093
1770
|
* Utility to return the baseline offset and total line height from the font
|
|
2094
1771
|
* size.
|
|
@@ -2105,7 +1782,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
2105
1782
|
* @return {Highcharts.FontMetricsObject}
|
|
2106
1783
|
* The font metrics.
|
|
2107
1784
|
*/
|
|
2108
|
-
fontMetrics
|
|
1785
|
+
SVGRenderer.prototype.fontMetrics = function (fontSize, elem) {
|
|
2109
1786
|
var lineHeight, baseline;
|
|
2110
1787
|
if ((this.styledMode || !/px/.test(fontSize)) &&
|
|
2111
1788
|
win.getComputedStyle // old IE doesn't support it
|
|
@@ -2136,7 +1813,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
2136
1813
|
b: baseline,
|
|
2137
1814
|
f: fontSize
|
|
2138
1815
|
};
|
|
2139
|
-
}
|
|
1816
|
+
};
|
|
2140
1817
|
/**
|
|
2141
1818
|
* Correct X and Y positioning of a label for rotation (#1764).
|
|
2142
1819
|
*
|
|
@@ -2151,7 +1828,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
2151
1828
|
*
|
|
2152
1829
|
* @param {Highcharts.PositionObject}
|
|
2153
1830
|
*/
|
|
2154
|
-
rotCorr
|
|
1831
|
+
SVGRenderer.prototype.rotCorr = function (baseline, rotation, alterY) {
|
|
2155
1832
|
var y = baseline;
|
|
2156
1833
|
if (rotation && alterY) {
|
|
2157
1834
|
y = Math.max(y * Math.cos(rotation * deg2rad), 4);
|
|
@@ -2160,7 +1837,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
2160
1837
|
x: (-baseline / 3) * Math.sin(rotation * deg2rad),
|
|
2161
1838
|
y: y
|
|
2162
1839
|
};
|
|
2163
|
-
}
|
|
1840
|
+
};
|
|
2164
1841
|
/**
|
|
2165
1842
|
* Compatibility function to convert the legacy one-dimensional path array
|
|
2166
1843
|
* into an array of segments.
|
|
@@ -2168,14 +1845,10 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
2168
1845
|
* It is used in maps to parse the `path` option, and in SVGRenderer.dSetter
|
|
2169
1846
|
* to support legacy paths from demos.
|
|
2170
1847
|
*
|
|
2171
|
-
* @
|
|
1848
|
+
* @private
|
|
2172
1849
|
* @function Highcharts.SVGRenderer#pathToSegments
|
|
2173
|
-
*
|
|
2174
|
-
* @param {Array<string|number>}
|
|
2175
|
-
*
|
|
2176
|
-
* @return {Highcharts.SVGPathArray}
|
|
2177
1850
|
*/
|
|
2178
|
-
pathToSegments
|
|
1851
|
+
SVGRenderer.prototype.pathToSegments = function (path) {
|
|
2179
1852
|
var ret = [];
|
|
2180
1853
|
var segment = [];
|
|
2181
1854
|
var commandLength = {
|
|
@@ -2215,7 +1888,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
2215
1888
|
// Fully type-safe version where each tuple type is checked. The
|
|
2216
1889
|
// downside is filesize and a lack of flexibility for unsupported
|
|
2217
1890
|
// commands
|
|
2218
|
-
const ret:
|
|
1891
|
+
const ret: SVGPath = [],
|
|
2219
1892
|
commands = {
|
|
2220
1893
|
A: 7,
|
|
2221
1894
|
C: 6,
|
|
@@ -2398,7 +2071,7 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
2398
2071
|
}
|
|
2399
2072
|
return ret;
|
|
2400
2073
|
*/
|
|
2401
|
-
}
|
|
2074
|
+
};
|
|
2402
2075
|
/**
|
|
2403
2076
|
* Draw a label, which is an extended text element with support for border
|
|
2404
2077
|
* and background. Highcharts creates a `g` element with a text and a `path`
|
|
@@ -2449,343 +2122,210 @@ extend(SVGRenderer.prototype, /** @lends Highcharts.SVGRenderer.prototype */ {
|
|
|
2449
2122
|
* @return {Highcharts.SVGElement}
|
|
2450
2123
|
* The generated label.
|
|
2451
2124
|
*/
|
|
2452
|
-
label
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2125
|
+
SVGRenderer.prototype.label = function (str, x, y, shape, anchorX, anchorY, useHTML, baseline, className) {
|
|
2126
|
+
return new SVGLabel(this, str, x, y, shape, anchorX, anchorY, useHTML, baseline, className);
|
|
2127
|
+
};
|
|
2128
|
+
return SVGRenderer;
|
|
2129
|
+
}());
|
|
2130
|
+
/**
|
|
2131
|
+
* A pointer to the renderer's associated Element class. The VMLRenderer
|
|
2132
|
+
* will have a pointer to VMLElement here.
|
|
2133
|
+
*
|
|
2134
|
+
* @name Highcharts.SVGRenderer#Element
|
|
2135
|
+
* @type {Highcharts.SVGElement}
|
|
2136
|
+
*/
|
|
2137
|
+
SVGRenderer.prototype.Element = SVGElement;
|
|
2138
|
+
/**
|
|
2139
|
+
* @private
|
|
2140
|
+
*/
|
|
2141
|
+
SVGRenderer.prototype.SVG_NS = SVG_NS;
|
|
2142
|
+
/**
|
|
2143
|
+
* Dummy function for plugins, called every time the renderer is updated.
|
|
2144
|
+
* Prior to Highcharts 5, this was used for the canvg renderer.
|
|
2145
|
+
*
|
|
2146
|
+
* @deprecated
|
|
2147
|
+
* @function Highcharts.SVGRenderer#draw
|
|
2148
|
+
*/
|
|
2149
|
+
SVGRenderer.prototype.draw = noop;
|
|
2150
|
+
/**
|
|
2151
|
+
* A collection of characters mapped to HTML entities. When `useHTML` on an
|
|
2152
|
+
* element is true, these entities will be rendered correctly by HTML. In
|
|
2153
|
+
* the SVG pseudo-HTML, they need to be unescaped back to simple characters,
|
|
2154
|
+
* so for example `<` will render as `<`.
|
|
2155
|
+
*
|
|
2156
|
+
* @example
|
|
2157
|
+
* // Add support for unescaping quotes
|
|
2158
|
+
* Highcharts.SVGRenderer.prototype.escapes['"'] = '"';
|
|
2159
|
+
*
|
|
2160
|
+
* @name Highcharts.SVGRenderer#escapes
|
|
2161
|
+
* @type {Highcharts.Dictionary<string>}
|
|
2162
|
+
*/
|
|
2163
|
+
SVGRenderer.prototype.escapes = {
|
|
2164
|
+
'&': '&',
|
|
2165
|
+
'<': '<',
|
|
2166
|
+
'>': '>',
|
|
2167
|
+
"'": ''',
|
|
2168
|
+
'"': '"'
|
|
2169
|
+
};
|
|
2170
|
+
/**
|
|
2171
|
+
* An extendable collection of functions for defining symbol paths.
|
|
2172
|
+
*
|
|
2173
|
+
* @name Highcharts.SVGRenderer#symbols
|
|
2174
|
+
* @type {Highcharts.SymbolDictionary}
|
|
2175
|
+
*/
|
|
2176
|
+
SVGRenderer.prototype.symbols = {
|
|
2177
|
+
circle: function (x, y, w, h) {
|
|
2178
|
+
// Return a full arc
|
|
2179
|
+
return this.arc(x + w / 2, y + h / 2, w / 2, h / 2, {
|
|
2180
|
+
start: Math.PI * 0.5,
|
|
2181
|
+
end: Math.PI * 2.5,
|
|
2182
|
+
open: false
|
|
2183
|
+
});
|
|
2184
|
+
},
|
|
2185
|
+
square: function (x, y, w, h) {
|
|
2186
|
+
return [
|
|
2187
|
+
['M', x, y],
|
|
2188
|
+
['L', x + w, y],
|
|
2189
|
+
['L', x + w, y + h],
|
|
2190
|
+
['L', x, y + h],
|
|
2191
|
+
['Z']
|
|
2192
|
+
];
|
|
2193
|
+
},
|
|
2194
|
+
triangle: function (x, y, w, h) {
|
|
2195
|
+
return [
|
|
2196
|
+
['M', x + w / 2, y],
|
|
2197
|
+
['L', x + w, y + h],
|
|
2198
|
+
['L', x, y + h],
|
|
2199
|
+
['Z']
|
|
2200
|
+
];
|
|
2201
|
+
},
|
|
2202
|
+
'triangle-down': function (x, y, w, h) {
|
|
2203
|
+
return [
|
|
2204
|
+
['M', x, y],
|
|
2205
|
+
['L', x + w, y],
|
|
2206
|
+
['L', x + w / 2, y + h],
|
|
2207
|
+
['Z']
|
|
2208
|
+
];
|
|
2209
|
+
},
|
|
2210
|
+
diamond: function (x, y, w, h) {
|
|
2211
|
+
return [
|
|
2212
|
+
['M', x + w / 2, y],
|
|
2213
|
+
['L', x + w, y + h / 2],
|
|
2214
|
+
['L', x + w / 2, y + h],
|
|
2215
|
+
['L', x, y + h / 2],
|
|
2216
|
+
['Z']
|
|
2217
|
+
];
|
|
2218
|
+
},
|
|
2219
|
+
arc: function (x, y, w, h, options) {
|
|
2220
|
+
var arc = [];
|
|
2221
|
+
if (options) {
|
|
2222
|
+
var start = options.start || 0, end = options.end || 0, rx = options.r || w, ry = options.r || h || w, proximity = 0.001, fullCircle = Math.abs(end - start - 2 * Math.PI) <
|
|
2223
|
+
proximity,
|
|
2224
|
+
// Substract a small number to prevent cos and sin of start and
|
|
2225
|
+
// end from becoming equal on 360 arcs (related: #1561)
|
|
2226
|
+
end = end - proximity, innerRadius = options.innerR, open = pick(options.open, fullCircle), cosStart = Math.cos(start), sinStart = Math.sin(start), cosEnd = Math.cos(end), sinEnd = Math.sin(end),
|
|
2227
|
+
// Proximity takes care of rounding errors around PI (#6971)
|
|
2228
|
+
longArc = pick(options.longArc, end - start - Math.PI < proximity ? 0 : 1);
|
|
2229
|
+
arc.push([
|
|
2230
|
+
'M',
|
|
2231
|
+
x + rx * cosStart,
|
|
2232
|
+
y + ry * sinStart
|
|
2233
|
+
], [
|
|
2234
|
+
'A',
|
|
2235
|
+
rx,
|
|
2236
|
+
ry,
|
|
2237
|
+
0,
|
|
2238
|
+
longArc,
|
|
2239
|
+
pick(options.clockwise, 1),
|
|
2240
|
+
x + rx * cosEnd,
|
|
2241
|
+
y + ry * sinEnd
|
|
2242
|
+
]);
|
|
2243
|
+
if (defined(innerRadius)) {
|
|
2244
|
+
arc.push(open ?
|
|
2245
|
+
[
|
|
2246
|
+
'M',
|
|
2247
|
+
x + innerRadius * cosEnd,
|
|
2248
|
+
y + innerRadius * sinEnd
|
|
2249
|
+
] : [
|
|
2250
|
+
'L',
|
|
2251
|
+
x + innerRadius * cosEnd,
|
|
2252
|
+
y + innerRadius * sinEnd
|
|
2253
|
+
], [
|
|
2254
|
+
'A',
|
|
2255
|
+
innerRadius,
|
|
2256
|
+
innerRadius,
|
|
2257
|
+
0,
|
|
2258
|
+
longArc,
|
|
2259
|
+
// Clockwise - opposite to the outer arc clockwise
|
|
2260
|
+
defined(options.clockwise) ? 1 - options.clockwise : 0,
|
|
2261
|
+
x + innerRadius * cosStart,
|
|
2262
|
+
y + innerRadius * sinStart
|
|
2263
|
+
]);
|
|
2524
2264
|
}
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
text.attr('x', textX);
|
|
2528
|
-
// #8159 - prevent misplaced data labels in treemap
|
|
2529
|
-
// (useHTML: true)
|
|
2530
|
-
if (text.hasBoxWidthChanged) {
|
|
2531
|
-
bBox = text.getBBox(true);
|
|
2532
|
-
updateBoxSize();
|
|
2533
|
-
}
|
|
2534
|
-
if (typeof textY !== 'undefined') {
|
|
2535
|
-
text.attr('y', textY);
|
|
2536
|
-
}
|
|
2265
|
+
if (!open) {
|
|
2266
|
+
arc.push(['Z']);
|
|
2537
2267
|
}
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2268
|
+
}
|
|
2269
|
+
return arc;
|
|
2270
|
+
},
|
|
2271
|
+
/**
|
|
2272
|
+
* Callout shape used for default tooltips, also used for rounded
|
|
2273
|
+
* rectangles in VML
|
|
2274
|
+
*/
|
|
2275
|
+
callout: function (x, y, w, h, options) {
|
|
2276
|
+
var arrowLength = 6, halfDistance = 6, r = Math.min((options && options.r) || 0, w, h), safeDistance = r + halfDistance, anchorX = options && options.anchorX || 0, anchorY = options && options.anchorY || 0, path;
|
|
2277
|
+
path = [
|
|
2278
|
+
['M', x + r, y],
|
|
2279
|
+
['L', x + w - r, y],
|
|
2280
|
+
['C', x + w, y, x + w, y, x + w, y + r],
|
|
2281
|
+
['L', x + w, y + h - r],
|
|
2282
|
+
['C', x + w, y + h, x + w, y + h, x + w - r, y + h],
|
|
2283
|
+
['L', x + r, y + h],
|
|
2284
|
+
['C', x, y + h, x, y + h, x, y + h - r],
|
|
2285
|
+
['L', x, y + r],
|
|
2286
|
+
['C', x, y, x, y, x + r, y] // top-left corner
|
|
2287
|
+
];
|
|
2288
|
+
// Anchor on right side
|
|
2289
|
+
if (anchorX && anchorX > w) {
|
|
2290
|
+
// Chevron
|
|
2291
|
+
if (anchorY > y + safeDistance &&
|
|
2292
|
+
anchorY < y + h - safeDistance) {
|
|
2293
|
+
path.splice(3, 1, ['L', x + w, anchorY - halfDistance], ['L', x + w + arrowLength, anchorY], ['L', x + w, anchorY + halfDistance], ['L', x + w, y + h - r]);
|
|
2294
|
+
// Simple connector
|
|
2548
2295
|
}
|
|
2549
2296
|
else {
|
|
2550
|
-
|
|
2297
|
+
path.splice(3, 1, ['L', x + w, h / 2], ['L', anchorX, anchorY], ['L', x + w, h / 2], ['L', x + w, y + h - r]);
|
|
2551
2298
|
}
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
// Alignment is available now (#3295, 0 not rendered if given
|
|
2561
|
-
// as a value)
|
|
2562
|
-
text: (str || str === 0) ? str : '',
|
|
2563
|
-
x: x,
|
|
2564
|
-
y: y
|
|
2565
|
-
});
|
|
2566
|
-
if (box && defined(anchorX)) {
|
|
2567
|
-
wrapper.attr({
|
|
2568
|
-
anchorX: anchorX,
|
|
2569
|
-
anchorY: anchorY
|
|
2570
|
-
});
|
|
2571
|
-
}
|
|
2572
|
-
};
|
|
2573
|
-
/*
|
|
2574
|
-
* Add specific attribute setters.
|
|
2575
|
-
*/
|
|
2576
|
-
// only change local variables
|
|
2577
|
-
wrapper.widthSetter = function (value) {
|
|
2578
|
-
// width:auto => null
|
|
2579
|
-
width = isNumber(value) ? value : null;
|
|
2580
|
-
};
|
|
2581
|
-
wrapper.heightSetter = function (value) {
|
|
2582
|
-
height = value;
|
|
2583
|
-
};
|
|
2584
|
-
wrapper['text-alignSetter'] = function (value) {
|
|
2585
|
-
textAlign = value;
|
|
2586
|
-
};
|
|
2587
|
-
wrapper.paddingSetter = function (value) {
|
|
2588
|
-
if (defined(value) && value !== padding) {
|
|
2589
|
-
padding = wrapper.padding = value;
|
|
2590
|
-
updateTextPadding();
|
|
2591
|
-
}
|
|
2592
|
-
};
|
|
2593
|
-
wrapper.paddingLeftSetter = function (value) {
|
|
2594
|
-
if (defined(value) && value !== paddingLeft) {
|
|
2595
|
-
paddingLeft = value;
|
|
2596
|
-
updateTextPadding();
|
|
2597
|
-
}
|
|
2598
|
-
};
|
|
2599
|
-
// change local variable and prevent setting attribute on the group
|
|
2600
|
-
wrapper.alignSetter = function (value) {
|
|
2601
|
-
value = {
|
|
2602
|
-
left: 0,
|
|
2603
|
-
center: 0.5,
|
|
2604
|
-
right: 1
|
|
2605
|
-
}[value];
|
|
2606
|
-
if (value !== alignFactor) {
|
|
2607
|
-
alignFactor = value;
|
|
2608
|
-
// Bounding box exists, means we're dynamically changing
|
|
2609
|
-
if (bBox) {
|
|
2610
|
-
wrapper.attr({ x: wrapperX }); // #5134
|
|
2611
|
-
}
|
|
2612
|
-
}
|
|
2613
|
-
};
|
|
2614
|
-
// apply these to the box and the text alike
|
|
2615
|
-
wrapper.textSetter = function (value) {
|
|
2616
|
-
if (typeof value !== 'undefined') {
|
|
2617
|
-
// Must use .attr to ensure transforms are done (#10009)
|
|
2618
|
-
text.attr({
|
|
2619
|
-
text: value
|
|
2620
|
-
});
|
|
2299
|
+
// Anchor on left side
|
|
2300
|
+
}
|
|
2301
|
+
else if (anchorX && anchorX < 0) {
|
|
2302
|
+
// Chevron
|
|
2303
|
+
if (anchorY > y + safeDistance &&
|
|
2304
|
+
anchorY < y + h - safeDistance) {
|
|
2305
|
+
path.splice(7, 1, ['L', x, anchorY + halfDistance], ['L', x - arrowLength, anchorY], ['L', x, anchorY - halfDistance], ['L', x, y + r]);
|
|
2306
|
+
// Simple connector
|
|
2621
2307
|
}
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
};
|
|
2625
|
-
// apply these to the box but not to the text
|
|
2626
|
-
wrapper['stroke-widthSetter'] = function (value, key) {
|
|
2627
|
-
if (value) {
|
|
2628
|
-
needsBox = true;
|
|
2308
|
+
else {
|
|
2309
|
+
path.splice(7, 1, ['L', x, h / 2], ['L', anchorX, anchorY], ['L', x, h / 2], ['L', x, y + r]);
|
|
2629
2310
|
}
|
|
2630
|
-
strokeWidth = this['stroke-width'] = value;
|
|
2631
|
-
boxAttr(key, value);
|
|
2632
|
-
};
|
|
2633
|
-
if (styledMode) {
|
|
2634
|
-
wrapper.rSetter = function (value, key) {
|
|
2635
|
-
boxAttr(key, value);
|
|
2636
|
-
};
|
|
2637
2311
|
}
|
|
2638
|
-
else
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
needsBox = true;
|
|
2645
|
-
}
|
|
2646
|
-
// for animation getter (#6776)
|
|
2647
|
-
wrapper[key] = value;
|
|
2648
|
-
}
|
|
2649
|
-
boxAttr(key, value);
|
|
2650
|
-
};
|
|
2312
|
+
else if ( // replace bottom
|
|
2313
|
+
anchorY &&
|
|
2314
|
+
anchorY > h &&
|
|
2315
|
+
anchorX > x + safeDistance &&
|
|
2316
|
+
anchorX < x + w - safeDistance) {
|
|
2317
|
+
path.splice(5, 1, ['L', anchorX + halfDistance, y + h], ['L', anchorX, y + h + arrowLength], ['L', anchorX - halfDistance, y + h], ['L', x + r, y + h]);
|
|
2651
2318
|
}
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
boxAttr(key, value - wrapperY);
|
|
2659
|
-
};
|
|
2660
|
-
// rename attributes
|
|
2661
|
-
wrapper.xSetter = function (value) {
|
|
2662
|
-
wrapper.x = value; // for animation getter
|
|
2663
|
-
if (alignFactor) {
|
|
2664
|
-
value -= alignFactor * ((width || bBox.width) + 2 * padding);
|
|
2665
|
-
// Force animation even when setting to the same value (#7898)
|
|
2666
|
-
wrapper['forceAnimate:x'] = true;
|
|
2667
|
-
}
|
|
2668
|
-
wrapperX = Math.round(value);
|
|
2669
|
-
wrapper.attr('translateX', wrapperX);
|
|
2670
|
-
};
|
|
2671
|
-
wrapper.ySetter = function (value) {
|
|
2672
|
-
wrapperY = wrapper.y = Math.round(value);
|
|
2673
|
-
wrapper.attr('translateY', wrapperY);
|
|
2674
|
-
};
|
|
2675
|
-
wrapper.isLabel = true;
|
|
2676
|
-
// Redirect certain methods to either the box or the text
|
|
2677
|
-
var baseCss = wrapper.css;
|
|
2678
|
-
var wrapperExtension = {
|
|
2679
|
-
/**
|
|
2680
|
-
* Pick up some properties and apply them to the text instead of the
|
|
2681
|
-
* wrapper.
|
|
2682
|
-
*/
|
|
2683
|
-
css: function (styles) {
|
|
2684
|
-
if (styles) {
|
|
2685
|
-
var textStyles = {}, isWidth, isFontStyle;
|
|
2686
|
-
// Create a copy to avoid altering the original object
|
|
2687
|
-
// (#537)
|
|
2688
|
-
styles = merge(styles);
|
|
2689
|
-
wrapper.textProps.forEach(function (prop) {
|
|
2690
|
-
if (typeof styles[prop] !== 'undefined') {
|
|
2691
|
-
textStyles[prop] = styles[prop];
|
|
2692
|
-
delete styles[prop];
|
|
2693
|
-
}
|
|
2694
|
-
});
|
|
2695
|
-
text.css(textStyles);
|
|
2696
|
-
isWidth = 'width' in textStyles;
|
|
2697
|
-
isFontStyle = 'fontSize' in textStyles ||
|
|
2698
|
-
'fontWeight' in textStyles;
|
|
2699
|
-
// Update existing text, box (#9400, #12163)
|
|
2700
|
-
if (isWidth || isFontStyle) {
|
|
2701
|
-
updateBoxSize();
|
|
2702
|
-
// Keep updated (#9400, #12163)
|
|
2703
|
-
if (isFontStyle) {
|
|
2704
|
-
updateTextPadding();
|
|
2705
|
-
}
|
|
2706
|
-
}
|
|
2707
|
-
}
|
|
2708
|
-
return baseCss.call(wrapper, styles);
|
|
2709
|
-
},
|
|
2710
|
-
/*
|
|
2711
|
-
* Return the bounding box of the box, not the group.
|
|
2712
|
-
*/
|
|
2713
|
-
getBBox: function () {
|
|
2714
|
-
return {
|
|
2715
|
-
width: bBox.width + 2 * padding,
|
|
2716
|
-
height: bBox.height + 2 * padding,
|
|
2717
|
-
x: bBox.x - padding,
|
|
2718
|
-
y: bBox.y - padding
|
|
2719
|
-
};
|
|
2720
|
-
},
|
|
2721
|
-
/**
|
|
2722
|
-
* Destroy and release memory.
|
|
2723
|
-
*/
|
|
2724
|
-
destroy: function () {
|
|
2725
|
-
// Added by button implementation
|
|
2726
|
-
removeEvent(wrapper.element, 'mouseenter');
|
|
2727
|
-
removeEvent(wrapper.element, 'mouseleave');
|
|
2728
|
-
if (text) {
|
|
2729
|
-
text.destroy();
|
|
2730
|
-
}
|
|
2731
|
-
if (box) {
|
|
2732
|
-
box = box.destroy();
|
|
2733
|
-
}
|
|
2734
|
-
// Call base implementation to destroy the rest
|
|
2735
|
-
SVGElement.prototype.destroy.call(wrapper);
|
|
2736
|
-
// Release local pointers (#1298)
|
|
2737
|
-
wrapper =
|
|
2738
|
-
renderer =
|
|
2739
|
-
text =
|
|
2740
|
-
updateBoxSize =
|
|
2741
|
-
updateTextPadding =
|
|
2742
|
-
boxAttr = null;
|
|
2743
|
-
}
|
|
2744
|
-
};
|
|
2745
|
-
// Event handling. In case of useHTML, we need to make sure that events
|
|
2746
|
-
// are captured on the span as well, and that mouseenter/mouseleave
|
|
2747
|
-
// between the SVG group and the HTML span are not treated as real
|
|
2748
|
-
// enter/leave events. #13310.
|
|
2749
|
-
wrapper.on = function (eventType, handler) {
|
|
2750
|
-
var span = text && text.element.tagName === 'SPAN' ? text : void 0;
|
|
2751
|
-
var selectiveHandler;
|
|
2752
|
-
if (span) {
|
|
2753
|
-
selectiveHandler = function (e) {
|
|
2754
|
-
if ((eventType === 'mouseenter' ||
|
|
2755
|
-
eventType === 'mouseleave') &&
|
|
2756
|
-
e.relatedTarget instanceof Element &&
|
|
2757
|
-
(wrapper.element.contains(e.relatedTarget) ||
|
|
2758
|
-
span.element.contains(e.relatedTarget))) {
|
|
2759
|
-
return;
|
|
2760
|
-
}
|
|
2761
|
-
handler.call(wrapper.element, e);
|
|
2762
|
-
};
|
|
2763
|
-
span.on(eventType, selectiveHandler);
|
|
2764
|
-
}
|
|
2765
|
-
SVGElement.prototype.on.call(wrapper, eventType, selectiveHandler || handler);
|
|
2766
|
-
return wrapper;
|
|
2767
|
-
};
|
|
2768
|
-
if (!styledMode) {
|
|
2769
|
-
/**
|
|
2770
|
-
* Apply the shadow to the box.
|
|
2771
|
-
*
|
|
2772
|
-
* @ignore
|
|
2773
|
-
* @function Highcharts.SVGElement#shadow
|
|
2774
|
-
*
|
|
2775
|
-
* @return {Highcharts.SVGElement}
|
|
2776
|
-
*/
|
|
2777
|
-
wrapperExtension.shadow = function (b) {
|
|
2778
|
-
if (b) {
|
|
2779
|
-
updateBoxSize();
|
|
2780
|
-
if (box) {
|
|
2781
|
-
box.shadow(b);
|
|
2782
|
-
}
|
|
2783
|
-
}
|
|
2784
|
-
return wrapper;
|
|
2785
|
-
};
|
|
2319
|
+
else if ( // replace top
|
|
2320
|
+
anchorY &&
|
|
2321
|
+
anchorY < 0 &&
|
|
2322
|
+
anchorX > x + safeDistance &&
|
|
2323
|
+
anchorX < x + w - safeDistance) {
|
|
2324
|
+
path.splice(1, 1, ['L', anchorX - halfDistance, y], ['L', anchorX, y - arrowLength], ['L', anchorX + halfDistance, y], ['L', w - r, y]);
|
|
2786
2325
|
}
|
|
2787
|
-
return
|
|
2326
|
+
return path;
|
|
2788
2327
|
}
|
|
2789
|
-
}
|
|
2790
|
-
|
|
2791
|
-
H.Renderer = SVGRenderer;
|
|
2328
|
+
};
|
|
2329
|
+
H.SVGRenderer = SVGRenderer;
|
|
2330
|
+
H.Renderer = H.SVGRenderer;
|
|
2331
|
+
export default H.Renderer;
|