scichart 3.1.346 → 3.2.0-beta

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 (316) hide show
  1. package/Charting/ChartModifiers/ChartModifierBase.d.ts +15 -1
  2. package/Charting/ChartModifiers/ChartModifierBase.js +65 -7
  3. package/Charting/ChartModifiers/CursorModifier.js +13 -1
  4. package/Charting/ChartModifiers/LegendModifier.d.ts +1 -1
  5. package/Charting/ChartModifiers/LegendModifier.js +8 -6
  6. package/Charting/ChartModifiers/PinchZoomModifier.d.ts +38 -8
  7. package/Charting/ChartModifiers/PinchZoomModifier.js +103 -40
  8. package/Charting/ChartModifiers/RolloverModifier.js +10 -3
  9. package/Charting/ChartModifiers/RubberBandXyZoomModifier.d.ts +1 -1
  10. package/Charting/ChartModifiers/SeriesSelectionModifier.js +32 -24
  11. package/Charting/ChartModifiers/ZoomPanModifier.d.ts +13 -38
  12. package/Charting/ChartModifiers/ZoomPanModifier.js +54 -99
  13. package/Charting/Drawing/BaseCache.d.ts +2 -1
  14. package/Charting/Drawing/BaseCache.js +40 -7
  15. package/Charting/Drawing/RenderSurface.d.ts +1 -0
  16. package/Charting/Drawing/RenderSurface.js +5 -1
  17. package/Charting/Drawing/SolidBrushCache.d.ts +2 -1
  18. package/Charting/Drawing/SolidBrushCache.js +23 -3
  19. package/Charting/Drawing/WebGlBrush.d.ts +2 -1
  20. package/Charting/Drawing/WebGlBrush.js +22 -3
  21. package/Charting/Drawing/WebGlPen.d.ts +2 -1
  22. package/Charting/Drawing/WebGlPen.js +23 -4
  23. package/Charting/Drawing/WebGlRenderContext2D.d.ts +4 -3
  24. package/Charting/Drawing/WebGlRenderContext2D.js +26 -7
  25. package/Charting/Model/BaseDataSeries.d.ts +67 -2
  26. package/Charting/Model/BaseDataSeries.js +193 -42
  27. package/Charting/Model/BaseHeatmapDataSeries.js +1 -1
  28. package/Charting/Model/ChartData/SeriesInfo.d.ts +16 -0
  29. package/Charting/Model/ChartData/SeriesInfo.js +7 -0
  30. package/Charting/Model/ChartData/XyzSeriesInfo.d.ts +8 -0
  31. package/Charting/Model/ChartData/XyzSeriesInfo.js +36 -0
  32. package/Charting/Model/DoubleVectorProvider.d.ts +19 -0
  33. package/Charting/Model/DoubleVectorProvider.js +95 -0
  34. package/Charting/Model/HlcDataSeries.d.ts +3 -0
  35. package/Charting/Model/HlcDataSeries.js +44 -15
  36. package/Charting/Model/IDataSeries.d.ts +23 -0
  37. package/Charting/Model/NonUniformHeatmapDataSeries.js +2 -0
  38. package/Charting/Model/OhlcDataSeries.d.ts +3 -0
  39. package/Charting/Model/OhlcDataSeries.js +56 -24
  40. package/Charting/Model/PointSeries/BasePointSeriesResampled.d.ts +4 -5
  41. package/Charting/Model/PointSeries/BasePointSeriesResampled.js +29 -21
  42. package/Charting/Model/PointSeries/BasePointSeriesWrapped.d.ts +2 -0
  43. package/Charting/Model/PointSeries/BasePointSeriesWrapped.js +2 -0
  44. package/Charting/Model/PointSeries/IPointSeries.d.ts +2 -1
  45. package/Charting/Model/PointSeries/OhlcPointSeriesResampled.js +1 -1
  46. package/Charting/Model/PointSeries/XyPointSeriesWrapped.d.ts +2 -1
  47. package/Charting/Model/PointSeries/XyPointSeriesWrapped.js +2 -2
  48. package/Charting/Model/PointSeries/XyyPointSeriesResampled.js +1 -1
  49. package/Charting/Model/UniformHeatmapDataSeries.d.ts +31 -11
  50. package/Charting/Model/UniformHeatmapDataSeries.js +72 -4
  51. package/Charting/Model/XyDataSeries.d.ts +0 -8
  52. package/Charting/Model/XyDataSeries.js +21 -5
  53. package/Charting/Model/XyTextDataSeries.d.ts +2 -0
  54. package/Charting/Model/XyTextDataSeries.js +35 -4
  55. package/Charting/Model/XyyDataSeries.d.ts +2 -0
  56. package/Charting/Model/XyyDataSeries.js +35 -10
  57. package/Charting/Model/XyzDataSeries.d.ts +3 -0
  58. package/Charting/Model/XyzDataSeries.js +36 -10
  59. package/Charting/Numerics/CoordinateCalculators/CategoryCoordinateCalculator.d.ts +3 -5
  60. package/Charting/Numerics/CoordinateCalculators/CategoryCoordinateCalculator.js +5 -7
  61. package/Charting/Numerics/CoordinateCalculators/CoordinateCalculatorBase.d.ts +2 -1
  62. package/Charting/Numerics/CoordinateCalculators/CoordinateCalculatorBase.js +29 -9
  63. package/Charting/Numerics/CoordinateCalculators/FlippedCategoryCoordinateCalculator.d.ts +3 -5
  64. package/Charting/Numerics/CoordinateCalculators/FlippedCategoryCoordinateCalculator.js +5 -7
  65. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.d.ts +14 -10
  66. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +105 -69
  67. package/Charting/Numerics/Resamplers/ResamplingParams.d.ts +4 -2
  68. package/Charting/Numerics/Resamplers/ResamplingParams.js +12 -7
  69. package/Charting/Numerics/TickCoordinateProviders/TickCoordinatesProvider.d.ts +5 -0
  70. package/Charting/Numerics/TickCoordinateProviders/TickCoordinatesProvider.js +7 -0
  71. package/Charting/Numerics/TickProviders/NumericTickProvider.js +3 -4
  72. package/Charting/Numerics/TickProviders/TickProvider.d.ts +5 -0
  73. package/Charting/Numerics/TickProviders/TickProvider.js +7 -0
  74. package/Charting/Services/SciChartRenderer.js +15 -5
  75. package/Charting/Services/TitleRenderer.d.ts +2 -1
  76. package/Charting/Services/TitleRenderer.js +35 -14
  77. package/Charting/Visuals/Annotations/AdornerLayer.d.ts +1 -1
  78. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +6 -6
  79. package/Charting/Visuals/Annotations/AnnotationBase.js +81 -61
  80. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +8 -0
  81. package/Charting/Visuals/Annotations/IAnnotation.d.ts +9 -4
  82. package/Charting/Visuals/Annotations/IAnnotation.js +6 -0
  83. package/Charting/Visuals/Annotations/LineAnnotation.js +3 -1
  84. package/Charting/Visuals/Annotations/RenderContextAnnotationBase.d.ts +5 -0
  85. package/Charting/Visuals/Annotations/RenderContextAnnotationBase.js +16 -0
  86. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +6 -0
  87. package/Charting/Visuals/Annotations/constants.d.ts +1 -0
  88. package/Charting/Visuals/Annotations/constants.js +1 -0
  89. package/Charting/Visuals/Axis/AxisBase2D.d.ts +20 -5
  90. package/Charting/Visuals/Axis/AxisBase2D.js +46 -10
  91. package/Charting/Visuals/Axis/AxisCore.d.ts +4 -1
  92. package/Charting/Visuals/Axis/AxisCore.js +100 -54
  93. package/Charting/Visuals/Axis/AxisRenderer.d.ts +2 -1
  94. package/Charting/Visuals/Axis/AxisRenderer.js +40 -16
  95. package/Charting/Visuals/Axis/AxisTitleRenderer.d.ts +1 -0
  96. package/Charting/Visuals/Axis/AxisTitleRenderer.js +4 -0
  97. package/Charting/Visuals/Axis/CategoryAxisBase.js +4 -4
  98. package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +14 -9
  99. package/Charting/Visuals/Axis/DeltaCalculator/DeltaCalculator.d.ts +5 -0
  100. package/Charting/Visuals/Axis/DeltaCalculator/DeltaCalculator.js +7 -0
  101. package/Charting/Visuals/Axis/LabelProvider/LabelCache.d.ts +2 -2
  102. package/Charting/Visuals/Axis/LabelProvider/LabelCache.js +8 -1
  103. package/Charting/Visuals/Axis/LabelProvider/LabelProvider.d.ts +7 -1
  104. package/Charting/Visuals/Axis/LabelProvider/LabelProvider.js +34 -8
  105. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.d.ts +4 -2
  106. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +8 -2
  107. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.d.ts +1 -0
  108. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +1 -0
  109. package/Charting/Visuals/HeatmapLegend.d.ts +3 -2
  110. package/Charting/Visuals/HeatmapLegend.js +33 -12
  111. package/Charting/Visuals/Helpers/NativeObject.d.ts +8 -5
  112. package/Charting/Visuals/Helpers/NativeObject.js +42 -21
  113. package/Charting/Visuals/Helpers/drawLabel.js +3 -1
  114. package/Charting/Visuals/I2DSurfaceOptions.d.ts +0 -15
  115. package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +3 -1
  116. package/Charting/Visuals/Legend/SciChartLegendBase.js +35 -14
  117. package/Charting/Visuals/Legend/SciChartPieLegend.js +1 -1
  118. package/Charting/Visuals/PointMarkers/BasePointMarker.d.ts +13 -1
  119. package/Charting/Visuals/PointMarkers/BasePointMarker.js +72 -19
  120. package/Charting/Visuals/PointMarkers/Constants.d.ts +2 -1
  121. package/Charting/Visuals/PointMarkers/Constants.js +1 -0
  122. package/Charting/Visuals/PointMarkers/IPointMarker.d.ts +2 -0
  123. package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.js +4 -1
  124. package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.d.ts +1 -1
  125. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +8 -7
  126. package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.d.ts +1 -0
  127. package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.js +5 -0
  128. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +10 -9
  129. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +2 -1
  130. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +101 -69
  131. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +13 -4
  132. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +12 -3
  133. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.d.ts +2 -0
  134. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.js +5 -0
  135. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +6 -0
  136. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.d.ts +1 -0
  137. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.js +18 -5
  138. package/Charting/Visuals/RenderableSeries/DataLabels/NonUniformHeatmapDataLabelProvider.js +0 -1
  139. package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.js +8 -2
  140. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +1 -0
  141. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +35 -16
  142. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +2 -1
  143. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +62 -33
  144. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.d.ts +1 -0
  145. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +30 -9
  146. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.d.ts +1 -0
  147. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +37 -16
  148. package/Charting/Visuals/RenderableSeries/DrawingProviders/HeatmapHelpers.d.ts +47 -0
  149. package/Charting/Visuals/RenderableSeries/DrawingProviders/HeatmapHelpers.js +258 -0
  150. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +26 -2
  151. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.d.ts +1 -0
  152. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +34 -15
  153. package/Charting/Visuals/RenderableSeries/DrawingProviders/NonUniformHeatmapDrawingProvider.js +5 -230
  154. package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.d.ts +1 -0
  155. package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.js +62 -37
  156. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +30 -3
  157. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.d.ts +1 -0
  158. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +4 -1
  159. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +0 -2
  160. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +0 -4
  161. package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.d.ts +3 -0
  162. package/Charting/Visuals/RenderableSeries/FastTextRenderableSeries.js +10 -0
  163. package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.d.ts +4 -0
  164. package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +7 -0
  165. package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.d.ts +4 -0
  166. package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.js +9 -0
  167. package/Charting/Visuals/RenderableSeries/ShaderEffect.d.ts +3 -2
  168. package/Charting/Visuals/RenderableSeries/ShaderEffect.js +29 -9
  169. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +7 -0
  170. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +7 -0
  171. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +7 -0
  172. package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +3 -0
  173. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +0 -2
  174. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +4 -4
  175. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +1 -0
  176. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +8 -0
  177. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +1 -2
  178. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +8 -3
  179. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.d.ts +3 -1
  180. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.js +30 -10
  181. package/Charting/Visuals/SciChartDefaults.d.ts +10 -0
  182. package/Charting/Visuals/SciChartDefaults.js +10 -0
  183. package/Charting/Visuals/SciChartOverview.d.ts +2 -1
  184. package/Charting/Visuals/SciChartOverview.js +28 -8
  185. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +10 -3
  186. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +118 -60
  187. package/Charting/Visuals/SciChartSurface.d.ts +4 -36
  188. package/Charting/Visuals/SciChartSurface.js +48 -61
  189. package/Charting/Visuals/SciChartSurfaceBase.d.ts +99 -13
  190. package/Charting/Visuals/SciChartSurfaceBase.js +155 -32
  191. package/Charting/Visuals/TextureManager/CanvasTexture.d.ts +2 -1
  192. package/Charting/Visuals/TextureManager/CanvasTexture.js +37 -17
  193. package/Charting/Visuals/TextureManager/TextureManager.d.ts +2 -1
  194. package/Charting/Visuals/TextureManager/TextureManager.js +27 -7
  195. package/Charting/Visuals/createMaster.d.ts +4 -2
  196. package/Charting/Visuals/createMaster.js +92 -28
  197. package/Charting/Visuals/createSingle.d.ts +0 -2
  198. package/Charting/Visuals/createSingle.js +44 -9
  199. package/Charting/Visuals/licenseManager2D.d.ts +7 -5
  200. package/Charting/Visuals/licenseManager2D.js +105 -53
  201. package/Charting/Visuals/loader.js +3 -1
  202. package/Charting/Visuals/sciChartInitCommon.d.ts +1 -1
  203. package/Charting/Visuals/sciChartInitCommon.js +5 -1
  204. package/Charting3D/CameraController.d.ts +1 -1
  205. package/Charting3D/CameraController.js +21 -7
  206. package/Charting3D/ChartModifiers/ChartModifierBase3D.d.ts +1 -0
  207. package/Charting3D/ChartModifiers/ChartModifierBase3D.js +4 -1
  208. package/Charting3D/ChartModifiers/OrbitModifier3D.d.ts +17 -5
  209. package/Charting3D/ChartModifiers/OrbitModifier3D.js +62 -26
  210. package/Charting3D/ChartModifiers/PinchZoomModifier3D.d.ts +81 -0
  211. package/Charting3D/ChartModifiers/PinchZoomModifier3D.js +164 -0
  212. package/Charting3D/ChartModifiers/TooltipModifier3D.d.ts +87 -0
  213. package/Charting3D/ChartModifiers/TooltipModifier3D.js +391 -0
  214. package/Charting3D/I3DSurfaceOptions.d.ts +10 -0
  215. package/Charting3D/I3DSurfaceOptions.js +2 -0
  216. package/Charting3D/Model/DataSeries/BaseDataSeries3D.d.ts +2 -1
  217. package/Charting3D/Model/DataSeries/BaseDataSeries3D.js +27 -6
  218. package/Charting3D/Model/DataSeries/UniformGridDataSeries3D.d.ts +8 -0
  219. package/Charting3D/Model/DataSeries/UniformGridDataSeries3D.js +12 -0
  220. package/Charting3D/Model/DataSeries/XyzDataSeries3D.d.ts +2 -2
  221. package/Charting3D/Model/DataSeries/XyzDataSeries3D.js +1 -1
  222. package/Charting3D/Vector3.d.ts +5 -0
  223. package/Charting3D/Vector3.js +7 -0
  224. package/Charting3D/Visuals/Annotations/TooltipSvgAnnotation3D.d.ts +88 -0
  225. package/Charting3D/Visuals/Annotations/TooltipSvgAnnotation3D.js +291 -0
  226. package/Charting3D/Visuals/Axis/AxisBase3D.d.ts +21 -2
  227. package/Charting3D/Visuals/Axis/AxisBase3D.js +48 -18
  228. package/Charting3D/Visuals/Axis/AxisBase3DLabelStyle.js +2 -1
  229. package/Charting3D/Visuals/Axis/AxisCubeEntity.d.ts +0 -4
  230. package/Charting3D/Visuals/Axis/AxisCubeEntity.js +3 -6
  231. package/Charting3D/Visuals/Axis/IAxisDescriptor.d.ts +2 -2
  232. package/Charting3D/Visuals/Axis/IAxisDescriptor.js +2 -2
  233. package/Charting3D/Visuals/Primitives/BaseSceneEntity3D.d.ts +41 -30
  234. package/Charting3D/Visuals/Primitives/BaseSceneEntity3D.js +78 -26
  235. package/Charting3D/Visuals/Primitives/CrosshairLinesSceneEntity.d.ts +47 -0
  236. package/Charting3D/Visuals/Primitives/CrosshairLinesSceneEntity.js +106 -0
  237. package/Charting3D/Visuals/Primitives/EntityIdProvider.d.ts +29 -0
  238. package/Charting3D/Visuals/Primitives/EntityIdProvider.js +28 -0
  239. package/Charting3D/Visuals/Primitives/PointLine3DSceneEntity.d.ts +51 -0
  240. package/Charting3D/Visuals/Primitives/PointLine3DSceneEntity.js +188 -0
  241. package/Charting3D/Visuals/Primitives/RenderableSeriesSceneEntity.d.ts +12 -0
  242. package/Charting3D/Visuals/Primitives/RenderableSeriesSceneEntity.js +14 -0
  243. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.d.ts +11 -0
  244. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +18 -0
  245. package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.d.ts +3 -0
  246. package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.js +15 -0
  247. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.d.ts +16 -1
  248. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +64 -12
  249. package/Charting3D/Visuals/RenderableSeries/Constants.d.ts +2 -0
  250. package/Charting3D/Visuals/RenderableSeries/Constants.js +2 -0
  251. package/Charting3D/Visuals/RenderableSeries/ESeriesType.d.ts +2 -1
  252. package/Charting3D/Visuals/RenderableSeries/ESeriesType.js +1 -0
  253. package/Charting3D/Visuals/RenderableSeries/HitTestInfo3D.d.ts +37 -0
  254. package/Charting3D/Visuals/RenderableSeries/HitTestInfo3D.js +22 -0
  255. package/Charting3D/Visuals/RenderableSeries/PointLineRenderableSeries3D.d.ts +64 -0
  256. package/Charting3D/Visuals/RenderableSeries/PointLineRenderableSeries3D.js +105 -0
  257. package/Charting3D/Visuals/RenderableSeries/SeriesInfo3D.d.ts +51 -0
  258. package/Charting3D/Visuals/RenderableSeries/SeriesInfo3D.js +32 -0
  259. package/Charting3D/Visuals/RenderableSeries/SurfaceMeshSeriesInfo3D.d.ts +15 -0
  260. package/Charting3D/Visuals/RenderableSeries/SurfaceMeshSeriesInfo3D.js +112 -0
  261. package/Charting3D/Visuals/RenderableSeries/XyzSeriesInfo3D.d.ts +20 -0
  262. package/Charting3D/Visuals/RenderableSeries/XyzSeriesInfo3D.js +60 -0
  263. package/Charting3D/Visuals/RootSceneEntity.d.ts +0 -4
  264. package/Charting3D/Visuals/RootSceneEntity.js +3 -8
  265. package/Charting3D/Visuals/SciChart3DRenderer.d.ts +2 -0
  266. package/Charting3D/Visuals/SciChart3DRenderer.js +49 -0
  267. package/Charting3D/Visuals/SciChart3DSurface.d.ts +44 -3
  268. package/Charting3D/Visuals/SciChart3DSurface.js +103 -9
  269. package/Charting3D/Visuals/ViewportManager3DBase.d.ts +4 -0
  270. package/Charting3D/Visuals/ViewportManager3DBase.js +7 -1
  271. package/Charting3D/Visuals/createMaster3d.d.ts +1 -2
  272. package/Charting3D/Visuals/createMaster3d.js +76 -14
  273. package/Charting3D/Visuals/createSingle3d.js +34 -4
  274. package/Charting3D/Visuals/licenseManager3D.js +29 -25
  275. package/Core/BuildStamp.d.ts +1 -1
  276. package/Core/BuildStamp.js +2 -2
  277. package/Core/DeletableEntity.d.ts +28 -0
  278. package/Core/DeletableEntity.js +141 -0
  279. package/Core/Globals.d.ts +11 -0
  280. package/Core/Globals.js +13 -0
  281. package/Core/Guard.d.ts +6 -0
  282. package/Core/Guard.js +10 -0
  283. package/Core/Mouse/MouseManager.d.ts +23 -0
  284. package/Core/Mouse/MouseManager.js +47 -0
  285. package/Core/ObservableArray.d.ts +11 -5
  286. package/Core/ObservableArray.js +25 -6
  287. package/Core/Telemetry.js +4 -6
  288. package/_wasm/scichart.browser.js +1 -1
  289. package/_wasm/scichart2d.data +0 -0
  290. package/_wasm/scichart2d.js +4 -294
  291. package/_wasm/scichart2d.wasm +0 -0
  292. package/_wasm/scichart3d.data +0 -0
  293. package/_wasm/scichart3d.js +4 -294
  294. package/_wasm/scichart3d.wasm +0 -0
  295. package/index.d.ts +43 -2
  296. package/index.js +89 -27
  297. package/index.min.js +1 -1
  298. package/package.json +3 -4
  299. package/types/ChartModifierType.d.ts +2 -0
  300. package/types/ChartModifierType.js +2 -0
  301. package/types/DefaultRenderLayer.d.ts +9 -8
  302. package/types/DefaultRenderLayer.js +9 -8
  303. package/types/NumberArray.d.ts +1 -0
  304. package/types/NumberArray.js +12 -1
  305. package/types/SceneEntityType.d.ts +13 -5
  306. package/types/SceneEntityType.js +13 -5
  307. package/types/TSciChart.d.ts +37 -8
  308. package/types/TSciChart3D.d.ts +126 -7
  309. package/types/licensingClasses.d.ts +2 -1
  310. package/types/licensingClasses.js +1 -0
  311. package/utils/MemoryUsageHelper.d.ts +45 -0
  312. package/utils/MemoryUsageHelper.js +171 -0
  313. package/utils/array.d.ts +8 -0
  314. package/utils/array.js +58 -1
  315. package/utils/logger.d.ts +2 -0
  316. package/utils/logger.js +11 -0
