scichart 2.2.2417 → 3.0.0-beta.230

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.
Files changed (394) hide show
  1. package/Builder/buildDataSeries.d.ts +16 -1
  2. package/Builder/buildDataSeries.js +24 -1
  3. package/Builder/buildSeries.d.ts +60 -3
  4. package/Builder/buildSeries.js +28 -1
  5. package/Builder/buildSurface.d.ts +28 -2
  6. package/Builder/buildSurface.js +53 -31
  7. package/Builder/chartBuilder.d.ts +20 -7
  8. package/Builder/chartBuilder.js +37 -3
  9. package/Charting/ChartModifiers/ChartModifierBase.d.ts +21 -0
  10. package/Charting/ChartModifiers/ChartModifierBase.js +12 -0
  11. package/Charting/ChartModifiers/ChartModifierBase2D.js +2 -1
  12. package/Charting/ChartModifiers/CursorModifier.d.ts +92 -19
  13. package/Charting/ChartModifiers/CursorModifier.js +147 -58
  14. package/Charting/ChartModifiers/DataPointSelectionModifier.js +2 -1
  15. package/Charting/ChartModifiers/LegendModifier.js +2 -1
  16. package/Charting/ChartModifiers/ModifierMouseArgs.d.ts +6 -1
  17. package/Charting/ChartModifiers/ModifierMouseArgs.js +13 -3
  18. package/Charting/ChartModifiers/MouseWheelZoomModifier.d.ts +2 -2
  19. package/Charting/ChartModifiers/MouseWheelZoomModifier.js +16 -4
  20. package/Charting/ChartModifiers/OverviewRangeSelectionModifier.d.ts +2 -1
  21. package/Charting/ChartModifiers/OverviewRangeSelectionModifier.js +8 -4
  22. package/Charting/ChartModifiers/PinchZoomModifier.js +2 -1
  23. package/Charting/ChartModifiers/RolloverModifier.d.ts +43 -21
  24. package/Charting/ChartModifiers/RolloverModifier.js +48 -29
  25. package/Charting/ChartModifiers/RubberBandXyZoomModifier.d.ts +9 -6
  26. package/Charting/ChartModifiers/RubberBandXyZoomModifier.js +10 -8
  27. package/Charting/ChartModifiers/SeriesSelectionModifier.js +2 -1
  28. package/Charting/ChartModifiers/XAxisDragModifier.d.ts +1 -1
  29. package/Charting/ChartModifiers/XAxisDragModifier.js +2 -1
  30. package/Charting/ChartModifiers/YAxisDragModifier.d.ts +1 -1
  31. package/Charting/ChartModifiers/YAxisDragModifier.js +2 -1
  32. package/Charting/ChartModifiers/ZoomExtentsModifier.js +2 -1
  33. package/Charting/ChartModifiers/ZoomPanModifier.js +2 -1
  34. package/Charting/ChartModifiers/constants.d.ts +3 -1
  35. package/Charting/ChartModifiers/constants.js +2 -0
  36. package/Charting/Drawing/BatchRenderContext.d.ts +6 -0
  37. package/Charting/Drawing/BatchRenderContext.js +40 -0
  38. package/Charting/Drawing/RenderSurface.d.ts +2 -1
  39. package/Charting/Drawing/RenderSurface.js +3 -2
  40. package/Charting/Drawing/WebGlRenderContext2D.d.ts +19 -4
  41. package/Charting/Drawing/WebGlRenderContext2D.js +70 -41
  42. package/Charting/LayoutManager/BaseCenteredAxisLayoutStrategy.js +2 -1
  43. package/Charting/LayoutManager/BottomAlignedInnerAxisLayoutStrategy.js +1 -1
  44. package/Charting/LayoutManager/CentralAxesLayoutManager.js +2 -1
  45. package/Charting/LayoutManager/LayoutManager.d.ts +2 -1
  46. package/Charting/LayoutManager/LayoutManager.js +6 -5
  47. package/Charting/LayoutManager/LeftAlignedInnerAxisLayoutStrategy.js +1 -1
  48. package/Charting/LayoutManager/RightAlignedInnerAxisLayoutStrategy.js +1 -1
  49. package/Charting/LayoutManager/TopAlignedInnerAxisLayoutStrategy.js +1 -1
  50. package/Charting/Model/BaseDataSeries.d.ts +10 -1
  51. package/Charting/Model/BaseDataSeries.js +9 -8
  52. package/Charting/Model/BaseHeatmapDataSeries.d.ts +18 -5
  53. package/Charting/Model/BaseHeatmapDataSeries.js +21 -13
  54. package/Charting/Model/ChartData/SeriesInfo.d.ts +6 -0
  55. package/Charting/Model/ChartData/SeriesInfo.js +5 -0
  56. package/Charting/Model/ChartData/XyySeriesInfo.d.ts +2 -0
  57. package/Charting/Model/ChartData/XyySeriesInfo.js +2 -0
  58. package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.js +4 -3
  59. package/Charting/Model/Filters/HlcCustomFilter.js +12 -9
  60. package/Charting/Model/Filters/HlcFilterBase.js +2 -1
  61. package/Charting/Model/Filters/HlcScaleOffsetFilter.js +2 -1
  62. package/Charting/Model/Filters/OhlcCustomFilter.js +12 -9
  63. package/Charting/Model/Filters/OhlcScaleOffsetFilter.js +2 -1
  64. package/Charting/Model/Filters/XyCustomFilter.js +12 -9
  65. package/Charting/Model/Filters/XyFilterBase.d.ts +14 -5
  66. package/Charting/Model/Filters/XyFilterBase.js +47 -15
  67. package/Charting/Model/Filters/XyMovingAverageFilter.js +2 -1
  68. package/Charting/Model/Filters/XyRatioFilter.js +2 -1
  69. package/Charting/Model/Filters/XyScaleOffsetFilter.js +2 -1
  70. package/Charting/Model/Filters/XyyCustomFilter.js +12 -9
  71. package/Charting/Model/Filters/XyyFilterBase.js +2 -1
  72. package/Charting/Model/Filters/XyyScaleOffsetFilter.js +2 -1
  73. package/Charting/Model/Filters/XyzCustomFilter.js +12 -9
  74. package/Charting/Model/Filters/XyzFilterBase.js +2 -1
  75. package/Charting/Model/Filters/XyzScaleOffsetFilter.js +2 -1
  76. package/Charting/Model/IDataSeries.d.ts +9 -1
  77. package/Charting/Model/IDataSeries.js +8 -0
  78. package/Charting/Model/NonUniformHeatmapDataSeries.d.ts +112 -0
  79. package/Charting/Model/NonUniformHeatmapDataSeries.js +261 -0
  80. package/Charting/Model/PaletteFactory.d.ts +40 -4
  81. package/Charting/Model/PaletteFactory.js +37 -11
  82. package/Charting/Model/XyTextDataSeries.d.ts +121 -0
  83. package/Charting/Model/XyTextDataSeries.js +274 -0
  84. package/Charting/Numerics/CoordinateCalculators/CoordinateCalculatorBase.d.ts +1 -1
  85. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +1 -1
  86. package/Charting/Services/RenderPassData.d.ts +15 -5
  87. package/Charting/Services/RenderPassData.js +27 -5
  88. package/Charting/Services/SciChartRenderer.d.ts +2 -1
  89. package/Charting/Services/SciChartRenderer.js +91 -29
  90. package/Charting/Themes/IThemeProvider.d.ts +61 -0
  91. package/Charting/Themes/IThemeProvider.js +67 -1
  92. package/Charting/Themes/SciChartJSDarkTheme.d.ts +4 -0
  93. package/Charting/Themes/SciChartJSDarkTheme.js +6 -2
  94. package/Charting/Themes/SciChartJSDarkv2Theme.js +3 -0
  95. package/Charting/Themes/SciChartJSLightTheme.d.ts +8 -0
  96. package/Charting/Themes/SciChartJSLightTheme.js +8 -0
  97. package/Charting/Themes/SciChartJsNavyTheme.d.ts +10 -0
  98. package/Charting/Themes/SciChartJsNavyTheme.js +49 -0
  99. package/Charting/Visuals/Annotations/AdornerLayer.js +4 -8
  100. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +80 -7
  101. package/Charting/Visuals/Annotations/AnnotationBase.js +238 -28
  102. package/Charting/Visuals/Annotations/AnnotationClickEventArgs.d.ts +11 -0
  103. package/Charting/Visuals/Annotations/AnnotationClickEventArgs.js +12 -0
  104. package/Charting/Visuals/Annotations/AxisMarkerAnnotation.d.ts +1 -0
  105. package/Charting/Visuals/Annotations/AxisMarkerAnnotation.js +18 -19
  106. package/Charting/Visuals/Annotations/BoxAnnotation.d.ts +1 -0
  107. package/Charting/Visuals/Annotations/BoxAnnotation.js +69 -67
  108. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +2 -2
  109. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +20 -20
  110. package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +1 -1
  111. package/Charting/Visuals/Annotations/CustomAnnotation.js +3 -2
  112. package/Charting/Visuals/Annotations/HorizontalLineAnnotation.js +6 -3
  113. package/Charting/Visuals/Annotations/IAdornerProvider.d.ts +12 -0
  114. package/Charting/Visuals/Annotations/IAnnotation.d.ts +9 -0
  115. package/Charting/Visuals/Annotations/IAnnotation.js +9 -0
  116. package/Charting/Visuals/Annotations/LineAnnotation.d.ts +1 -0
  117. package/Charting/Visuals/Annotations/LineAnnotation.js +29 -35
  118. package/Charting/Visuals/Annotations/NativeTextAnnotation.d.ts +193 -0
  119. package/Charting/Visuals/Annotations/NativeTextAnnotation.js +536 -0
  120. package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.d.ts +4 -2
  121. package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.js +19 -14
  122. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.d.ts +2 -2
  123. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.js +9 -8
  124. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.d.ts +2 -2
  125. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +6 -6
  126. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +2 -2
  127. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +20 -21
  128. package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +13 -2
  129. package/Charting/Visuals/Annotations/SvgAnnotationBase.js +34 -42
  130. package/Charting/Visuals/Annotations/TextAnnotation.d.ts +2 -2
  131. package/Charting/Visuals/Annotations/TextAnnotation.js +41 -22
  132. package/Charting/Visuals/Annotations/VerticalLineAnnotation.js +6 -3
  133. package/Charting/Visuals/Annotations/annotationHelpers.d.ts +6 -6
  134. package/Charting/Visuals/Annotations/annotationHelpers.js +7 -6
  135. package/Charting/Visuals/Annotations/constants.d.ts +13 -1
  136. package/Charting/Visuals/Annotations/constants.js +12 -0
  137. package/Charting/Visuals/Axis/AxisBase2D.d.ts +24 -4
  138. package/Charting/Visuals/Axis/AxisBase2D.js +115 -38
  139. package/Charting/Visuals/Axis/AxisCore.d.ts +10 -5
  140. package/Charting/Visuals/Axis/AxisCore.js +11 -10
  141. package/Charting/Visuals/Axis/AxisRenderer.js +114 -20
  142. package/Charting/Visuals/Axis/CategoryAxis.js +2 -1
  143. package/Charting/Visuals/Axis/CategoryAxisBase.d.ts +15 -15
  144. package/Charting/Visuals/Axis/CategoryAxisBase.js +14 -12
  145. package/Charting/Visuals/Axis/DateTimeNumericAxis.js +2 -1
  146. package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +2 -1
  147. package/Charting/Visuals/Axis/LabelProvider/DateLabelProvider.js +2 -1
  148. package/Charting/Visuals/Axis/LabelProvider/LabelCache.js +2 -0
  149. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.d.ts +14 -0
  150. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +140 -33
  151. package/Charting/Visuals/Axis/LabelProvider/LogarithmicLabelProvider.js +2 -1
  152. package/Charting/Visuals/Axis/LabelProvider/NumericLabelProvider.js +2 -1
  153. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +2 -1
  154. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.d.ts +31 -1
  155. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +64 -42
  156. package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.d.ts +2 -2
  157. package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.js +16 -19
  158. package/Charting/Visuals/Axis/LogarithmicAxis.js +9 -6
  159. package/Charting/Visuals/Axis/NumericAxis.js +3 -3
  160. package/Charting/Visuals/Axis/constants.d.ts +1 -0
  161. package/Charting/Visuals/Axis/constants.js +1 -0
  162. package/Charting/Visuals/HeatmapLegend.d.ts +95 -0
  163. package/Charting/Visuals/HeatmapLegend.js +192 -0
  164. package/Charting/Visuals/Helpers/NativeObject.d.ts +15 -2
  165. package/Charting/Visuals/Helpers/NativeObject.js +72 -6
  166. package/Charting/Visuals/I2DSurfaceOptions.d.ts +46 -0
  167. package/Charting/Visuals/PointMarkers/BasePointMarker.d.ts +5 -0
  168. package/Charting/Visuals/PointMarkers/BasePointMarker.js +28 -0
  169. package/Charting/Visuals/PointMarkers/IPointMarker.d.ts +8 -0
  170. package/Charting/Visuals/RenderableSeries/Animations/BandAnimation.js +2 -1
  171. package/Charting/Visuals/RenderableSeries/Animations/BandAnimationStyle.js +2 -1
  172. package/Charting/Visuals/RenderableSeries/Animations/BubbleAnimation.js +2 -1
  173. package/Charting/Visuals/RenderableSeries/Animations/CandlestickAnimation.js +2 -1
  174. package/Charting/Visuals/RenderableSeries/Animations/CandlestickAnimationStyle.js +2 -1
  175. package/Charting/Visuals/RenderableSeries/Animations/ColumnAnimation.js +2 -1
  176. package/Charting/Visuals/RenderableSeries/Animations/ColumnAnimationStyle.js +2 -1
  177. package/Charting/Visuals/RenderableSeries/Animations/CustomPointMarkerStyle.js +2 -1
  178. package/Charting/Visuals/RenderableSeries/Animations/FadeAnimation.js +2 -1
  179. package/Charting/Visuals/RenderableSeries/Animations/LineAnimation.js +2 -1
  180. package/Charting/Visuals/RenderableSeries/Animations/MountainAnimation.js +2 -1
  181. package/Charting/Visuals/RenderableSeries/Animations/MountainAnimationStyle.js +2 -1
  182. package/Charting/Visuals/RenderableSeries/Animations/OhlcAnimation.js +2 -1
  183. package/Charting/Visuals/RenderableSeries/Animations/OhlcAnimationStyle.js +2 -1
  184. package/Charting/Visuals/RenderableSeries/Animations/PointMarkerStyle.js +2 -1
  185. package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.js +2 -1
  186. package/Charting/Visuals/RenderableSeries/Animations/ScatterAnimation.js +2 -1
  187. package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.d.ts +8 -2
  188. package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.js +3 -3
  189. package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.js +2 -1
  190. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +7 -0
  191. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +42 -10
  192. package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.d.ts +128 -0
  193. package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.js +201 -0
  194. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.d.ts +26 -0
  195. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.js +39 -3
  196. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.d.ts +7 -0
  197. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.js +17 -2
  198. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +2 -0
  199. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +15 -2
  200. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +10 -0
  201. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +93 -17
  202. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +8 -1
  203. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +21 -1
  204. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +1 -0
  205. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +4 -0
  206. package/Charting/Visuals/RenderableSeries/DataLabels/BandSeriesDataLabelProvider.d.ts +43 -0
  207. package/Charting/Visuals/RenderableSeries/DataLabels/BandSeriesDataLabelProvider.js +142 -0
  208. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.d.ts +92 -0
  209. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.js +129 -0
  210. package/Charting/Visuals/RenderableSeries/DataLabels/BubbleSeriesDataLabelProvider.d.ts +17 -0
  211. package/Charting/Visuals/RenderableSeries/DataLabels/BubbleSeriesDataLabelProvider.js +62 -0
  212. package/Charting/Visuals/RenderableSeries/DataLabels/ColumnSeriesDataLabelProvider.d.ts +47 -0
  213. package/Charting/Visuals/RenderableSeries/DataLabels/ColumnSeriesDataLabelProvider.js +125 -0
  214. package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.d.ts +71 -0
  215. package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.js +221 -0
  216. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelLayoutManager.d.ts +5 -0
  217. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelLayoutManager.js +2 -0
  218. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.d.ts +208 -0
  219. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +410 -0
  220. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.d.ts +40 -0
  221. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.js +141 -0
  222. package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.d.ts +63 -0
  223. package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.js +198 -0
  224. package/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider.d.ts +35 -0
  225. package/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider.js +92 -0
  226. package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.d.ts +12 -0
  227. package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.js +134 -0
  228. package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.d.ts +56 -0
  229. package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.js +167 -0
  230. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +0 -1
  231. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +1 -2
  232. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +5 -2
  233. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +47 -40
  234. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +1 -1
  235. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.d.ts +1 -0
  236. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +18 -5
  237. package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.d.ts +0 -1
  238. package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.js +14 -27
  239. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.d.ts +17 -4
  240. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +34 -11
  241. package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.d.ts +36 -0
  242. package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.js +493 -0
  243. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.d.ts +5 -2
  244. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +8 -5
  245. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformContoursDrawingProvider.js +4 -4
  246. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.d.ts +3 -0
  247. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +15 -4
  248. package/Charting/Visuals/RenderableSeries/FastBandRenderableSeries.js +2 -1
  249. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +21 -0
  250. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +40 -4
  251. package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.d.ts +2 -0
  252. package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.js +18 -3
  253. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +36 -2
  254. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.js +77 -8
  255. package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.js +2 -1
  256. package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.d.ts +7 -0
  257. package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.js +16 -4
  258. package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.js +2 -1
  259. package/Charting/Visuals/RenderableSeries/FastMountainRenderableSeries.js +2 -1
  260. package/Charting/Visuals/RenderableSeries/FastOhlcRenderableSeries.js +2 -1
  261. package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.d.ts +17 -0
  262. package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.js +45 -0
  263. package/Charting/Visuals/RenderableSeries/HeatmapColorMap.js +3 -2
  264. package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +35 -5
  265. package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +17 -1
  266. package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.d.ts +8 -0
  267. package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +7 -1
  268. package/Charting/Visuals/RenderableSeries/HitTest/NonUniformHeatmapHitTestProvider.d.ts +20 -0
  269. package/Charting/Visuals/RenderableSeries/HitTest/NonUniformHeatmapHitTestProvider.js +86 -0
  270. package/Charting/Visuals/RenderableSeries/HitTest/TextSeriesHitTestProvider.d.ts +6 -0
  271. package/Charting/Visuals/RenderableSeries/HitTest/TextSeriesHitTestProvider.js +56 -0
  272. package/Charting/Visuals/RenderableSeries/HitTest/UniformHeatmapHitTestProvider.js +1 -1
  273. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +7 -1
  274. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +34 -2
  275. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +6 -1
  276. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +12 -0
  277. package/Charting/Visuals/RenderableSeries/NonUniformHeatmapRenderableSeries.d.ts +74 -0
  278. package/Charting/Visuals/RenderableSeries/NonUniformHeatmapRenderableSeries.js +99 -0
  279. package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.d.ts +7 -2
  280. package/Charting/Visuals/RenderableSeries/ShaderEffect.js +2 -2
  281. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +2 -1
  282. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +2 -3
  283. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +2 -1
  284. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +2 -1
  285. package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +2 -1
  286. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.d.ts +3 -0
  287. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.js +13 -2
  288. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +4 -1
  289. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +7 -0
  290. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +33 -9
  291. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.d.ts +5 -0
  292. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.js +7 -1
  293. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.d.ts +2 -75
  294. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +8 -130
  295. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -0
  296. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +7 -1
  297. package/Charting/Visuals/RenderableSeries/constants.d.ts +5 -1
  298. package/Charting/Visuals/RenderableSeries/constants.js +4 -0
  299. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.js +3 -3
  300. package/Charting/Visuals/SciChartDefaults.d.ts +4 -0
  301. package/Charting/Visuals/SciChartDefaults.js +4 -0
  302. package/Charting/Visuals/SciChartOverview.js +5 -3
  303. package/Charting/Visuals/SciChartPieSurface/PieSegment/IPieSegment.d.ts +4 -0
  304. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.d.ts +13 -0
  305. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +22 -4
  306. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.d.ts +2 -1
  307. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.js +1 -0
  308. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +5 -0
  309. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +17 -19
  310. package/Charting/Visuals/SciChartSurface.d.ts +238 -7
  311. package/Charting/Visuals/SciChartSurface.js +800 -28
  312. package/Charting/Visuals/SciChartSurfaceBase.d.ts +16 -1
  313. package/Charting/Visuals/SciChartSurfaceBase.js +34 -2
  314. package/Charting/Visuals/TextureManager/CanvasTexture.js +1 -1
  315. package/Charting/Visuals/TextureManager/DpiHelper.js +3 -7
  316. package/Charting/Visuals/TextureManager/TextureManager.d.ts +11 -0
  317. package/Charting/Visuals/TextureManager/TextureManager.js +37 -1
  318. package/Charting/Visuals/createMaster.js +7 -10
  319. package/Charting/Visuals/createSingle.js +2 -0
  320. package/Charting/Visuals/licenseManager2D.js +9 -9
  321. package/Charting/Visuals/sciChartInitCommon.js +16 -12
  322. package/Charting3D/CameraController.d.ts +5 -0
  323. package/Charting3D/CameraController.js +6 -0
  324. package/Charting3D/ChartModifiers/ResetCamera3DModifier.js +2 -1
  325. package/Charting3D/Visuals/Axis/AxisBase3D.js +7 -5
  326. package/Charting3D/Visuals/Axis/NumericAxis3D.js +2 -1
  327. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.d.ts +4 -0
  328. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +7 -0
  329. package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.js +6 -4
  330. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.d.ts +7 -2
  331. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +3 -2
  332. package/Charting3D/Visuals/RenderableSeries/SurfaceMesh/SurfaceMeshRenderableSeries3D.d.ts +0 -5
  333. package/Charting3D/Visuals/RenderableSeries/SurfaceMesh/SurfaceMeshRenderableSeries3D.js +12 -11
  334. package/Charting3D/Visuals/SciChart3DSurface.d.ts +2 -2
  335. package/Charting3D/Visuals/SciChart3DSurface.js +18 -11
  336. package/Charting3D/Visuals/createMaster3d.js +10 -18
  337. package/Charting3D/Visuals/createSingle3d.js +12 -10
  338. package/Core/Animations/GenericAnimation.d.ts +2 -0
  339. package/Core/Animations/GenericAnimation.js +3 -0
  340. package/Core/Animations/NumberRangeAnimator.js +7 -2
  341. package/Core/BuildStamp.d.ts +1 -1
  342. package/Core/BuildStamp.js +2 -2
  343. package/Core/Mouse/MouseManager.d.ts +20 -0
  344. package/Core/Mouse/MouseManager.js +201 -30
  345. package/Core/Telemetry.js +1 -1
  346. package/README.md +91 -403
  347. package/_wasm/scichart.browser.js +1 -1
  348. package/_wasm/scichart2d.data +0 -0
  349. package/_wasm/scichart2d.js +280 -267
  350. package/_wasm/scichart2d.wasm +0 -0
  351. package/_wasm/scichart3d.data +0 -0
  352. package/_wasm/scichart3d.js +280 -268
  353. package/_wasm/scichart3d.wasm +0 -0
  354. package/constants/performanceWarnings.d.ts +2 -0
  355. package/constants/performanceWarnings.js +3 -1
  356. package/package.json +2 -2
  357. package/types/AutoColorMode.d.ts +9 -0
  358. package/types/AutoColorMode.js +13 -0
  359. package/types/BaseType.d.ts +3 -1
  360. package/types/BaseType.js +2 -0
  361. package/types/DataLabelProviderType.d.ts +15 -0
  362. package/types/DataLabelProviderType.js +19 -0
  363. package/types/DataLabelSkipMode.d.ts +21 -0
  364. package/types/DataLabelSkipMode.js +25 -0
  365. package/types/DefaultRenderLayer.d.ts +10 -0
  366. package/types/DefaultRenderLayer.js +14 -0
  367. package/types/MousePosition.d.ts +1 -1
  368. package/types/MousePosition.js +1 -1
  369. package/types/SeriesType.d.ts +7 -1
  370. package/types/SeriesType.js +6 -0
  371. package/types/SvgClippingMode.d.ts +17 -0
  372. package/types/SvgClippingMode.js +21 -0
  373. package/types/TDataLabelStyle.d.ts +16 -0
  374. package/types/TDataLabelStyle.js +2 -0
  375. package/types/TSciChart.d.ts +214 -118
  376. package/types/TSciChart3D.d.ts +104 -70
  377. package/types/TextPosition.d.ts +17 -0
  378. package/types/TextPosition.js +39 -0
  379. package/types/ThemeProviderType.d.ts +3 -1
  380. package/types/ThemeProviderType.js +2 -0
  381. package/utils/ccall/appendDoubleVectorFromJsArray.d.ts +10 -1
  382. package/utils/ccall/appendDoubleVectorFromJsArray.js +24 -1
  383. package/utils/memoize.d.ts +1 -0
  384. package/utils/memoize.js +26 -0
  385. package/utils/number.d.ts +1 -0
  386. package/utils/number.js +5 -1
  387. package/utils/parseColor.d.ts +2 -0
  388. package/utils/parseColor.js +3 -3
  389. package/utils/text.d.ts +5 -0
  390. package/utils/text.js +48 -0
  391. package/utils/translate.d.ts +12 -2
  392. package/utils/translate.js +67 -11
  393. package/utils/zeroArray2D.d.ts +5 -0
  394. package/utils/zeroArray2D.js +5 -0
