@highcharts/grid-pro 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -0
- package/css/grid-pro.css +1756 -0
- package/es-modules/Accessibility/A11yI18n.d.ts +95 -0
- package/es-modules/Accessibility/A11yI18n.js +290 -0
- package/es-modules/Accessibility/Accessibility.d.ts +116 -0
- package/es-modules/Accessibility/Accessibility.js +402 -0
- package/es-modules/Accessibility/AccessibilityComponent.d.ts +97 -0
- package/es-modules/Accessibility/AccessibilityComponent.js +147 -0
- package/es-modules/Accessibility/Components/AnnotationsA11y.d.ts +43 -0
- package/es-modules/Accessibility/Components/AnnotationsA11y.js +160 -0
- package/es-modules/Accessibility/Components/ContainerComponent.d.ts +48 -0
- package/es-modules/Accessibility/Components/ContainerComponent.js +142 -0
- package/es-modules/Accessibility/Components/InfoRegionsComponent.d.ts +144 -0
- package/es-modules/Accessibility/Components/InfoRegionsComponent.js +555 -0
- package/es-modules/Accessibility/Components/LegendComponent.d.ts +124 -0
- package/es-modules/Accessibility/Components/LegendComponent.js +474 -0
- package/es-modules/Accessibility/Components/MenuComponent.d.ts +93 -0
- package/es-modules/Accessibility/Components/MenuComponent.js +430 -0
- package/es-modules/Accessibility/Components/NavigatorComponent.d.ts +57 -0
- package/es-modules/Accessibility/Components/NavigatorComponent.js +235 -0
- package/es-modules/Accessibility/Components/RangeSelectorComponent.d.ts +126 -0
- package/es-modules/Accessibility/Components/RangeSelectorComponent.js +473 -0
- package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.d.ts +18 -0
- package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +234 -0
- package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.d.ts +87 -0
- package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +309 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.d.ts +53 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +130 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.d.ts +28 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +415 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.d.ts +114 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +721 -0
- package/es-modules/Accessibility/Components/ZoomComponent.d.ts +96 -0
- package/es-modules/Accessibility/Components/ZoomComponent.js +314 -0
- package/es-modules/Accessibility/FocusBorder.d.ts +40 -0
- package/es-modules/Accessibility/FocusBorder.js +301 -0
- package/es-modules/Accessibility/HighContrastMode.d.ts +35 -0
- package/es-modules/Accessibility/HighContrastMode.js +100 -0
- package/es-modules/Accessibility/HighContrastTheme.d.ts +11 -0
- package/es-modules/Accessibility/HighContrastTheme.js +212 -0
- package/es-modules/Accessibility/KeyboardNavigation.d.ts +133 -0
- package/es-modules/Accessibility/KeyboardNavigation.js +450 -0
- package/es-modules/Accessibility/KeyboardNavigationHandler.d.ts +48 -0
- package/es-modules/Accessibility/KeyboardNavigationHandler.js +126 -0
- package/es-modules/Accessibility/Options/A11yDefaults.d.ts +68 -0
- package/es-modules/Accessibility/Options/A11yDefaults.js +971 -0
- package/es-modules/Accessibility/Options/DeprecatedOptions.d.ts +22 -0
- package/es-modules/Accessibility/Options/DeprecatedOptions.js +265 -0
- package/es-modules/Accessibility/Options/LangDefaults.d.ts +4 -0
- package/es-modules/Accessibility/Options/LangDefaults.js +440 -0
- package/es-modules/Accessibility/ProxyElement.d.ts +78 -0
- package/es-modules/Accessibility/ProxyElement.js +223 -0
- package/es-modules/Accessibility/ProxyProvider.d.ts +90 -0
- package/es-modules/Accessibility/ProxyProvider.js +315 -0
- package/es-modules/Accessibility/Utils/Announcer.d.ts +26 -0
- package/es-modules/Accessibility/Utils/Announcer.js +90 -0
- package/es-modules/Accessibility/Utils/ChartUtilities.d.ts +90 -0
- package/es-modules/Accessibility/Utils/ChartUtilities.js +298 -0
- package/es-modules/Accessibility/Utils/DOMElementProvider.d.ts +20 -0
- package/es-modules/Accessibility/Utils/DOMElementProvider.js +69 -0
- package/es-modules/Accessibility/Utils/EventProvider.d.ts +26 -0
- package/es-modules/Accessibility/Utils/EventProvider.js +65 -0
- package/es-modules/Accessibility/Utils/HTMLUtilities.d.ts +108 -0
- package/es-modules/Accessibility/Utils/HTMLUtilities.js +319 -0
- package/es-modules/Core/Animation/AnimationUtilities.d.ts +107 -0
- package/es-modules/Core/Animation/AnimationUtilities.js +200 -0
- package/es-modules/Core/Animation/Fx.d.ts +130 -0
- package/es-modules/Core/Animation/Fx.js +388 -0
- package/es-modules/Core/Chart/Chart.d.ts +1009 -0
- package/es-modules/Core/Chart/Chart.js +3008 -0
- package/es-modules/Core/Chart/Chart3D.d.ts +276 -0
- package/es-modules/Core/Chart/Chart3D.js +1686 -0
- package/es-modules/Core/Chart/ChartDefaults.d.ts +8 -0
- package/es-modules/Core/Chart/ChartDefaults.js +1304 -0
- package/es-modules/Core/Chart/ChartNavigationComposition.d.ts +55 -0
- package/es-modules/Core/Chart/ChartNavigationComposition.js +90 -0
- package/es-modules/Core/Chart/GanttChart.d.ts +74 -0
- package/es-modules/Core/Chart/GanttChart.js +189 -0
- package/es-modules/Core/Chart/MapChart.d.ts +132 -0
- package/es-modules/Core/Chart/MapChart.js +232 -0
- package/es-modules/Core/Chart/StockChart.d.ts +117 -0
- package/es-modules/Core/Chart/StockChart.js +641 -0
- package/es-modules/Core/Color/Color.d.ts +112 -0
- package/es-modules/Core/Color/Color.js +418 -0
- package/es-modules/Core/Color/Palettes.d.ts +84 -0
- package/es-modules/Core/Color/Palettes.js +23 -0
- package/es-modules/Core/Defaults.d.ts +42 -0
- package/es-modules/Core/Defaults.js +2977 -0
- package/es-modules/Core/Foundation.d.ts +19 -0
- package/es-modules/Core/Foundation.js +63 -0
- package/es-modules/Core/Geometry/CircleUtilities.d.ts +189 -0
- package/es-modules/Core/Geometry/CircleUtilities.js +388 -0
- package/es-modules/Core/Geometry/GeometryUtilities.d.ts +48 -0
- package/es-modules/Core/Geometry/GeometryUtilities.js +105 -0
- package/es-modules/Core/Geometry/PolygonClip.d.ts +19 -0
- package/es-modules/Core/Geometry/PolygonClip.js +96 -0
- package/es-modules/Core/Globals.d.ts +110 -0
- package/es-modules/Core/Globals.js +127 -0
- package/es-modules/Core/HttpUtilities.d.ts +61 -0
- package/es-modules/Core/HttpUtilities.js +214 -0
- package/es-modules/Core/MSPointer.d.ts +74 -0
- package/es-modules/Core/MSPointer.js +218 -0
- package/es-modules/Core/Math3D.d.ts +117 -0
- package/es-modules/Core/Math3D.js +250 -0
- package/es-modules/Core/Pointer.d.ts +590 -0
- package/es-modules/Core/Pointer.js +1631 -0
- package/es-modules/Core/Renderer/HTML/AST.d.ts +163 -0
- package/es-modules/Core/Renderer/HTML/AST.js +562 -0
- package/es-modules/Core/Renderer/HTML/HTMLElement.d.ts +76 -0
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +471 -0
- package/es-modules/Core/Renderer/RendererRegistry.d.ts +29 -0
- package/es-modules/Core/Renderer/RendererRegistry.js +76 -0
- package/es-modules/Core/Renderer/RendererUtilities.d.ts +26 -0
- package/es-modules/Core/Renderer/RendererUtilities.js +172 -0
- package/es-modules/Core/Responsive.d.ts +55 -0
- package/es-modules/Core/Responsive.js +260 -0
- package/es-modules/Core/Templating.d.ts +125 -0
- package/es-modules/Core/Templating.js +428 -0
- package/es-modules/Core/Time.d.ts +69 -0
- package/es-modules/Core/Time.js +172 -0
- package/es-modules/Core/Tooltip.d.ts +297 -0
- package/es-modules/Core/Tooltip.js +1377 -0
- package/es-modules/Core/Utilities.d.ts +770 -0
- package/es-modules/Core/Utilities.js +1989 -0
- package/es-modules/Data/ColumnUtils.d.ts +87 -0
- package/es-modules/Data/ColumnUtils.js +140 -0
- package/es-modules/Data/Connectors/CSVConnector.d.ts +63 -0
- package/es-modules/Data/Connectors/CSVConnector.js +149 -0
- package/es-modules/Data/Connectors/CSVConnectorOptions.d.ts +149 -0
- package/es-modules/Data/Connectors/DataConnector.d.ts +204 -0
- package/es-modules/Data/Connectors/DataConnector.js +345 -0
- package/es-modules/Data/Connectors/DataConnectorOptions.d.ts +87 -0
- package/es-modules/Data/Connectors/DataConnectorType.d.ts +45 -0
- package/es-modules/Data/Connectors/GoogleSheetsConnector.d.ts +65 -0
- package/es-modules/Data/Connectors/GoogleSheetsConnector.js +226 -0
- package/es-modules/Data/Connectors/GoogleSheetsConnectorOptions.d.ts +167 -0
- package/es-modules/Data/Connectors/HTMLTableConnector.d.ts +77 -0
- package/es-modules/Data/Connectors/HTMLTableConnector.js +119 -0
- package/es-modules/Data/Connectors/HTMLTableConnectorOptions.d.ts +49 -0
- package/es-modules/Data/Connectors/JSONConnector.d.ts +64 -0
- package/es-modules/Data/Connectors/JSONConnector.js +156 -0
- package/es-modules/Data/Connectors/JSONConnectorOptions.d.ts +185 -0
- package/es-modules/Data/Converters/CSVConverter.d.ts +64 -0
- package/es-modules/Data/Converters/CSVConverter.js +374 -0
- package/es-modules/Data/Converters/CSVConverterOptions.d.ts +53 -0
- package/es-modules/Data/Converters/DataConverter.d.ts +168 -0
- package/es-modules/Data/Converters/DataConverter.js +387 -0
- package/es-modules/Data/Converters/DataConverterType.d.ts +40 -0
- package/es-modules/Data/Converters/DataConverterUtils.d.ts +82 -0
- package/es-modules/Data/Converters/DataConverterUtils.js +216 -0
- package/es-modules/Data/Converters/GoogleSheetsConverter.d.ts +46 -0
- package/es-modules/Data/Converters/GoogleSheetsConverter.js +135 -0
- package/es-modules/Data/Converters/GoogleSheetsConverterOptions.d.ts +52 -0
- package/es-modules/Data/Converters/HTMLTableConverter.d.ts +72 -0
- package/es-modules/Data/Converters/HTMLTableConverter.js +362 -0
- package/es-modules/Data/Converters/HTMLTableConverterOptions.d.ts +51 -0
- package/es-modules/Data/Converters/JSONConverter.d.ts +99 -0
- package/es-modules/Data/Converters/JSONConverter.js +239 -0
- package/es-modules/Data/Converters/JSONConverterOptions.d.ts +52 -0
- package/es-modules/Data/DataCursor.d.ts +176 -0
- package/es-modules/Data/DataCursor.js +379 -0
- package/es-modules/Data/DataEvent.d.ts +81 -0
- package/es-modules/Data/DataEvent.js +14 -0
- package/es-modules/Data/DataPool.d.ts +130 -0
- package/es-modules/Data/DataPool.js +257 -0
- package/es-modules/Data/DataPoolOptions.d.ts +66 -0
- package/es-modules/Data/DataTable.d.ts +563 -0
- package/es-modules/Data/DataTable.js +930 -0
- package/es-modules/Data/DataTableCore.d.ts +165 -0
- package/es-modules/Data/DataTableCore.js +316 -0
- package/es-modules/Data/DataTableOptions.d.ts +25 -0
- package/es-modules/Data/DataTableOptions.js +15 -0
- package/es-modules/Data/Formula/Formula.d.ts +21 -0
- package/es-modules/Data/Formula/Formula.js +54 -0
- package/es-modules/Data/Formula/FormulaParser.d.ts +31 -0
- package/es-modules/Data/Formula/FormulaParser.js +488 -0
- package/es-modules/Data/Formula/FormulaProcessor.d.ts +155 -0
- package/es-modules/Data/Formula/FormulaProcessor.js +529 -0
- package/es-modules/Data/Formula/FormulaTypes.d.ts +138 -0
- package/es-modules/Data/Formula/FormulaTypes.js +135 -0
- package/es-modules/Data/Formula/Functions/ABS.d.ts +19 -0
- package/es-modules/Data/Formula/Functions/ABS.js +67 -0
- package/es-modules/Data/Formula/Functions/AND.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/AND.js +59 -0
- package/es-modules/Data/Formula/Functions/AVERAGE.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/AVERAGE.js +74 -0
- package/es-modules/Data/Formula/Functions/AVERAGEA.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/AVERAGEA.js +90 -0
- package/es-modules/Data/Formula/Functions/COUNT.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/COUNT.js +65 -0
- package/es-modules/Data/Formula/Functions/COUNTA.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/COUNTA.js +71 -0
- package/es-modules/Data/Formula/Functions/IF.d.ts +21 -0
- package/es-modules/Data/Formula/Functions/IF.js +54 -0
- package/es-modules/Data/Formula/Functions/ISNA.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/ISNA.js +52 -0
- package/es-modules/Data/Formula/Functions/MAX.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/MAX.js +69 -0
- package/es-modules/Data/Formula/Functions/MEDIAN.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/MEDIAN.js +78 -0
- package/es-modules/Data/Formula/Functions/MIN.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/MIN.js +69 -0
- package/es-modules/Data/Formula/Functions/MOD.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/MOD.js +63 -0
- package/es-modules/Data/Formula/Functions/MODE.d.ts +41 -0
- package/es-modules/Data/Formula/Functions/MODE.js +149 -0
- package/es-modules/Data/Formula/Functions/NOT.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/NOT.js +60 -0
- package/es-modules/Data/Formula/Functions/OR.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/OR.js +62 -0
- package/es-modules/Data/Formula/Functions/PRODUCT.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/PRODUCT.js +68 -0
- package/es-modules/Data/Formula/Functions/SUM.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/SUM.js +65 -0
- package/es-modules/Data/Formula/Functions/XOR.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/XOR.js +81 -0
- package/es-modules/Data/Modifiers/ChainModifier.d.ts +128 -0
- package/es-modules/Data/Modifiers/ChainModifier.js +231 -0
- package/es-modules/Data/Modifiers/ChainModifierOptions.d.ts +20 -0
- package/es-modules/Data/Modifiers/ChainModifierOptions.js +14 -0
- package/es-modules/Data/Modifiers/DataModifier.d.ts +117 -0
- package/es-modules/Data/Modifiers/DataModifier.js +202 -0
- package/es-modules/Data/Modifiers/DataModifierEvent.d.ts +28 -0
- package/es-modules/Data/Modifiers/DataModifierEvent.js +15 -0
- package/es-modules/Data/Modifiers/DataModifierOptions.d.ts +11 -0
- package/es-modules/Data/Modifiers/DataModifierOptions.js +15 -0
- package/es-modules/Data/Modifiers/DataModifierType.d.ts +44 -0
- package/es-modules/Data/Modifiers/FilterModifier.d.ts +53 -0
- package/es-modules/Data/Modifiers/FilterModifier.js +172 -0
- package/es-modules/Data/Modifiers/FilterModifierOptions.d.ts +110 -0
- package/es-modules/Data/Modifiers/FilterModifierOptions.js +14 -0
- package/es-modules/Data/Modifiers/InvertModifier.d.ts +48 -0
- package/es-modules/Data/Modifiers/InvertModifier.js +116 -0
- package/es-modules/Data/Modifiers/InvertModifierOptions.d.ts +11 -0
- package/es-modules/Data/Modifiers/InvertModifierOptions.js +15 -0
- package/es-modules/Data/Modifiers/MathModifier.d.ts +68 -0
- package/es-modules/Data/Modifiers/MathModifier.js +165 -0
- package/es-modules/Data/Modifiers/MathModifierOptions.d.ts +50 -0
- package/es-modules/Data/Modifiers/MathModifierOptions.js +14 -0
- package/es-modules/Data/Modifiers/RangeModifier.d.ts +46 -0
- package/es-modules/Data/Modifiers/RangeModifier.js +96 -0
- package/es-modules/Data/Modifiers/RangeModifierOptions.d.ts +22 -0
- package/es-modules/Data/Modifiers/RangeModifierOptions.js +15 -0
- package/es-modules/Data/Modifiers/SortModifier.d.ts +54 -0
- package/es-modules/Data/Modifiers/SortModifier.js +144 -0
- package/es-modules/Data/Modifiers/SortModifierOptions.d.ts +44 -0
- package/es-modules/Data/Modifiers/SortModifierOptions.js +14 -0
- package/es-modules/Grid/Core/Accessibility/A11yOptions.d.ts +148 -0
- package/es-modules/Grid/Core/Accessibility/A11yOptions.js +17 -0
- package/es-modules/Grid/Core/Accessibility/Accessibility.d.ts +115 -0
- package/es-modules/Grid/Core/Accessibility/Accessibility.js +231 -0
- package/es-modules/Grid/Core/Credits.d.ts +57 -0
- package/es-modules/Grid/Core/Credits.js +125 -0
- package/es-modules/Grid/Core/Defaults.d.ts +20 -0
- package/es-modules/Grid/Core/Defaults.js +148 -0
- package/es-modules/Grid/Core/Globals.d.ts +103 -0
- package/es-modules/Grid/Core/Globals.js +134 -0
- package/es-modules/Grid/Core/Grid.d.ts +295 -0
- package/es-modules/Grid/Core/Grid.js +730 -0
- package/es-modules/Grid/Core/GridUtils.d.ts +110 -0
- package/es-modules/Grid/Core/GridUtils.js +191 -0
- package/es-modules/Grid/Core/Options.d.ts +599 -0
- package/es-modules/Grid/Core/Options.js +16 -0
- package/es-modules/Grid/Core/Pagination/Icons.d.ts +7 -0
- package/es-modules/Grid/Core/Pagination/Icons.js +7 -0
- package/es-modules/Grid/Core/Pagination/Pagination.d.ts +278 -0
- package/es-modules/Grid/Core/Pagination/Pagination.js +842 -0
- package/es-modules/Grid/Core/Pagination/PaginationOptions.d.ts +228 -0
- package/es-modules/Grid/Core/Querying/FilteringController.d.ts +66 -0
- package/es-modules/Grid/Core/Querying/FilteringController.js +256 -0
- package/es-modules/Grid/Core/Querying/PaginationController.d.ts +50 -0
- package/es-modules/Grid/Core/Querying/PaginationController.js +101 -0
- package/es-modules/Grid/Core/Querying/QueryingController.d.ts +58 -0
- package/es-modules/Grid/Core/Querying/QueryingController.js +127 -0
- package/es-modules/Grid/Core/Querying/SortingController.d.ts +67 -0
- package/es-modules/Grid/Core/Querying/SortingController.js +136 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.d.ts +114 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.js +351 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.d.ts +14 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.js +86 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.d.ts +19 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.js +80 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilteringTypes.d.ts +52 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilteringTypes.js +81 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnSorting.d.ts +56 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnSorting.js +170 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.d.ts +55 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.js +182 -0
- package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.d.ts +87 -0
- package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.js +346 -0
- package/es-modules/Grid/Core/Table/Body/TableCell.d.ts +88 -0
- package/es-modules/Grid/Core/Table/Body/TableCell.js +231 -0
- package/es-modules/Grid/Core/Table/Body/TableRow.d.ts +79 -0
- package/es-modules/Grid/Core/Table/Body/TableRow.js +177 -0
- package/es-modules/Grid/Core/Table/Cell.d.ts +92 -0
- package/es-modules/Grid/Core/Table/Cell.js +223 -0
- package/es-modules/Grid/Core/Table/CellContent/CellContent.d.ts +30 -0
- package/es-modules/Grid/Core/Table/CellContent/CellContent.js +40 -0
- package/es-modules/Grid/Core/Table/CellContent/TextContent.d.ts +19 -0
- package/es-modules/Grid/Core/Table/CellContent/TextContent.js +98 -0
- package/es-modules/Grid/Core/Table/Column.d.ts +136 -0
- package/es-modules/Grid/Core/Table/Column.js +230 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/AdjacentResizingMode.d.ts +7 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/AdjacentResizingMode.js +62 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/ColumnResizing.d.ts +32 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/ColumnResizing.js +68 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/DistributedResizingMode.d.ts +7 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/DistributedResizingMode.js +53 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.d.ts +7 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.js +63 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.d.ts +92 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.js +194 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.d.ts +68 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.js +187 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.d.ts +29 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.js +77 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.d.ts +13 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.js +79 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.d.ts +12 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.js +71 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuPopup.d.ts +12 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuPopup.js +66 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/StateHelpers.d.ts +25 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/StateHelpers.js +65 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.d.ts +12 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.js +81 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.d.ts +12 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.js +80 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.d.ts +11 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.js +81 -0
- package/es-modules/Grid/Core/Table/Header/HeaderCell.d.ts +70 -0
- package/es-modules/Grid/Core/Table/Header/HeaderCell.js +225 -0
- package/es-modules/Grid/Core/Table/Header/HeaderRow.d.ts +53 -0
- package/es-modules/Grid/Core/Table/Header/HeaderRow.js +182 -0
- package/es-modules/Grid/Core/Table/Header/TableHeader.d.ts +65 -0
- package/es-modules/Grid/Core/Table/Header/TableHeader.js +159 -0
- package/es-modules/Grid/Core/Table/Row.d.ts +76 -0
- package/es-modules/Grid/Core/Table/Row.js +131 -0
- package/es-modules/Grid/Core/Table/Table.d.ts +181 -0
- package/es-modules/Grid/Core/Table/Table.js +399 -0
- package/es-modules/Grid/Core/UI/Button.d.ts +31 -0
- package/es-modules/Grid/Core/UI/Button.js +16 -0
- package/es-modules/Grid/Core/UI/ContextMenu.d.ts +38 -0
- package/es-modules/Grid/Core/UI/ContextMenu.js +132 -0
- package/es-modules/Grid/Core/UI/ContextMenuButton.d.ts +126 -0
- package/es-modules/Grid/Core/UI/ContextMenuButton.js +183 -0
- package/es-modules/Grid/Core/UI/Popup.d.ts +149 -0
- package/es-modules/Grid/Core/UI/Popup.js +271 -0
- package/es-modules/Grid/Core/UI/SvgIcons.d.ts +53 -0
- package/es-modules/Grid/Core/UI/SvgIcons.js +158 -0
- package/es-modules/Grid/Core/UI/Toolbar.d.ts +16 -0
- package/es-modules/Grid/Core/UI/Toolbar.js +16 -0
- package/es-modules/Grid/Core/UI/ToolbarButton.d.ts +135 -0
- package/es-modules/Grid/Core/UI/ToolbarButton.js +191 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditMode.d.ts +112 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditing.d.ts +80 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditing.js +211 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.d.ts +123 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.js +198 -0
- package/es-modules/Grid/Pro/CellRendering/CellContentPro.d.ts +23 -0
- package/es-modules/Grid/Pro/CellRendering/CellContentPro.js +45 -0
- package/es-modules/Grid/Pro/CellRendering/CellRenderer.d.ts +50 -0
- package/es-modules/Grid/Pro/CellRendering/CellRenderer.js +41 -0
- package/es-modules/Grid/Pro/CellRendering/CellRendererRegistry.d.ts +18 -0
- package/es-modules/Grid/Pro/CellRendering/CellRendererRegistry.js +58 -0
- package/es-modules/Grid/Pro/CellRendering/CellRendererType.d.ts +48 -0
- package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.d.ts +18 -0
- package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.js +79 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.d.ts +30 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.js +122 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContent.d.ts +12 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContent.js +39 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContentBase.d.ts +66 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContentBase.js +145 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateTimeInputContent.d.ts +12 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateTimeInputContent.js +38 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.d.ts +58 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.js +158 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.d.ts +58 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.js +173 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.d.ts +28 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.js +157 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.d.ts +58 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.js +168 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TimeInputContent.d.ts +13 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TimeInputContent.js +41 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.d.ts +50 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.js +65 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.d.ts +37 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.js +65 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRendererBase.d.ts +26 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRendererBase.js +16 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.d.ts +37 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.js +64 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.d.ts +52 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.js +64 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.d.ts +74 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.js +66 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.d.ts +45 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.js +89 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.d.ts +54 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.js +65 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.d.ts +43 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.js +74 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.d.ts +37 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.js +64 -0
- package/es-modules/Grid/Pro/ColumnTypes/ColumnDataType.d.ts +29 -0
- package/es-modules/Grid/Pro/ColumnTypes/Validator.d.ts +118 -0
- package/es-modules/Grid/Pro/ColumnTypes/Validator.js +270 -0
- package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.d.ts +32 -0
- package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.js +63 -0
- package/es-modules/Grid/Pro/Credits/CreditsPro.d.ts +35 -0
- package/es-modules/Grid/Pro/Credits/CreditsPro.js +112 -0
- package/es-modules/Grid/Pro/Credits/CreditsProComposition.d.ts +28 -0
- package/es-modules/Grid/Pro/Credits/CreditsProComposition.js +61 -0
- package/es-modules/Grid/Pro/Export/Exporting.d.ts +68 -0
- package/es-modules/Grid/Pro/Export/Exporting.js +202 -0
- package/es-modules/Grid/Pro/Export/ExportingComposition.d.ts +68 -0
- package/es-modules/Grid/Pro/Export/ExportingComposition.js +55 -0
- package/es-modules/Grid/Pro/GridEvents.d.ts +119 -0
- package/es-modules/Grid/Pro/GridEvents.js +107 -0
- package/es-modules/Grid/Pro/Pagination/PaginationComposition.d.ts +75 -0
- package/es-modules/Grid/Pro/Pagination/PaginationComposition.js +76 -0
- package/es-modules/Grid/Pro/highcharts.d.ts +7 -0
- package/es-modules/Grid/index.d.ts +5 -0
- package/es-modules/Grid/index.js +19 -0
- package/es-modules/Shared/BaseForm.d.ts +49 -0
- package/es-modules/Shared/BaseForm.js +126 -0
- package/es-modules/Shared/DownloadURL.d.ts +85 -0
- package/es-modules/Shared/DownloadURL.js +198 -0
- package/es-modules/Shared/LangOptionsCore.d.ts +27 -0
- package/es-modules/Shared/TimeBase.d.ts +353 -0
- package/es-modules/Shared/TimeBase.js +830 -0
- package/es-modules/Shared/Types.d.ts +48 -0
- package/es-modules/masters/grid-pro.src.d.ts +99 -0
- package/es-modules/masters/grid-pro.src.js +129 -0
- package/grid-pro.d.ts +50 -0
- package/grid-pro.js +12 -0
- package/grid-pro.js.map +1 -0
- package/grid-pro.src.d.ts +50 -0
- package/grid-pro.src.js +26623 -0
- package/package.json +21 -0
|
@@ -0,0 +1,1686 @@
|
|
|
1
|
+
/* *
|
|
2
|
+
*
|
|
3
|
+
* (c) 2010-2025 Torstein Honsi
|
|
4
|
+
*
|
|
5
|
+
* Extension for 3D charts
|
|
6
|
+
*
|
|
7
|
+
* License: www.highcharts.com/license
|
|
8
|
+
*
|
|
9
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
10
|
+
*
|
|
11
|
+
* */
|
|
12
|
+
'use strict';
|
|
13
|
+
import Color from '../Color/Color.js';
|
|
14
|
+
const { parse: color } = Color;
|
|
15
|
+
import D from '../Defaults.js';
|
|
16
|
+
const { defaultOptions: genericDefaultOptions } = D;
|
|
17
|
+
import Math3D from '../Math3D.js';
|
|
18
|
+
const { perspective, shapeArea3D } = Math3D;
|
|
19
|
+
import U from '../Utilities.js';
|
|
20
|
+
const { addEvent, isArray, merge, pick, wrap } = U;
|
|
21
|
+
/* *
|
|
22
|
+
*
|
|
23
|
+
* Composition
|
|
24
|
+
*
|
|
25
|
+
* */
|
|
26
|
+
var Chart3D;
|
|
27
|
+
(function (Chart3D) {
|
|
28
|
+
/* *
|
|
29
|
+
*
|
|
30
|
+
* Declarations
|
|
31
|
+
*
|
|
32
|
+
* */
|
|
33
|
+
/* *
|
|
34
|
+
*
|
|
35
|
+
* Constants
|
|
36
|
+
*
|
|
37
|
+
* */
|
|
38
|
+
/**
|
|
39
|
+
* @optionparent
|
|
40
|
+
* @private
|
|
41
|
+
*/
|
|
42
|
+
Chart3D.defaultOptions = {
|
|
43
|
+
chart: {
|
|
44
|
+
/**
|
|
45
|
+
* Options to render charts in 3 dimensions. This feature requires
|
|
46
|
+
* `highcharts-3d.js`, found in the download package or online at
|
|
47
|
+
* [code.highcharts.com/highcharts-3d.js](https://code.highcharts.com/highcharts-3d.js).
|
|
48
|
+
*
|
|
49
|
+
* @since 4.0
|
|
50
|
+
* @product highcharts
|
|
51
|
+
* @requires highcharts-3d
|
|
52
|
+
*/
|
|
53
|
+
options3d: {
|
|
54
|
+
/**
|
|
55
|
+
* Whether to render the chart using the 3D functionality.
|
|
56
|
+
*
|
|
57
|
+
* @since 4.0
|
|
58
|
+
* @product highcharts
|
|
59
|
+
*/
|
|
60
|
+
enabled: false,
|
|
61
|
+
/**
|
|
62
|
+
* One of the two rotation angles for the chart.
|
|
63
|
+
*
|
|
64
|
+
* @since 4.0
|
|
65
|
+
* @product highcharts
|
|
66
|
+
*/
|
|
67
|
+
alpha: 0,
|
|
68
|
+
/**
|
|
69
|
+
* One of the two rotation angles for the chart.
|
|
70
|
+
*
|
|
71
|
+
* @since 4.0
|
|
72
|
+
* @product highcharts
|
|
73
|
+
*/
|
|
74
|
+
beta: 0,
|
|
75
|
+
/**
|
|
76
|
+
* The total depth of the chart.
|
|
77
|
+
*
|
|
78
|
+
* @since 4.0
|
|
79
|
+
* @product highcharts
|
|
80
|
+
*/
|
|
81
|
+
depth: 100,
|
|
82
|
+
/**
|
|
83
|
+
* Whether the 3d box should automatically adjust to the chart
|
|
84
|
+
* plot area.
|
|
85
|
+
*
|
|
86
|
+
* @since 4.2.4
|
|
87
|
+
* @product highcharts
|
|
88
|
+
*/
|
|
89
|
+
fitToPlot: true,
|
|
90
|
+
/**
|
|
91
|
+
* Defines the distance the viewer is standing in front of the
|
|
92
|
+
* chart, this setting is important to calculate the perspective
|
|
93
|
+
* effect in column and scatter charts. It is not used for 3D
|
|
94
|
+
* pie charts.
|
|
95
|
+
*
|
|
96
|
+
* @since 4.0
|
|
97
|
+
* @product highcharts
|
|
98
|
+
*/
|
|
99
|
+
viewDistance: 25,
|
|
100
|
+
/**
|
|
101
|
+
* Set it to `"auto"` to automatically move the labels to the
|
|
102
|
+
* best edge.
|
|
103
|
+
*
|
|
104
|
+
* @type {"auto"|null}
|
|
105
|
+
* @since 5.0.12
|
|
106
|
+
* @product highcharts
|
|
107
|
+
*/
|
|
108
|
+
axisLabelPosition: null,
|
|
109
|
+
/**
|
|
110
|
+
* Provides the option to draw a frame around the charts by
|
|
111
|
+
* defining a bottom, front and back panel.
|
|
112
|
+
*
|
|
113
|
+
* @since 4.0
|
|
114
|
+
* @product highcharts
|
|
115
|
+
* @requires highcharts-3d
|
|
116
|
+
*/
|
|
117
|
+
frame: {
|
|
118
|
+
/**
|
|
119
|
+
* Whether the frames are visible.
|
|
120
|
+
*/
|
|
121
|
+
visible: 'default',
|
|
122
|
+
/**
|
|
123
|
+
* General pixel thickness for the frame faces.
|
|
124
|
+
*/
|
|
125
|
+
size: 1,
|
|
126
|
+
/**
|
|
127
|
+
* The bottom of the frame around a 3D chart.
|
|
128
|
+
*
|
|
129
|
+
* @since 4.0
|
|
130
|
+
* @product highcharts
|
|
131
|
+
* @requires highcharts-3d
|
|
132
|
+
*/
|
|
133
|
+
/**
|
|
134
|
+
* The color of the panel.
|
|
135
|
+
*
|
|
136
|
+
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
137
|
+
* @default transparent
|
|
138
|
+
* @since 4.0
|
|
139
|
+
* @product highcharts
|
|
140
|
+
* @apioption chart.options3d.frame.bottom.color
|
|
141
|
+
*/
|
|
142
|
+
/**
|
|
143
|
+
* The thickness of the panel.
|
|
144
|
+
*
|
|
145
|
+
* @type {number}
|
|
146
|
+
* @default 1
|
|
147
|
+
* @since 4.0
|
|
148
|
+
* @product highcharts
|
|
149
|
+
* @apioption chart.options3d.frame.bottom.size
|
|
150
|
+
*/
|
|
151
|
+
/**
|
|
152
|
+
* Whether to display the frame. Possible values are `true`,
|
|
153
|
+
* `false`, `"auto"` to display only the frames behind the
|
|
154
|
+
* data, and `"default"` to display faces behind the data
|
|
155
|
+
* based on the axis layout, ignoring the point of view.
|
|
156
|
+
*
|
|
157
|
+
* @sample {highcharts} highcharts/3d/scatter-frame/
|
|
158
|
+
* Auto frames
|
|
159
|
+
*
|
|
160
|
+
* @type {boolean|"default"|"auto"}
|
|
161
|
+
* @default default
|
|
162
|
+
* @since 5.0.12
|
|
163
|
+
* @product highcharts
|
|
164
|
+
* @apioption chart.options3d.frame.bottom.visible
|
|
165
|
+
*/
|
|
166
|
+
/**
|
|
167
|
+
* The bottom of the frame around a 3D chart.
|
|
168
|
+
*/
|
|
169
|
+
bottom: {},
|
|
170
|
+
/**
|
|
171
|
+
* The top of the frame around a 3D chart.
|
|
172
|
+
*
|
|
173
|
+
* @extends chart.options3d.frame.bottom
|
|
174
|
+
*/
|
|
175
|
+
top: {},
|
|
176
|
+
/**
|
|
177
|
+
* The left side of the frame around a 3D chart.
|
|
178
|
+
*
|
|
179
|
+
* @extends chart.options3d.frame.bottom
|
|
180
|
+
*/
|
|
181
|
+
left: {},
|
|
182
|
+
/**
|
|
183
|
+
* The right of the frame around a 3D chart.
|
|
184
|
+
*
|
|
185
|
+
* @extends chart.options3d.frame.bottom
|
|
186
|
+
*/
|
|
187
|
+
right: {},
|
|
188
|
+
/**
|
|
189
|
+
* The back side of the frame around a 3D chart.
|
|
190
|
+
*
|
|
191
|
+
* @extends chart.options3d.frame.bottom
|
|
192
|
+
*/
|
|
193
|
+
back: {},
|
|
194
|
+
/**
|
|
195
|
+
* The front of the frame around a 3D chart.
|
|
196
|
+
*
|
|
197
|
+
* @extends chart.options3d.frame.bottom
|
|
198
|
+
*/
|
|
199
|
+
front: {}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
/* *
|
|
205
|
+
*
|
|
206
|
+
* Functions
|
|
207
|
+
*
|
|
208
|
+
* */
|
|
209
|
+
/**
|
|
210
|
+
* @private
|
|
211
|
+
*/
|
|
212
|
+
function compose(ChartClass, FxClass) {
|
|
213
|
+
const chartProto = ChartClass.prototype;
|
|
214
|
+
const fxProto = FxClass.prototype;
|
|
215
|
+
/**
|
|
216
|
+
* Shorthand to check the is3d flag.
|
|
217
|
+
* @private
|
|
218
|
+
* @return {boolean}
|
|
219
|
+
* Whether it is a 3D chart.
|
|
220
|
+
*/
|
|
221
|
+
chartProto.is3d = function () {
|
|
222
|
+
return !!this.options.chart.options3d?.enabled;
|
|
223
|
+
};
|
|
224
|
+
chartProto.propsRequireDirtyBox.push('chart.options3d');
|
|
225
|
+
chartProto.propsRequireUpdateSeries.push('chart.options3d');
|
|
226
|
+
/**
|
|
227
|
+
* Animation setter for matrix property.
|
|
228
|
+
* @private
|
|
229
|
+
*/
|
|
230
|
+
fxProto.matrixSetter = function () {
|
|
231
|
+
let interpolated;
|
|
232
|
+
if (this.pos < 1 &&
|
|
233
|
+
(isArray(this.start) || isArray(this.end))) {
|
|
234
|
+
const start = (this.start ||
|
|
235
|
+
[1, 0, 0, 1, 0, 0]), end = this.end || [1, 0, 0, 1, 0, 0];
|
|
236
|
+
interpolated = [];
|
|
237
|
+
for (let i = 0; i < 6; i++) {
|
|
238
|
+
interpolated.push(this.pos * end[i] + (1 - this.pos) * start[i]);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
interpolated = this.end;
|
|
243
|
+
}
|
|
244
|
+
this.elem.attr(this.prop, interpolated, null, true);
|
|
245
|
+
};
|
|
246
|
+
merge(true, genericDefaultOptions, Chart3D.defaultOptions);
|
|
247
|
+
addEvent(ChartClass, 'init', onInit);
|
|
248
|
+
addEvent(ChartClass, 'addSeries', onAddSeries);
|
|
249
|
+
addEvent(ChartClass, 'afterDrawChartBox', onAfterDrawChartBox);
|
|
250
|
+
addEvent(ChartClass, 'afterGetContainer', onAfterGetContainer);
|
|
251
|
+
addEvent(ChartClass, 'afterInit', onAfterInit);
|
|
252
|
+
addEvent(ChartClass, 'afterSetChartSize', onAfterSetChartSize);
|
|
253
|
+
addEvent(ChartClass, 'beforeRedraw', onBeforeRedraw);
|
|
254
|
+
addEvent(ChartClass, 'beforeRender', onBeforeRender);
|
|
255
|
+
wrap(chartProto, 'isInsidePlot', wrapIsInsidePlot);
|
|
256
|
+
wrap(chartProto, 'renderSeries', wrapRenderSeries);
|
|
257
|
+
wrap(chartProto, 'setClassName', wrapSetClassName);
|
|
258
|
+
}
|
|
259
|
+
Chart3D.compose = compose;
|
|
260
|
+
/**
|
|
261
|
+
* Legacy support for HC < 6 to make 'scatter' series in a 3D chart route to
|
|
262
|
+
* the real 'scatter3d' series type. (#8407)
|
|
263
|
+
* @private
|
|
264
|
+
*/
|
|
265
|
+
function onAddSeries(e) {
|
|
266
|
+
if (this.is3d()) {
|
|
267
|
+
if (e.options.type === 'scatter') {
|
|
268
|
+
e.options.type = 'scatter3d';
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* @private
|
|
274
|
+
*/
|
|
275
|
+
function onAfterDrawChartBox() {
|
|
276
|
+
if (this.chart3d &&
|
|
277
|
+
this.is3d()) {
|
|
278
|
+
const chart = this, renderer = chart.renderer, options3d = chart.options.chart.options3d, frame = chart.chart3d.get3dFrame(), xm = chart.plotLeft, xp = chart.plotLeft + chart.plotWidth, ym = chart.plotTop, yp = chart.plotTop + chart.plotHeight, zm = 0, zp = options3d.depth, xmm = xm - (frame.left.visible ? frame.left.size : 0), xpp = xp + (frame.right.visible ? frame.right.size : 0), ymm = ym - (frame.top.visible ? frame.top.size : 0), ypp = yp + (frame.bottom.visible ? frame.bottom.size : 0), zmm = zm - (frame.front.visible ? frame.front.size : 0), zpp = zp + (frame.back.visible ? frame.back.size : 0), verb = chart.hasRendered ? 'animate' : 'attr';
|
|
279
|
+
chart.chart3d.frame3d = frame;
|
|
280
|
+
if (!chart.frameShapes) {
|
|
281
|
+
chart.frameShapes = {
|
|
282
|
+
bottom: renderer.polyhedron().add(),
|
|
283
|
+
top: renderer.polyhedron().add(),
|
|
284
|
+
left: renderer.polyhedron().add(),
|
|
285
|
+
right: renderer.polyhedron().add(),
|
|
286
|
+
back: renderer.polyhedron().add(),
|
|
287
|
+
front: renderer.polyhedron().add()
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
chart.frameShapes.bottom[verb]({
|
|
291
|
+
'class': 'highcharts-3d-frame highcharts-3d-frame-bottom',
|
|
292
|
+
zIndex: frame.bottom.frontFacing ? -1000 : 1000,
|
|
293
|
+
faces: [{
|
|
294
|
+
fill: color(frame.bottom.color).brighten(0.1).get(),
|
|
295
|
+
vertexes: [{
|
|
296
|
+
x: xmm,
|
|
297
|
+
y: ypp,
|
|
298
|
+
z: zmm
|
|
299
|
+
}, {
|
|
300
|
+
x: xpp,
|
|
301
|
+
y: ypp,
|
|
302
|
+
z: zmm
|
|
303
|
+
}, {
|
|
304
|
+
x: xpp,
|
|
305
|
+
y: ypp,
|
|
306
|
+
z: zpp
|
|
307
|
+
}, {
|
|
308
|
+
x: xmm,
|
|
309
|
+
y: ypp,
|
|
310
|
+
z: zpp
|
|
311
|
+
}],
|
|
312
|
+
enabled: frame.bottom.visible
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
fill: color(frame.bottom.color).brighten(0.1).get(),
|
|
316
|
+
vertexes: [{
|
|
317
|
+
x: xm,
|
|
318
|
+
y: yp,
|
|
319
|
+
z: zp
|
|
320
|
+
}, {
|
|
321
|
+
x: xp,
|
|
322
|
+
y: yp,
|
|
323
|
+
z: zp
|
|
324
|
+
}, {
|
|
325
|
+
x: xp,
|
|
326
|
+
y: yp,
|
|
327
|
+
z: zm
|
|
328
|
+
}, {
|
|
329
|
+
x: xm,
|
|
330
|
+
y: yp,
|
|
331
|
+
z: zm
|
|
332
|
+
}],
|
|
333
|
+
enabled: frame.bottom.visible
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
fill: color(frame.bottom.color).brighten(-0.1).get(),
|
|
337
|
+
vertexes: [{
|
|
338
|
+
x: xmm,
|
|
339
|
+
y: ypp,
|
|
340
|
+
z: zmm
|
|
341
|
+
}, {
|
|
342
|
+
x: xmm,
|
|
343
|
+
y: ypp,
|
|
344
|
+
z: zpp
|
|
345
|
+
}, {
|
|
346
|
+
x: xm,
|
|
347
|
+
y: yp,
|
|
348
|
+
z: zp
|
|
349
|
+
}, {
|
|
350
|
+
x: xm,
|
|
351
|
+
y: yp,
|
|
352
|
+
z: zm
|
|
353
|
+
}],
|
|
354
|
+
enabled: frame.bottom.visible && !frame.left.visible
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
fill: color(frame.bottom.color).brighten(-0.1).get(),
|
|
358
|
+
vertexes: [{
|
|
359
|
+
x: xpp,
|
|
360
|
+
y: ypp,
|
|
361
|
+
z: zpp
|
|
362
|
+
}, {
|
|
363
|
+
x: xpp,
|
|
364
|
+
y: ypp,
|
|
365
|
+
z: zmm
|
|
366
|
+
}, {
|
|
367
|
+
x: xp,
|
|
368
|
+
y: yp,
|
|
369
|
+
z: zm
|
|
370
|
+
}, {
|
|
371
|
+
x: xp,
|
|
372
|
+
y: yp,
|
|
373
|
+
z: zp
|
|
374
|
+
}],
|
|
375
|
+
enabled: frame.bottom.visible && !frame.right.visible
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
fill: color(frame.bottom.color).get(),
|
|
379
|
+
vertexes: [{
|
|
380
|
+
x: xpp,
|
|
381
|
+
y: ypp,
|
|
382
|
+
z: zmm
|
|
383
|
+
}, {
|
|
384
|
+
x: xmm,
|
|
385
|
+
y: ypp,
|
|
386
|
+
z: zmm
|
|
387
|
+
}, {
|
|
388
|
+
x: xm,
|
|
389
|
+
y: yp,
|
|
390
|
+
z: zm
|
|
391
|
+
}, {
|
|
392
|
+
x: xp,
|
|
393
|
+
y: yp,
|
|
394
|
+
z: zm
|
|
395
|
+
}],
|
|
396
|
+
enabled: frame.bottom.visible && !frame.front.visible
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
fill: color(frame.bottom.color).get(),
|
|
400
|
+
vertexes: [{
|
|
401
|
+
x: xmm,
|
|
402
|
+
y: ypp,
|
|
403
|
+
z: zpp
|
|
404
|
+
}, {
|
|
405
|
+
x: xpp,
|
|
406
|
+
y: ypp,
|
|
407
|
+
z: zpp
|
|
408
|
+
}, {
|
|
409
|
+
x: xp,
|
|
410
|
+
y: yp,
|
|
411
|
+
z: zp
|
|
412
|
+
}, {
|
|
413
|
+
x: xm,
|
|
414
|
+
y: yp,
|
|
415
|
+
z: zp
|
|
416
|
+
}],
|
|
417
|
+
enabled: frame.bottom.visible && !frame.back.visible
|
|
418
|
+
}]
|
|
419
|
+
});
|
|
420
|
+
chart.frameShapes.top[verb]({
|
|
421
|
+
'class': 'highcharts-3d-frame highcharts-3d-frame-top',
|
|
422
|
+
zIndex: frame.top.frontFacing ? -1000 : 1000,
|
|
423
|
+
faces: [{
|
|
424
|
+
fill: color(frame.top.color).brighten(0.1).get(),
|
|
425
|
+
vertexes: [{
|
|
426
|
+
x: xmm,
|
|
427
|
+
y: ymm,
|
|
428
|
+
z: zpp
|
|
429
|
+
}, {
|
|
430
|
+
x: xpp,
|
|
431
|
+
y: ymm,
|
|
432
|
+
z: zpp
|
|
433
|
+
}, {
|
|
434
|
+
x: xpp,
|
|
435
|
+
y: ymm,
|
|
436
|
+
z: zmm
|
|
437
|
+
}, {
|
|
438
|
+
x: xmm,
|
|
439
|
+
y: ymm,
|
|
440
|
+
z: zmm
|
|
441
|
+
}],
|
|
442
|
+
enabled: frame.top.visible
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
fill: color(frame.top.color).brighten(0.1).get(),
|
|
446
|
+
vertexes: [{
|
|
447
|
+
x: xm,
|
|
448
|
+
y: ym,
|
|
449
|
+
z: zm
|
|
450
|
+
}, {
|
|
451
|
+
x: xp,
|
|
452
|
+
y: ym,
|
|
453
|
+
z: zm
|
|
454
|
+
}, {
|
|
455
|
+
x: xp,
|
|
456
|
+
y: ym,
|
|
457
|
+
z: zp
|
|
458
|
+
}, {
|
|
459
|
+
x: xm,
|
|
460
|
+
y: ym,
|
|
461
|
+
z: zp
|
|
462
|
+
}],
|
|
463
|
+
enabled: frame.top.visible
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
fill: color(frame.top.color).brighten(-0.1).get(),
|
|
467
|
+
vertexes: [{
|
|
468
|
+
x: xmm,
|
|
469
|
+
y: ymm,
|
|
470
|
+
z: zpp
|
|
471
|
+
}, {
|
|
472
|
+
x: xmm,
|
|
473
|
+
y: ymm,
|
|
474
|
+
z: zmm
|
|
475
|
+
}, {
|
|
476
|
+
x: xm,
|
|
477
|
+
y: ym,
|
|
478
|
+
z: zm
|
|
479
|
+
}, {
|
|
480
|
+
x: xm,
|
|
481
|
+
y: ym,
|
|
482
|
+
z: zp
|
|
483
|
+
}],
|
|
484
|
+
enabled: frame.top.visible && !frame.left.visible
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
fill: color(frame.top.color).brighten(-0.1).get(),
|
|
488
|
+
vertexes: [{
|
|
489
|
+
x: xpp,
|
|
490
|
+
y: ymm,
|
|
491
|
+
z: zmm
|
|
492
|
+
}, {
|
|
493
|
+
x: xpp,
|
|
494
|
+
y: ymm,
|
|
495
|
+
z: zpp
|
|
496
|
+
}, {
|
|
497
|
+
x: xp,
|
|
498
|
+
y: ym,
|
|
499
|
+
z: zp
|
|
500
|
+
}, {
|
|
501
|
+
x: xp,
|
|
502
|
+
y: ym,
|
|
503
|
+
z: zm
|
|
504
|
+
}],
|
|
505
|
+
enabled: frame.top.visible && !frame.right.visible
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
fill: color(frame.top.color).get(),
|
|
509
|
+
vertexes: [{
|
|
510
|
+
x: xmm,
|
|
511
|
+
y: ymm,
|
|
512
|
+
z: zmm
|
|
513
|
+
}, {
|
|
514
|
+
x: xpp,
|
|
515
|
+
y: ymm,
|
|
516
|
+
z: zmm
|
|
517
|
+
}, {
|
|
518
|
+
x: xp,
|
|
519
|
+
y: ym,
|
|
520
|
+
z: zm
|
|
521
|
+
}, {
|
|
522
|
+
x: xm,
|
|
523
|
+
y: ym,
|
|
524
|
+
z: zm
|
|
525
|
+
}],
|
|
526
|
+
enabled: frame.top.visible && !frame.front.visible
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
fill: color(frame.top.color).get(),
|
|
530
|
+
vertexes: [{
|
|
531
|
+
x: xpp,
|
|
532
|
+
y: ymm,
|
|
533
|
+
z: zpp
|
|
534
|
+
}, {
|
|
535
|
+
x: xmm,
|
|
536
|
+
y: ymm,
|
|
537
|
+
z: zpp
|
|
538
|
+
}, {
|
|
539
|
+
x: xm,
|
|
540
|
+
y: ym,
|
|
541
|
+
z: zp
|
|
542
|
+
}, {
|
|
543
|
+
x: xp,
|
|
544
|
+
y: ym,
|
|
545
|
+
z: zp
|
|
546
|
+
}],
|
|
547
|
+
enabled: frame.top.visible && !frame.back.visible
|
|
548
|
+
}]
|
|
549
|
+
});
|
|
550
|
+
chart.frameShapes.left[verb]({
|
|
551
|
+
'class': 'highcharts-3d-frame highcharts-3d-frame-left',
|
|
552
|
+
zIndex: frame.left.frontFacing ? -1000 : 1000,
|
|
553
|
+
faces: [{
|
|
554
|
+
fill: color(frame.left.color).brighten(0.1).get(),
|
|
555
|
+
vertexes: [{
|
|
556
|
+
x: xmm,
|
|
557
|
+
y: ypp,
|
|
558
|
+
z: zmm
|
|
559
|
+
}, {
|
|
560
|
+
x: xm,
|
|
561
|
+
y: yp,
|
|
562
|
+
z: zm
|
|
563
|
+
}, {
|
|
564
|
+
x: xm,
|
|
565
|
+
y: yp,
|
|
566
|
+
z: zp
|
|
567
|
+
}, {
|
|
568
|
+
x: xmm,
|
|
569
|
+
y: ypp,
|
|
570
|
+
z: zpp
|
|
571
|
+
}],
|
|
572
|
+
enabled: frame.left.visible && !frame.bottom.visible
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
fill: color(frame.left.color).brighten(0.1).get(),
|
|
576
|
+
vertexes: [{
|
|
577
|
+
x: xmm,
|
|
578
|
+
y: ymm,
|
|
579
|
+
z: zpp
|
|
580
|
+
}, {
|
|
581
|
+
x: xm,
|
|
582
|
+
y: ym,
|
|
583
|
+
z: zp
|
|
584
|
+
}, {
|
|
585
|
+
x: xm,
|
|
586
|
+
y: ym,
|
|
587
|
+
z: zm
|
|
588
|
+
}, {
|
|
589
|
+
x: xmm,
|
|
590
|
+
y: ymm,
|
|
591
|
+
z: zmm
|
|
592
|
+
}],
|
|
593
|
+
enabled: frame.left.visible && !frame.top.visible
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
fill: color(frame.left.color).brighten(-0.1).get(),
|
|
597
|
+
vertexes: [{
|
|
598
|
+
x: xmm,
|
|
599
|
+
y: ypp,
|
|
600
|
+
z: zpp
|
|
601
|
+
}, {
|
|
602
|
+
x: xmm,
|
|
603
|
+
y: ymm,
|
|
604
|
+
z: zpp
|
|
605
|
+
}, {
|
|
606
|
+
x: xmm,
|
|
607
|
+
y: ymm,
|
|
608
|
+
z: zmm
|
|
609
|
+
}, {
|
|
610
|
+
x: xmm,
|
|
611
|
+
y: ypp,
|
|
612
|
+
z: zmm
|
|
613
|
+
}],
|
|
614
|
+
enabled: frame.left.visible
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
fill: color(frame.left.color).brighten(-0.1).get(),
|
|
618
|
+
vertexes: [{
|
|
619
|
+
x: xm,
|
|
620
|
+
y: ym,
|
|
621
|
+
z: zp
|
|
622
|
+
}, {
|
|
623
|
+
x: xm,
|
|
624
|
+
y: yp,
|
|
625
|
+
z: zp
|
|
626
|
+
}, {
|
|
627
|
+
x: xm,
|
|
628
|
+
y: yp,
|
|
629
|
+
z: zm
|
|
630
|
+
}, {
|
|
631
|
+
x: xm,
|
|
632
|
+
y: ym,
|
|
633
|
+
z: zm
|
|
634
|
+
}],
|
|
635
|
+
enabled: frame.left.visible
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
fill: color(frame.left.color).get(),
|
|
639
|
+
vertexes: [{
|
|
640
|
+
x: xmm,
|
|
641
|
+
y: ypp,
|
|
642
|
+
z: zmm
|
|
643
|
+
}, {
|
|
644
|
+
x: xmm,
|
|
645
|
+
y: ymm,
|
|
646
|
+
z: zmm
|
|
647
|
+
}, {
|
|
648
|
+
x: xm,
|
|
649
|
+
y: ym,
|
|
650
|
+
z: zm
|
|
651
|
+
}, {
|
|
652
|
+
x: xm,
|
|
653
|
+
y: yp,
|
|
654
|
+
z: zm
|
|
655
|
+
}],
|
|
656
|
+
enabled: frame.left.visible && !frame.front.visible
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
fill: color(frame.left.color).get(),
|
|
660
|
+
vertexes: [{
|
|
661
|
+
x: xmm,
|
|
662
|
+
y: ymm,
|
|
663
|
+
z: zpp
|
|
664
|
+
}, {
|
|
665
|
+
x: xmm,
|
|
666
|
+
y: ypp,
|
|
667
|
+
z: zpp
|
|
668
|
+
}, {
|
|
669
|
+
x: xm,
|
|
670
|
+
y: yp,
|
|
671
|
+
z: zp
|
|
672
|
+
}, {
|
|
673
|
+
x: xm,
|
|
674
|
+
y: ym,
|
|
675
|
+
z: zp
|
|
676
|
+
}],
|
|
677
|
+
enabled: frame.left.visible && !frame.back.visible
|
|
678
|
+
}]
|
|
679
|
+
});
|
|
680
|
+
chart.frameShapes.right[verb]({
|
|
681
|
+
'class': 'highcharts-3d-frame highcharts-3d-frame-right',
|
|
682
|
+
zIndex: frame.right.frontFacing ? -1000 : 1000,
|
|
683
|
+
faces: [{
|
|
684
|
+
fill: color(frame.right.color).brighten(0.1).get(),
|
|
685
|
+
vertexes: [{
|
|
686
|
+
x: xpp,
|
|
687
|
+
y: ypp,
|
|
688
|
+
z: zpp
|
|
689
|
+
}, {
|
|
690
|
+
x: xp,
|
|
691
|
+
y: yp,
|
|
692
|
+
z: zp
|
|
693
|
+
}, {
|
|
694
|
+
x: xp,
|
|
695
|
+
y: yp,
|
|
696
|
+
z: zm
|
|
697
|
+
}, {
|
|
698
|
+
x: xpp,
|
|
699
|
+
y: ypp,
|
|
700
|
+
z: zmm
|
|
701
|
+
}],
|
|
702
|
+
enabled: frame.right.visible && !frame.bottom.visible
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
fill: color(frame.right.color).brighten(0.1).get(),
|
|
706
|
+
vertexes: [{
|
|
707
|
+
x: xpp,
|
|
708
|
+
y: ymm,
|
|
709
|
+
z: zmm
|
|
710
|
+
}, {
|
|
711
|
+
x: xp,
|
|
712
|
+
y: ym,
|
|
713
|
+
z: zm
|
|
714
|
+
}, {
|
|
715
|
+
x: xp,
|
|
716
|
+
y: ym,
|
|
717
|
+
z: zp
|
|
718
|
+
}, {
|
|
719
|
+
x: xpp,
|
|
720
|
+
y: ymm,
|
|
721
|
+
z: zpp
|
|
722
|
+
}],
|
|
723
|
+
enabled: frame.right.visible && !frame.top.visible
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
fill: color(frame.right.color).brighten(-0.1).get(),
|
|
727
|
+
vertexes: [{
|
|
728
|
+
x: xp,
|
|
729
|
+
y: ym,
|
|
730
|
+
z: zm
|
|
731
|
+
}, {
|
|
732
|
+
x: xp,
|
|
733
|
+
y: yp,
|
|
734
|
+
z: zm
|
|
735
|
+
}, {
|
|
736
|
+
x: xp,
|
|
737
|
+
y: yp,
|
|
738
|
+
z: zp
|
|
739
|
+
}, {
|
|
740
|
+
x: xp,
|
|
741
|
+
y: ym,
|
|
742
|
+
z: zp
|
|
743
|
+
}],
|
|
744
|
+
enabled: frame.right.visible
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
fill: color(frame.right.color).brighten(-0.1).get(),
|
|
748
|
+
vertexes: [{
|
|
749
|
+
x: xpp,
|
|
750
|
+
y: ypp,
|
|
751
|
+
z: zmm
|
|
752
|
+
}, {
|
|
753
|
+
x: xpp,
|
|
754
|
+
y: ymm,
|
|
755
|
+
z: zmm
|
|
756
|
+
}, {
|
|
757
|
+
x: xpp,
|
|
758
|
+
y: ymm,
|
|
759
|
+
z: zpp
|
|
760
|
+
}, {
|
|
761
|
+
x: xpp,
|
|
762
|
+
y: ypp,
|
|
763
|
+
z: zpp
|
|
764
|
+
}],
|
|
765
|
+
enabled: frame.right.visible
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
fill: color(frame.right.color).get(),
|
|
769
|
+
vertexes: [{
|
|
770
|
+
x: xpp,
|
|
771
|
+
y: ymm,
|
|
772
|
+
z: zmm
|
|
773
|
+
}, {
|
|
774
|
+
x: xpp,
|
|
775
|
+
y: ypp,
|
|
776
|
+
z: zmm
|
|
777
|
+
}, {
|
|
778
|
+
x: xp,
|
|
779
|
+
y: yp,
|
|
780
|
+
z: zm
|
|
781
|
+
}, {
|
|
782
|
+
x: xp,
|
|
783
|
+
y: ym,
|
|
784
|
+
z: zm
|
|
785
|
+
}],
|
|
786
|
+
enabled: frame.right.visible && !frame.front.visible
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
fill: color(frame.right.color).get(),
|
|
790
|
+
vertexes: [{
|
|
791
|
+
x: xpp,
|
|
792
|
+
y: ypp,
|
|
793
|
+
z: zpp
|
|
794
|
+
}, {
|
|
795
|
+
x: xpp,
|
|
796
|
+
y: ymm,
|
|
797
|
+
z: zpp
|
|
798
|
+
}, {
|
|
799
|
+
x: xp,
|
|
800
|
+
y: ym,
|
|
801
|
+
z: zp
|
|
802
|
+
}, {
|
|
803
|
+
x: xp,
|
|
804
|
+
y: yp,
|
|
805
|
+
z: zp
|
|
806
|
+
}],
|
|
807
|
+
enabled: frame.right.visible && !frame.back.visible
|
|
808
|
+
}]
|
|
809
|
+
});
|
|
810
|
+
chart.frameShapes.back[verb]({
|
|
811
|
+
'class': 'highcharts-3d-frame highcharts-3d-frame-back',
|
|
812
|
+
zIndex: frame.back.frontFacing ? -1000 : 1000,
|
|
813
|
+
faces: [{
|
|
814
|
+
fill: color(frame.back.color).brighten(0.1).get(),
|
|
815
|
+
vertexes: [{
|
|
816
|
+
x: xpp,
|
|
817
|
+
y: ypp,
|
|
818
|
+
z: zpp
|
|
819
|
+
}, {
|
|
820
|
+
x: xmm,
|
|
821
|
+
y: ypp,
|
|
822
|
+
z: zpp
|
|
823
|
+
}, {
|
|
824
|
+
x: xm,
|
|
825
|
+
y: yp,
|
|
826
|
+
z: zp
|
|
827
|
+
}, {
|
|
828
|
+
x: xp,
|
|
829
|
+
y: yp,
|
|
830
|
+
z: zp
|
|
831
|
+
}],
|
|
832
|
+
enabled: frame.back.visible && !frame.bottom.visible
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
fill: color(frame.back.color).brighten(0.1).get(),
|
|
836
|
+
vertexes: [{
|
|
837
|
+
x: xmm,
|
|
838
|
+
y: ymm,
|
|
839
|
+
z: zpp
|
|
840
|
+
}, {
|
|
841
|
+
x: xpp,
|
|
842
|
+
y: ymm,
|
|
843
|
+
z: zpp
|
|
844
|
+
}, {
|
|
845
|
+
x: xp,
|
|
846
|
+
y: ym,
|
|
847
|
+
z: zp
|
|
848
|
+
}, {
|
|
849
|
+
x: xm,
|
|
850
|
+
y: ym,
|
|
851
|
+
z: zp
|
|
852
|
+
}],
|
|
853
|
+
enabled: frame.back.visible && !frame.top.visible
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
fill: color(frame.back.color).brighten(-0.1).get(),
|
|
857
|
+
vertexes: [{
|
|
858
|
+
x: xmm,
|
|
859
|
+
y: ypp,
|
|
860
|
+
z: zpp
|
|
861
|
+
}, {
|
|
862
|
+
x: xmm,
|
|
863
|
+
y: ymm,
|
|
864
|
+
z: zpp
|
|
865
|
+
}, {
|
|
866
|
+
x: xm,
|
|
867
|
+
y: ym,
|
|
868
|
+
z: zp
|
|
869
|
+
}, {
|
|
870
|
+
x: xm,
|
|
871
|
+
y: yp,
|
|
872
|
+
z: zp
|
|
873
|
+
}],
|
|
874
|
+
enabled: frame.back.visible && !frame.left.visible
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
fill: color(frame.back.color).brighten(-0.1).get(),
|
|
878
|
+
vertexes: [{
|
|
879
|
+
x: xpp,
|
|
880
|
+
y: ymm,
|
|
881
|
+
z: zpp
|
|
882
|
+
}, {
|
|
883
|
+
x: xpp,
|
|
884
|
+
y: ypp,
|
|
885
|
+
z: zpp
|
|
886
|
+
}, {
|
|
887
|
+
x: xp,
|
|
888
|
+
y: yp,
|
|
889
|
+
z: zp
|
|
890
|
+
}, {
|
|
891
|
+
x: xp,
|
|
892
|
+
y: ym,
|
|
893
|
+
z: zp
|
|
894
|
+
}],
|
|
895
|
+
enabled: frame.back.visible && !frame.right.visible
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
fill: color(frame.back.color).get(),
|
|
899
|
+
vertexes: [{
|
|
900
|
+
x: xm,
|
|
901
|
+
y: ym,
|
|
902
|
+
z: zp
|
|
903
|
+
}, {
|
|
904
|
+
x: xp,
|
|
905
|
+
y: ym,
|
|
906
|
+
z: zp
|
|
907
|
+
}, {
|
|
908
|
+
x: xp,
|
|
909
|
+
y: yp,
|
|
910
|
+
z: zp
|
|
911
|
+
}, {
|
|
912
|
+
x: xm,
|
|
913
|
+
y: yp,
|
|
914
|
+
z: zp
|
|
915
|
+
}],
|
|
916
|
+
enabled: frame.back.visible
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
fill: color(frame.back.color).get(),
|
|
920
|
+
vertexes: [{
|
|
921
|
+
x: xmm,
|
|
922
|
+
y: ypp,
|
|
923
|
+
z: zpp
|
|
924
|
+
}, {
|
|
925
|
+
x: xpp,
|
|
926
|
+
y: ypp,
|
|
927
|
+
z: zpp
|
|
928
|
+
}, {
|
|
929
|
+
x: xpp,
|
|
930
|
+
y: ymm,
|
|
931
|
+
z: zpp
|
|
932
|
+
}, {
|
|
933
|
+
x: xmm,
|
|
934
|
+
y: ymm,
|
|
935
|
+
z: zpp
|
|
936
|
+
}],
|
|
937
|
+
enabled: frame.back.visible
|
|
938
|
+
}]
|
|
939
|
+
});
|
|
940
|
+
chart.frameShapes.front[verb]({
|
|
941
|
+
'class': 'highcharts-3d-frame highcharts-3d-frame-front',
|
|
942
|
+
zIndex: frame.front.frontFacing ? -1000 : 1000,
|
|
943
|
+
faces: [{
|
|
944
|
+
fill: color(frame.front.color).brighten(0.1).get(),
|
|
945
|
+
vertexes: [{
|
|
946
|
+
x: xmm,
|
|
947
|
+
y: ypp,
|
|
948
|
+
z: zmm
|
|
949
|
+
}, {
|
|
950
|
+
x: xpp,
|
|
951
|
+
y: ypp,
|
|
952
|
+
z: zmm
|
|
953
|
+
}, {
|
|
954
|
+
x: xp,
|
|
955
|
+
y: yp,
|
|
956
|
+
z: zm
|
|
957
|
+
}, {
|
|
958
|
+
x: xm,
|
|
959
|
+
y: yp,
|
|
960
|
+
z: zm
|
|
961
|
+
}],
|
|
962
|
+
enabled: frame.front.visible && !frame.bottom.visible
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
fill: color(frame.front.color).brighten(0.1).get(),
|
|
966
|
+
vertexes: [{
|
|
967
|
+
x: xpp,
|
|
968
|
+
y: ymm,
|
|
969
|
+
z: zmm
|
|
970
|
+
}, {
|
|
971
|
+
x: xmm,
|
|
972
|
+
y: ymm,
|
|
973
|
+
z: zmm
|
|
974
|
+
}, {
|
|
975
|
+
x: xm,
|
|
976
|
+
y: ym,
|
|
977
|
+
z: zm
|
|
978
|
+
}, {
|
|
979
|
+
x: xp,
|
|
980
|
+
y: ym,
|
|
981
|
+
z: zm
|
|
982
|
+
}],
|
|
983
|
+
enabled: frame.front.visible && !frame.top.visible
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
fill: color(frame.front.color).brighten(-0.1).get(),
|
|
987
|
+
vertexes: [{
|
|
988
|
+
x: xmm,
|
|
989
|
+
y: ymm,
|
|
990
|
+
z: zmm
|
|
991
|
+
}, {
|
|
992
|
+
x: xmm,
|
|
993
|
+
y: ypp,
|
|
994
|
+
z: zmm
|
|
995
|
+
}, {
|
|
996
|
+
x: xm,
|
|
997
|
+
y: yp,
|
|
998
|
+
z: zm
|
|
999
|
+
}, {
|
|
1000
|
+
x: xm,
|
|
1001
|
+
y: ym,
|
|
1002
|
+
z: zm
|
|
1003
|
+
}],
|
|
1004
|
+
enabled: frame.front.visible && !frame.left.visible
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
fill: color(frame.front.color).brighten(-0.1).get(),
|
|
1008
|
+
vertexes: [{
|
|
1009
|
+
x: xpp,
|
|
1010
|
+
y: ypp,
|
|
1011
|
+
z: zmm
|
|
1012
|
+
}, {
|
|
1013
|
+
x: xpp,
|
|
1014
|
+
y: ymm,
|
|
1015
|
+
z: zmm
|
|
1016
|
+
}, {
|
|
1017
|
+
x: xp,
|
|
1018
|
+
y: ym,
|
|
1019
|
+
z: zm
|
|
1020
|
+
}, {
|
|
1021
|
+
x: xp,
|
|
1022
|
+
y: yp,
|
|
1023
|
+
z: zm
|
|
1024
|
+
}],
|
|
1025
|
+
enabled: frame.front.visible && !frame.right.visible
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
fill: color(frame.front.color).get(),
|
|
1029
|
+
vertexes: [{
|
|
1030
|
+
x: xp,
|
|
1031
|
+
y: ym,
|
|
1032
|
+
z: zm
|
|
1033
|
+
}, {
|
|
1034
|
+
x: xm,
|
|
1035
|
+
y: ym,
|
|
1036
|
+
z: zm
|
|
1037
|
+
}, {
|
|
1038
|
+
x: xm,
|
|
1039
|
+
y: yp,
|
|
1040
|
+
z: zm
|
|
1041
|
+
}, {
|
|
1042
|
+
x: xp,
|
|
1043
|
+
y: yp,
|
|
1044
|
+
z: zm
|
|
1045
|
+
}],
|
|
1046
|
+
enabled: frame.front.visible
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
fill: color(frame.front.color).get(),
|
|
1050
|
+
vertexes: [{
|
|
1051
|
+
x: xpp,
|
|
1052
|
+
y: ypp,
|
|
1053
|
+
z: zmm
|
|
1054
|
+
}, {
|
|
1055
|
+
x: xmm,
|
|
1056
|
+
y: ypp,
|
|
1057
|
+
z: zmm
|
|
1058
|
+
}, {
|
|
1059
|
+
x: xmm,
|
|
1060
|
+
y: ymm,
|
|
1061
|
+
z: zmm
|
|
1062
|
+
}, {
|
|
1063
|
+
x: xpp,
|
|
1064
|
+
y: ymm,
|
|
1065
|
+
z: zmm
|
|
1066
|
+
}],
|
|
1067
|
+
enabled: frame.front.visible
|
|
1068
|
+
}]
|
|
1069
|
+
});
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
/**
|
|
1073
|
+
* Add the required CSS classes for column sides (#6018)
|
|
1074
|
+
* @private
|
|
1075
|
+
*/
|
|
1076
|
+
function onAfterGetContainer() {
|
|
1077
|
+
if (this.styledMode) {
|
|
1078
|
+
// Add definitions used by brighter and darker faces of the cuboids.
|
|
1079
|
+
[{
|
|
1080
|
+
name: 'darker',
|
|
1081
|
+
slope: 0.6
|
|
1082
|
+
}, {
|
|
1083
|
+
name: 'brighter',
|
|
1084
|
+
slope: 1.4
|
|
1085
|
+
}].forEach(function (cfg) {
|
|
1086
|
+
this.renderer.definition({
|
|
1087
|
+
tagName: 'filter',
|
|
1088
|
+
attributes: {
|
|
1089
|
+
id: 'highcharts-' + cfg.name
|
|
1090
|
+
},
|
|
1091
|
+
children: [{
|
|
1092
|
+
tagName: 'feComponentTransfer',
|
|
1093
|
+
children: [{
|
|
1094
|
+
tagName: 'feFuncR',
|
|
1095
|
+
attributes: {
|
|
1096
|
+
type: 'linear',
|
|
1097
|
+
slope: cfg.slope
|
|
1098
|
+
}
|
|
1099
|
+
}, {
|
|
1100
|
+
tagName: 'feFuncG',
|
|
1101
|
+
attributes: {
|
|
1102
|
+
type: 'linear',
|
|
1103
|
+
slope: cfg.slope
|
|
1104
|
+
}
|
|
1105
|
+
}, {
|
|
1106
|
+
tagName: 'feFuncB',
|
|
1107
|
+
attributes: {
|
|
1108
|
+
type: 'linear',
|
|
1109
|
+
slope: cfg.slope
|
|
1110
|
+
}
|
|
1111
|
+
}]
|
|
1112
|
+
}]
|
|
1113
|
+
});
|
|
1114
|
+
}, this);
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
/**
|
|
1118
|
+
* Legacy support for HC < 6 to make 'scatter' series in a 3D chart route to
|
|
1119
|
+
* the real 'scatter3d' series type. (#8407)
|
|
1120
|
+
* @private
|
|
1121
|
+
*/
|
|
1122
|
+
function onAfterInit() {
|
|
1123
|
+
const options = this.options;
|
|
1124
|
+
if (this.is3d()) {
|
|
1125
|
+
(options.series || []).forEach(function (s) {
|
|
1126
|
+
const type = (s.type ||
|
|
1127
|
+
options.chart.type ||
|
|
1128
|
+
options.chart.defaultSeriesType);
|
|
1129
|
+
if (type === 'scatter') {
|
|
1130
|
+
s.type = 'scatter3d';
|
|
1131
|
+
}
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
/**
|
|
1136
|
+
* @private
|
|
1137
|
+
*/
|
|
1138
|
+
function onAfterSetChartSize() {
|
|
1139
|
+
const chart = this, options3d = chart.options.chart.options3d;
|
|
1140
|
+
if (chart.chart3d &&
|
|
1141
|
+
chart.is3d()) {
|
|
1142
|
+
// Add a 0-360 normalisation for alfa and beta angles in 3d graph
|
|
1143
|
+
if (options3d) {
|
|
1144
|
+
options3d.alpha = options3d.alpha % 360 +
|
|
1145
|
+
(options3d.alpha >= 0 ? 0 : 360);
|
|
1146
|
+
options3d.beta = options3d.beta % 360 +
|
|
1147
|
+
(options3d.beta >= 0 ? 0 : 360);
|
|
1148
|
+
}
|
|
1149
|
+
const inverted = chart.inverted, clipBox = chart.clipBox, margin = chart.margin, x = inverted ? 'y' : 'x', y = inverted ? 'x' : 'y', w = inverted ? 'height' : 'width', h = inverted ? 'width' : 'height';
|
|
1150
|
+
clipBox[x] = -(margin[3] || 0);
|
|
1151
|
+
clipBox[y] = -(margin[0] || 0);
|
|
1152
|
+
clipBox[w] = (chart.chartWidth + (margin[3] || 0) + (margin[1] || 0));
|
|
1153
|
+
clipBox[h] = (chart.chartHeight + (margin[0] || 0) + (margin[2] || 0));
|
|
1154
|
+
// Set scale, used later in perspective method():
|
|
1155
|
+
// getScale uses perspective, so scale3d has to be reset.
|
|
1156
|
+
chart.scale3d = 1;
|
|
1157
|
+
if (options3d.fitToPlot === true) {
|
|
1158
|
+
chart.scale3d = chart.chart3d.getScale(options3d.depth);
|
|
1159
|
+
}
|
|
1160
|
+
// Recalculate the 3d frame with every call of setChartSize,
|
|
1161
|
+
// instead of doing it after every redraw(). It avoids ticks
|
|
1162
|
+
// and axis title outside of chart.
|
|
1163
|
+
chart.chart3d.frame3d = chart.chart3d.get3dFrame(); // #7942
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
/**
|
|
1167
|
+
* @private
|
|
1168
|
+
*/
|
|
1169
|
+
function onBeforeRedraw() {
|
|
1170
|
+
if (this.is3d()) {
|
|
1171
|
+
// Set to force a redraw of all elements
|
|
1172
|
+
this.isDirtyBox = true;
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
/**
|
|
1176
|
+
* @private
|
|
1177
|
+
*/
|
|
1178
|
+
function onBeforeRender() {
|
|
1179
|
+
if (this.chart3d && this.is3d()) {
|
|
1180
|
+
this.chart3d.frame3d = this.chart3d.get3dFrame();
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
/**
|
|
1184
|
+
* @private
|
|
1185
|
+
*/
|
|
1186
|
+
function onInit() {
|
|
1187
|
+
if (!this.chart3d) {
|
|
1188
|
+
this.chart3d = new Additions(this);
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
/**
|
|
1192
|
+
* @private
|
|
1193
|
+
*/
|
|
1194
|
+
function wrapIsInsidePlot(proceed) {
|
|
1195
|
+
return this.is3d() || proceed.apply(this, [].slice.call(arguments, 1));
|
|
1196
|
+
}
|
|
1197
|
+
/**
|
|
1198
|
+
* Draw the series in the reverse order (#3803, #3917)
|
|
1199
|
+
* @private
|
|
1200
|
+
*/
|
|
1201
|
+
function wrapRenderSeries(proceed) {
|
|
1202
|
+
let series, i = this.series.length;
|
|
1203
|
+
if (this.is3d()) {
|
|
1204
|
+
while (i--) {
|
|
1205
|
+
series = this.series[i];
|
|
1206
|
+
series.translate();
|
|
1207
|
+
series.render();
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
else {
|
|
1211
|
+
proceed.call(this);
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
/**
|
|
1215
|
+
* @private
|
|
1216
|
+
*/
|
|
1217
|
+
function wrapSetClassName(proceed) {
|
|
1218
|
+
proceed.apply(this, [].slice.call(arguments, 1));
|
|
1219
|
+
if (this.is3d()) {
|
|
1220
|
+
this.container.className += ' highcharts-3d-chart';
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
/* *
|
|
1224
|
+
*
|
|
1225
|
+
* Class
|
|
1226
|
+
*
|
|
1227
|
+
* */
|
|
1228
|
+
class Additions {
|
|
1229
|
+
/* *
|
|
1230
|
+
*
|
|
1231
|
+
* Constructors
|
|
1232
|
+
*
|
|
1233
|
+
* */
|
|
1234
|
+
constructor(chart) {
|
|
1235
|
+
this.chart = chart;
|
|
1236
|
+
}
|
|
1237
|
+
/* *
|
|
1238
|
+
*
|
|
1239
|
+
* Functions
|
|
1240
|
+
*
|
|
1241
|
+
* */
|
|
1242
|
+
get3dFrame() {
|
|
1243
|
+
const chart = this.chart, options3d = chart.options.chart.options3d, frameOptions = options3d.frame, xm = chart.plotLeft, xp = chart.plotLeft + chart.plotWidth, ym = chart.plotTop, yp = chart.plotTop + chart.plotHeight, zm = 0, zp = options3d.depth, faceOrientation = function (vertexes) {
|
|
1244
|
+
const area = shapeArea3D(vertexes, chart);
|
|
1245
|
+
// Give it 0.5 squared-pixel as a margin for rounding errors
|
|
1246
|
+
if (area > 0.5) {
|
|
1247
|
+
return 1;
|
|
1248
|
+
}
|
|
1249
|
+
if (area < -0.5) {
|
|
1250
|
+
return -1;
|
|
1251
|
+
}
|
|
1252
|
+
return 0;
|
|
1253
|
+
}, bottomOrientation = faceOrientation([
|
|
1254
|
+
{ x: xm, y: yp, z: zp },
|
|
1255
|
+
{ x: xp, y: yp, z: zp },
|
|
1256
|
+
{ x: xp, y: yp, z: zm },
|
|
1257
|
+
{ x: xm, y: yp, z: zm }
|
|
1258
|
+
]), topOrientation = faceOrientation([
|
|
1259
|
+
{ x: xm, y: ym, z: zm },
|
|
1260
|
+
{ x: xp, y: ym, z: zm },
|
|
1261
|
+
{ x: xp, y: ym, z: zp },
|
|
1262
|
+
{ x: xm, y: ym, z: zp }
|
|
1263
|
+
]), leftOrientation = faceOrientation([
|
|
1264
|
+
{ x: xm, y: ym, z: zm },
|
|
1265
|
+
{ x: xm, y: ym, z: zp },
|
|
1266
|
+
{ x: xm, y: yp, z: zp },
|
|
1267
|
+
{ x: xm, y: yp, z: zm }
|
|
1268
|
+
]), rightOrientation = faceOrientation([
|
|
1269
|
+
{ x: xp, y: ym, z: zp },
|
|
1270
|
+
{ x: xp, y: ym, z: zm },
|
|
1271
|
+
{ x: xp, y: yp, z: zm },
|
|
1272
|
+
{ x: xp, y: yp, z: zp }
|
|
1273
|
+
]), frontOrientation = faceOrientation([
|
|
1274
|
+
{ x: xm, y: yp, z: zm },
|
|
1275
|
+
{ x: xp, y: yp, z: zm },
|
|
1276
|
+
{ x: xp, y: ym, z: zm },
|
|
1277
|
+
{ x: xm, y: ym, z: zm }
|
|
1278
|
+
]), backOrientation = faceOrientation([
|
|
1279
|
+
{ x: xm, y: ym, z: zp },
|
|
1280
|
+
{ x: xp, y: ym, z: zp },
|
|
1281
|
+
{ x: xp, y: yp, z: zp },
|
|
1282
|
+
{ x: xm, y: yp, z: zp }
|
|
1283
|
+
]), defaultShowFront = false, defaultShowBack = true;
|
|
1284
|
+
let defaultShowBottom = false, defaultShowTop = false, defaultShowLeft = false, defaultShowRight = false;
|
|
1285
|
+
// The 'default' criteria to visible faces of the frame is looking
|
|
1286
|
+
// up every axis to decide whenever the left/right//top/bottom sides
|
|
1287
|
+
// of the frame will be shown
|
|
1288
|
+
[]
|
|
1289
|
+
.concat(chart.xAxis, chart.yAxis, chart.zAxis)
|
|
1290
|
+
.forEach(function (axis) {
|
|
1291
|
+
if (axis) {
|
|
1292
|
+
if (axis.horiz) {
|
|
1293
|
+
if (axis.opposite) {
|
|
1294
|
+
defaultShowTop = true;
|
|
1295
|
+
}
|
|
1296
|
+
else {
|
|
1297
|
+
defaultShowBottom = true;
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
else {
|
|
1301
|
+
if (axis.opposite) {
|
|
1302
|
+
defaultShowRight = true;
|
|
1303
|
+
}
|
|
1304
|
+
else {
|
|
1305
|
+
defaultShowLeft = true;
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
});
|
|
1310
|
+
const getFaceOptions = function (sources, faceOrientation, defaultVisible) {
|
|
1311
|
+
const faceAttrs = ['size', 'color', 'visible'], options = {};
|
|
1312
|
+
for (let i = 0; i < faceAttrs.length; i++) {
|
|
1313
|
+
const attr = faceAttrs[i];
|
|
1314
|
+
for (let j = 0; j < sources.length; j++) {
|
|
1315
|
+
if (typeof sources[j] === 'object') {
|
|
1316
|
+
const val = sources[j][attr];
|
|
1317
|
+
if (typeof val !== 'undefined' && val !== null) {
|
|
1318
|
+
options[attr] = val;
|
|
1319
|
+
break;
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
let isVisible = defaultVisible;
|
|
1325
|
+
if (options.visible === true || options.visible === false) {
|
|
1326
|
+
isVisible = options.visible;
|
|
1327
|
+
}
|
|
1328
|
+
else if (options.visible === 'auto') {
|
|
1329
|
+
isVisible = faceOrientation > 0;
|
|
1330
|
+
}
|
|
1331
|
+
return {
|
|
1332
|
+
size: pick(options.size, 1),
|
|
1333
|
+
color: pick(options.color, 'none'),
|
|
1334
|
+
frontFacing: faceOrientation > 0,
|
|
1335
|
+
visible: isVisible
|
|
1336
|
+
};
|
|
1337
|
+
};
|
|
1338
|
+
// Docs @TODO: Add all frame options (left, right, top, bottom,
|
|
1339
|
+
// front, back) to apioptions JSDoc once the new system is up.
|
|
1340
|
+
const ret = {
|
|
1341
|
+
axes: {},
|
|
1342
|
+
// FIXME: Previously, left/right, top/bottom and front/back
|
|
1343
|
+
// pairs shared size and color.
|
|
1344
|
+
// For compatibility and consistency sake, when one face have
|
|
1345
|
+
// size/color/visibility set, the opposite face will default to
|
|
1346
|
+
// the same values. Also, left/right used to be called 'side',
|
|
1347
|
+
// so that's also added as a fallback.
|
|
1348
|
+
bottom: getFaceOptions([frameOptions.bottom, frameOptions.top, frameOptions], bottomOrientation, defaultShowBottom),
|
|
1349
|
+
top: getFaceOptions([frameOptions.top, frameOptions.bottom, frameOptions], topOrientation, defaultShowTop),
|
|
1350
|
+
left: getFaceOptions([
|
|
1351
|
+
frameOptions.left,
|
|
1352
|
+
frameOptions.right,
|
|
1353
|
+
frameOptions.side,
|
|
1354
|
+
frameOptions
|
|
1355
|
+
], leftOrientation, defaultShowLeft),
|
|
1356
|
+
right: getFaceOptions([
|
|
1357
|
+
frameOptions.right,
|
|
1358
|
+
frameOptions.left,
|
|
1359
|
+
frameOptions.side,
|
|
1360
|
+
frameOptions
|
|
1361
|
+
], rightOrientation, defaultShowRight),
|
|
1362
|
+
back: getFaceOptions([frameOptions.back, frameOptions.front, frameOptions], backOrientation, defaultShowBack),
|
|
1363
|
+
front: getFaceOptions([frameOptions.front, frameOptions.back, frameOptions], frontOrientation, defaultShowFront)
|
|
1364
|
+
};
|
|
1365
|
+
// Decide the bast place to put axis title/labels based on the
|
|
1366
|
+
// visible faces. Ideally, The labels can only be on the edge
|
|
1367
|
+
// between a visible face and an invisible one. Also, the Y label
|
|
1368
|
+
// should be one the left-most edge (right-most if opposite).
|
|
1369
|
+
if (options3d.axisLabelPosition === 'auto') {
|
|
1370
|
+
const isValidEdge = function (face1, face2) {
|
|
1371
|
+
return ((face1.visible !== face2.visible) ||
|
|
1372
|
+
(face1.visible &&
|
|
1373
|
+
face2.visible &&
|
|
1374
|
+
(face1.frontFacing !== face2.frontFacing)));
|
|
1375
|
+
};
|
|
1376
|
+
const yEdges = [];
|
|
1377
|
+
if (isValidEdge(ret.left, ret.front)) {
|
|
1378
|
+
yEdges.push({
|
|
1379
|
+
y: (ym + yp) / 2,
|
|
1380
|
+
x: xm,
|
|
1381
|
+
z: zm,
|
|
1382
|
+
xDir: { x: 1, y: 0, z: 0 }
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
if (isValidEdge(ret.left, ret.back)) {
|
|
1386
|
+
yEdges.push({
|
|
1387
|
+
y: (ym + yp) / 2,
|
|
1388
|
+
x: xm,
|
|
1389
|
+
z: zp,
|
|
1390
|
+
xDir: { x: 0, y: 0, z: -1 }
|
|
1391
|
+
});
|
|
1392
|
+
}
|
|
1393
|
+
if (isValidEdge(ret.right, ret.front)) {
|
|
1394
|
+
yEdges.push({
|
|
1395
|
+
y: (ym + yp) / 2,
|
|
1396
|
+
x: xp,
|
|
1397
|
+
z: zm,
|
|
1398
|
+
xDir: { x: 0, y: 0, z: 1 }
|
|
1399
|
+
});
|
|
1400
|
+
}
|
|
1401
|
+
if (isValidEdge(ret.right, ret.back)) {
|
|
1402
|
+
yEdges.push({
|
|
1403
|
+
y: (ym + yp) / 2,
|
|
1404
|
+
x: xp,
|
|
1405
|
+
z: zp,
|
|
1406
|
+
xDir: { x: -1, y: 0, z: 0 }
|
|
1407
|
+
});
|
|
1408
|
+
}
|
|
1409
|
+
const xBottomEdges = [];
|
|
1410
|
+
if (isValidEdge(ret.bottom, ret.front)) {
|
|
1411
|
+
xBottomEdges.push({
|
|
1412
|
+
x: (xm + xp) / 2,
|
|
1413
|
+
y: yp,
|
|
1414
|
+
z: zm,
|
|
1415
|
+
xDir: { x: 1, y: 0, z: 0 }
|
|
1416
|
+
});
|
|
1417
|
+
}
|
|
1418
|
+
if (isValidEdge(ret.bottom, ret.back)) {
|
|
1419
|
+
xBottomEdges.push({
|
|
1420
|
+
x: (xm + xp) / 2,
|
|
1421
|
+
y: yp,
|
|
1422
|
+
z: zp,
|
|
1423
|
+
xDir: { x: -1, y: 0, z: 0 }
|
|
1424
|
+
});
|
|
1425
|
+
}
|
|
1426
|
+
const xTopEdges = [];
|
|
1427
|
+
if (isValidEdge(ret.top, ret.front)) {
|
|
1428
|
+
xTopEdges.push({
|
|
1429
|
+
x: (xm + xp) / 2,
|
|
1430
|
+
y: ym,
|
|
1431
|
+
z: zm,
|
|
1432
|
+
xDir: { x: 1, y: 0, z: 0 }
|
|
1433
|
+
});
|
|
1434
|
+
}
|
|
1435
|
+
if (isValidEdge(ret.top, ret.back)) {
|
|
1436
|
+
xTopEdges.push({
|
|
1437
|
+
x: (xm + xp) / 2,
|
|
1438
|
+
y: ym,
|
|
1439
|
+
z: zp,
|
|
1440
|
+
xDir: { x: -1, y: 0, z: 0 }
|
|
1441
|
+
});
|
|
1442
|
+
}
|
|
1443
|
+
const zBottomEdges = [];
|
|
1444
|
+
if (isValidEdge(ret.bottom, ret.left)) {
|
|
1445
|
+
zBottomEdges.push({
|
|
1446
|
+
z: (zm + zp) / 2,
|
|
1447
|
+
y: yp,
|
|
1448
|
+
x: xm,
|
|
1449
|
+
xDir: { x: 0, y: 0, z: -1 }
|
|
1450
|
+
});
|
|
1451
|
+
}
|
|
1452
|
+
if (isValidEdge(ret.bottom, ret.right)) {
|
|
1453
|
+
zBottomEdges.push({
|
|
1454
|
+
z: (zm + zp) / 2,
|
|
1455
|
+
y: yp,
|
|
1456
|
+
x: xp,
|
|
1457
|
+
xDir: { x: 0, y: 0, z: 1 }
|
|
1458
|
+
});
|
|
1459
|
+
}
|
|
1460
|
+
const zTopEdges = [];
|
|
1461
|
+
if (isValidEdge(ret.top, ret.left)) {
|
|
1462
|
+
zTopEdges.push({
|
|
1463
|
+
z: (zm + zp) / 2,
|
|
1464
|
+
y: ym,
|
|
1465
|
+
x: xm,
|
|
1466
|
+
xDir: { x: 0, y: 0, z: -1 }
|
|
1467
|
+
});
|
|
1468
|
+
}
|
|
1469
|
+
if (isValidEdge(ret.top, ret.right)) {
|
|
1470
|
+
zTopEdges.push({
|
|
1471
|
+
z: (zm + zp) / 2,
|
|
1472
|
+
y: ym,
|
|
1473
|
+
x: xp,
|
|
1474
|
+
xDir: { x: 0, y: 0, z: 1 }
|
|
1475
|
+
});
|
|
1476
|
+
}
|
|
1477
|
+
const pickEdge = function (edges, axis, mult) {
|
|
1478
|
+
if (edges.length === 0) {
|
|
1479
|
+
return null;
|
|
1480
|
+
}
|
|
1481
|
+
if (edges.length === 1) {
|
|
1482
|
+
return edges[0];
|
|
1483
|
+
}
|
|
1484
|
+
const projections = perspective(edges, chart, false);
|
|
1485
|
+
let best = 0;
|
|
1486
|
+
for (let i = 1; i < projections.length; i++) {
|
|
1487
|
+
if (mult * projections[i][axis] >
|
|
1488
|
+
mult * projections[best][axis]) {
|
|
1489
|
+
best = i;
|
|
1490
|
+
}
|
|
1491
|
+
else if ((mult * projections[i][axis] ===
|
|
1492
|
+
mult * projections[best][axis]) &&
|
|
1493
|
+
(projections[i].z < projections[best].z)) {
|
|
1494
|
+
best = i;
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
return edges[best];
|
|
1498
|
+
};
|
|
1499
|
+
ret.axes = {
|
|
1500
|
+
y: {
|
|
1501
|
+
'left': pickEdge(yEdges, 'x', -1),
|
|
1502
|
+
'right': pickEdge(yEdges, 'x', +1)
|
|
1503
|
+
},
|
|
1504
|
+
x: {
|
|
1505
|
+
'top': pickEdge(xTopEdges, 'y', -1),
|
|
1506
|
+
'bottom': pickEdge(xBottomEdges, 'y', +1)
|
|
1507
|
+
},
|
|
1508
|
+
z: {
|
|
1509
|
+
'top': pickEdge(zTopEdges, 'y', -1),
|
|
1510
|
+
'bottom': pickEdge(zBottomEdges, 'y', +1)
|
|
1511
|
+
}
|
|
1512
|
+
};
|
|
1513
|
+
}
|
|
1514
|
+
else {
|
|
1515
|
+
ret.axes = {
|
|
1516
|
+
y: {
|
|
1517
|
+
'left': {
|
|
1518
|
+
x: xm, z: zm, xDir: { x: 1, y: 0, z: 0 }
|
|
1519
|
+
},
|
|
1520
|
+
'right': {
|
|
1521
|
+
x: xp, z: zm, xDir: { x: 0, y: 0, z: 1 }
|
|
1522
|
+
}
|
|
1523
|
+
},
|
|
1524
|
+
x: {
|
|
1525
|
+
'top': {
|
|
1526
|
+
y: ym, z: zm, xDir: { x: 1, y: 0, z: 0 }
|
|
1527
|
+
},
|
|
1528
|
+
'bottom': {
|
|
1529
|
+
y: yp,
|
|
1530
|
+
z: zm,
|
|
1531
|
+
xDir: { x: 1, y: 0, z: 0 }
|
|
1532
|
+
}
|
|
1533
|
+
},
|
|
1534
|
+
z: {
|
|
1535
|
+
'top': {
|
|
1536
|
+
x: defaultShowLeft ? xp : xm,
|
|
1537
|
+
y: ym,
|
|
1538
|
+
xDir: defaultShowLeft ?
|
|
1539
|
+
{ x: 0, y: 0, z: 1 } :
|
|
1540
|
+
{ x: 0, y: 0, z: -1 }
|
|
1541
|
+
},
|
|
1542
|
+
'bottom': {
|
|
1543
|
+
x: defaultShowLeft ? xp : xm,
|
|
1544
|
+
y: yp,
|
|
1545
|
+
xDir: defaultShowLeft ?
|
|
1546
|
+
{ x: 0, y: 0, z: 1 } :
|
|
1547
|
+
{ x: 0, y: 0, z: -1 }
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
};
|
|
1551
|
+
}
|
|
1552
|
+
return ret;
|
|
1553
|
+
}
|
|
1554
|
+
/**
|
|
1555
|
+
* Calculate scale of the 3D view. That is required to fit chart's 3D
|
|
1556
|
+
* projection into the actual plotting area. Reported as #4933.
|
|
1557
|
+
*
|
|
1558
|
+
* **Note:**
|
|
1559
|
+
* This function should ideally take the plot values instead of a chart
|
|
1560
|
+
* object, but since the chart object is needed for perspective it is
|
|
1561
|
+
* not practical. Possible to make both getScale and perspective more
|
|
1562
|
+
* logical and also immutable.
|
|
1563
|
+
*
|
|
1564
|
+
* @private
|
|
1565
|
+
* @function getScale
|
|
1566
|
+
*
|
|
1567
|
+
* @param {number} depth
|
|
1568
|
+
* The depth of the chart
|
|
1569
|
+
*
|
|
1570
|
+
* @return {number}
|
|
1571
|
+
* The scale to fit the 3D chart into the plotting area.
|
|
1572
|
+
*
|
|
1573
|
+
* @requires highcharts-3d
|
|
1574
|
+
*/
|
|
1575
|
+
getScale(depth) {
|
|
1576
|
+
const chart = this.chart, plotLeft = chart.plotLeft, plotRight = chart.plotWidth + plotLeft, plotTop = chart.plotTop, plotBottom = chart.plotHeight + plotTop, originX = plotLeft + chart.plotWidth / 2, originY = plotTop + chart.plotHeight / 2, bbox3d = {
|
|
1577
|
+
minX: Number.MAX_VALUE,
|
|
1578
|
+
maxX: -Number.MAX_VALUE,
|
|
1579
|
+
minY: Number.MAX_VALUE,
|
|
1580
|
+
maxY: -Number.MAX_VALUE
|
|
1581
|
+
};
|
|
1582
|
+
let corners, scale = 1;
|
|
1583
|
+
// Top left corners:
|
|
1584
|
+
corners = [{
|
|
1585
|
+
x: plotLeft,
|
|
1586
|
+
y: plotTop,
|
|
1587
|
+
z: 0
|
|
1588
|
+
}, {
|
|
1589
|
+
x: plotLeft,
|
|
1590
|
+
y: plotTop,
|
|
1591
|
+
z: depth
|
|
1592
|
+
}];
|
|
1593
|
+
// Top right corners:
|
|
1594
|
+
[0, 1].forEach(function (i) {
|
|
1595
|
+
corners.push({
|
|
1596
|
+
x: plotRight,
|
|
1597
|
+
y: corners[i].y,
|
|
1598
|
+
z: corners[i].z
|
|
1599
|
+
});
|
|
1600
|
+
});
|
|
1601
|
+
// All bottom corners:
|
|
1602
|
+
[0, 1, 2, 3].forEach(function (i) {
|
|
1603
|
+
corners.push({
|
|
1604
|
+
x: corners[i].x,
|
|
1605
|
+
y: plotBottom,
|
|
1606
|
+
z: corners[i].z
|
|
1607
|
+
});
|
|
1608
|
+
});
|
|
1609
|
+
// Calculate 3D corners:
|
|
1610
|
+
corners = perspective(corners, chart, false);
|
|
1611
|
+
// Get bounding box of 3D element:
|
|
1612
|
+
corners.forEach(function (corner) {
|
|
1613
|
+
bbox3d.minX = Math.min(bbox3d.minX, corner.x);
|
|
1614
|
+
bbox3d.maxX = Math.max(bbox3d.maxX, corner.x);
|
|
1615
|
+
bbox3d.minY = Math.min(bbox3d.minY, corner.y);
|
|
1616
|
+
bbox3d.maxY = Math.max(bbox3d.maxY, corner.y);
|
|
1617
|
+
});
|
|
1618
|
+
// Left edge:
|
|
1619
|
+
if (plotLeft > bbox3d.minX) {
|
|
1620
|
+
scale = Math.min(scale, 1 - Math.abs((plotLeft + originX) / (bbox3d.minX + originX)) % 1);
|
|
1621
|
+
}
|
|
1622
|
+
// Right edge:
|
|
1623
|
+
if (plotRight < bbox3d.maxX) {
|
|
1624
|
+
scale = Math.min(scale, (plotRight - originX) / (bbox3d.maxX - originX));
|
|
1625
|
+
}
|
|
1626
|
+
// Top edge:
|
|
1627
|
+
if (plotTop > bbox3d.minY) {
|
|
1628
|
+
if (bbox3d.minY < 0) {
|
|
1629
|
+
scale = Math.min(scale, (plotTop + originY) / (-bbox3d.minY + plotTop + originY));
|
|
1630
|
+
}
|
|
1631
|
+
else {
|
|
1632
|
+
scale = Math.min(scale, 1 - (plotTop + originY) / (bbox3d.minY + originY) % 1);
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
// Bottom edge:
|
|
1636
|
+
if (plotBottom < bbox3d.maxY) {
|
|
1637
|
+
scale = Math.min(scale, Math.abs((plotBottom - originY) / (bbox3d.maxY - originY)));
|
|
1638
|
+
}
|
|
1639
|
+
return scale;
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
Chart3D.Additions = Additions;
|
|
1643
|
+
})(Chart3D || (Chart3D = {}));
|
|
1644
|
+
/* *
|
|
1645
|
+
*
|
|
1646
|
+
* Default Export
|
|
1647
|
+
*
|
|
1648
|
+
* */
|
|
1649
|
+
export default Chart3D;
|
|
1650
|
+
/* *
|
|
1651
|
+
*
|
|
1652
|
+
* API Declarations
|
|
1653
|
+
*
|
|
1654
|
+
* */
|
|
1655
|
+
/**
|
|
1656
|
+
* Note: As of v5.0.12, `frame.left` or `frame.right` should be used instead.
|
|
1657
|
+
*
|
|
1658
|
+
* The side for the frame around a 3D chart.
|
|
1659
|
+
*
|
|
1660
|
+
* @deprecated
|
|
1661
|
+
* @since 4.0
|
|
1662
|
+
* @product highcharts
|
|
1663
|
+
* @requires highcharts-3d
|
|
1664
|
+
* @apioption chart.options3d.frame.side
|
|
1665
|
+
*/
|
|
1666
|
+
/**
|
|
1667
|
+
* The color of the panel.
|
|
1668
|
+
*
|
|
1669
|
+
* @deprecated
|
|
1670
|
+
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
|
|
1671
|
+
* @default transparent
|
|
1672
|
+
* @since 4.0
|
|
1673
|
+
* @product highcharts
|
|
1674
|
+
* @apioption chart.options3d.frame.side.color
|
|
1675
|
+
*/
|
|
1676
|
+
/**
|
|
1677
|
+
* The thickness of the panel.
|
|
1678
|
+
*
|
|
1679
|
+
* @deprecated
|
|
1680
|
+
* @type {number}
|
|
1681
|
+
* @default 1
|
|
1682
|
+
* @since 4.0
|
|
1683
|
+
* @product highcharts
|
|
1684
|
+
* @apioption chart.options3d.frame.side.size
|
|
1685
|
+
*/
|
|
1686
|
+
''; // Keeps doclets above in JS file
|