@@ -5,9 +5,11 @@ import { ESurfaceType, SciChartSurfaceBase, TSciChartConfig } from "../../Charti
5
5
  import { TDpiChangedEventArgs } from "../../Charting/Visuals/TextureManager/DpiHelper";
6
6
  import { IGenericAnimation } from "../../Core/Animations/GenericAnimation";
7
7
  import { ObservableArray } from "../../Core/ObservableArray";
8
+ import { Point } from "../../Core/Point";
8
9
  import { SCRTSceneWorld, TSciChart3D as TWasmContext } from "../../types/TSciChart3D";
9
10
  import { TSciChartSurfaceCanvases } from "../../types/TSciChartSurfaceCanvases";
10
11
  import { ICameraController } from "../CameraController";
12
+ import { I3DSurfaceOptions } from "../I3DSurfaceOptions";
11
13
  import { Vector3 } from "../Vector3";
12
14
  import { AxisBase3D } from "./Axis/AxisBase3D";
13
15
  import { AxisCubeEntity } from "./Axis/AxisCubeEntity";
@@ -84,10 +86,11 @@ export declare class SciChart3DSurface extends SciChartSurfaceBase {
84
86
  /**
85
87
  * Creates a {@link SciChart3DSurface} and {@link TSciChart3D | WebAssembly Context} to occupy the div by element ID in your DOM.
86
88
  * @remarks This method is async and must be awaited
87
- * @param divElementId The Div Element ID where the {@link SciChart3DSurface} will reside
89
+ * @param divElementId The ID or reference of Div Element where the {@link SciChart3DSurface} will reside
88
90
  * @param options Optional parameters of type {@link IChartCreationOptions}
89
91
  */
90
- static create(divElementId: string, options?: I2DSurfaceOptions): Promise<TWebAssemblyChart3D>;
92
+ static create(divElementId: string | HTMLDivElement, options?: I2DSurfaceOptions): Promise<TWebAssemblyChart3D>;
93
+ static disposeSharedWasmContext(): void;
91
94
  /**
92
95
  * @summary Gets the collection of {@link IRenderableSeries3D} - the chart types or seres on this {@link SciChart3DSurface}
93
96
  * @description A {@link SciChart3DSurface} can have zero to many {@link IRenderableSeries3D | RenderableSeries}.
@@ -137,6 +140,7 @@ export declare class SciChart3DSurface extends SciChartSurfaceBase {
137
140
  private watermarkPropertyPosition;
138
141
  private isAxisCubeRenderedProperty;
139
142
  private sceneWorldProperty;
143
+ private isHitTestEnabledProperty;
140
144
  /**
141
145
  * Creates an instance of {@link SciChart3DSurface}
142
146
  * @param webAssemblyContext The {@link TSciChart3D | SciChart 3D WebAssembly Context} containing native methods and
@@ -148,10 +152,20 @@ export declare class SciChart3DSurface extends SciChartSurfaceBase {
148
152
  * Used internally: Gets the {@link SCRTSceneWorld} object at the root of the 3d scene graph
149
153
  */
150
154
  getSceneWorld(): SCRTSceneWorld;
155
+ /**
156
+ * Converts a 3D Xyz coordinate in world coordinates space to a screen coordinate (2d) in pixels.
157
+ * This allows you to get the 2D screen coordinate of any object or vertex in the 3D scene.
158
+ * @remarks Note: Conversions to/from world/data space must be performed using the {@link AxisBase3D.getCurrentCoordinateCalculator()}
159
+ * API, which returns {@link CoordinateCalculatorBase}. Functions {@link CoordinateCalculatorBase.getDataValue} and
160
+ * {@link CoordinateCalculatorBase.getCoordinate} convert to/from world coords/data space
161
+ * @param worldCoordXyz The 3D Xyz coordinate
162
+ * @returns The 2D screen coordinate in pixels
163
+ */
164
+ worldToScreenCoord(worldCoordXyz: Vector3): Point;
151
165
  /**
152
166
  * @inheritdoc
153
167
  */
154
- delete(): void;
168
+ delete(clearHtml?: boolean): void;
155
169
  /**
156
170
  * Gets or sets whether the Xyz gizmo is enabled - a small 3D Xyz axis on the bottom left of the 3D Chart
157
171
  */
@@ -224,6 +238,24 @@ export declare class SciChart3DSurface extends SciChartSurfaceBase {
224
238
  * @remarks Axis types which derive from {@link AxisBase3D} or concrete type {@link NumericAxis3D} are valid
225
239
  */
226
240
  set zAxis(zAxis: AxisBase3D);
241
+ /**
242
+ * Required to enable Hit-Test if any of the following functions are needed in SciChart3DSurface:
243
+ * - {@link BaseRenderableSeries3D.hitTest}
244
+ * - {@link TooltipModiifer3D}
245
+ *
246
+ * Enabling hit-test adds minor a performance overhead for drawing and should be disabled if not required.
247
+ * @param isEnabled
248
+ */
249
+ set isHitTestEnabled(isEnabled: boolean);
250
+ /**
251
+ * Required to enable Hit-Test if any of the following functions are needed in SciChart3DSurface:
252
+ * - {@link BaseRenderableSeries3D.hitTest}
253
+ * - {@link TooltipModiifer3D}
254
+ *
255
+ * Enabling hit-test adds minor a performance overhead for drawing and should be disabled if not required.
256
+ * @param isEnabled
257
+ */
258
+ get isHitTestEnabled(): boolean;
227
259
  /**
228
260
  * Called internally
229
261
  * Sets isAxisCubeRenderedProperty flag after Axis Cube is rendered
@@ -282,10 +314,19 @@ export declare class SciChart3DSurface extends SciChartSurfaceBase {
282
314
  * @param timeElapsed
283
315
  */
284
316
  onAnimate(timeElapsed: number): void;
317
+ /**
318
+ * @inheritDoc
319
+ */
320
+ getXAxisById(axisId: string): AxisBase3D;
321
+ /**
322
+ * @inheritDoc
323
+ */
324
+ getYAxisById(axisId: string): AxisBase3D;
285
325
  /**
286
326
  * @inheritDoc
287
327
  */
288
328
  updateWatermark(left: number, bottom: number): void;
329
+ protected applyOptions(options: I3DSurfaceOptions): void;
289
330
  /**
290
331
  * @inheritDoc
291
332
  */
@@ -21,6 +21,7 @@ var DpiHelper_1 = require("../../Charting/Visuals/TextureManager/DpiHelper");
21
21
  var app_1 = require("../../constants/app");
22
22
  var Deleter_1 = require("../../Core/Deleter");
23
23
  var ObservableArray_1 = require("../../Core/ObservableArray");
24
+ var Point_1 = require("../../Core/Point");
24
25
  var CameraController_1 = require("../CameraController");
25
26
  var Vector3_1 = require("../Vector3");
26
27
  var AxisCubeEntity_1 = require("./Axis/AxisCubeEntity");
@@ -33,6 +34,9 @@ var RootSceneEntity_1 = require("./RootSceneEntity");
33
34
  var SciChart3DRenderer_1 = require("./SciChart3DRenderer");
34
35
  var BuildStamp_1 = require("../../Core/BuildStamp");
35
36
  var SciChartDefaults_1 = require("../../Charting/Visuals/SciChartDefaults");
37
+ var WebGlHelper_1 = require("../../Core/WebGlHelper");
38
+ var Globals_1 = require("../../Core/Globals");
39
+ var createMaster_1 = require("../../Charting/Visuals/createMaster");
36
40
  exports.sciChartConfig3D = {};
37
41
  /**
38
42
  * @summary The {@link SciChart3DSurface} is the root 3D Chart control in SciChart's High Performance Real-time
@@ -66,6 +70,7 @@ var SciChart3DSurface = /** @class */ (function (_super) {
66
70
  _this.watermarkPosition = SciChartDefaults_1.SciChartDefaults.watermarkPosition;
67
71
  _this.animationList = [];
68
72
  _this.isAxisCubeRenderedProperty = false;
73
+ _this.isHitTestEnabledProperty = false;
69
74
  var canvasWidth = (_b = (_a = _this.domCanvas2D) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : app_1.DEFAULT_WIDTH;
70
75
  var canvasHeight = (_d = (_c = _this.domCanvas2D) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : app_1.DEFAULT_HEIGHT;
71
76
  _this.webAssemblyContext3D = webAssemblyContext;
@@ -82,7 +87,7 @@ var SciChart3DSurface = /** @class */ (function (_super) {
82
87
  _this.invalidateElement = _this.invalidateElement.bind(_this);
83
88
  _this.sciChart3DRenderer = new SciChart3DRenderer_1.SciChart3DRenderer(_this, webAssemblyContext);
84
89
  // Set default viewportManager
85
- _this.viewportManager = new DefaultViewportManager3D_1.DefaultViewportManager3D();
90
+ _this.viewportManager = new DefaultViewportManager3D_1.DefaultViewportManager3D(canvasWidth, canvasHeight);
86
91
  // Set default WorldDimensions
87
92
  _this.worldDimensionsProperty = (options === null || options === void 0 ? void 0 : options.worldDimensions) || new Vector3_1.Vector3(300, 200, 300);
88
93
  // Setup series
@@ -94,9 +99,8 @@ var SciChart3DSurface = /** @class */ (function (_super) {
94
99
  (_a = args.getOldItems()) === null || _a === void 0 ? void 0 : _a.forEach(function (rs) { return _this.detachSeries(rs); });
95
100
  (_b = args.getNewItems()) === null || _b === void 0 ? void 0 : _b.forEach(function (rs) { return _this.attachSeries(rs); });
96
101
  });
97
- // Set default camera
102
+ // Set default scene
98
103
  _this.childPropertyChanged = _this.childPropertyChanged.bind(_this);
99
- _this.camera = (options === null || options === void 0 ? void 0 : options.camera) || new CameraController_1.CameraController(_this.webAssemblyContext3D);
100
104
  _this.sceneWorldProperty = new _this.webAssemblyContext3D.SCRTSceneWorld();
101
105
  _this.sceneWorldProperty.Init();
102
106
  _this.rootEntity = new RootSceneEntity_1.RootSceneEntity(webAssemblyContext, _this);
@@ -122,7 +126,10 @@ var SciChart3DSurface = /** @class */ (function (_super) {
122
126
  * @param options Optional parameters of type {@link I2DSurfaceOptions}
123
127
  */
124
128
  SciChart3DSurface.createSingle = function (divElement, options) {
125
- return (0, createSingle3d_1.createSingle3dInternal)(divElement, options);
129
+ return (0, createSingle3d_1.createSingle3dInternal)(divElement, options).then(function (result) {
130
+ result.sciChart3DSurface.applyOptions(options);
131
+ return result;
132
+ });
126
133
  };
127
134
  /**
128
135
  * Allows setting of web URL for Wasm and Data files, in the case you are loading SciChart outside of npm/webpack environment.
@@ -152,11 +159,21 @@ var SciChart3DSurface = /** @class */ (function (_super) {
152
159
  /**
153
160
  * Creates a {@link SciChart3DSurface} and {@link TSciChart3D | WebAssembly Context} to occupy the div by element ID in your DOM.
154
161
  * @remarks This method is async and must be awaited
155
- * @param divElementId The Div Element ID where the {@link SciChart3DSurface} will reside
162
+ * @param divElementId The ID or reference of Div Element where the {@link SciChart3DSurface} will reside
156
163
  * @param options Optional parameters of type {@link IChartCreationOptions}
157
164
  */
158
165
  SciChart3DSurface.create = function (divElementId, options) {
159
- return (0, createMaster3d_1.createMultichart3d)(divElementId, options);
166
+ return (0, createMaster3d_1.createMultichart3d)(divElementId, options).then(function (result) {
167
+ result.sciChart3DSurface.applyOptions(options);
168
+ return result;
169
+ });
170
+ };
171
+ SciChart3DSurface.disposeSharedWasmContext = function () {
172
+ if (Globals_1.sciChart3DDestinations.length === 0 && Globals_1.sciChartDestinations.length === 0) {
173
+ (0, createMaster_1.disposeMultiChart)();
174
+ (0, createMaster3d_1.disposeMultiChart3d)();
175
+ }
176
+ _super.disposeSharedWasmContext.call(this);
160
177
  };
161
178
  /**
162
179
  * Used internally: Gets the {@link SCRTSceneWorld} object at the root of the 3d scene graph
@@ -164,11 +181,31 @@ var SciChart3DSurface = /** @class */ (function (_super) {
164
181
  SciChart3DSurface.prototype.getSceneWorld = function () {
165
182
  return this.sceneWorldProperty;
166
183
  };
184
+ /**
185
+ * Converts a 3D Xyz coordinate in world coordinates space to a screen coordinate (2d) in pixels.
186
+ * This allows you to get the 2D screen coordinate of any object or vertex in the 3D scene.
187
+ * @remarks Note: Conversions to/from world/data space must be performed using the {@link AxisBase3D.getCurrentCoordinateCalculator()}
188
+ * API, which returns {@link CoordinateCalculatorBase}. Functions {@link CoordinateCalculatorBase.getDataValue} and
189
+ * {@link CoordinateCalculatorBase.getCoordinate} convert to/from world coords/data space
190
+ * @param worldCoordXyz The 3D Xyz coordinate
191
+ * @returns The 2D screen coordinate in pixels
192
+ */
193
+ SciChart3DSurface.prototype.worldToScreenCoord = function (worldCoordXyz) {
194
+ var sceneWorld = this.getSceneWorld();
195
+ if (!sceneWorld)
196
+ return undefined;
197
+ var tsrWorldXyz = worldCoordXyz.toTsrVector3(this.webAssemblyContext3D);
198
+ var tsrScreen2D = sceneWorld.TransformWorldToScreenCoords(tsrWorldXyz);
199
+ var screen2D = new Point_1.Point(tsrScreen2D.x, tsrScreen2D.y);
200
+ tsrScreen2D.delete();
201
+ tsrWorldXyz.delete();
202
+ return screen2D;
203
+ };
167
204
  /**
168
205
  * @inheritdoc
169
206
  */
170
- SciChart3DSurface.prototype.delete = function () {
171
- _super.prototype.delete.call(this);
207
+ SciChart3DSurface.prototype.delete = function (clearHtml) {
208
+ if (clearHtml === void 0) { clearHtml = true; }
172
209
  this.renderableSeries.asArray().forEach(function (el) { return el.delete(); });
173
210
  this.renderableSeries.clear();
174
211
  this.xAxis = (0, Deleter_1.deleteSafe)(this.xAxis);
@@ -181,6 +218,8 @@ var SciChart3DSurface = /** @class */ (function (_super) {
181
218
  if (!app_1.IS_TEST_ENV) {
182
219
  this.webAssemblyContext3D.SCRTSetActiveWorld(null);
183
220
  }
221
+ this.clearRootElement(clearHtml);
222
+ _super.prototype.delete.call(this);
184
223
  };
185
224
  Object.defineProperty(SciChart3DSurface.prototype, "enableGizmo", {
186
225
  /**
@@ -328,6 +367,36 @@ var SciChart3DSurface = /** @class */ (function (_super) {
328
367
  enumerable: false,
329
368
  configurable: true
330
369
  });
370
+ Object.defineProperty(SciChart3DSurface.prototype, "isHitTestEnabled", {
371
+ /**
372
+ * Required to enable Hit-Test if any of the following functions are needed in SciChart3DSurface:
373
+ * - {@link BaseRenderableSeries3D.hitTest}
374
+ * - {@link TooltipModiifer3D}
375
+ *
376
+ * Enabling hit-test adds minor a performance overhead for drawing and should be disabled if not required.
377
+ * @param isEnabled
378
+ */
379
+ get: function () {
380
+ return this.isHitTestEnabledProperty;
381
+ },
382
+ /**
383
+ * Required to enable Hit-Test if any of the following functions are needed in SciChart3DSurface:
384
+ * - {@link BaseRenderableSeries3D.hitTest}
385
+ * - {@link TooltipModiifer3D}
386
+ *
387
+ * Enabling hit-test adds minor a performance overhead for drawing and should be disabled if not required.
388
+ * @param isEnabled
389
+ */
390
+ set: function (isEnabled) {
391
+ if (isEnabled !== this.isHitTestEnabledProperty) {
392
+ this.isHitTestEnabledProperty = isEnabled;
393
+ this.webAssemblyContext3D.SCRTSetIsSelectionBufferEnabled(isEnabled);
394
+ this.invalidateElement();
395
+ }
396
+ },
397
+ enumerable: false,
398
+ configurable: true
399
+ });
331
400
  /**
332
401
  * Called internally
333
402
  * Sets isAxisCubeRenderedProperty flag after Axis Cube is rendered
@@ -350,11 +419,16 @@ var SciChart3DSurface = /** @class */ (function (_super) {
350
419
  * @inheritDoc
351
420
  */
352
421
  SciChart3DSurface.prototype.invalidateElement = function () {
422
+ var _a;
353
423
  // When isSuspended (see suspendUpdates() function) ignore drawing
354
- if (this.isSuspended) {
424
+ if (this.isSuspended || this.isDeleted) {
355
425
  // Logger.log("SciChart3DSurface.isSuspended = true. Ignoring invalidateElement() call");
356
426
  return;
357
427
  }
428
+ // Prevent drawing request when WebGL context is lost
429
+ if ((_a = WebGlHelper_1.WebGlHelper.getContext(this.webAssemblyContext3D.canvas)) === null || _a === void 0 ? void 0 : _a.isContextLost()) {
430
+ return;
431
+ }
358
432
  var canvasId = this.domCanvas2D ? this.domCanvas2D.id : "undefinedCanvasId";
359
433
  this.webAssemblyContext3D.TSRRequestCanvasDraw(canvasId);
360
434
  };
@@ -409,6 +483,7 @@ var SciChart3DSurface = /** @class */ (function (_super) {
409
483
  if (!pixelWidth || !pixelHeight) {
410
484
  return;
411
485
  }
486
+ this.viewportManager.setSize(pixelWidth, pixelHeight);
412
487
  if (this.isCopyCanvasSurface) {
413
488
  this.changeMasterCanvasViewportSize(this.webAssemblyContext3D, pixelWidth, pixelHeight);
414
489
  if (this.domCanvas2D) {
@@ -475,6 +550,18 @@ var SciChart3DSurface = /** @class */ (function (_super) {
475
550
  this.animationList = remainingAnimations;
476
551
  }
477
552
  };
553
+ /**
554
+ * @inheritDoc
555
+ */
556
+ SciChart3DSurface.prototype.getXAxisById = function (axisId) {
557
+ return this.xAxis;
558
+ };
559
+ /**
560
+ * @inheritDoc
561
+ */
562
+ SciChart3DSurface.prototype.getYAxisById = function (axisId) {
563
+ return this.yAxis;
564
+ };
478
565
  /**
479
566
  * @inheritDoc
480
567
  */
@@ -490,6 +577,13 @@ var SciChart3DSurface = /** @class */ (function (_super) {
490
577
  this.webAssemblyContext3D.SCRT3DSetWaterMarkProperties(this.watermarkProperties);
491
578
  }
492
579
  };
580
+ SciChart3DSurface.prototype.applyOptions = function (options) {
581
+ _super.prototype.applyOptions.call(this, options);
582
+ this.camera = new CameraController_1.CameraController(this.webAssemblyContext3D, options === null || options === void 0 ? void 0 : options.cameraOptions);
583
+ if (options === null || options === void 0 ? void 0 : options.worldDimensions) {
584
+ this.worldDimensions = options.worldDimensions;
585
+ }
586
+ };
493
587
  /**
494
588
  * @inheritDoc
495
589
  */
@@ -14,6 +14,10 @@ export declare abstract class ViewportManager3DBase {
14
14
  * The parent {@link SciChart3DSurface} when attached
15
15
  */
16
16
  parentSurface: SciChart3DSurface;
17
+ width: number;
18
+ height: number;
19
+ constructor(width: number, height: number);
20
+ setSize(width: number, height: number): void;
17
21
  /**
18
22
  * Called when attached to a {@link SciChart3DSurface}
19
23
  * @param scs The {@link SciChart3DSurface}
@@ -7,8 +7,14 @@ var AutoRange_1 = require("../../types/AutoRange");
7
7
  * on a {@link SciChart3DSurface}
8
8
  */
9
9
  var ViewportManager3DBase = /** @class */ (function () {
10
- function ViewportManager3DBase() {
10
+ function ViewportManager3DBase(width, height) {
11
+ this.width = width;
12
+ this.height = height;
11
13
  }
14
+ ViewportManager3DBase.prototype.setSize = function (width, height) {
15
+ this.width = width;
16
+ this.height = height;
17
+ };
12
18
  /**
13
19
  * Called when attached to a {@link SciChart3DSurface}
14
20
  * @param scs The {@link SciChart3DSurface}
@@ -1,7 +1,6 @@
1
1
  import { I2DSurfaceOptions } from "../../Charting/Visuals/I2DSurfaceOptions";
2
- import { TSciChartDestination } from "../../Charting/Visuals/SciChartSurfaceBase";
3
2
  import { TWebAssemblyChart3D } from "./SciChart3DSurface";
4
3
  /** @ignore */
5
4
  export declare const createMultichart3d: (divElement: string | HTMLDivElement, options?: I2DSurfaceOptions) => Promise<TWebAssemblyChart3D>;
6
5
  /** @ignore */
7
- export declare const sciChartDestinations: TSciChartDestination[];
6
+ export declare const disposeMultiChart3d: () => void;
@@ -36,14 +36,19 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.sciChartDestinations = exports.createMultichart3d = void 0;
39
+ exports.disposeMultiChart3d = exports.createMultichart3d = void 0;
40
40
  // @ts-ignore
41
41
  var WasmModule3D = require("../../_wasm/scichart3d");
42
42
  var chartBuilder_1 = require("../../Builder/chartBuilder");
43
+ var licenseManager2D_1 = require("../../Charting/Visuals/licenseManager2D");
43
44
  var loader_1 = require("../../Charting/Visuals/loader");
45
+ var SciChartDefaults_1 = require("../../Charting/Visuals/SciChartDefaults");
44
46
  var sciChartInitCommon_1 = require("../../Charting/Visuals/sciChartInitCommon");
45
47
  var SciChartSurfaceBase_1 = require("../../Charting/Visuals/SciChartSurfaceBase");
46
48
  var BuildStamp_1 = require("../../Core/BuildStamp");
49
+ var DeletableEntity_1 = require("../../Core/DeletableEntity");
50
+ var Globals_1 = require("../../Core/Globals");
51
+ var MemoryUsageHelper_1 = require("../../utils/MemoryUsageHelper");
47
52
  var licenseManager3D_1 = require("./licenseManager3D");
48
53
  var SciChart3DSurface_1 = require("./SciChart3DSurface");
49
54
  /** @ignore */
@@ -63,7 +68,7 @@ var createMultichart3d = function (divElement, options) { return __awaiter(void
63
68
  case 0:
64
69
  (0, chartBuilder_1.ensureRegistrations)();
65
70
  sciChartInitCommon_1.default.checkChartDivExists(divElement);
66
- canvases = sciChartInitCommon_1.default.initCanvas(divElement, (_a = options === null || options === void 0 ? void 0 : options.widthAspect) !== null && _a !== void 0 ? _a : 0, (_b = options === null || options === void 0 ? void 0 : options.heightAspect) !== null && _b !== void 0 ? _b : 0, sciChartInitCommon_1.default.ECanvasType.canvas2D);
71
+ canvases = sciChartInitCommon_1.default.initCanvas(divElement, (_a = options === null || options === void 0 ? void 0 : options.widthAspect) !== null && _a !== void 0 ? _a : 0, (_b = options === null || options === void 0 ? void 0 : options.heightAspect) !== null && _b !== void 0 ? _b : 0, sciChartInitCommon_1.default.ECanvasType.canvas2D, undefined, options === null || options === void 0 ? void 0 : options.touchAction);
67
72
  loader = (_c = options === null || options === void 0 ? void 0 : options.loader) !== null && _c !== void 0 ? _c : new loader_1.DefaultSciChartLoader();
68
73
  loaderDiv = loader.addChartLoader(canvases.domDivContainer, (_d = options === null || options === void 0 ? void 0 : options.theme) !== null && _d !== void 0 ? _d : SciChartSurfaceBase_1.SciChartSurfaceBase.DEFAULT_THEME);
69
74
  _f.label = 1;
@@ -105,14 +110,25 @@ var createMultichart3d = function (divElement, options) { return __awaiter(void
105
110
  });
106
111
  }); };
107
112
  exports.createMultichart3d = createMultichart3d;
113
+ var cleanupWasmContext;
108
114
  /** @ignore */
109
- exports.sciChartDestinations = [];
115
+ var disposeMultiChart3d = function () {
116
+ if (cleanupWasmContext) {
117
+ cleanupWasmContext();
118
+ }
119
+ sciChartMaster3D.createChildSurface = undefined;
120
+ sciChartMaster3D.getChildSurfaces = undefined;
121
+ sciChartMaster3D.wasmContext = undefined;
122
+ sciChartMaster3DPromise = undefined;
123
+ licenseManager2D_1.licenseManager.clear();
124
+ };
125
+ exports.disposeMultiChart3d = disposeMultiChart3d;
110
126
  /** @ignore */
111
127
  var createMaster = function () {
112
128
  var createChildSurfaceInner = function (wasmContext, divElementId, canvases, theme) {
113
129
  var sciChart3DSurface = new SciChart3DSurface_1.SciChart3DSurface(wasmContext, { canvases: canvases });
114
130
  sciChart3DSurface.applyTheme(theme);
115
- sciChart3DSurface.setDestinations(exports.sciChartDestinations);
131
+ sciChart3DSurface.setDestinations(Globals_1.sciChart3DDestinations);
116
132
  var unsub = sciChartInitCommon_1.default.subscribeToResize(canvases.domChartRoot, canvases.aspect, sciChart3DSurface);
117
133
  sciChart3DSurface.addDeletable(unsub);
118
134
  return sciChart3DSurface;
@@ -125,28 +141,72 @@ var createMaster = function () {
125
141
  }
126
142
  var dest = wasmContext.SCRTSurfaceDestination.implement(newDestination);
127
143
  chartInitObj3D.AddDestination(dest);
128
- exports.sciChartDestinations.push({ canvasElementId: canvasElementId, sciChartSurface: sciChartSurface, width: width, height: height });
144
+ Globals_1.sciChart3DDestinations.push({ canvasElementId: canvasElementId, sciChartSurface: sciChartSurface, width: width, height: height });
129
145
  };
130
146
  return new Promise(function (resolve, reject) {
131
147
  var locateFile = (0, SciChartSurfaceBase_1.getLocateFile)(SciChart3DSurface_1.sciChartConfig3D);
132
148
  // @ts-ignore
133
149
  new WasmModule3D({ locateFile: locateFile, noInitialRun: true })
134
- .then(function (wasmContext) {
135
- var getChildSurfaces = function () { return exports.sciChartDestinations.map(function (el) { return el.sciChartSurface; }); };
150
+ .then(function (originalWasmContext) {
151
+ var revocable = (0, DeletableEntity_1.createWasmContextRevocableProxy)(originalWasmContext);
152
+ var wasmContext = revocable.proxy;
153
+ cleanupWasmContext = function () {
154
+ // Halt the engine
155
+ wasmContext.TSRRequestExit();
156
+ frameRenderer3D.delete();
157
+ // wasmContext.SCRTGetGlobalSampleChartInterface().GetFrameRenderer().delete();
158
+ wasmContext.SCRTGetGlobalSampleChartInterface().SetFrameRenderer(null);
159
+ wasmContext.SCRTGetGlobalSampleChartInterface().delete();
160
+ wasmContext.SCRTSetGlobalSampleChartInterface(null);
161
+ // deleteCache(wasmContext);
162
+ canvasCopyObj.delete();
163
+ wasmContext.SCRTSetGlobalCopyToDestinationInterface(null);
164
+ revocable.revoke();
165
+ revocable = undefined;
166
+ cleanupWasmContext = undefined;
167
+ };
168
+ var getChildSurfaces = function () {
169
+ return Globals_1.sciChart3DDestinations.map(function (el) { return el.sciChartSurface; });
170
+ };
136
171
  // Create of replace child surface
137
172
  var createChildSurface = function (divElementId, canvases, theme) {
138
173
  var canvas2dId = sciChartInitCommon_1.default.getCanvas2dId(divElementId);
139
- var otherDestinations = exports.sciChartDestinations.filter(function (el) { return el.canvasElementId !== canvas2dId; });
174
+ var otherDestinations = Globals_1.sciChart3DDestinations.filter(function (el) { return el.canvasElementId !== canvas2dId; });
140
175
  chartInitObj.ClearDestinations();
141
- var sameIdDestination = exports.sciChartDestinations.filter(function (el) { return el.canvasElementId === canvas2dId; });
176
+ var sameIdDestination = Globals_1.sciChart3DDestinations.filter(function (el) { return el.canvasElementId === canvas2dId; });
142
177
  sameIdDestination.forEach(function (el) { return el.sciChartSurface.delete(); });
143
- while (exports.sciChartDestinations.length > 0) {
144
- exports.sciChartDestinations.pop();
178
+ while (Globals_1.sciChart3DDestinations.length > 0) {
179
+ Globals_1.sciChart3DDestinations.pop();
145
180
  }
146
181
  otherDestinations.forEach(function (el) {
147
182
  return addDestination(wasmContext, el.canvasElementId, el.sciChartSurface, el.width, el.height, chartInitObj);
148
183
  });
149
184
  var sciChart3DSurface = createChildSurfaceInner(wasmContext, divElementId, canvases, theme);
185
+ sciChart3DSurface.addDeletable({
186
+ delete: function () {
187
+ if (SciChart3DSurface_1.SciChart3DSurface.autoDisposeWasmContext &&
188
+ sciChart3DSurface.otherSurfaces.length === 0) {
189
+ if (SciChart3DSurface_1.SciChart3DSurface.wasmContextDisposeTimeout) {
190
+ setTimeout(function () {
191
+ if (Globals_1.sciChart3DDestinations.length === 0) {
192
+ SciChart3DSurface_1.SciChart3DSurface.disposeSharedWasmContext();
193
+ }
194
+ }, SciChart3DSurface_1.SciChart3DSurface.wasmContextDisposeTimeout);
195
+ }
196
+ else {
197
+ SciChart3DSurface_1.SciChart3DSurface.disposeSharedWasmContext();
198
+ }
199
+ }
200
+ else {
201
+ if (process.env.NODE_ENV !== "production") {
202
+ if (MemoryUsageHelper_1.MemoryUsageHelper.isMemoryUsageDebugEnabled &&
203
+ sciChart3DSurface.otherSurfaces.length === 0) {
204
+ console.warn("SciChart3DSurface.autoDisposeWasmContext is disabled, thus wasmContext should be disposed explicitly using \"SciChartSurface.disposeSharedWasmContext()\".");
205
+ }
206
+ }
207
+ }
208
+ }
209
+ });
150
210
  addDestination(wasmContext, canvas2dId, sciChart3DSurface, canvases.domCanvas2D.width, canvases.domCanvas2D.height, chartInitObj);
151
211
  (0, licenseManager3D_1.applyLicense3D)(wasmContext, sciChart3DSurface, false);
152
212
  return sciChart3DSurface;
@@ -157,7 +217,7 @@ var createMaster = function () {
157
217
  resolve({ getChildSurfaces: getChildSurfaces, createChildSurface: createChildSurface, wasmContext: wasmContext });
158
218
  },
159
219
  Draw: function (canvasId) {
160
- var dest = exports.sciChartDestinations.find(function (d) { return d.canvasElementId === canvasId; });
220
+ var dest = Globals_1.sciChart3DDestinations.find(function (d) { return d.canvasElementId === canvasId; });
161
221
  if (dest) {
162
222
  dest.sciChartSurface.doDrawingLoop();
163
223
  }
@@ -173,6 +233,8 @@ var createMaster = function () {
173
233
  var frameRenderer3D = new wasmContext.SCRTFrameRenderer3D();
174
234
  chartInitObj.SetFrameRenderer(frameRenderer3D);
175
235
  chartInitObj.SetFPSCounterEnabled(false);
236
+ // This may not be used in the case of 3D charts, but we set the property anyway as its passed down to TSR engine when initialising
237
+ chartInitObj.SetWasmBufferSizesKb(SciChartDefaults_1.SciChartDefaults.wasmBufferSizesKb);
176
238
  wasmContext.SCRTSetGlobalSampleChartInterface(chartInitObj);
177
239
  // create an object that native side can trigger the copy to from...
178
240
  var canvasCopyObj = wasmContext.SCRTCopyToDestinationInterface.implement({
@@ -183,7 +245,7 @@ var createMaster = function () {
183
245
  // SCJS-1321 fixes cutting 3d chart issue. 3D wasm and vice versa doesn't know about domMasterCanvas width/height
184
246
  // when creating one 3d chart and one 2d chart on the same screen. So we tell the other wasm about existing master canvas size
185
247
  if (SciChartSurfaceBase_1.SciChartSurfaceBase.domMasterCanvas) {
186
- wasmContext.TSRSetMainWindowSize(SciChartSurfaceBase_1.SciChartSurfaceBase.domMasterCanvas.width, SciChartSurfaceBase_1.SciChartSurfaceBase.domMasterCanvas.height);
248
+ wasmContext.SCRTSetMainWindowSize(SciChartSurfaceBase_1.SciChartSurfaceBase.domMasterCanvas.width, SciChartSurfaceBase_1.SciChartSurfaceBase.domMasterCanvas.height);
187
249
  }
188
250
  // @ts-ignore
189
251
  wasmContext.callMain();
@@ -195,5 +257,5 @@ var createMaster = function () {
195
257
  };
196
258
  /** @ignore */
197
259
  var getDestinationById = function (destinationId) {
198
- return exports.sciChartDestinations.find(function (dest) { return dest.canvasElementId === destinationId; });
260
+ return Globals_1.sciChart3DDestinations.find(function (dest) { return dest.canvasElementId === destinationId; });
199
261
  };
@@ -4,10 +4,13 @@ exports.createSingle3dInternal = void 0;
4
4
  // @ts-ignore
5
5
  var WasmModule3D = require("../../_wasm/scichart3d");
6
6
  var chartBuilder_1 = require("../../Builder/chartBuilder");
7
+ var licenseManager2D_1 = require("../../Charting/Visuals/licenseManager2D");
7
8
  var loader_1 = require("../../Charting/Visuals/loader");
9
+ var SciChartDefaults_1 = require("../../Charting/Visuals/SciChartDefaults");
8
10
  var sciChartInitCommon_1 = require("../../Charting/Visuals/sciChartInitCommon");
9
11
  var SciChartSurfaceBase_1 = require("../../Charting/Visuals/SciChartSurfaceBase");
10
12
  var BuildStamp_1 = require("../../Core/BuildStamp");
13
+ var DeletableEntity_1 = require("../../Core/DeletableEntity");
11
14
  var WebGlHelper_1 = require("../../Core/WebGlHelper");
12
15
  var licenseManager3D_1 = require("./licenseManager3D");
13
16
  var SciChart3DSurface_1 = require("./SciChart3DSurface");
@@ -15,7 +18,7 @@ var createSingle3dInternal = function (divElement, options) {
15
18
  (0, chartBuilder_1.ensureRegistrations)();
16
19
  return new Promise(function (resolve, reject) {
17
20
  var _a, _b, _c, _d;
18
- var canvases = sciChartInitCommon_1.default.initCanvas(divElement, (_a = options === null || options === void 0 ? void 0 : options.widthAspect) !== null && _a !== void 0 ? _a : 0, (_b = options === null || options === void 0 ? void 0 : options.heightAspect) !== null && _b !== void 0 ? _b : 0);
21
+ var canvases = sciChartInitCommon_1.default.initCanvas(divElement, (_a = options === null || options === void 0 ? void 0 : options.widthAspect) !== null && _a !== void 0 ? _a : 0, (_b = options === null || options === void 0 ? void 0 : options.heightAspect) !== null && _b !== void 0 ? _b : 0, undefined, undefined, options === null || options === void 0 ? void 0 : options.touchAction);
19
22
  var loader = (_c = options === null || options === void 0 ? void 0 : options.loader) !== null && _c !== void 0 ? _c : new loader_1.DefaultSciChartLoader();
20
23
  var loaderDiv = loader.addChartLoader(canvases.domDivContainer, (_d = options === null || options === void 0 ? void 0 : options.theme) !== null && _d !== void 0 ? _d : SciChartSurfaceBase_1.SciChartSurfaceBase.DEFAULT_THEME);
21
24
  var webGLSupport = WebGlHelper_1.WebGlHelper.getWebGlSupport();
@@ -29,7 +32,23 @@ var createSingle3dInternal = function (divElement, options) {
29
32
  loader.removeChartLoader(canvases.domDivContainer, loaderDiv);
30
33
  // @ts-ignore
31
34
  wasmContext.doNotCaptureKeyboard = true;
32
- initDrawEngineSingleChart(wasmContext, canvases, resolve, (_a = options === null || options === void 0 ? void 0 : options.theme) !== null && _a !== void 0 ? _a : SciChartSurfaceBase_1.SciChartSurfaceBase.DEFAULT_THEME);
35
+ var revocable = (0, DeletableEntity_1.createWasmContextRevocableProxy)(wasmContext);
36
+ var customResolve = function (res) {
37
+ res.sciChart3DSurface.addDeletable({
38
+ delete: function () {
39
+ revocable.revoke();
40
+ revocable = undefined;
41
+ }
42
+ });
43
+ resolve(res);
44
+ };
45
+ initDrawEngineSingleChart(revocable.proxy, canvases, customResolve, (_a = options === null || options === void 0 ? void 0 : options.theme) !== null && _a !== void 0 ? _a : SciChartSurfaceBase_1.SciChartSurfaceBase.DEFAULT_THEME);
46
+ // initDrawEngineSingleChart(
47
+ // wasmContext,
48
+ // canvases,
49
+ // resolve,
50
+ // (options?.theme as IThemeProvider) ?? SciChartSurfaceBase.DEFAULT_THEME
51
+ // );
33
52
  (0, BuildStamp_1.checkBuildStamp)(wasmContext);
34
53
  })
35
54
  .catch(function (ex) {
@@ -47,8 +66,6 @@ exports.createSingle3dInternal = createSingle3dInternal;
47
66
  // SINGLE CHART FUNCTIONS
48
67
  /** @ignore */
49
68
  var initDrawEngineSingleChart = function (wasmContext, canvases, resolve, theme) {
50
- var width = canvases.domCanvas2D.width;
51
- var height = canvases.domCanvas2D.height;
52
69
  // @ts-ignore
53
70
  wasmContext.preRun.push(function () { return (ENV.SDL_EMSCRIPTEN_KEYBOARD_ELEMENT = "#chart_WebGL"); });
54
71
  var scs;
@@ -57,6 +74,17 @@ var initDrawEngineSingleChart = function (wasmContext, canvases, resolve, theme)
57
74
  InitializeChart: function () {
58
75
  scs = new SciChart3DSurface_1.SciChart3DSurface(wasmContext, { canvases: canvases });
59
76
  scs.applyTheme(theme);
77
+ scs.addDeletable({
78
+ delete: function () {
79
+ // Halt the engine
80
+ wasmContext.TSRRequestExit();
81
+ frameRenderer3D.delete();
82
+ wasmContext.SCRTGetGlobalSampleChartInterface().SetFrameRenderer(null);
83
+ wasmContext.SCRTGetGlobalSampleChartInterface().delete();
84
+ wasmContext.SCRTSetGlobalSampleChartInterface(null);
85
+ licenseManager2D_1.licenseManager.clear();
86
+ }
87
+ });
60
88
  setTimeout(function () {
61
89
  scs.invalidateElement();
62
90
  (0, licenseManager3D_1.applyLicense3D)(wasmContext, scs, true);
@@ -82,6 +110,8 @@ var initDrawEngineSingleChart = function (wasmContext, canvases, resolve, theme)
82
110
  var frameRenderer3D = new wasmContext.SCRTFrameRenderer3D();
83
111
  chartInitObj.SetFrameRenderer(frameRenderer3D);
84
112
  chartInitObj.SetFPSCounterEnabled(false);
113
+ // This may not be used in the case of 3D charts, but we set the property anyway as its passed down to TSR engine when initialising
114
+ chartInitObj.SetWasmBufferSizesKb(SciChartDefaults_1.SciChartDefaults.wasmBufferSizesKb);
85
115
  wasmContext.SCRTSetGlobalSampleChartInterface(chartInitObj);
86
116
  // @ts-ignore
87
117
  wasmContext.callMain();