@@ -26,10 +26,11 @@ var __assign = (this && this.__assign) || function () {
26
26
  return __assign.apply(this, arguments);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.SciChartSurface = exports.sciChartConfig = void 0;
29
+ exports.SciChartSubSurface = exports.SciChartSurface = exports.sciChartConfig = void 0;
30
30
  var chartBuilder_1 = require("../../Builder/chartBuilder");
31
31
  var classFactory_1 = require("../../Builder/classFactory");
32
32
  var app_1 = require("../../constants/app");
33
+ var performanceWarnings_1 = require("../../constants/performanceWarnings");
33
34
  var EasingFunctions_1 = require("../../Core/Animations/EasingFunctions");
34
35
  var BuildStamp_1 = require("../../Core/BuildStamp");
35
36
  var Deleter_1 = require("../../Core/Deleter");
@@ -38,11 +39,17 @@ var EventHandler_1 = require("../../Core/EventHandler");
38
39
  var ObservableArray_1 = require("../../Core/ObservableArray");
39
40
  var Rect_1 = require("../../Core/Rect");
40
41
  var Thickness_1 = require("../../Core/Thickness");
42
+ var AutoColorMode_1 = require("../../types/AutoColorMode");
41
43
  var BaseType_1 = require("../../types/BaseType");
42
44
  var SeriesType_1 = require("../../types/SeriesType");
43
45
  var Size_1 = require("../../types/Size");
46
+ var SvgClippingMode_1 = require("../../types/SvgClippingMode");
44
47
  var ZoomState_1 = require("../../types/ZoomState");
48
+ var parseColor_1 = require("../../utils/parseColor");
49
+ var translate_1 = require("../../utils/translate");
45
50
  var ChartModifierBase_1 = require("../ChartModifiers/ChartModifierBase");
51
+ var BatchRenderContext_1 = require("../Drawing/BatchRenderContext");
52
+ var BrushCache_1 = require("../Drawing/BrushCache");
46
53
  var RenderContext2D_1 = require("../Drawing/RenderContext2D");
47
54
  var RenderSurface_1 = require("../Drawing/RenderSurface");
48
55
  var SolidBrushCache_1 = require("../Drawing/SolidBrushCache");
@@ -50,14 +57,21 @@ var LayoutManager_1 = require("../LayoutManager/LayoutManager");
50
57
  var SciChartRenderer_1 = require("../Services/SciChartRenderer");
51
58
  var TextureWorker_1 = require("../Services/Workers/TextureWorker");
52
59
  var AdornerLayer_1 = require("./Annotations/AdornerLayer");
60
+ var AnnotationBase_1 = require("./Annotations/AnnotationBase");
61
+ var AxisBase2D_1 = require("./Axis/AxisBase2D");
62
+ var AxisCore_1 = require("./Axis/AxisCore");
53
63
  var createMaster_1 = require("./createMaster");
54
64
  var createSingle_1 = require("./createSingle");
65
+ var createNativeRect_1 = require("./Helpers/createNativeRect");
55
66
  var drawBorder_1 = require("./Helpers/drawBorder");
67
+ var NativeObject_1 = require("./Helpers/NativeObject");
56
68
  var StackedColumnCollection_1 = require("./RenderableSeries/StackedColumnCollection");
57
69
  var StackedMountainCollection_1 = require("./RenderableSeries/StackedMountainCollection");
58
70
  var sciChartInitCommon_1 = require("./sciChartInitCommon");
59
71
  var SciChartSurfaceBase_1 = require("./SciChartSurfaceBase");
60
72
  var DpiHelper_1 = require("./TextureManager/DpiHelper");
73
+ var UpdateSuspender_1 = require("./UpdateSuspender");
74
+ var Point_1 = require("../../Core/Point");
61
75
  exports.sciChartConfig = {};
62
76
  // To force the worker to be created before it is needed, so we know if it alive or not
63
77
  var t = TextureWorker_1.textureWorker;
@@ -88,16 +102,35 @@ var SciChartSurface = /** @class */ (function (_super) {
88
102
  * @param options optional parameters of type {@link ISciChartSurfaceOptions} used to configure the {@link SciChartSurface}
89
103
  */
90
104
  function SciChartSurface(webAssemblyContext, options) {
91
- var _a, _b, _c, _d;
92
- var _this = _super.call(this, webAssemblyContext, options === null || options === void 0 ? void 0 : options.canvases) || this;
105
+ var _this = this;
106
+ var _a, _b, _c, _d, _e;
107
+ _this = _super.call(this, webAssemblyContext, options === null || options === void 0 ? void 0 : options.canvases) || this;
93
108
  /**
94
- * An event handler which notifies its subsribers when a render operation has finished. Use this
109
+ * An event handler which notifies its subscribers when a render operation has finished. Use this
95
110
  * to time render performance, or to update elements of the chart or your UI on redraw.
96
111
  */
97
112
  _this.rendered = new EventHandler_1.EventHandler();
113
+ /**
114
+ * An event handler which notifies its subscribers when a render operation starts. Use this
115
+ * to update elements of the chart for the current render. Any updates made here will not trigger a subsequent render.
116
+ */
117
+ _this.preRender = new EventHandler_1.EventHandler();
118
+ // TODO make these properties internal only; or add some provider
119
+ _this.layersOffset = 0;
120
+ _this.stepBetweenLayers = 10;
121
+ _this.isSubSurface = false;
122
+ /**
123
+ * Sets / Gets the clipping mode for SVG Annotations
124
+ */
125
+ _this.svgClippingMode = SvgClippingMode_1.ESvgClippingMode.SeriesViewRect;
126
+ /**
127
+ * Normally, native labels are drawn all at once at the end of the render cycle to improve performance.
128
+ * In circumstances where you want to draw over the labels, eg with a subchart, set this true to have them drawn earlier.
129
+ */
130
+ _this.renderNativeAxisLabelsImmediately = false;
98
131
  _this.animationList = [];
99
- _this.zoomStateProperty = ZoomState_1.EZoomState.AtExtents;
100
132
  _this.paddingProperty = Thickness_1.Thickness.fromNumber(10);
133
+ _this.zoomStateProperty = ZoomState_1.EZoomState.AtExtents;
101
134
  _this.viewportBorderProperty = {
102
135
  borderBottom: undefined,
103
136
  borderLeft: undefined,
@@ -114,7 +147,13 @@ var SciChartSurface = /** @class */ (function (_super) {
114
147
  color: "#00000000",
115
148
  border: undefined
116
149
  };
150
+ _this.subChartsProperty = [];
117
151
  _this.drawSeriesBehindAxisProperty = false;
152
+ _this.autoColorModeProperty = AutoColorMode_1.EAutoColorMode.OnAddRemoveSeries;
153
+ _this.autoColorRequired = true;
154
+ _this.xCoordSvgTrans = 0;
155
+ _this.yCoordSvgTrans = 0;
156
+ _this.subChartCounter = 0;
118
157
  var canvasWidth = (_b = (_a = _this.domCanvas2D) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : app_1.DEFAULT_WIDTH;
119
158
  var canvasHeight = (_d = (_c = _this.domCanvas2D) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : app_1.DEFAULT_HEIGHT;
120
159
  _this.webAssemblyContext2D = webAssemblyContext;
@@ -133,7 +172,7 @@ var SciChartSurface = /** @class */ (function (_super) {
133
172
  var viewportSize = _this.domCanvas2D
134
173
  ? new Size_1.Size(canvasWidth, canvasHeight)
135
174
  : new Size_1.Size(app_1.DEFAULT_WIDTH, app_1.DEFAULT_HEIGHT);
136
- _this.renderSurface = new RenderSurface_1.RenderSurface(webAssemblyContext, viewportSize);
175
+ _this.renderSurface = new RenderSurface_1.RenderSurface(webAssemblyContext, viewportSize, (_e = _this.domCanvas2D) === null || _e === void 0 ? void 0 : _e.id);
137
176
  _this.renderSurface.handleDraw = _this.onRenderSurfaceDraw;
138
177
  _this.sciChartRenderer = new SciChartRenderer_1.SciChartRenderer(_this);
139
178
  _this.layoutManager = new LayoutManager_1.LayoutManager();
@@ -191,7 +230,6 @@ var SciChartSurface = /** @class */ (function (_super) {
191
230
  _this.watermarkProperties.SetOpacity(0.5);
192
231
  webAssemblyContext.SCRTSetWaterMarkProperties(_this.watermarkProperties);
193
232
  }
194
- _this.applySciChartBackground(SciChartSurfaceBase_1.SciChartSurfaceBase.DEFAULT_THEME.sciChartBackground);
195
233
  return _this;
196
234
  }
197
235
  /**
@@ -214,7 +252,9 @@ var SciChartSurface = /** @class */ (function (_super) {
214
252
  }
215
253
  };
216
254
  /**
217
- * USED INTERNALLY - performs a similar operation to {@link SciChartSurface.create} but used internally for testing
255
+ * Performs a similar operation to {@link SciChartSurface.create} but uses a dedicated WebAssembly context for this chart, and draws directly to the target canvas
256
+ * This provides better performance for a single chart, but there is a limit (16) to how many you can have on one page.
257
+ * If you need large numbers of charts all updating at the same time, use this, together with {@link addSubChart} to create many charts on one surface.
218
258
  * @param divElement The Div Element ID or reference where the {@link SciChartSurface} will reside
219
259
  * @param options - optional parameters for chart creation. See {@link I2DSurfaceOptions} for more details
220
260
  */
@@ -268,6 +308,76 @@ var SciChartSurface = /** @class */ (function (_super) {
268
308
  return resolve({ wasmContext: sciChartSurface.webAssemblyContext2D, sciChartSurface: sciChartSurface });
269
309
  });
270
310
  };
311
+ /**
312
+ * Add another chart to an existing surface.
313
+ * This is a performance optimization if you need to have multiple charts all updating together, eg because they have synced axes.
314
+ * We suggest you use SciChartSurface.createSingle for the parent surface. The parent surface does not have to have any chart elements defined.
315
+ * The position property required in the options determines the placement and size of the subchart. Its values are interpreted differently depending on the coordinateMode
316
+ * Modifiers using modifierGroup will work across other subcharts on the surface, but not to any other surface.
317
+ */
318
+ SciChartSurface.prototype.addSubChart = function (options) {
319
+ var optionsBase = SciChartSurface.resolveOptions(options);
320
+ options = __assign(__assign({}, options), optionsBase);
321
+ this.subChartCounter++;
322
+ var divElementId = this.domChartRoot.id + "_" + this.subChartCounter.toString();
323
+ var chartRoot = this.domChartRoot;
324
+ var width = chartRoot.clientWidth;
325
+ var height = chartRoot.clientHeight;
326
+ // SVG Root Element
327
+ var svgRootElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
328
+ svgRootElement.id = "".concat(divElementId, "_SVG");
329
+ svgRootElement.setAttribute("width", width.toString());
330
+ svgRootElement.setAttribute("height", height.toString());
331
+ svgRootElement.setAttribute("role", "img");
332
+ svgRootElement.setAttribute("xmlns", "http://www.w3.org/2000/svg");
333
+ svgRootElement.style.position = "absolute";
334
+ svgRootElement.style.left = "0";
335
+ svgRootElement.style.top = "0";
336
+ svgRootElement.style.display = "block";
337
+ svgRootElement.style.pointerEvents = "none";
338
+ chartRoot.appendChild(svgRootElement);
339
+ var canvases = {
340
+ domChartRoot: this.domChartRoot,
341
+ domCanvasWebGL: this.domCanvasWebGL,
342
+ domCanvas2D: this.domCanvas2D,
343
+ domSvgContainer: svgRootElement,
344
+ domSvgAdornerLayer: this.domSvgAdornerLayer,
345
+ domDivContainer: this.domDivContainer
346
+ };
347
+ var subSurface = new SciChartSubSurface(this.webAssemblyContext2D, {
348
+ canvases: canvases,
349
+ parentSurface: this,
350
+ subSurfaceOptions: options
351
+ });
352
+ if (options === null || options === void 0 ? void 0 : options.theme) {
353
+ subSurface.applyTheme(options.theme);
354
+ }
355
+ // subcharts get mouse events from parent
356
+ subSurface.mouseManager.unsubscribe();
357
+ this.subChartsProperty.push(subSurface);
358
+ this.onAttachSubSurface(subSurface);
359
+ return subSurface;
360
+ };
361
+ /**
362
+ * Remove an existing subChart from a parent surface. See {@link addSubChart}
363
+ */
364
+ SciChartSurface.prototype.removeSubChart = function (subChart) {
365
+ var index = this.subChartsProperty.findIndex(function (s) { return s === subChart; });
366
+ if (index > -1) {
367
+ this.subChartsProperty.splice(index, 1);
368
+ subChart.delete();
369
+ }
370
+ };
371
+ Object.defineProperty(SciChartSurface.prototype, "subCharts", {
372
+ /**
373
+ * The list of subCharts on this surface. See {@link addSubChart}
374
+ */
375
+ get: function () {
376
+ return this.subChartsProperty;
377
+ },
378
+ enumerable: false,
379
+ configurable: true
380
+ });
271
381
  Object.defineProperty(SciChartSurface.prototype, "surfaceType", {
272
382
  /**
273
383
  * @inheritDoc
@@ -296,6 +406,23 @@ var SciChartSurface = /** @class */ (function (_super) {
296
406
  enumerable: false,
297
407
  configurable: true
298
408
  });
409
+ Object.defineProperty(SciChartSurface.prototype, "dataLabelLayoutManager", {
410
+ /**
411
+ * Gets or sets the {@link ISeriesTextLayoutManager} for performing text layout across multiple series
412
+ */
413
+ get: function () {
414
+ return this.dataLabelLayoutManagerProperty;
415
+ },
416
+ /**
417
+ * Used internally - gets or sets the {@link ISeriesTextLayoutManager} for performing text layout across multiple series
418
+ */
419
+ set: function (value) {
420
+ this.dataLabelLayoutManagerProperty = value;
421
+ this.invalidateElement();
422
+ },
423
+ enumerable: false,
424
+ configurable: true
425
+ });
299
426
  Object.defineProperty(SciChartSurface.prototype, "padding", {
300
427
  /**
301
428
  * Gets or sets the Padding between the SciChartSurface and it's inner elements, in order top, right, bottom, left
@@ -313,8 +440,10 @@ var SciChartSurface = /** @class */ (function (_super) {
313
440
  * set a new Thickness when you want to change the padding.
314
441
  */
315
442
  set: function (padding) {
316
- this.paddingProperty = padding;
317
- this.invalidateElement();
443
+ if (!this.paddingProperty.equals(padding)) {
444
+ this.paddingProperty = padding;
445
+ this.invalidateElement();
446
+ }
318
447
  },
319
448
  enumerable: false,
320
449
  configurable: true
@@ -349,6 +478,29 @@ var SciChartSurface = /** @class */ (function (_super) {
349
478
  enumerable: false,
350
479
  configurable: true
351
480
  });
481
+ Object.defineProperty(SciChartSurface.prototype, "autoColorMode", {
482
+ /**
483
+ * Gets or sets the EAutoColorMode which determines when resolution of AUTO_COLOR should occur
484
+ */
485
+ get: function () {
486
+ return this.autoColorModeProperty;
487
+ },
488
+ /**
489
+ * Gets or sets the EAutoColorMode which determines when resolution of AUTO_COLOR should occur
490
+ */
491
+ set: function (autoColorMode) {
492
+ this.autoColorModeProperty = autoColorMode;
493
+ if (autoColorMode !== AutoColorMode_1.EAutoColorMode.Never && !this.autoColorRequired) {
494
+ this.autoColorRequired = true;
495
+ }
496
+ else if (autoColorMode === AutoColorMode_1.EAutoColorMode.Never) {
497
+ this.autoColorRequired = false;
498
+ }
499
+ this.invalidateElement();
500
+ },
501
+ enumerable: false,
502
+ configurable: true
503
+ });
352
504
  /**
353
505
  * @inheritDoc
354
506
  */
@@ -383,8 +535,9 @@ var SciChartSurface = /** @class */ (function (_super) {
383
535
  this.domSvgAdornerLayer.setAttribute("width", pixelWidth.toString());
384
536
  this.domSvgAdornerLayer.setAttribute("height", pixelHeight.toString());
385
537
  }
386
- if (this.domDivContainer) {
387
- this.domDivContainer.style.height = "".concat(pixelHeight, "px");
538
+ for (var _i = 0, _a = this.subChartsProperty; _i < _a.length; _i++) {
539
+ var chart = _a[_i];
540
+ chart.updateSubLayout();
388
541
  }
389
542
  this.invalidateElement();
390
543
  };
@@ -402,14 +555,43 @@ var SciChartSurface = /** @class */ (function (_super) {
402
555
  this.renderSurface.invalidateElement(canvasId);
403
556
  };
404
557
  // Step_5: Get context and pass drawing to SciChartRenderer
405
- SciChartSurface.prototype.doDrawingLoop = function () {
406
- var context = this.renderSurface.getRenderContext();
558
+ SciChartSurface.prototype.doDrawingLoop = function (context) {
559
+ context = context !== null && context !== void 0 ? context : this.renderSurface.getRenderContext();
407
560
  try {
408
- // console.log("Drawing ", this.domChartRoot.id);
561
+ var sus = new UpdateSuspender_1.UpdateSuspender(this, false); // Don't want to invalidate on resume
562
+ try {
563
+ if (this.autoColorRequired &&
564
+ this.themeProvider.strokePalette &&
565
+ this.themeProvider.strokePalette.length > 0) {
566
+ this.resolveAutoColors();
567
+ if (this.autoColorMode !== AutoColorMode_1.EAutoColorMode.Always) {
568
+ this.autoColorRequired = false;
569
+ }
570
+ }
571
+ this.preRender.raiseEvent(context);
572
+ }
573
+ catch (err) {
574
+ console.error(err);
575
+ }
576
+ finally {
577
+ sus.resume();
578
+ }
409
579
  this.sciChartRenderer.render(context);
410
580
  }
411
581
  catch (err) {
412
- console.error("Error from chart in div ".concat(this.domChartRoot.id), err);
582
+ // @ts-ignore
583
+ if (err.name === "BindingError") {
584
+ console.error(err);
585
+ console.warn("Binding errors can occur if a previous chart using the same div id was not deleted correctly, or if you try to share data or series between charts that use different webassembly contexts.");
586
+ (0, NativeObject_1.freeCache)(this.webAssemblyContext2D);
587
+ }
588
+ else if (this.domChartRoot) {
589
+ console.error("Error from chart in div ".concat(this.domChartRoot.id), err);
590
+ }
591
+ else {
592
+ // Surface the error for tests
593
+ throw err;
594
+ }
413
595
  }
414
596
  };
415
597
  /**
@@ -418,6 +600,11 @@ var SciChartSurface = /** @class */ (function (_super) {
418
600
  SciChartSurface.prototype.delete = function (clearHtml) {
419
601
  if (clearHtml === void 0) { clearHtml = true; }
420
602
  _super.prototype.delete.call(this);
603
+ for (var _i = 0, _a = this.subChartsProperty; _i < _a.length; _i++) {
604
+ var chart = _a[_i];
605
+ chart.delete();
606
+ }
607
+ this.subChartsProperty = [];
421
608
  this.renderableSeries.asArray().forEach(function (rs) { return rs.delete(); });
422
609
  this.renderableSeries.clear();
423
610
  this.xAxes.asArray().forEach(function (xAxis) { return xAxis.delete(); });
@@ -452,6 +639,8 @@ var SciChartSurface = /** @class */ (function (_super) {
452
639
  this.renderableSeries.asArray().forEach(function (rs) { return rs.onDpiChanged(args); });
453
640
  this.annotations.asArray().forEach(function (a) { return a.onDpiChanged(args); });
454
641
  this.modifierAnnotations.asArray().forEach(function (a) { return a.onDpiChanged(args); });
642
+ this.xAxes.asArray().forEach(function (a) { return a.onDpiChanged(); });
643
+ this.yAxes.asArray().forEach(function (a) { return a.onDpiChanged(); });
455
644
  // Force a viewport size change as size-changed may not fire when parent div has width, height
456
645
  this.changeViewportSize((_a = this.getMainCanvas()) === null || _a === void 0 ? void 0 : _a.clientWidth, (_b = this.getMainCanvas()) === null || _b === void 0 ? void 0 : _b.clientHeight);
457
646
  _super.prototype.onDpiChanged.call(this, args);
@@ -461,20 +650,28 @@ var SciChartSurface = /** @class */ (function (_super) {
461
650
  * @param axisId The AxisId to search for
462
651
  */
463
652
  SciChartSurface.prototype.getXAxisById = function (axisId) {
464
- return this.xAxes.asArray().find(function (x) { return x.id === axisId; });
653
+ var axis = this.xAxes.getById(axisId);
654
+ if (!axis && axisId === AxisCore_1.AxisCore.DEFAULT_AXIS_ID && this.xAxes.size() > 0) {
655
+ axis = this.xAxes.get(0);
656
+ }
657
+ return axis;
465
658
  };
466
659
  /**
467
660
  * Gets the {@link AxisBase2D | YAxis} which matches the axisId. Returns undefined if not axis found
468
661
  * @param axisId The AxisId to search for
469
662
  */
470
663
  SciChartSurface.prototype.getYAxisById = function (axisId) {
471
- return this.yAxes.asArray().find(function (y) { return y.id === axisId; });
664
+ var axis = this.yAxes.getById(axisId);
665
+ if (!axis && axisId === AxisCore_1.AxisCore.DEFAULT_AXIS_ID && this.yAxes.size() > 0) {
666
+ axis = this.yAxes.get(0);
667
+ }
668
+ return axis;
472
669
  };
473
670
  /**
474
671
  * Update accumulated vectors for all stacked collections
475
672
  */
476
673
  SciChartSurface.prototype.updateStackedCollectionAccumulatedVectors = function () {
477
- var stackedCollection = this.renderableSeries.asArray().filter(function (el) { return el.isStacked; });
674
+ var stackedCollection = this.renderableSeries.asArray().filter(function (el) { return el.isStacked && "size" in el; });
478
675
  stackedCollection.forEach(function (el) { return el.updateAccumulatedVectors(); });
479
676
  };
480
677
  /**
@@ -525,10 +722,14 @@ var SciChartSurface = /** @class */ (function (_super) {
525
722
  * @inheritDoc
526
723
  */
527
724
  SciChartSurface.prototype.updateWatermark = function (left, bottom) {
725
+ var _a;
528
726
  if (!app_1.IS_TEST_ENV) {
529
727
  this.watermarkPropertyPosition.x = left;
530
728
  this.watermarkPropertyPosition.y = bottom;
729
+ this.watermarkProperties.m_fCanvasWidth = this.renderSurface.viewportSize.width;
531
730
  this.watermarkProperties.SetPosition(this.watermarkPropertyPosition);
731
+ var isLightBackground = (_a = this.themeProvider) === null || _a === void 0 ? void 0 : _a.isLightBackground;
732
+ this.watermarkProperties.m_bIsDarkBackground = isLightBackground !== undefined ? !isLightBackground : false;
532
733
  this.webAssemblyContext2D.SCRTSetWaterMarkProperties(this.watermarkProperties);
533
734
  }
534
735
  };
@@ -715,10 +916,15 @@ var SciChartSurface = /** @class */ (function (_super) {
715
916
  * Multiple animations will be run in parallel, so if you want to run one after another, use the onCompleted callback
716
917
  * to add another animation after the first completes
717
918
  */
718
- SciChartSurface.prototype.addAnimation = function (animation) {
719
- if (!animation)
919
+ SciChartSurface.prototype.addAnimation = function () {
920
+ var _this = this;
921
+ var animations = [];
922
+ for (var _i = 0; _i < arguments.length; _i++) {
923
+ animations[_i] = arguments[_i];
924
+ }
925
+ if (animations === undefined)
720
926
  return;
721
- this.animationList.push(animation);
927
+ animations.forEach(function (a) { return _this.animationList.push(a); });
722
928
  this.invalidateElement();
723
929
  };
724
930
  Object.defineProperty(SciChartSurface.prototype, "isRunningAnimation", {
@@ -751,6 +957,47 @@ var SciChartSurface = /** @class */ (function (_super) {
751
957
  var bottom = (this.domCanvas2D.height - seriesViewRect.bottom) / divider;
752
958
  return new Thickness_1.Thickness(top, right, bottom, left);
753
959
  };
960
+ /** Calls resolveAutoColors on each series to resolve colors marked as auto based on the seriesColorPalette */
961
+ SciChartSurface.prototype.resolveAutoColors = function (maxSeries) {
962
+ if (!maxSeries) {
963
+ var stackedCollections = this.renderableSeries
964
+ .asArray()
965
+ .filter(function (el) { return el.isStacked && "size" in el; });
966
+ maxSeries = this.renderableSeries.size() - stackedCollections.length;
967
+ for (var _i = 0, stackedCollections_1 = stackedCollections; _i < stackedCollections_1.length; _i++) {
968
+ var sc = stackedCollections_1[_i];
969
+ maxSeries += sc.size();
970
+ }
971
+ }
972
+ var index = 0;
973
+ for (var i = 0; i < this.renderableSeries.size(); i++) {
974
+ var rs = this.renderableSeries.get(i);
975
+ if (rs) {
976
+ rs.resolveAutoColors(index, maxSeries, this.themeProvider);
977
+ }
978
+ if (rs.isStacked && "size" in rs) {
979
+ index += rs.size();
980
+ }
981
+ else {
982
+ index += 1;
983
+ }
984
+ }
985
+ };
986
+ /**
987
+ * Used internally - sets SVG Canvas Translation
988
+ * @param x
989
+ * @param y
990
+ */
991
+ SciChartSurface.prototype.setCoordSvgTranslation = function (x, y) {
992
+ this.xCoordSvgTrans = x;
993
+ this.yCoordSvgTrans = y;
994
+ };
995
+ /**
996
+ * Gets SVG Canvas Translation, used to draw on SVG Canvas using different {@link ESvgClippingMode}
997
+ */
998
+ SciChartSurface.prototype.getCoordSvgTranslation = function () {
999
+ return new Point_1.Point(this.xCoordSvgTrans, this.yCoordSvgTrans);
1000
+ };
754
1001
  /**
755
1002
  * Convert the object to a definition that can be serialized to JSON, or used directly with the builder api
756
1003
  * @param excludeData if set true, data values will not be included in the json.
@@ -767,6 +1014,7 @@ var SciChartSurface = /** @class */ (function (_super) {
767
1014
  theme = this.themeProvider;
768
1015
  }
769
1016
  var options = {
1017
+ id: this.id,
770
1018
  canvasBorder: this.canvasBorder,
771
1019
  heightAspect: this.heightAspect,
772
1020
  widthAspect: this.widthAspect,
@@ -774,7 +1022,10 @@ var SciChartSurface = /** @class */ (function (_super) {
774
1022
  padding: this.padding,
775
1023
  theme: theme,
776
1024
  viewportBorder: this.viewportBorder,
777
- loader: this.loaderJson
1025
+ loader: this.loaderJson,
1026
+ drawSeriesBehindAxis: this.drawSeriesBehindAxis,
1027
+ disableAspect: this.disableAspect,
1028
+ autoColorMode: this.autoColorMode
778
1029
  };
779
1030
  var definition = {
780
1031
  surface: options,
@@ -783,7 +1034,9 @@ var SciChartSurface = /** @class */ (function (_super) {
783
1034
  series: this.renderableSeries.asArray().map(function (series) { return series.toJSON(excludeData); }),
784
1035
  modifiers: this.chartModifiers.asArray().map(function (modifier) { return modifier.toJSON(); }),
785
1036
  annotations: this.annotations.asArray().map(function (annotation) { return annotation.toJSON(); }),
786
- onCreated: this.onCreatedName
1037
+ onCreated: this.onCreatedName,
1038
+ subCharts: this.subCharts.map(function (sc) { return sc.toJSON(); }),
1039
+ createSingle: this.webAssemblyContext2D.canvas.id !== "SciChartMasterCanvas"
787
1040
  };
788
1041
  return definition;
789
1042
  };
@@ -811,12 +1064,18 @@ var SciChartSurface = /** @class */ (function (_super) {
811
1064
  if (options === null || options === void 0 ? void 0 : options.drawSeriesBehindAxis) {
812
1065
  this.drawSeriesBehindAxisProperty = options.drawSeriesBehindAxis;
813
1066
  }
1067
+ if (options === null || options === void 0 ? void 0 : options.autoColorMode) {
1068
+ this.autoColorMode = options.autoColorMode;
1069
+ }
814
1070
  };
815
1071
  /**
816
1072
  * @inheritDoc
817
1073
  */
818
1074
  SciChartSurface.prototype.detachChartModifier = function (chartModifier) {
819
1075
  _super.prototype.detachChartModifier.call(this, chartModifier);
1076
+ this.subCharts.forEach(function (subChart) {
1077
+ chartModifier.onDetachSubSurface(subChart);
1078
+ });
820
1079
  };
821
1080
  /**
822
1081
  * @inheritDoc
@@ -827,6 +1086,9 @@ var SciChartSurface = /** @class */ (function (_super) {
827
1086
  chartModifier.setParentSurface(this);
828
1087
  chartModifier.invalidateParentCallback = this.invalidateElement;
829
1088
  chartModifier.onAttach();
1089
+ this.subCharts.forEach(function (subChart) {
1090
+ chartModifier.onAttachSubSurface(subChart);
1091
+ });
830
1092
  this.invalidateElement();
831
1093
  }
832
1094
  };
@@ -857,7 +1119,9 @@ var SciChartSurface = /** @class */ (function (_super) {
857
1119
  if (onCompleted === void 0) { onCompleted = function () { }; }
858
1120
  this.yAxes.asArray().forEach(function (yAxis) {
859
1121
  var yRange = yAxis.getWindowedYRange(xRanges);
860
- yAxis.animateVisibleRange(yRange, animationDurationMs, easingFunction, onCompleted);
1122
+ if (yRange) {
1123
+ yAxis.animateVisibleRange(yRange, animationDurationMs, easingFunction, onCompleted);
1124
+ }
861
1125
  });
862
1126
  };
863
1127
  SciChartSurface.prototype.zoomExtentsXInternal = function (animationDurationMs, easingFunction, onCompleted) {
@@ -874,8 +1138,29 @@ var SciChartSurface = /** @class */ (function (_super) {
874
1138
  };
875
1139
  // Step_4: Start drawing
876
1140
  SciChartSurface.prototype.onRenderSurfaceDraw = function () {
877
- // Logger.log("onRenderSurfaceDraw! " + Date.now().toLocaleString());
878
- this.doDrawingLoop();
1141
+ var _a;
1142
+ if (this.subChartsProperty.length > 0) {
1143
+ var batchContext_1 = new BatchRenderContext_1.BatchRenderContext(this.webAssemblyContext2D, this.renderSurface.viewportSize, (_a = this.domCanvas2D) === null || _a === void 0 ? void 0 : _a.id);
1144
+ var visibleSubCharts_1 = this.subChartsProperty.filter(function (sc) { return sc.isVisible; });
1145
+ if (visibleSubCharts_1.length === 0) {
1146
+ // Draw on parent if no visible SubCharts
1147
+ batchContext_1.doDraw = true;
1148
+ }
1149
+ // Render parent
1150
+ this.doDrawingLoop(batchContext_1);
1151
+ var middleChartLayersOffset_1 = 100;
1152
+ visibleSubCharts_1.forEach(function (chart, index) {
1153
+ chart.layersOffset = middleChartLayersOffset_1 * (index + 1);
1154
+ if (index === visibleSubCharts_1.length - 1) {
1155
+ // If this is the last subChart, draw
1156
+ batchContext_1.doDraw = true;
1157
+ }
1158
+ chart.doDrawingLoop(batchContext_1);
1159
+ });
1160
+ }
1161
+ else {
1162
+ this.doDrawingLoop();
1163
+ }
879
1164
  };
880
1165
  SciChartSurface.prototype.detachSeries = function (renderableSeries) {
881
1166
  if (renderableSeries.type === SeriesType_1.ESeriesType.StackedColumnSeries ||
@@ -886,6 +1171,9 @@ var SciChartSurface = /** @class */ (function (_super) {
886
1171
  cm.onDetachSeries(renderableSeries);
887
1172
  });
888
1173
  renderableSeries.onDetach();
1174
+ if (this.autoColorMode === AutoColorMode_1.EAutoColorMode.OnAddRemoveSeries) {
1175
+ this.autoColorRequired = true;
1176
+ }
889
1177
  this.invalidateElement();
890
1178
  };
891
1179
  SciChartSurface.prototype.attachSeries = function (renderableSeries) {
@@ -916,13 +1204,18 @@ var SciChartSurface = /** @class */ (function (_super) {
916
1204
  col.add(renderableSeries);
917
1205
  this.renderableSeries.remove(renderableSeries);
918
1206
  }
919
- renderableSeries.onAttach(this);
1207
+ if (!renderableSeries.isStacked || "size" in renderableSeries) {
1208
+ renderableSeries.onAttach(this);
1209
+ }
920
1210
  if (this.themeProviderProperty) {
921
1211
  renderableSeries.applyTheme(this.themeProviderProperty);
922
1212
  }
923
1213
  this.chartModifiers.asArray().forEach(function (cm) {
924
1214
  cm.onAttachSeries(renderableSeries);
925
1215
  });
1216
+ if (this.autoColorMode === AutoColorMode_1.EAutoColorMode.OnAddRemoveSeries) {
1217
+ this.autoColorRequired = true;
1218
+ }
926
1219
  this.invalidateElement();
927
1220
  };
928
1221
  SciChartSurface.prototype.detachAxis = function (axis) {
@@ -963,6 +1256,16 @@ var SciChartSurface = /** @class */ (function (_super) {
963
1256
  annotation.onAttach(this);
964
1257
  this.invalidateElement();
965
1258
  };
1259
+ SciChartSurface.prototype.onAttachSubSurface = function (subSurface) {
1260
+ this.chartModifiers.asArray().forEach(function (modifier) {
1261
+ modifier.onAttachSubSurface(subSurface);
1262
+ });
1263
+ };
1264
+ SciChartSurface.prototype.onDetachSubSurface = function (subSurface) {
1265
+ this.chartModifiers.asArray().forEach(function (modifier) {
1266
+ modifier.onDetachSubSurface(subSurface);
1267
+ });
1268
+ };
966
1269
  Object.defineProperty(SciChartSurface.prototype, "drawSeriesBehindAxis", {
967
1270
  /**
968
1271
  * Gets or sets the boolean flag for switching behaviour of Axises rendering
@@ -983,3 +1286,472 @@ var SciChartSurface = /** @class */ (function (_super) {
983
1286
  return SciChartSurface;
984
1287
  }(SciChartSurfaceBase_1.SciChartSurfaceBase));
985
1288
  exports.SciChartSurface = SciChartSurface;
1289
+ /**
1290
+ * @summary The {@link SciChartSubSurface} is the surface created within another surface
1291
+ * @description
1292
+ * It can be added using {@link SciChartSurface.addSubChart} method.
1293
+ *
1294
+ * To update the positioning of the {@link SciChartSubSurface}, use {@link SciChartSubSurface.subPosition};
1295
+ * also you can call {@link SciChartSubSurface.updateSubLayout} to refresh the layout of the sub-surface.
1296
+ * @remarks
1297
+ * It is not possible to have more than one level of nested sub-surfaces.
1298
+ */
1299
+ // tslint:disable-next-line: max-classes-per-file
1300
+ var SciChartSubSurface = /** @class */ (function (_super) {
1301
+ __extends(SciChartSubSurface, _super);
1302
+ /**
1303
+ * Creates an instance of the {@link SciChartSurface}
1304
+ * @param webAssemblyContext The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and
1305
+ * access to our WebGL2 Engine and WebAssembly numerical methods
1306
+ * @param options optional parameters of type {@link ISciChartSurfaceOptions} used to configure the {@link SciChart2DSurfaceBase}
1307
+ */
1308
+ function SciChartSubSurface(webAssemblyContext, options) {
1309
+ var _this = this;
1310
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
1311
+ _this = _super.call(this, webAssemblyContext, options) || this;
1312
+ _this.isSubSurface = true;
1313
+ _this.topSectionClass = "top-section";
1314
+ _this.leftSectionClass = "left-section";
1315
+ _this.bottomSectionClass = "bottom-section";
1316
+ _this.rightSectionClass = "right-section";
1317
+ // TODO move to constant for subCharts
1318
+ _this.backgroundProperty = "transparent";
1319
+ _this.isTransparentProperty = true;
1320
+ _this.subPositionProperty = new Rect_1.Rect(0, 0, 1, 1);
1321
+ _this.coordinateModeProperty = AnnotationBase_1.ECoordinateMode.Relative;
1322
+ _this.parentXAxisIdProperty = AxisBase2D_1.AxisBase2D.DEFAULT_AXIS_ID;
1323
+ _this.parentYAxisIdProperty = AxisBase2D_1.AxisBase2D.DEFAULT_AXIS_ID;
1324
+ _this.isVisibleProperty = true;
1325
+ _this.sectionScaleProperty = 1;
1326
+ _this.parentSurfaceProperty = options.parentSurface;
1327
+ _this.subChartContainerId = (_a = options.subSurfaceOptions) === null || _a === void 0 ? void 0 : _a.subChartContainerId;
1328
+ _this.subPaddingProperty = (_b = options === null || options === void 0 ? void 0 : options.subSurfaceOptions) === null || _b === void 0 ? void 0 : _b.subChartPadding;
1329
+ _this.isTransparentProperty = (_d = (_c = options === null || options === void 0 ? void 0 : options.subSurfaceOptions) === null || _c === void 0 ? void 0 : _c.isTransparent) !== null && _d !== void 0 ? _d : _this.isTransparent;
1330
+ _this.coordinateModeProperty = (_f = (_e = options === null || options === void 0 ? void 0 : options.subSurfaceOptions) === null || _e === void 0 ? void 0 : _e.coordinateMode) !== null && _f !== void 0 ? _f : _this.coordinateMode;
1331
+ _this.parentXAxisIdProperty = (_h = (_g = options === null || options === void 0 ? void 0 : options.subSurfaceOptions) === null || _g === void 0 ? void 0 : _g.parentXAxisId) !== null && _h !== void 0 ? _h : _this.parentXAxisId;
1332
+ _this.parentYAxisIdProperty = (_k = (_j = options === null || options === void 0 ? void 0 : options.subSurfaceOptions) === null || _j === void 0 ? void 0 : _j.parentYAxisId) !== null && _k !== void 0 ? _k : _this.parentYAxisId;
1333
+ _this.sectionScaleProperty = (_m = (_l = options === null || options === void 0 ? void 0 : options.subSurfaceOptions) === null || _l === void 0 ? void 0 : _l.sectionScale) !== null && _m !== void 0 ? _m : _this.sectionScaleProperty;
1334
+ _this.isVisible = (_p = (_o = options === null || options === void 0 ? void 0 : options.subSurfaceOptions) === null || _o === void 0 ? void 0 : _o.isVisible) !== null && _p !== void 0 ? _p : _this.isVisible;
1335
+ if (_this.subChartContainerId) {
1336
+ _this.subChartContainer =
1337
+ typeof _this.subChartContainerId === "string"
1338
+ ? document.getElementById(_this.subChartContainerId)
1339
+ : _this.subChartContainerId;
1340
+ }
1341
+ _this.applyOptions(options.subSurfaceOptions);
1342
+ _this.subPosition = (_q = options.subSurfaceOptions.position) !== null && _q !== void 0 ? _q : _this.subPositionProperty;
1343
+ _this.backgroundFillBrushCache = new BrushCache_1.BrushCache(webAssemblyContext);
1344
+ _this.preRender.subscribe(function (context) {
1345
+ // Parent coordcalc may not be available when the chart is first created, so recalculate padding before drawing
1346
+ if (_this.coordinateMode === AnnotationBase_1.ECoordinateMode.DataValue) {
1347
+ _this.updateSubLayout(true);
1348
+ }
1349
+ });
1350
+ return _this;
1351
+ }
1352
+ Object.defineProperty(SciChartSubSurface.prototype, "isTransparent", {
1353
+ /**
1354
+ * Whether other surfaces, including the parent, will be visible underneath this surface
1355
+ */
1356
+ get: function () {
1357
+ return this.isTransparentProperty;
1358
+ },
1359
+ /**
1360
+ * Whether other surfaces, including the parent, will be visible underneath this surface
1361
+ */
1362
+ set: function (value) {
1363
+ if (this.isTransparentProperty !== value) {
1364
+ this.isTransparentProperty = value;
1365
+ this.updateBackground();
1366
+ }
1367
+ },
1368
+ enumerable: false,
1369
+ configurable: true
1370
+ });
1371
+ Object.defineProperty(SciChartSubSurface.prototype, "subChartPadding", {
1372
+ /**
1373
+ * Gets or sets additional absolute padding between the SciChartSubSurface and its parent, in order top, right, bottom, left
1374
+ * {@link subPosition} is applied first, then this padding is added.
1375
+ */
1376
+ get: function () {
1377
+ return this.subPaddingProperty;
1378
+ },
1379
+ /**
1380
+ * Gets or sets additional absolute padding between the SciChartSubSurface and its parent, in order top, right, bottom, left
1381
+ * {@link subPosition} is applied first, then this padding is added.
1382
+ */
1383
+ set: function (padding) {
1384
+ this.subPaddingProperty = padding;
1385
+ this.updateSubLayout();
1386
+ },
1387
+ enumerable: false,
1388
+ configurable: true
1389
+ });
1390
+ Object.defineProperty(SciChartSubSurface.prototype, "coordinateMode", {
1391
+ /**
1392
+ * Gets or sets the {@link ECoordinateMode} used when calculating the actual position based on the {@link subPosition}
1393
+ */
1394
+ get: function () {
1395
+ return this.coordinateModeProperty;
1396
+ },
1397
+ /**
1398
+ * Gets or sets the {@link ECoordinateMode} used when calculating the actual position based on the {@link subPosition}
1399
+ */
1400
+ set: function (coordinateMode) {
1401
+ this.coordinateModeProperty = coordinateMode;
1402
+ this.updateSubLayout();
1403
+ },
1404
+ enumerable: false,
1405
+ configurable: true
1406
+ });
1407
+ Object.defineProperty(SciChartSubSurface.prototype, "parentXAxisId", {
1408
+ /**
1409
+ * Gets or sets the AxisId used to determing which X Axis should be used when calculating the actual position based on the {@link subPosition}
1410
+ * if {@link coordinateMode} is DataValue
1411
+ */
1412
+ get: function () {
1413
+ return this.parentXAxisIdProperty;
1414
+ },
1415
+ /**
1416
+ * Gets or sets the AxisId used to determing which X Axis should be used when calculating the actual position based on the {@link subPosition}
1417
+ * if {@link coordinateMode} is DataValue
1418
+ */
1419
+ set: function (id) {
1420
+ this.parentXAxisIdProperty = id;
1421
+ this.updateSubLayout();
1422
+ },
1423
+ enumerable: false,
1424
+ configurable: true
1425
+ });
1426
+ Object.defineProperty(SciChartSubSurface.prototype, "parentYAxisId", {
1427
+ /**
1428
+ * Gets or sets the AxisId used to determing which Y Axis should be used when calculating the actual position based on the {@link subPosition}
1429
+ * if {@link coordinateMode} is DataValue
1430
+ */
1431
+ get: function () {
1432
+ return this.parentYAxisIdProperty;
1433
+ },
1434
+ /**
1435
+ * Gets or sets the AxisId used to determing which Y Axis should be used when calculating the actual position based on the {@link subPosition}
1436
+ * if {@link coordinateMode} is DataValue
1437
+ */
1438
+ set: function (id) {
1439
+ this.parentYAxisIdProperty = id;
1440
+ this.updateSubLayout();
1441
+ },
1442
+ enumerable: false,
1443
+ configurable: true
1444
+ });
1445
+ Object.defineProperty(SciChartSubSurface.prototype, "subPosition", {
1446
+ /**
1447
+ * A rectangle defining the position and size of a subchart.
1448
+ * If {@link coordinateMode} is Relative (the default) then the values give the size as a proportion of the parent div, and all properties must be between 0 and 1 inclusive.
1449
+ * If {@link coordinateMode} is DataValue, values will be converted to coordinates using {@link parentXAxisId} and {@link parentYAxisId}. Subchart will be clpped to the parent SeriesViewRect
1450
+ * Can only be set if this is a subChart. See {@link addSubChart}
1451
+ */
1452
+ get: function () {
1453
+ return this.subPositionProperty;
1454
+ },
1455
+ /**
1456
+ * A rectangle defining the position and size of a subchart.
1457
+ * If {@link coordinateMode} is Relative (the default) then the values give the size as a proportion of the parent div, and all properties must be between 0 and 1 inclusive.
1458
+ * If {@link coordinateMode} is DataValue, values will be converted to coordinates using {@link parentXAxisId} and {@link parentYAxisId}. Subchart will be clpped to the parent SeriesViewRect
1459
+ * Can only be set if this is a subChart. See {@link addSubChart}
1460
+ */
1461
+ set: function (value) {
1462
+ if (!this.parentSurface) {
1463
+ throw new Error("subPosition can only be changed for subCharts.");
1464
+ }
1465
+ if (!Rect_1.Rect.isEqual(this.subPositionProperty, value)) {
1466
+ this.subPositionProperty = value;
1467
+ this.updateSubLayout();
1468
+ }
1469
+ },
1470
+ enumerable: false,
1471
+ configurable: true
1472
+ });
1473
+ Object.defineProperty(SciChartSubSurface.prototype, "isVisible", {
1474
+ /**
1475
+ * Gets or sets if the subchart is visible, allowing you to hide a subchart without removing it from the parent surface
1476
+ */
1477
+ get: function () {
1478
+ return this.isVisibleProperty;
1479
+ },
1480
+ /**
1481
+ * Gets or sets if the subchart is visible, allowing you to hide a subchart without removing it from the parent surface
1482
+ */
1483
+ set: function (isVisible) {
1484
+ this.isVisibleProperty = isVisible;
1485
+ this.invalidateElement();
1486
+ },
1487
+ enumerable: false,
1488
+ configurable: true
1489
+ });
1490
+ Object.defineProperty(SciChartSubSurface.prototype, "sectionScale", {
1491
+ /**
1492
+ * Gets or sets scale property for all sections
1493
+ * It is necessary if the scale transformation is being used for html areas around the subchart
1494
+ * For example, style = { width: "50%", transform: scale(2), transformOrigin: 'left top' }
1495
+ */
1496
+ get: function () {
1497
+ return this.sectionScaleProperty;
1498
+ },
1499
+ set: function (value) {
1500
+ this.sectionScaleProperty = value;
1501
+ this.updateSubLayout();
1502
+ },
1503
+ enumerable: false,
1504
+ configurable: true
1505
+ });
1506
+ /** Recalculate the position of the subChart. Call if you update the size of html elements in the wrapper */
1507
+ SciChartSubSurface.prototype.updateSubLayout = function (isDrawing) {
1508
+ if (isDrawing === void 0) { isDrawing = false; }
1509
+ this.updateWrapper(this.subPosition);
1510
+ var offsets = this.getOffsets(this.subChartContainer);
1511
+ this.padding = this.calcPadding(this.parentSurface.renderSurface.viewportSize, this.subPositionProperty, offsets, isDrawing);
1512
+ };
1513
+ Object.defineProperty(SciChartSubSurface.prototype, "parentSurface", {
1514
+ /**
1515
+ * The parent SciChartSurface, if this is a subChart. See {@link addSubChart}
1516
+ */
1517
+ get: function () {
1518
+ return this.parentSurfaceProperty;
1519
+ },
1520
+ enumerable: false,
1521
+ configurable: true
1522
+ });
1523
+ Object.defineProperty(SciChartSubSurface.prototype, "surfaceType", {
1524
+ /**
1525
+ * @inheritDoc
1526
+ */
1527
+ get: function () {
1528
+ return SciChartSurfaceBase_1.ESurfaceType.SciChartSurfaceType;
1529
+ },
1530
+ enumerable: false,
1531
+ configurable: true
1532
+ });
1533
+ /**
1534
+ * @inheritDoc
1535
+ */
1536
+ SciChartSubSurface.prototype.changeViewportSize = function (pixelWidth, pixelHeight) { };
1537
+ /**
1538
+ * Gets the sub-chart container
1539
+ */
1540
+ SciChartSubSurface.prototype.getSubChartContainer = function () {
1541
+ return this.subChartContainer;
1542
+ };
1543
+ SciChartSubSurface.prototype.getSubChartRect = function () {
1544
+ var _a = this.renderSurface.viewportSize, width = _a.width, height = _a.height;
1545
+ var _b = this.padding, top = _b.top, left = _b.left, bottom = _b.bottom, right = _b.right;
1546
+ return new Rect_1.Rect(left, top, width - left - right, height - top - bottom);
1547
+ };
1548
+ /**
1549
+ * @inheritDoc
1550
+ */
1551
+ SciChartSubSurface.prototype.delete = function (clearHtml) {
1552
+ if (clearHtml === void 0) { clearHtml = true; }
1553
+ // Don't ever clear html on the parent here as it kills the drawing for all subcharts.
1554
+ _super.prototype.delete.call(this, false);
1555
+ if (clearHtml && this.domChartRoot.contains(this.domSvgContainer)) {
1556
+ this.domChartRoot.removeChild(this.domSvgContainer);
1557
+ }
1558
+ this.backgroundFillBrushCache = (0, Deleter_1.deleteSafe)(this.backgroundFillBrushCache);
1559
+ };
1560
+ SciChartSubSurface.prototype.toJSON = function (excludeData) {
1561
+ var _a;
1562
+ if (excludeData === void 0) { excludeData = false; }
1563
+ var theme;
1564
+ if ("toJSON" in this.themeProvider) {
1565
+ // @ts-ignore
1566
+ theme = this.themeProvider.toJSON();
1567
+ }
1568
+ else {
1569
+ theme = this.themeProvider;
1570
+ }
1571
+ var options = {
1572
+ canvasBorder: this.canvasBorder,
1573
+ heightAspect: this.heightAspect,
1574
+ widthAspect: this.widthAspect,
1575
+ layoutManager: (_a = this.layoutManager) === null || _a === void 0 ? void 0 : _a.toJSON(),
1576
+ padding: this.subPaddingProperty,
1577
+ theme: theme,
1578
+ viewportBorder: this.viewportBorder,
1579
+ loader: this.loaderJson,
1580
+ position: this.subPosition,
1581
+ subChartContainerId: typeof this.subChartContainerId === "string" ? this.subChartContainerId : this.subChartContainerId.id,
1582
+ subChartPadding: this.subChartPadding,
1583
+ coordinateMode: this.coordinateMode,
1584
+ parentXAxisId: this.parentXAxisId,
1585
+ parentYAxisId: this.parentYAxisId
1586
+ };
1587
+ var definition = {
1588
+ surface: options,
1589
+ xAxes: this.xAxes.asArray().map(function (axis) { return axis.toJSON(); }),
1590
+ yAxes: this.yAxes.asArray().map(function (axis) { return axis.toJSON(); }),
1591
+ series: this.renderableSeries.asArray().map(function (series) { return series.toJSON(excludeData); }),
1592
+ modifiers: this.chartModifiers.asArray().map(function (modifier) { return modifier.toJSON(); }),
1593
+ annotations: this.annotations.asArray().map(function (annotation) { return annotation.toJSON(); })
1594
+ };
1595
+ return definition;
1596
+ };
1597
+ SciChartSubSurface.prototype.calcPadding = function (viewportSize, position, offsets, isDrawing) {
1598
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1599
+ if (isDrawing === void 0) { isDrawing = false; }
1600
+ var scaledViewWidth = viewportSize.width, scaledViewHeight = viewportSize.height;
1601
+ var viewWidth = (0, translate_1.translateToNotScaled)(scaledViewWidth);
1602
+ var viewHeight = (0, translate_1.translateToNotScaled)(scaledViewHeight);
1603
+ var x = position.x, y = position.y, width = position.width, height = position.height;
1604
+ // Pixel mode
1605
+ // TODO DPI scale absolute coords?
1606
+ var left = x;
1607
+ var top = y;
1608
+ var bottom = viewHeight - y - height;
1609
+ var right = viewWidth - x - width;
1610
+ if (this.coordinateMode === AnnotationBase_1.ECoordinateMode.Relative) {
1611
+ left = viewWidth * x + offsets.left;
1612
+ top = viewHeight * y + offsets.top;
1613
+ right = viewWidth - viewWidth * x - viewWidth * width + offsets.right;
1614
+ bottom = viewHeight - viewHeight * y - viewHeight * height + offsets.bottom;
1615
+ }
1616
+ else if (this.coordinateMode === AnnotationBase_1.ECoordinateMode.DataValue && isDrawing) {
1617
+ var xAxis = this.parentSurface.getXAxisById(this.parentXAxisId);
1618
+ if (!xAxis) {
1619
+ throw new Error("No x axis with id ".concat(this.parentXAxisId, " found on parent surface"));
1620
+ }
1621
+ var xCoordCalc = xAxis.getCurrentCoordinateCalculator();
1622
+ var yAxis = this.parentSurface.getYAxisById(this.parentYAxisId);
1623
+ if (!yAxis) {
1624
+ throw new Error("No y axis with id ".concat(this.parentYAxisId, " found on parent surface"));
1625
+ }
1626
+ var seriesViewRect = this.parentSurface.seriesViewRect;
1627
+ var scaledParentLeft = (0, translate_1.translateToNotScaled)(seriesViewRect.left);
1628
+ var scaledParentTop = (0, translate_1.translateToNotScaled)(seriesViewRect.top);
1629
+ var scaledParentBottom = (0, translate_1.translateToNotScaled)(seriesViewRect.bottom);
1630
+ var scaledParentRight = (0, translate_1.translateToNotScaled)(seriesViewRect.right);
1631
+ var yCoordCalc = yAxis.getCurrentCoordinateCalculator();
1632
+ left = xAxis.isVerticalChart ? yCoordCalc.getCoordinate(x) : xCoordCalc.getCoordinate(x);
1633
+ top = xAxis.isVerticalChart ? xCoordCalc.getCoordinate(y) : yCoordCalc.getCoordinate(y);
1634
+ left = Math.max((0, translate_1.translateToNotScaled)(left), 0);
1635
+ top = Math.max((0, translate_1.translateToNotScaled)(top), 0);
1636
+ left += scaledParentLeft;
1637
+ top += scaledParentTop;
1638
+ var x2 = xAxis.flippedCoordinates ? x - width : x + width;
1639
+ var y2 = yAxis.flippedCoordinates ? y + height : y - height;
1640
+ bottom = Math.max(viewHeight -
1641
+ scaledParentTop -
1642
+ (0, translate_1.translateToNotScaled)(xAxis.isVerticalChart ? xCoordCalc.getCoordinate(y2) : yCoordCalc.getCoordinate(y2)), viewHeight - scaledParentBottom);
1643
+ right = Math.max(viewWidth -
1644
+ scaledParentLeft -
1645
+ (0, translate_1.translateToNotScaled)(xAxis.isVerticalChart ? yCoordCalc.getCoordinate(x2) : xCoordCalc.getCoordinate(x2)), viewWidth - scaledParentRight);
1646
+ }
1647
+ left += (_b = (_a = this.subPaddingProperty) === null || _a === void 0 ? void 0 : _a.left) !== null && _b !== void 0 ? _b : 0;
1648
+ top += (_d = (_c = this.subPaddingProperty) === null || _c === void 0 ? void 0 : _c.top) !== null && _d !== void 0 ? _d : 0;
1649
+ right += (_f = (_e = this.subPaddingProperty) === null || _e === void 0 ? void 0 : _e.right) !== null && _f !== void 0 ? _f : 0;
1650
+ bottom += (_h = (_g = this.subPaddingProperty) === null || _g === void 0 ? void 0 : _g.bottom) !== null && _h !== void 0 ? _h : 0;
1651
+ return new Thickness_1.Thickness(top, right, bottom, left);
1652
+ };
1653
+ /**
1654
+ * @inheritDoc
1655
+ */
1656
+ SciChartSubSurface.prototype.applySciChartBackground = function (background, alphaEnabled) {
1657
+ if (alphaEnabled === void 0) { alphaEnabled = true; }
1658
+ this.backgroundProperty = background;
1659
+ if (!this.isTransparent) {
1660
+ var renderContext = this.renderSurface.getRenderContext();
1661
+ var nativeContext = renderContext.getNativeContext();
1662
+ var _a = this.parentSurface.renderSurface.viewportSize, width = _a.width, height = _a.height;
1663
+ nativeContext.SetClipRect(this.adjustedPadding.left, this.adjustedPadding.top, width - this.adjustedPadding.right - this.adjustedPadding.left, height - this.adjustedPadding.bottom - this.adjustedPadding.top);
1664
+ nativeContext.SetClearColor(0, 0, 0, 0);
1665
+ nativeContext.Clear();
1666
+ nativeContext.SetClipRect(0, 0, width, height);
1667
+ try {
1668
+ // try parse background value. throws if cannot parse html color
1669
+ var brushColor = (0, parseColor_1.parseColorToUIntArgb)(background);
1670
+ var vecRects = (0, NativeObject_1.getVectorRectVertex)(this.webAssemblyContext2D);
1671
+ vecRects.push_back((0, createNativeRect_1.createNativeRect)(this.webAssemblyContext2D, this.adjustedPadding.left, this.adjustedPadding.top, this.renderSurface.viewportSize.width - this.adjustedPadding.right, this.renderSurface.viewportSize.height - this.adjustedPadding.bottom));
1672
+ var brush = (0, BrushCache_1.createBrushInCache)(this.backgroundFillBrushCache, background, 1);
1673
+ renderContext.drawRects(vecRects, brush, 0, 0);
1674
+ }
1675
+ catch (error) {
1676
+ performanceWarnings_1.performanceWarnings.subchartBackgroundNotSimpleColor.warn();
1677
+ }
1678
+ }
1679
+ };
1680
+ SciChartSubSurface.prototype.updateWrapper = function (subChartPosition) {
1681
+ var _this = this;
1682
+ if (!this.parentSurface || !this.subChartContainer) {
1683
+ return;
1684
+ }
1685
+ var seriesViewRect = this.parentSurface.seriesViewRect;
1686
+ if (!seriesViewRect && this.coordinateMode !== AnnotationBase_1.ECoordinateMode.Relative) {
1687
+ return;
1688
+ }
1689
+ this.subChartContainer.style.pointerEvents = "none";
1690
+ this.subChartContainer.style.position = "absolute";
1691
+ var getSubChartContainerPosition = function (subChartPosition) {
1692
+ if (_this.coordinateMode === AnnotationBase_1.ECoordinateMode.DataValue) {
1693
+ var xAxis = _this.parentSurface.getXAxisById(_this.parentXAxisId);
1694
+ if (!xAxis) {
1695
+ throw new Error("No x axis with id ".concat(_this.parentXAxisId, " found on parent surface"));
1696
+ }
1697
+ var yAxis = _this.parentSurface.getYAxisById(_this.parentYAxisId);
1698
+ if (!yAxis) {
1699
+ throw new Error("No y axis with id ".concat(_this.parentYAxisId, " found on parent surface"));
1700
+ }
1701
+ var absolutePositionRect = (0, translate_1.translateDataValueRectToAbsolute)(subChartPosition, xAxis, yAxis, seriesViewRect);
1702
+ var left = (0, translate_1.convertToHtmlPx)(absolutePositionRect.x);
1703
+ var top_1 = (0, translate_1.convertToHtmlPx)(absolutePositionRect.y);
1704
+ var width = (0, translate_1.convertToHtmlPx)(absolutePositionRect.width);
1705
+ var height = (0, translate_1.convertToHtmlPx)(absolutePositionRect.height);
1706
+ return { left: left, top: top_1, width: width, height: height };
1707
+ }
1708
+ else if (_this.coordinateMode === AnnotationBase_1.ECoordinateMode.Relative) {
1709
+ var left = (0, translate_1.convertToRelativeHtmlSize)(subChartPosition.x);
1710
+ var top_2 = (0, translate_1.convertToRelativeHtmlSize)(subChartPosition.y);
1711
+ var width = (0, translate_1.convertToRelativeHtmlSize)(subChartPosition.width);
1712
+ var height = (0, translate_1.convertToRelativeHtmlSize)(subChartPosition.height);
1713
+ return { left: left, top: top_2, width: width, height: height };
1714
+ }
1715
+ else {
1716
+ var left = (0, translate_1.convertToHtmlPx)(subChartPosition.x);
1717
+ var top_3 = (0, translate_1.convertToHtmlPx)(subChartPosition.y);
1718
+ var width = (0, translate_1.convertToHtmlPx)(subChartPosition.width);
1719
+ var height = (0, translate_1.convertToHtmlPx)(subChartPosition.height);
1720
+ return { left: left, top: top_3, width: width, height: height };
1721
+ }
1722
+ };
1723
+ var subChartContainerPosition = getSubChartContainerPosition(subChartPosition);
1724
+ this.subChartContainer.style.left = subChartContainerPosition.left;
1725
+ this.subChartContainer.style.top = subChartContainerPosition.top;
1726
+ this.subChartContainer.style.width = subChartContainerPosition.width;
1727
+ this.subChartContainer.style.height = subChartContainerPosition.height;
1728
+ };
1729
+ SciChartSubSurface.prototype.getOffsets = function (subChartContainer) {
1730
+ var _a, _b, _c, _d;
1731
+ if (!subChartContainer) {
1732
+ return {
1733
+ left: 0,
1734
+ top: 0,
1735
+ right: 0,
1736
+ bottom: 0
1737
+ };
1738
+ }
1739
+ // TODO probably we can use better selector
1740
+ var leftSection = subChartContainer.getElementsByClassName(this.leftSectionClass)[0];
1741
+ var topSection = subChartContainer.getElementsByClassName(this.topSectionClass)[0];
1742
+ var rightSection = subChartContainer.getElementsByClassName(this.rightSectionClass)[0];
1743
+ var bottomSection = subChartContainer.getElementsByClassName(this.bottomSectionClass)[0];
1744
+ var leftSectionWidth = (_a = leftSection === null || leftSection === void 0 ? void 0 : leftSection.clientWidth) !== null && _a !== void 0 ? _a : 0;
1745
+ var topSectionHeight = (_b = topSection === null || topSection === void 0 ? void 0 : topSection.clientHeight) !== null && _b !== void 0 ? _b : 0;
1746
+ var rightSectionWidth = (_c = rightSection === null || rightSection === void 0 ? void 0 : rightSection.clientWidth) !== null && _c !== void 0 ? _c : 0;
1747
+ var bottomSectionHeight = (_d = bottomSection === null || bottomSection === void 0 ? void 0 : bottomSection.clientHeight) !== null && _d !== void 0 ? _d : 0;
1748
+ return {
1749
+ left: leftSectionWidth * this.sectionScaleProperty,
1750
+ top: topSectionHeight * this.sectionScaleProperty,
1751
+ right: rightSectionWidth * this.sectionScaleProperty,
1752
+ bottom: bottomSectionHeight * this.sectionScaleProperty
1753
+ };
1754
+ };
1755
+ return SciChartSubSurface;
1756
+ }(SciChartSurface));
1757
+ exports.SciChartSubSurface = SciChartSubSurface;