scichart 3.1.348 → 3.2.434

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 (358) hide show
  1. package/Builder/buildSurface.d.ts +2 -2
  2. package/Builder/chartBuilder.d.ts +4 -4
  3. package/Charting/ChartModifiers/ChartModifierBase.d.ts +19 -5
  4. package/Charting/ChartModifiers/ChartModifierBase.js +64 -7
  5. package/Charting/ChartModifiers/CursorModifier.d.ts +9 -9
  6. package/Charting/ChartModifiers/CursorModifier.js +13 -1
  7. package/Charting/ChartModifiers/DataPointSelectionModifier.d.ts +1 -0
  8. package/Charting/ChartModifiers/DataPointSelectionModifier.js +6 -1
  9. package/Charting/ChartModifiers/LegendModifier.d.ts +10 -25
  10. package/Charting/ChartModifiers/LegendModifier.js +10 -20
  11. package/Charting/ChartModifiers/MouseWheelZoomModifier.js +20 -11
  12. package/Charting/ChartModifiers/OverviewRangeSelectionModifier.d.ts +5 -5
  13. package/Charting/ChartModifiers/PinchZoomModifier.d.ts +38 -8
  14. package/Charting/ChartModifiers/PinchZoomModifier.js +103 -40
  15. package/Charting/ChartModifiers/RolloverModifier.js +10 -3
  16. package/Charting/ChartModifiers/RubberBandXyZoomModifier.d.ts +4 -7
  17. package/Charting/ChartModifiers/RubberBandXyZoomModifier.js +6 -8
  18. package/Charting/ChartModifiers/SeriesSelectionModifier.js +39 -29
  19. package/Charting/ChartModifiers/XAxisDragModifier.d.ts +1 -1
  20. package/Charting/ChartModifiers/XAxisDragModifier.js +3 -3
  21. package/Charting/ChartModifiers/YAxisDragModifier.d.ts +2 -4
  22. package/Charting/ChartModifiers/YAxisDragModifier.js +7 -8
  23. package/Charting/ChartModifiers/ZoomPanModifier.d.ts +13 -38
  24. package/Charting/ChartModifiers/ZoomPanModifier.js +54 -99
  25. package/Charting/Drawing/BaseCache.d.ts +2 -1
  26. package/Charting/Drawing/BaseCache.js +45 -7
  27. package/Charting/Drawing/RenderSurface.d.ts +1 -0
  28. package/Charting/Drawing/RenderSurface.js +5 -1
  29. package/Charting/Drawing/SolidBrushCache.d.ts +2 -1
  30. package/Charting/Drawing/SolidBrushCache.js +23 -3
  31. package/Charting/Drawing/WebGlBrush.d.ts +2 -1
  32. package/Charting/Drawing/WebGlBrush.js +22 -3
  33. package/Charting/Drawing/WebGlPen.d.ts +2 -1
  34. package/Charting/Drawing/WebGlPen.js +23 -4
  35. package/Charting/Drawing/WebGlRenderContext2D.d.ts +4 -3
  36. package/Charting/Drawing/WebGlRenderContext2D.js +26 -7
  37. package/Charting/Model/BaseDataSeries.d.ts +67 -2
  38. package/Charting/Model/BaseDataSeries.js +193 -42
  39. package/Charting/Model/BaseHeatmapDataSeries.js +1 -1
  40. package/Charting/Model/ChartData/SeriesInfo.d.ts +16 -0
  41. package/Charting/Model/ChartData/SeriesInfo.js +7 -0
  42. package/Charting/Model/ChartData/XyzSeriesInfo.d.ts +8 -0
  43. package/Charting/Model/ChartData/XyzSeriesInfo.js +36 -0
  44. package/Charting/Model/DoubleVectorProvider.d.ts +19 -0
  45. package/Charting/Model/DoubleVectorProvider.js +95 -0
  46. package/Charting/Model/Filters/HlcFilterBase.d.ts +6 -2
  47. package/Charting/Model/Filters/HlcFilterBase.js +17 -1
  48. package/Charting/Model/Filters/IFilterBase.d.ts +24 -0
  49. package/Charting/Model/Filters/IFilterBase.js +2 -0
  50. package/Charting/Model/Filters/OhlcFilterBase.d.ts +6 -2
  51. package/Charting/Model/Filters/OhlcFilterBase.js +17 -1
  52. package/Charting/Model/Filters/XyFilterBase.d.ts +6 -5
  53. package/Charting/Model/Filters/XyFilterBase.js +17 -1
  54. package/Charting/Model/Filters/XyyFilterBase.d.ts +6 -2
  55. package/Charting/Model/Filters/XyyFilterBase.js +17 -1
  56. package/Charting/Model/Filters/XyzFilterBase.d.ts +6 -2
  57. package/Charting/Model/Filters/XyzFilterBase.js +17 -1
  58. package/Charting/Model/HlcDataSeries.d.ts +3 -0
  59. package/Charting/Model/HlcDataSeries.js +44 -15
  60. package/Charting/Model/IDataSeries.d.ts +23 -0
  61. package/Charting/Model/NonUniformHeatmapDataSeries.js +2 -0
  62. package/Charting/Model/OhlcDataSeries.d.ts +3 -0
  63. package/Charting/Model/OhlcDataSeries.js +56 -24
  64. package/Charting/Model/PointSeries/BasePointSeriesResampled.d.ts +4 -5
  65. package/Charting/Model/PointSeries/BasePointSeriesResampled.js +29 -21
  66. package/Charting/Model/PointSeries/BasePointSeriesWrapped.d.ts +2 -0
  67. package/Charting/Model/PointSeries/BasePointSeriesWrapped.js +2 -0
  68. package/Charting/Model/PointSeries/IPointSeries.d.ts +2 -1
  69. package/Charting/Model/PointSeries/OhlcPointSeriesResampled.js +1 -1
  70. package/Charting/Model/PointSeries/XyPointSeriesWrapped.d.ts +2 -1
  71. package/Charting/Model/PointSeries/XyPointSeriesWrapped.js +2 -2
  72. package/Charting/Model/PointSeries/XyyPointSeriesResampled.js +1 -1
  73. package/Charting/Model/UniformHeatmapDataSeries.d.ts +31 -11
  74. package/Charting/Model/UniformHeatmapDataSeries.js +72 -4
  75. package/Charting/Model/XyDataSeries.d.ts +0 -8
  76. package/Charting/Model/XyDataSeries.js +21 -5
  77. package/Charting/Model/XyTextDataSeries.d.ts +2 -0
  78. package/Charting/Model/XyTextDataSeries.js +35 -4
  79. package/Charting/Model/XyyDataSeries.d.ts +2 -0
  80. package/Charting/Model/XyyDataSeries.js +50 -26
  81. package/Charting/Model/XyzDataSeries.d.ts +3 -0
  82. package/Charting/Model/XyzDataSeries.js +36 -10
  83. package/Charting/Numerics/CoordinateCalculators/CategoryCoordinateCalculator.d.ts +3 -5
  84. package/Charting/Numerics/CoordinateCalculators/CategoryCoordinateCalculator.js +5 -7
  85. package/Charting/Numerics/CoordinateCalculators/CoordinateCalculatorBase.d.ts +2 -1
  86. package/Charting/Numerics/CoordinateCalculators/CoordinateCalculatorBase.js +29 -9
  87. package/Charting/Numerics/CoordinateCalculators/FlippedCategoryCoordinateCalculator.d.ts +3 -5
  88. package/Charting/Numerics/CoordinateCalculators/FlippedCategoryCoordinateCalculator.js +5 -7
  89. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.d.ts +14 -10
  90. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +105 -69
  91. package/Charting/Numerics/Resamplers/ResamplingParams.d.ts +4 -2
  92. package/Charting/Numerics/Resamplers/ResamplingParams.js +12 -7
  93. package/Charting/Numerics/TickCoordinateProviders/TickCoordinatesProvider.d.ts +5 -0
  94. package/Charting/Numerics/TickCoordinateProviders/TickCoordinatesProvider.js +7 -0
  95. package/Charting/Numerics/TickProviders/NumericTickProvider.js +3 -4
  96. package/Charting/Numerics/TickProviders/TickProvider.d.ts +5 -0
  97. package/Charting/Numerics/TickProviders/TickProvider.js +7 -0
  98. package/Charting/Services/SciChartRenderer.js +15 -5
  99. package/Charting/Services/TitleRenderer.d.ts +2 -1
  100. package/Charting/Services/TitleRenderer.js +35 -14
  101. package/Charting/Visuals/Annotations/AdornerLayer.d.ts +1 -1
  102. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +6 -6
  103. package/Charting/Visuals/Annotations/AnnotationBase.js +81 -61
  104. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +4 -0
  105. package/Charting/Visuals/Annotations/IAnnotation.d.ts +9 -4
  106. package/Charting/Visuals/Annotations/IAnnotation.js +6 -0
  107. package/Charting/Visuals/Annotations/LineAnnotation.js +3 -1
  108. package/Charting/Visuals/Annotations/NativeTextAnnotation.js +4 -0
  109. package/Charting/Visuals/Annotations/RenderContextAnnotationBase.d.ts +5 -0
  110. package/Charting/Visuals/Annotations/RenderContextAnnotationBase.js +16 -0
  111. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +6 -0
  112. package/Charting/Visuals/Annotations/constants.d.ts +1 -0
  113. package/Charting/Visuals/Annotations/constants.js +1 -0
  114. package/Charting/Visuals/Axis/AxisBase2D.d.ts +23 -8
  115. package/Charting/Visuals/Axis/AxisBase2D.js +46 -10
  116. package/Charting/Visuals/Axis/AxisCore.d.ts +6 -3
  117. package/Charting/Visuals/Axis/AxisCore.js +100 -54
  118. package/Charting/Visuals/Axis/AxisRenderer.d.ts +2 -1
  119. package/Charting/Visuals/Axis/AxisRenderer.js +40 -16
  120. package/Charting/Visuals/Axis/AxisTitleRenderer.d.ts +1 -0
  121. package/Charting/Visuals/Axis/AxisTitleRenderer.js +4 -0
  122. package/Charting/Visuals/Axis/CategoryAxisBase.js +4 -4
  123. package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +14 -9
  124. package/Charting/Visuals/Axis/DeltaCalculator/DeltaCalculator.d.ts +5 -0
  125. package/Charting/Visuals/Axis/DeltaCalculator/DeltaCalculator.js +7 -0
  126. package/Charting/Visuals/Axis/LabelProvider/LabelCache.d.ts +2 -2
  127. package/Charting/Visuals/Axis/LabelProvider/LabelCache.js +8 -1
  128. package/Charting/Visuals/Axis/LabelProvider/LabelProvider.d.ts +7 -1
  129. package/Charting/Visuals/Axis/LabelProvider/LabelProvider.js +34 -8
  130. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.d.ts +4 -2
  131. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +8 -2
  132. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.d.ts +1 -0
  133. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +1 -0
  134. package/Charting/Visuals/HeatmapLegend.d.ts +3 -2
  135. package/Charting/Visuals/HeatmapLegend.js +33 -12
  136. package/Charting/Visuals/Helpers/NativeObject.d.ts +8 -5
  137. package/Charting/Visuals/Helpers/NativeObject.js +42 -21
  138. package/Charting/Visuals/Helpers/drawLabel.js +3 -1
  139. package/Charting/Visuals/I2DSurfaceOptions.d.ts +0 -15
  140. package/Charting/Visuals/Legend/ManualLegend.d.ts +56 -0
  141. package/Charting/Visuals/Legend/ManualLegend.js +138 -0
  142. package/Charting/Visuals/Legend/SciChartLegend.js +4 -3
  143. package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +65 -4
  144. package/Charting/Visuals/Legend/SciChartLegendBase.js +111 -23
  145. package/Charting/Visuals/Legend/SciChartPieLegend.js +1 -1
  146. package/Charting/Visuals/PointMarkers/BasePointMarker.d.ts +13 -1
  147. package/Charting/Visuals/PointMarkers/BasePointMarker.js +77 -19
  148. package/Charting/Visuals/PointMarkers/Constants.d.ts +2 -1
  149. package/Charting/Visuals/PointMarkers/Constants.js +1 -0
  150. package/Charting/Visuals/PointMarkers/IPointMarker.d.ts +2 -0
  151. package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.js +4 -1
  152. package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.d.ts +1 -1
  153. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +8 -7
  154. package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.d.ts +1 -0
  155. package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.js +5 -0
  156. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +10 -9
  157. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +3 -2
  158. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +101 -69
  159. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +18 -4
  160. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +12 -3
  161. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.d.ts +2 -0
  162. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.js +5 -0
  163. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +6 -0
  164. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.d.ts +1 -0
  165. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.js +18 -5
  166. package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.js +0 -1
  167. package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.js +8 -2
  168. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +1 -0
  169. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +35 -16
  170. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +5 -4
  171. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +70 -33
  172. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.d.ts +1 -0
  173. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +30 -9
  174. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.d.ts +1 -0
  175. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +37 -16
  176. package/Charting/Visuals/RenderableSeries/DrawingProviders/HeatmapHelpers.d.ts +47 -0
  177. package/Charting/Visuals/RenderableSeries/DrawingProviders/HeatmapHelpers.js +258 -0
  178. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +26 -2
  179. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.d.ts +1 -0
  180. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +34 -15
  181. package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.js +5 -230
  182. package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.d.ts +1 -0
  183. package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.js +62 -37
  184. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +30 -3
  185. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.d.ts +1 -0
  186. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +4 -1
  187. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +0 -2
  188. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +0 -4
  189. package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.d.ts +3 -0
  190. package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.js +10 -0
  191. package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.d.ts +4 -0
  192. package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +7 -0
  193. package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.d.ts +4 -0
  194. package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.js +9 -0
  195. package/Charting/Visuals/RenderableSeries/HoveredChangedArgs.d.ts +6 -1
  196. package/Charting/Visuals/RenderableSeries/HoveredChangedArgs.js +2 -1
  197. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +1 -1
  198. package/Charting/Visuals/RenderableSeries/SelectionChangedArgs.d.ts +6 -1
  199. package/Charting/Visuals/RenderableSeries/SelectionChangedArgs.js +2 -1
  200. package/Charting/Visuals/RenderableSeries/ShaderEffect.d.ts +3 -2
  201. package/Charting/Visuals/RenderableSeries/ShaderEffect.js +29 -9
  202. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +50 -1
  203. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +13 -1
  204. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +13 -1
  205. package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +3 -0
  206. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +0 -2
  207. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +4 -4
  208. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +1 -0
  209. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +8 -0
  210. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +1 -2
  211. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +8 -3
  212. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.d.ts +7 -1
  213. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.js +38 -12
  214. package/Charting/Visuals/SciChartDefaults.d.ts +10 -0
  215. package/Charting/Visuals/SciChartDefaults.js +10 -0
  216. package/Charting/Visuals/SciChartOverview.d.ts +2 -1
  217. package/Charting/Visuals/SciChartOverview.js +28 -8
  218. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +16 -3
  219. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +125 -60
  220. package/Charting/Visuals/SciChartSurface.d.ts +4 -41
  221. package/Charting/Visuals/SciChartSurface.js +52 -66
  222. package/Charting/Visuals/SciChartSurfaceBase.d.ts +117 -13
  223. package/Charting/Visuals/SciChartSurfaceBase.js +177 -32
  224. package/Charting/Visuals/TextureManager/CanvasTexture.d.ts +2 -1
  225. package/Charting/Visuals/TextureManager/CanvasTexture.js +37 -17
  226. package/Charting/Visuals/TextureManager/TextureManager.d.ts +2 -1
  227. package/Charting/Visuals/TextureManager/TextureManager.js +27 -7
  228. package/Charting/Visuals/createMaster.d.ts +7 -2
  229. package/Charting/Visuals/createMaster.js +140 -45
  230. package/Charting/Visuals/createSingle.d.ts +0 -2
  231. package/Charting/Visuals/createSingle.js +46 -11
  232. package/Charting/Visuals/licenseManager2D.d.ts +7 -5
  233. package/Charting/Visuals/licenseManager2D.js +105 -53
  234. package/Charting/Visuals/loader.js +3 -1
  235. package/Charting/Visuals/sciChartInitCommon.d.ts +1 -1
  236. package/Charting/Visuals/sciChartInitCommon.js +5 -1
  237. package/Charting3D/CameraController.d.ts +1 -1
  238. package/Charting3D/CameraController.js +21 -7
  239. package/Charting3D/ChartModifiers/ChartModifierBase3D.d.ts +1 -0
  240. package/Charting3D/ChartModifiers/ChartModifierBase3D.js +4 -1
  241. package/Charting3D/ChartModifiers/OrbitModifier3D.d.ts +17 -5
  242. package/Charting3D/ChartModifiers/OrbitModifier3D.js +62 -26
  243. package/Charting3D/ChartModifiers/PinchZoomModifier3D.d.ts +81 -0
  244. package/Charting3D/ChartModifiers/PinchZoomModifier3D.js +164 -0
  245. package/Charting3D/ChartModifiers/ResetCamera3DModifier.d.ts +1 -1
  246. package/Charting3D/ChartModifiers/ResetCamera3DModifier.js +1 -2
  247. package/Charting3D/ChartModifiers/TooltipModifier3D.d.ts +122 -0
  248. package/Charting3D/ChartModifiers/TooltipModifier3D.js +427 -0
  249. package/Charting3D/I3DSurfaceOptions.d.ts +10 -0
  250. package/Charting3D/I3DSurfaceOptions.js +2 -0
  251. package/Charting3D/Model/DataSeries/BaseDataSeries3D.d.ts +2 -1
  252. package/Charting3D/Model/DataSeries/BaseDataSeries3D.js +27 -6
  253. package/Charting3D/Model/DataSeries/BaseGridDataSeries3D.d.ts +1 -1
  254. package/Charting3D/Model/DataSeries/BaseGridDataSeries3D.js +2 -2
  255. package/Charting3D/Model/DataSeries/IPointMetadata3D.d.ts +7 -2
  256. package/Charting3D/Model/DataSeries/UniformGridDataSeries3D.d.ts +8 -0
  257. package/Charting3D/Model/DataSeries/UniformGridDataSeries3D.js +12 -0
  258. package/Charting3D/Model/DataSeries/XyzDataSeries3D.d.ts +2 -2
  259. package/Charting3D/Model/DataSeries/XyzDataSeries3D.js +1 -1
  260. package/Charting3D/Vector3.d.ts +5 -0
  261. package/Charting3D/Vector3.js +7 -0
  262. package/Charting3D/Visuals/Annotations/TooltipSvgAnnotation3D.d.ts +88 -0
  263. package/Charting3D/Visuals/Annotations/TooltipSvgAnnotation3D.js +291 -0
  264. package/Charting3D/Visuals/Axis/AxisBase3D.d.ts +29 -3
  265. package/Charting3D/Visuals/Axis/AxisBase3D.js +46 -18
  266. package/Charting3D/Visuals/Axis/AxisBase3DLabelStyle.js +2 -1
  267. package/Charting3D/Visuals/Axis/AxisCubeEntity.d.ts +0 -4
  268. package/Charting3D/Visuals/Axis/AxisCubeEntity.js +3 -6
  269. package/Charting3D/Visuals/Axis/IAxisDescriptor.d.ts +2 -2
  270. package/Charting3D/Visuals/Axis/IAxisDescriptor.js +2 -2
  271. package/Charting3D/Visuals/Axis/NumericAxis3D.d.ts +3 -2
  272. package/Charting3D/Visuals/Axis/NumericAxis3D.js +7 -3
  273. package/Charting3D/Visuals/Primitives/BaseSceneEntity3D.d.ts +41 -30
  274. package/Charting3D/Visuals/Primitives/BaseSceneEntity3D.js +78 -26
  275. package/Charting3D/Visuals/Primitives/CrosshairLinesSceneEntity.d.ts +47 -0
  276. package/Charting3D/Visuals/Primitives/CrosshairLinesSceneEntity.js +106 -0
  277. package/Charting3D/Visuals/Primitives/EntityIdProvider.d.ts +29 -0
  278. package/Charting3D/Visuals/Primitives/EntityIdProvider.js +28 -0
  279. package/Charting3D/Visuals/Primitives/PointLine3DSceneEntity.d.ts +51 -0
  280. package/Charting3D/Visuals/Primitives/PointLine3DSceneEntity.js +190 -0
  281. package/Charting3D/Visuals/Primitives/RenderableSeriesSceneEntity.d.ts +12 -0
  282. package/Charting3D/Visuals/Primitives/RenderableSeriesSceneEntity.js +14 -0
  283. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.d.ts +11 -0
  284. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +23 -2
  285. package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.d.ts +3 -0
  286. package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.js +17 -1
  287. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.d.ts +21 -1
  288. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +78 -12
  289. package/Charting3D/Visuals/RenderableSeries/Constants.d.ts +2 -0
  290. package/Charting3D/Visuals/RenderableSeries/Constants.js +2 -0
  291. package/Charting3D/Visuals/RenderableSeries/ESeriesType.d.ts +2 -1
  292. package/Charting3D/Visuals/RenderableSeries/ESeriesType.js +1 -0
  293. package/Charting3D/Visuals/RenderableSeries/HitTestInfo3D.d.ts +37 -0
  294. package/Charting3D/Visuals/RenderableSeries/HitTestInfo3D.js +22 -0
  295. package/Charting3D/Visuals/RenderableSeries/PointLineRenderableSeries3D.d.ts +64 -0
  296. package/Charting3D/Visuals/RenderableSeries/PointLineRenderableSeries3D.js +105 -0
  297. package/Charting3D/Visuals/RenderableSeries/SeriesInfo3D.d.ts +51 -0
  298. package/Charting3D/Visuals/RenderableSeries/SeriesInfo3D.js +32 -0
  299. package/Charting3D/Visuals/RenderableSeries/SurfaceMeshSeriesInfo3D.d.ts +15 -0
  300. package/Charting3D/Visuals/RenderableSeries/SurfaceMeshSeriesInfo3D.js +112 -0
  301. package/Charting3D/Visuals/RenderableSeries/XyzSeriesInfo3D.d.ts +20 -0
  302. package/Charting3D/Visuals/RenderableSeries/XyzSeriesInfo3D.js +60 -0
  303. package/Charting3D/Visuals/RootSceneEntity.d.ts +0 -4
  304. package/Charting3D/Visuals/RootSceneEntity.js +3 -8
  305. package/Charting3D/Visuals/SciChart3DRenderer.d.ts +1 -0
  306. package/Charting3D/Visuals/SciChart3DRenderer.js +26 -0
  307. package/Charting3D/Visuals/SciChart3DSurface.d.ts +55 -7
  308. package/Charting3D/Visuals/SciChart3DSurface.js +136 -13
  309. package/Charting3D/Visuals/ViewportManager3DBase.d.ts +4 -0
  310. package/Charting3D/Visuals/ViewportManager3DBase.js +7 -1
  311. package/Charting3D/Visuals/createMaster3d.d.ts +1 -2
  312. package/Charting3D/Visuals/createMaster3d.js +81 -14
  313. package/Charting3D/Visuals/createSingle3d.js +34 -4
  314. package/Charting3D/Visuals/licenseManager3D.js +29 -25
  315. package/Core/BuildStamp.d.ts +1 -1
  316. package/Core/BuildStamp.js +2 -2
  317. package/Core/DeletableEntity.d.ts +34 -0
  318. package/Core/DeletableEntity.js +138 -0
  319. package/Core/Globals.d.ts +11 -0
  320. package/Core/Globals.js +13 -0
  321. package/Core/Guard.d.ts +6 -0
  322. package/Core/Guard.js +10 -0
  323. package/Core/Mouse/MouseManager.d.ts +23 -0
  324. package/Core/Mouse/MouseManager.js +53 -0
  325. package/Core/Telemetry.js +4 -6
  326. package/_wasm/scichart.browser.js +1 -1
  327. package/_wasm/scichart2d.data +0 -0
  328. package/_wasm/scichart2d.js +4 -294
  329. package/_wasm/scichart2d.wasm +0 -0
  330. package/_wasm/scichart3d.data +0 -0
  331. package/_wasm/scichart3d.js +4 -294
  332. package/_wasm/scichart3d.wasm +0 -0
  333. package/index.d.ts +42 -2
  334. package/index.dev.js +68876 -0
  335. package/index.js +81 -27
  336. package/index.min.js +1 -1
  337. package/package.json +3 -4
  338. package/types/ChartModifierType.d.ts +2 -0
  339. package/types/ChartModifierType.js +2 -0
  340. package/types/DefaultRenderLayer.d.ts +9 -8
  341. package/types/DefaultRenderLayer.js +9 -8
  342. package/types/NumberArray.d.ts +1 -0
  343. package/types/NumberArray.js +12 -1
  344. package/types/SceneEntityType.d.ts +13 -5
  345. package/types/SceneEntityType.js +13 -5
  346. package/types/TSciChart.d.ts +37 -8
  347. package/types/TSciChart3D.d.ts +126 -7
  348. package/types/licensingClasses.d.ts +2 -1
  349. package/types/licensingClasses.js +1 -0
  350. package/utils/MemoryUsageHelper.d.ts +92 -0
  351. package/utils/MemoryUsageHelper.js +221 -0
  352. package/utils/array.d.ts +8 -0
  353. package/utils/array.js +58 -1
  354. package/utils/colorUtil.d.ts +7 -0
  355. package/utils/colorUtil.js +13 -1
  356. package/utils/logger.d.ts +2 -0
  357. package/utils/logger.js +11 -0
  358. package/utils/parseColor.js +19 -4
@@ -1,10 +1,27 @@
1
1
  "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
2
17
  Object.defineProperty(exports, "__esModule", { value: true });
3
18
  exports.getLocateFile = exports.copyToCanvas = exports.getMasterCanvas = exports.createChartDestination = exports.SciChartSurfaceBase = exports.ESurfaceType = exports.DebugForDpi = void 0;
4
19
  var classFactory_1 = require("../../Builder/classFactory");
5
20
  var licenseManager2D_1 = require("../../Charting/Visuals/licenseManager2D");
21
+ var DeletableEntity_1 = require("../../Core/DeletableEntity");
6
22
  var Deleter_1 = require("../../Core/Deleter");
7
23
  var EventHandler_1 = require("../../Core/EventHandler");
24
+ var Globals_1 = require("../../Core/Globals");
8
25
  var Guard_1 = require("../../Core/Guard");
9
26
  var MouseManager_1 = require("../../Core/Mouse/MouseManager");
10
27
  var ObservableArray_1 = require("../../Core/ObservableArray");
@@ -13,6 +30,7 @@ var WebGlHelper_1 = require("../../Core/WebGlHelper");
13
30
  var BaseType_1 = require("../../types/BaseType");
14
31
  var array_1 = require("../../utils/array");
15
32
  var guid_1 = require("../../utils/guid");
33
+ var MemoryUsageHelper_1 = require("../../utils/MemoryUsageHelper");
16
34
  var ChartModifierBase_1 = require("../ChartModifiers/ChartModifierBase");
17
35
  var SciChartJSDarkv2Theme_1 = require("../Themes/SciChartJSDarkv2Theme");
18
36
  var DpiHelper_1 = require("./TextureManager/DpiHelper");
@@ -39,7 +57,8 @@ var ESurfaceType;
39
57
  * See derived types {@link SciChartSurface} (2D Charts) and {@link SciChart3DSurface} (3D Charts) for more specific instructions on how
40
58
  * to use the SciChartSurface and create a 2D or 3D {@link https://www.scichart.com/javascript-chart-features | JavaScript Chart}
41
59
  */
42
- var SciChartSurfaceBase = /** @class */ (function () {
60
+ var SciChartSurfaceBase = /** @class */ (function (_super) {
61
+ __extends(SciChartSurfaceBase, _super);
43
62
  /**
44
63
  * Creates an instance of a SciChartSurfaceBase
45
64
  * @param webAssemblyContext The {@link TSciChart | SciChart 2D WebAssembly Context} or {@link TSciChart | SciChart 3D WebAssembly Context}
@@ -48,48 +67,112 @@ var SciChartSurfaceBase = /** @class */ (function () {
48
67
  */
49
68
  function SciChartSurfaceBase(webAssemblyContext, canvases) {
50
69
  if (canvases === void 0) { canvases = {}; }
51
- var _this = this;
52
- this.themeProviderProperty = SciChartSurfaceBase.DEFAULT_THEME;
53
- this.previousThemeProviderProperty = SciChartSurfaceBase.DEFAULT_THEME;
54
- this.isInitializedProperty = false;
55
- this.isDeletedProperty = false;
56
- this.backgroundProperty = SciChartSurfaceBase.DEFAULT_THEME.sciChartBackground;
57
- this.idProperty = (0, guid_1.generateGuid)();
58
- this.suspendableIdProperty = (0, guid_1.generateGuid)();
59
- this.isAlphaEnabledProperty = true;
60
- this.deletables = [];
70
+ var _this = _super.call(this) || this;
71
+ /**
72
+ * An event handler which notifies its subscribers when a render operation has finished. Use this
73
+ * to time render performance, or to update elements of the chart or your UI on redraw.
74
+ */
75
+ _this.rendered = new EventHandler_1.EventHandler();
76
+ _this.themeProviderProperty = SciChartSurfaceBase.DEFAULT_THEME;
77
+ _this.previousThemeProviderProperty = SciChartSurfaceBase.DEFAULT_THEME;
78
+ _this.isInitializedProperty = false;
79
+ _this.isDeletedProperty = false;
80
+ _this.backgroundProperty = SciChartSurfaceBase.DEFAULT_THEME.sciChartBackground;
81
+ _this.idProperty = (0, guid_1.generateGuid)();
82
+ _this.suspendableIdProperty = (0, guid_1.generateGuid)();
83
+ _this.isAlphaEnabledProperty = true;
84
+ _this.deletables = [];
61
85
  Guard_1.Guard.notNull(webAssemblyContext, "webAssemblyContext");
62
- this.domChartRoot = canvases.domChartRoot;
63
- this.domCanvasWebGL = canvases.domCanvasWebGL;
64
- this.domCanvas2D = canvases.domCanvas2D;
65
- this.domSvgContainer = canvases.domSvgContainer;
66
- this.domSvgAdornerLayer = canvases.domSvgAdornerLayer;
67
- this.domDivContainer = canvases.domDivContainer;
68
- this.sharedWasmContext = webAssemblyContext;
69
- this.propertyChanged = new EventHandler_1.EventHandler();
86
+ _this.domChartRoot = canvases.domChartRoot;
87
+ _this.domCanvasWebGL = canvases.domCanvasWebGL;
88
+ _this.domCanvas2D = canvases.domCanvas2D;
89
+ _this.domSvgContainer = canvases.domSvgContainer;
90
+ _this.domSvgAdornerLayer = canvases.domSvgAdornerLayer;
91
+ _this.domDivContainer = canvases.domDivContainer;
92
+ _this.sharedWasmContext = webAssemblyContext;
93
+ _this.propertyChanged = new EventHandler_1.EventHandler();
70
94
  // Flag which ensures Typescript side drives emscripten rendering (one render per draw request)
71
95
  webAssemblyContext.TSRSetDrawRequestsEnabled(true);
72
96
  // Setup chart modifiers
73
- this.detachChartModifier = this.detachChartModifier.bind(this);
74
- this.attachChartModifier = this.attachChartModifier.bind(this);
75
- this.chartModifiers = new ObservableArray_1.ObservableArray();
76
- this.chartModifiers.collectionChanged.subscribe(function (arg) {
97
+ _this.detachChartModifier = _this.detachChartModifier.bind(_this);
98
+ _this.attachChartModifier = _this.attachChartModifier.bind(_this);
99
+ _this.chartModifiers = new ObservableArray_1.ObservableArray();
100
+ _this.chartModifiers.collectionChanged.subscribe(function (arg) {
77
101
  var _a, _b;
78
102
  (_a = arg.getOldItems()) === null || _a === void 0 ? void 0 : _a.forEach(function (cm) { return _this.detachChartModifier(cm); });
79
103
  (_b = arg.getNewItems()) === null || _b === void 0 ? void 0 : _b.forEach(function (cm) { return _this.attachChartModifier(cm); });
80
104
  });
105
+ // Setup annotations
106
+ _this.detachAnnotation = _this.detachAnnotation.bind(_this);
107
+ _this.attachAnnotation = _this.attachAnnotation.bind(_this);
108
+ _this.annotations = new ObservableArray_1.ObservableArray();
109
+ _this.modifierAnnotations = new ObservableArray_1.ObservableArray();
110
+ _this.annotations.collectionChanged.subscribe(function (arg) {
111
+ var _a, _b;
112
+ (_a = arg.getOldItems()) === null || _a === void 0 ? void 0 : _a.forEach(function (a) { return _this.detachAnnotation(a); });
113
+ (_b = arg.getNewItems()) === null || _b === void 0 ? void 0 : _b.forEach(function (a) { return _this.attachAnnotation(a); });
114
+ });
115
+ _this.modifierAnnotations.collectionChanged.subscribe(function (arg) {
116
+ var _a, _b;
117
+ (_a = arg.getOldItems()) === null || _a === void 0 ? void 0 : _a.forEach(function (a) { return _this.detachAnnotation(a); });
118
+ (_b = arg.getNewItems()) === null || _b === void 0 ? void 0 : _b.forEach(function (a) { return _this.attachAnnotation(a); });
119
+ });
81
120
  // Setup mouse manager
82
- this.mouseManager = new MouseManager_1.MouseManager(this);
121
+ _this.mouseManager = new MouseManager_1.MouseManager(_this);
83
122
  if (canvases.domCanvasWebGL) {
84
- this.mouseManager.subscribe(canvases.domCanvasWebGL);
123
+ _this.mouseManager.subscribe(canvases.domCanvasWebGL);
85
124
  }
86
125
  else if (canvases.domCanvas2D) {
87
- this.mouseManager.subscribe(canvases.domCanvas2D);
126
+ _this.mouseManager.subscribe(canvases.domCanvas2D);
88
127
  }
89
128
  // Setup Dpi change listeners
90
- this.onDpiChanged = this.onDpiChanged.bind(this);
91
- DpiHelper_1.DpiHelper.dpiChanged.subscribe(this.onDpiChanged);
129
+ _this.onDpiChanged = _this.onDpiChanged.bind(_this);
130
+ DpiHelper_1.DpiHelper.dpiChanged.subscribe(_this.onDpiChanged);
131
+ try {
132
+ if (process.env.NODE_ENV !== "production") {
133
+ if (MemoryUsageHelper_1.MemoryUsageHelper.isMemoryUsageDebugEnabled) {
134
+ var rootContainer = document.body;
135
+ var observer_1 = new MutationObserver(function () {
136
+ var isInDom = _this.domChartRoot.isConnected;
137
+ if (!isInDom && !_this.isDeleted) {
138
+ console.warn("The chart root element \"".concat(_this.domChartRoot.id, "\" was detached before the surface ").concat(_this.id, " was properly disposed! Make sure to call \"delete\" method on the surface when it is not longer needed."));
139
+ }
140
+ });
141
+ observer_1.observe(rootContainer, { childList: true, subtree: true });
142
+ _this.addDeletable({
143
+ delete: function () { return observer_1.disconnect(); }
144
+ });
145
+ }
146
+ }
147
+ }
148
+ catch (err) {
149
+ console.warn(err);
150
+ }
151
+ return _this;
92
152
  }
153
+ /**
154
+ * Deletes the shared wasmContext ({@link TSciChart | WebAssembly Context}) used by the charts instantiated with {@link SciChartSurface.create} or {@link SciChart3DSurface.create}.
155
+ */
156
+ SciChartSurfaceBase.disposeSharedWasmContext = function () {
157
+ if (Globals_1.sciChart3DDestinations.length === 0 && Globals_1.sciChartDestinations.length === 0) {
158
+ if (SciChartSurfaceBase.domMasterCanvas) {
159
+ document.body.removeChild(SciChartSurfaceBase.domMasterCanvas);
160
+ SciChartSurfaceBase.domMasterCanvas = undefined;
161
+ }
162
+ }
163
+ // try {
164
+ // if (process.env.NODE_ENV !== "production") {
165
+ // if (MemoryUsageHelper.isMemoryUsageDebugEnabled) {
166
+ // // @ts-ignore
167
+ // window.gc && window.gc();
168
+ // // TODO add warning if there are undeleted or uncollected entities instead
169
+ // // MemoryUsageHelper.objectRegistry.log();
170
+ // }
171
+ // }
172
+ // } catch (err) {
173
+ // console.warn(err);
174
+ // }
175
+ };
93
176
  /**
94
177
  * Sets the runtime license key. Use for full licenses or trials only, not developer licenses.
95
178
  * @param keyCode
@@ -97,6 +180,13 @@ var SciChartSurfaceBase = /** @class */ (function () {
97
180
  SciChartSurfaceBase.setRuntimeLicenseKey = function (keyCode) {
98
181
  licenseManager2D_1.licenseManager.setRuntimeLicenseKey(keyCode);
99
182
  };
183
+ /**
184
+ * Causes SciChart to always use its built in community non-commercial license. This stops it attempting to look for the license wizard
185
+ * Usage of the community license constitutes acceptace of the EULA at https://scichart.com/JSCommunityEULA
186
+ */
187
+ SciChartSurfaceBase.UseCommunityLicense = function () {
188
+ licenseManager2D_1.licenseManager.setRuntimeLicenseKey("community");
189
+ };
100
190
  /**
101
191
  * Sets the endpoint for validating a runtime license key with the server. Must be a relative path.
102
192
  * @default api/license
@@ -309,16 +399,29 @@ var SciChartSurfaceBase = /** @class */ (function () {
309
399
  var _a;
310
400
  if (clearHtml === void 0) { clearHtml = true; }
311
401
  this.isDeletedProperty = true;
312
- var currentSurfaceIndex = (_a = this.destinations) === null || _a === void 0 ? void 0 : _a.findIndex(function (dest) { return dest.sciChartSurface === _this; });
402
+ // TODO probably this should be moved outside for Proxy === this comparison issue exists
403
+ var currentSurfaceIndex = (_a = this.destinations) === null || _a === void 0 ? void 0 : _a.findIndex(function (dest) { return dest.sciChartSurface.id === _this.id; });
313
404
  if (currentSurfaceIndex >= 0) {
314
405
  this.destinations.splice(currentSurfaceIndex, 1);
315
406
  }
316
407
  DpiHelper_1.DpiHelper.dpiChanged.unsubscribe(this.onDpiChanged);
317
408
  this.mouseManager.unsubscribe();
409
+ this.mouseManager = undefined;
410
+ this.chartModifiers.asArray().forEach(function (chm) { return chm.delete(); });
411
+ this.modifierAnnotations.asArray().forEach(function (annotation) { return annotation.delete(); });
412
+ this.annotations.asArray().forEach(function (annotation) { return annotation.delete(); });
413
+ this.adornerLayer = undefined;
318
414
  for (var _i = 0, _b = this.deletables; _i < _b.length; _i++) {
319
415
  var deletable = _b[_i];
320
416
  (0, Deleter_1.deleteSafe)(deletable);
321
417
  }
418
+ this.domChartRoot = undefined;
419
+ this.domCanvasWebGL = undefined;
420
+ this.domCanvas2D = undefined;
421
+ this.domSvgContainer = undefined;
422
+ this.domSvgAdornerLayer = undefined;
423
+ this.domDivContainer = undefined;
424
+ this.sharedWasmContext = undefined;
322
425
  this.deletables = [];
323
426
  };
324
427
  SciChartSurfaceBase.prototype.addDeletable = function (deletable) {
@@ -350,6 +453,8 @@ var SciChartSurfaceBase = /** @class */ (function () {
350
453
  * @inheritDoc
351
454
  */
352
455
  SciChartSurfaceBase.prototype.onDpiChanged = function (args) {
456
+ this.annotations.asArray().forEach(function (a) { return a.onDpiChanged(args); });
457
+ this.modifierAnnotations.asArray().forEach(function (a) { return a.onDpiChanged(args); });
353
458
  this.invalidateElement();
354
459
  };
355
460
  Object.defineProperty(SciChartSurfaceBase.prototype, "chartModifierGroups", {
@@ -363,6 +468,22 @@ var SciChartSurfaceBase = /** @class */ (function () {
363
468
  enumerable: false,
364
469
  configurable: true
365
470
  });
471
+ SciChartSurfaceBase.prototype.clearRootElement = function (clearHtml) {
472
+ if (clearHtml && this.domChartRoot) {
473
+ var style = this.domChartRoot.style;
474
+ if (style) {
475
+ style.background = "";
476
+ style.position = "";
477
+ }
478
+ if (this.domChartRoot.hasOwnProperty("replaceChildren")) {
479
+ // @ts-ignore
480
+ this.domChartRoot.replaceChildren();
481
+ }
482
+ else {
483
+ this.domChartRoot.innerHTML = "";
484
+ }
485
+ }
486
+ };
366
487
  SciChartSurfaceBase.prototype.applyOptions = function (options) {
367
488
  var _a;
368
489
  this.idProperty = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : this.idProperty;
@@ -429,7 +550,7 @@ var SciChartSurfaceBase = /** @class */ (function () {
429
550
  DpiHelper_1.DpiHelper.setSize(SciChartSurfaceBase.domMasterCanvas, newWidth, newHeight);
430
551
  var masterCanvasBackBufferWidth = SciChartSurfaceBase.domMasterCanvas.width;
431
552
  var masterCanvasBackBufferHeight = SciChartSurfaceBase.domMasterCanvas.height;
432
- wasmContext.TSRSetMainWindowSize(masterCanvasBackBufferWidth, masterCanvasBackBufferHeight);
553
+ wasmContext.SCRTSetMainWindowSize(masterCanvasBackBufferWidth, masterCanvasBackBufferHeight);
433
554
  };
434
555
  SciChartSurfaceBase.prototype.changeWebGLCanvasViewportSize = function (wasmContext, pixelWidth, pixelHeight) {
435
556
  if (!this.domCanvasWebGL)
@@ -437,7 +558,22 @@ var SciChartSurfaceBase = /** @class */ (function () {
437
558
  var backBufferWidth = pixelWidth * DpiHelper_1.DpiHelper.PIXEL_RATIO;
438
559
  var backBufferHeight = pixelHeight * DpiHelper_1.DpiHelper.PIXEL_RATIO;
439
560
  DpiHelper_1.DpiHelper.setSize(this.domCanvasWebGL, pixelWidth, pixelHeight);
440
- wasmContext.TSRSetMainWindowSize(backBufferWidth, backBufferHeight);
561
+ wasmContext.SCRTSetMainWindowSize(backBufferWidth, backBufferHeight);
562
+ };
563
+ SciChartSurfaceBase.prototype.detachAnnotation = function (annotation) {
564
+ annotation.onDetach();
565
+ annotation.invalidateParentCallback = undefined;
566
+ annotation.parentSurface = undefined;
567
+ this.invalidateElement();
568
+ };
569
+ SciChartSurfaceBase.prototype.attachAnnotation = function (annotation) {
570
+ if (annotation.invalidateParentCallback) {
571
+ throw new Error("Invalid operation in sciChartSurface.attachAnnotation, this annotation has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another");
572
+ }
573
+ annotation.parentSurface = this;
574
+ annotation.invalidateParentCallback = this.invalidateElement;
575
+ annotation.onAttach(this);
576
+ this.invalidateElement();
441
577
  };
442
578
  /**
443
579
  * Gets or sets the application-wide default theme. See {@link IThemeProvider} for details
@@ -450,8 +586,16 @@ var SciChartSurfaceBase = /** @class */ (function () {
450
586
  * chart parts are automatically anti-aliased
451
587
  */
452
588
  SciChartSurfaceBase.AntiAliasWebGlBackbuffer = false;
589
+ /**
590
+ * Defines a delay of the shared wasmContext auto-dispose if {@link autoDisposeWasmContext} is enabled.
591
+ */
592
+ SciChartSurfaceBase.wasmContextDisposeTimeout = 0;
593
+ /**
594
+ * Defines if the shared wasmContext ({@link TSciChart | WebAssembly Context}) should be deleted after all of the surfaces that use it are deleted.
595
+ */
596
+ SciChartSurfaceBase.autoDisposeWasmContext = false;
453
597
  return SciChartSurfaceBase;
454
- }());
598
+ }(DeletableEntity_1.DeletableEntity));
455
599
  exports.SciChartSurfaceBase = SciChartSurfaceBase;
456
600
  var createChartDestination = function (canvas) {
457
601
  if (!canvas)
@@ -470,6 +614,7 @@ var createChartDestination = function (canvas) {
470
614
  };
471
615
  };
472
616
  exports.createChartDestination = createChartDestination;
617
+ /** @ignore */
473
618
  var getMasterCanvas = function () {
474
619
  /** @ignore */
475
620
  var SCICHART_MASTER_CANVAS_ID = "SciChartMasterCanvas";
@@ -1,6 +1,7 @@
1
1
  import { IDeletable } from "../../../Core/IDeletable";
2
2
  import { TSciChart, TSRTexture } from "../../../types/TSciChart";
3
3
  import { TSciChart3D } from "../../../types/TSciChart3D";
4
+ import { DeletableEntity } from "../../../Core/DeletableEntity";
4
5
  /**
5
6
  * @summary The {@link CanvasTexture} is used internally to map an {@link HTMLCanvasElement} to a WebGL Texture.
6
7
  * Use this when you want to create a WebGL texture and draw on it.
@@ -24,7 +25,7 @@ import { TSciChart3D } from "../../../types/TSciChart3D";
24
25
  * canvasTexture.delete();
25
26
  * ```
26
27
  */
27
- export declare class CanvasTexture implements IDeletable {
28
+ export declare class CanvasTexture extends DeletableEntity implements IDeletable {
28
29
  readonly width: number;
29
30
  readonly height: number;
30
31
  canvas: HTMLCanvasElement;
@@ -1,4 +1,19 @@
1
1
  "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
2
17
  Object.defineProperty(exports, "__esModule", { value: true });
3
18
  exports.CanvasTexture = void 0;
4
19
  var app_1 = require("../../../constants/app");
@@ -6,6 +21,7 @@ var Deleter_1 = require("../../../Core/Deleter");
6
21
  var colorUtil_1 = require("../../../utils/colorUtil");
7
22
  var TextureCache_1 = require("../../Drawing/TextureCache");
8
23
  var Guard_1 = require("../../../Core/Guard");
24
+ var DeletableEntity_1 = require("../../../Core/DeletableEntity");
9
25
  /**
10
26
  * @summary The {@link CanvasTexture} is used internally to map an {@link HTMLCanvasElement} to a WebGL Texture.
11
27
  * Use this when you want to create a WebGL texture and draw on it.
@@ -29,7 +45,8 @@ var Guard_1 = require("../../../Core/Guard");
29
45
  * canvasTexture.delete();
30
46
  * ```
31
47
  */
32
- var CanvasTexture = /** @class */ (function () {
48
+ var CanvasTexture = /** @class */ (function (_super) {
49
+ __extends(CanvasTexture, _super);
33
50
  /**
34
51
  * Creates an instance of a {@link CanvasTexture}
35
52
  * @remarks
@@ -41,28 +58,30 @@ var CanvasTexture = /** @class */ (function () {
41
58
  * @param useInterpolation The flat determines whether to useInterpolation when creating texture
42
59
  */
43
60
  function CanvasTexture(webAssemblyContext, textureWidth, textureHeight) {
44
- this.width = Math.floor(textureWidth);
45
- this.height = Math.floor(textureHeight);
46
- Guard_1.Guard.isTrue(this.width > 0, "CanvasTexture.width must be greater than zero");
47
- Guard_1.Guard.isTrue(this.height > 0, "CanvasTexture.height must be greater than zero");
61
+ var _this = _super.call(this) || this;
62
+ _this.width = Math.floor(textureWidth);
63
+ _this.height = Math.floor(textureHeight);
64
+ Guard_1.Guard.isTrue(_this.width > 0, "CanvasTexture.width must be greater than zero");
65
+ Guard_1.Guard.isTrue(_this.height > 0, "CanvasTexture.height must be greater than zero");
48
66
  if (!app_1.IS_TEST_ENV) {
49
- this.canvas = document.createElement("canvas");
50
- this.canvas.width = this.width;
51
- this.canvas.height = this.height;
67
+ _this.canvas = document.createElement("canvas");
68
+ _this.canvas.width = _this.width;
69
+ _this.canvas.height = _this.height;
52
70
  // Uncomment to see the texture on the screen
53
71
  // document.body.appendChild(this.canvas);
54
72
  }
55
- this.wasmContext = webAssemblyContext;
73
+ _this.wasmContext = webAssemblyContext;
56
74
  // Create UIntVector with size once
57
- this.intermediateVector = new this.wasmContext.UIntVector();
58
- this.intermediateVector.resize(this.height * this.width, 0);
75
+ _this.intermediateVector = new _this.wasmContext.UIntVector();
76
+ _this.intermediateVector.resize(_this.height * _this.width, 0);
59
77
  // Create UIntVector that will store initial color values
60
- this.originalIntermediateVector = new this.wasmContext.UIntVector();
61
- this.originalIntermediateVector.resize(this.height * this.width, 0);
62
- var textureFormat = this.wasmContext.eTSRTextureFormat.TSR_TEXTUREFORMAT_A8B8G8R8;
78
+ _this.originalIntermediateVector = new _this.wasmContext.UIntVector();
79
+ _this.originalIntermediateVector.resize(_this.height * _this.width, 0);
80
+ var textureFormat = _this.wasmContext.eTSRTextureFormat.TSR_TEXTUREFORMAT_A8B8G8R8;
63
81
  // Create TSRTexture with size once
64
- this.tsrTextureCache = new TextureCache_1.TextureCache(webAssemblyContext);
65
- this.tsrTextureCache.create(this.width, this.height, textureFormat);
82
+ _this.tsrTextureCache = new TextureCache_1.TextureCache(webAssemblyContext);
83
+ _this.tsrTextureCache.create(_this.width, _this.height, textureFormat);
84
+ return _this;
66
85
  }
67
86
  /**
68
87
  * Get an HTML5 {@link CanvasRenderingContext2D} to draw on.
@@ -93,6 +112,7 @@ var CanvasTexture = /** @class */ (function () {
93
112
  this.intermediateVector = (0, Deleter_1.deleteSafe)(this.intermediateVector);
94
113
  this.originalIntermediateVector = (0, Deleter_1.deleteSafe)(this.originalIntermediateVector);
95
114
  this.tsrTextureCache = (0, Deleter_1.deleteSafe)(this.tsrTextureCache);
115
+ this.wasmContext = undefined;
96
116
  };
97
117
  /**
98
118
  * After you have finished drawing, copy the canvas to the destination {@link TSRTexture}
@@ -139,5 +159,5 @@ var CanvasTexture = /** @class */ (function () {
139
159
  this.wasmContext.SCRTFillTextureAbgr(tsrTexture, this.width, this.height, this.intermediateVector);
140
160
  };
141
161
  return CanvasTexture;
142
- }());
162
+ }(DeletableEntity_1.DeletableEntity));
143
163
  exports.CanvasTexture = CanvasTexture;
@@ -1,3 +1,4 @@
1
+ import { DeletableEntity } from "../../../Core/DeletableEntity";
1
2
  import { IDeletable } from "../../../Core/IDeletable";
2
3
  import { EAxisAlignment } from "../../../types/AxisAlignment";
3
4
  import { TSciChart, TSRTexture } from "../../../types/TSciChart";
@@ -8,7 +9,7 @@ export declare type TTextureObject = {
8
9
  textureWidth: number;
9
10
  textureHeight: number;
10
11
  };
11
- export declare class TextureManager implements IDeletable {
12
+ export declare class TextureManager extends DeletableEntity implements IDeletable {
12
13
  private webAssemblyContext;
13
14
  private canvas;
14
15
  private ctx;
@@ -1,7 +1,23 @@
1
1
  "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
2
17
  Object.defineProperty(exports, "__esModule", { value: true });
3
18
  exports.measureTextWidth = exports.measureTextHeight = exports.TextureManager = void 0;
4
19
  var app_1 = require("../../../constants/app");
20
+ var DeletableEntity_1 = require("../../../Core/DeletableEntity");
5
21
  var AxisAlignment_1 = require("../../../types/AxisAlignment");
6
22
  var LabelAlignment_1 = require("../../../types/LabelAlignment");
7
23
  var font_1 = require("../../../utils/font");
@@ -16,15 +32,18 @@ var DEFAULT_WIDTH = 1920;
16
32
  var PT_TO_PX = 96 / 72;
17
33
  /** @ignore */
18
34
  var PX_TO_PT = 72 / 96;
19
- var TextureManager = /** @class */ (function () {
35
+ var TextureManager = /** @class */ (function (_super) {
36
+ __extends(TextureManager, _super);
20
37
  function TextureManager(webAssemblyContext) {
21
- this.webAssemblyContext = webAssemblyContext;
38
+ var _this = _super.call(this) || this;
39
+ _this.webAssemblyContext = webAssemblyContext;
22
40
  if (!app_1.IS_TEST_ENV) {
23
- this.canvas = document.createElement("canvas");
24
- this.canvas.width = DEFAULT_WIDTH;
25
- this.canvas.height = DEFAULT_HEIGHT;
26
- this.ctx = this.canvas.getContext("2d", { willReadFrequently: true });
41
+ _this.canvas = document.createElement("canvas");
42
+ _this.canvas.width = DEFAULT_WIDTH;
43
+ _this.canvas.height = DEFAULT_HEIGHT;
44
+ _this.ctx = _this.canvas.getContext("2d", { willReadFrequently: true });
27
45
  }
46
+ return _this;
28
47
  }
29
48
  TextureManager.prototype.createSimpleTextTexture = function (text, textStyle, backgroundColor, displayVertically, displayMirrored, opacity) {
30
49
  var rotation = 0;
@@ -268,6 +287,7 @@ var TextureManager = /** @class */ (function () {
268
287
  TextureManager.prototype.delete = function () {
269
288
  this.canvas = undefined;
270
289
  this.ctx = undefined;
290
+ this.webAssemblyContext = undefined;
271
291
  };
272
292
  TextureManager.prototype.createTextureFromCtx = function (textureWidth, textureHeight) {
273
293
  // TODO: Michael cache the canvas, UIntVector, bitmapTexture unless size changed
@@ -307,7 +327,7 @@ var TextureManager = /** @class */ (function () {
307
327
  };
308
328
  };
309
329
  return TextureManager;
310
- }());
330
+ }(DeletableEntity_1.DeletableEntity));
311
331
  exports.TextureManager = TextureManager;
312
332
  var measureTextHeight = function (fontSizePx) { return fontSizePx; };
313
333
  exports.measureTextHeight = measureTextHeight;
@@ -1,7 +1,12 @@
1
+ import { TSciChart } from "../../types/TSciChart";
1
2
  import { I2DSurfaceOptions } from "./I2DSurfaceOptions";
2
3
  import { TWebAssemblyChart } from "./SciChartSurface";
3
- import { TSciChartDestination } from "./SciChartSurfaceBase";
4
4
  /** @ignore */
5
5
  export declare const createMultichart: (divElement: string | HTMLDivElement, options?: I2DSurfaceOptions) => Promise<TWebAssemblyChart>;
6
6
  /** @ignore */
7
- export declare const sciChartDestinations: TSciChartDestination[];
7
+ declare const initializeChartEngine: () => Promise<void>;
8
+ /** @ignore */
9
+ export declare const disposeMultiChart: () => void;
10
+ /** @ignore */
11
+ export declare const monitorWebGL: (wasmContext: TSciChart) => void;
12
+ export { initializeChartEngine as initializeChartEngine2D };