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
@@ -1,3 +1,4 @@
1
+ import { DeletableEntity } from "../../Core/DeletableEntity";
1
2
  import { EventHandler } from "../../Core/EventHandler";
2
3
  import { IDeletable } from "../../Core/IDeletable";
3
4
  import { MouseManager } from "../../Core/Mouse/MouseManager";
@@ -11,7 +12,9 @@ import { TSciChartSurfaceCanvases } from "../../types/TSciChartSurfaceCanvases";
11
12
  import { IChartModifierBase } from "../ChartModifiers/ChartModifierBase";
12
13
  import { IThemeable } from "../Themes/IThemeable";
13
14
  import { IThemePartial, IThemeProvider } from "../Themes/IThemeProvider";
14
- import { I2DSurfaceOptions } from "./I2DSurfaceOptions";
15
+ import { AdornerLayer } from "./Annotations/AdornerLayer";
16
+ import { IAnnotation } from "./Annotations/IAnnotation";
17
+ import { AxisCore } from "./Axis/AxisCore";
15
18
  import { ISciChartLoader } from "./loader";
16
19
  import { INotifyOnDpiChanged, TDpiChangedEventArgs } from "./TextureManager/DpiHelper";
17
20
  import { ISuspendable, IUpdateSuspender } from "./UpdateSuspender";
@@ -19,7 +22,7 @@ export declare type TSciChartDestination = {
19
22
  canvasElementId: string;
20
23
  width: number;
21
24
  height: number;
22
- sciChartSurface: SciChartSurfaceBase;
25
+ sciChartSurface: ISciChartSurfaceBase;
23
26
  };
24
27
  export declare type TSciChartConfig = {
25
28
  wasmUrl?: string;
@@ -34,7 +37,7 @@ export interface ISurfaceOptionsBase {
34
37
  */
35
38
  id?: string;
36
39
  /**
37
- * Optional - The theme applied to the {@link SciChartSurface} on startup
40
+ * Optional - The theme applied to the {@link SciChartSurfaceBase} on startup
38
41
  * @remarks see {@link IThemeProvider} for properties which can affect SciChart theme. Two default
39
42
  * themes are included out of the box {@link SciChartJSLightTheme} and {@link SciChartJSDarkTheme}.
40
43
  * Custom themes may be created by implementing {@link IThemeProvider}
@@ -50,6 +53,29 @@ export interface ISurfaceOptionsBase {
50
53
  type: string;
51
54
  options?: any;
52
55
  };
56
+ /**
57
+ * Sets a `touch-action` property to the canvas style.
58
+ * Useful if touch interactions in browser should be configured.
59
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action
60
+ *
61
+ * @remarks By default a chart will use `touch-action: none` to prevent the default browser behavior.
62
+ */
63
+ touchAction?: string;
64
+ /**
65
+ * Optional - the width aspect ratio of the {@link SciChartSurfaceBase}. By default SciChart will scale to fit the parent Div.
66
+ * However if height of the div is not provided it will use width/height aspect ratio to calculate the height. The default ratio is 3/2.
67
+ */
68
+ widthAspect?: number;
69
+ /**
70
+ * Optional - the height aspect ratio of the {@link SciChartSurfaceBase}. By default SciChart will scale to fit the parent Div.
71
+ * However if height of the div is not provided it will use width/height aspect ratio to calculate the height. The default ratio is 3/2.
72
+ */
73
+ heightAspect?: number;
74
+ /**
75
+ * Optional - the option of disabling / enabling scaling of the {@link SciChartSurfaceBase}.
76
+ * If false - the {@link SciChartSurfaceBase} will take the height and width of parent div without scaling.
77
+ */
78
+ disableAspect?: boolean;
53
79
  }
54
80
  export declare const DebugForDpi: boolean;
55
81
  /**
@@ -60,8 +86,13 @@ export declare const DebugForDpi: boolean;
60
86
  * to use the SciChartSurface and create a 2D or 3D {@link https://www.scichart.com/javascript-chart-features | JavaScript Chart}
61
87
  */
62
88
  export interface ISciChartSurfaceBase extends IDeletable, IThemeable {
89
+ readonly id: string;
90
+ readonly domChartRoot: HTMLDivElement;
91
+ readonly domDivContainer: HTMLDivElement;
63
92
  readonly domCanvas2D: HTMLCanvasElement;
64
93
  readonly themeProvider: IThemeProvider;
94
+ readonly isDeleted: boolean;
95
+ readonly otherSurfaces: ISciChartSurfaceBase[];
65
96
  /**
66
97
  * Changes the Viewport Size of the {@link SciChartSurfaceBase}
67
98
  * @param width
@@ -72,6 +103,8 @@ export interface ISciChartSurfaceBase extends IDeletable, IThemeable {
72
103
  * Add an IDeleteable object to the surface which will have its delete method called when the surface is deleted
73
104
  */
74
105
  addDeletable(deletable: IDeletable): void;
106
+ invalidateElement(): void;
107
+ delete(clearHtml?: boolean): void;
75
108
  }
76
109
  /**
77
110
  * Enum constants to specify SciChartSurface type
@@ -93,7 +126,7 @@ export declare enum ESurfaceType {
93
126
  * See derived types {@link SciChartSurface} (2D Charts) and {@link SciChart3DSurface} (3D Charts) for more specific instructions on how
94
127
  * to use the SciChartSurface and create a 2D or 3D {@link https://www.scichart.com/javascript-chart-features | JavaScript Chart}
95
128
  */
96
- export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBase, ISuspendable, INotifyOnDpiChanged {
129
+ export declare abstract class SciChartSurfaceBase extends DeletableEntity implements ISciChartSurfaceBase, ISuspendable, INotifyOnDpiChanged {
97
130
  /**
98
131
  * Gets or sets the application-wide default theme. See {@link IThemeProvider} for details
99
132
  */
@@ -110,11 +143,22 @@ export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBas
110
143
  * chart parts are automatically anti-aliased
111
144
  */
112
145
  static AntiAliasWebGlBackbuffer: boolean;
146
+ static wasmContextDisposeTimeout: number;
147
+ static autoDisposeWasmContext: boolean;
148
+ /**
149
+ * Deletes a {@link TSciChart | WebAssembly Context} used by the charts instantiated with wasmContext {@link SciChartSurface.create}.
150
+ */
151
+ static disposeSharedWasmContext(): void;
113
152
  /**
114
153
  * Sets the runtime license key. Use for full licenses or trials only, not developer licenses.
115
154
  * @param keyCode
116
155
  */
117
156
  static setRuntimeLicenseKey(keyCode: string): void;
157
+ /**
158
+ * Causes SciChart to always use its built in community non-commercial license. This stops it attempting to look for the license wizard
159
+ * Usage of the community license constitutes acceptace of the EULA at https://scichart.com/JSCommunityEULA
160
+ */
161
+ static UseCommunityLicense(): void;
118
162
  /**
119
163
  * Sets the endpoint for validating a runtime license key with the server. Must be a relative path.
120
164
  * @default api/license
@@ -144,36 +188,63 @@ export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBas
144
188
  /**
145
189
  * The {@link HTMLDivElement} which is the dom chart root
146
190
  */
147
- readonly domChartRoot: HTMLDivElement;
191
+ domChartRoot: HTMLDivElement;
148
192
  /**
149
193
  * The {@link HTMLCanvasElement} which is the WebGL canvas that SciChart draws to
150
194
  */
151
- readonly domCanvasWebGL: HTMLCanvasElement;
195
+ domCanvasWebGL: HTMLCanvasElement;
152
196
  /**
153
197
  * The {@link HTMLCanvasElement} which is the HTML5 canvas which SciChart draws overlays (cursors, tooltips) to
154
198
  */
155
- readonly domCanvas2D: HTMLCanvasElement;
199
+ domCanvas2D: HTMLCanvasElement;
156
200
  /**
157
201
  * The {@link SVGSVGElement} which is the SVG canvas which SciChart adds elements (tooltips, annotations) to
158
202
  */
159
- readonly domSvgContainer: SVGSVGElement;
203
+ domSvgContainer: SVGSVGElement;
160
204
  /**
161
205
  * The {@link SVGSVGElement} which is the SVG adorner layer canvas, is used for annotation adorners
162
206
  */
163
- readonly domSvgAdornerLayer: SVGSVGElement;
207
+ domSvgAdornerLayer: SVGSVGElement;
164
208
  /**
165
209
  * The inner {@link HTMLDivElement} div element
166
210
  */
167
- readonly domDivContainer: HTMLDivElement;
211
+ domDivContainer: HTMLDivElement;
168
212
  /**
169
213
  * The {@link MouseManager} subscribes to mouse events on the {@link domChartRoot} and routes them to components within SciChart
170
214
  */
171
- readonly mouseManager: MouseManager;
215
+ mouseManager: MouseManager;
172
216
  /**
173
217
  * The {@link IThemeProvider} provides colors, brushes and theme information for the current {@link SciChartSurfaceBase}
174
218
  */
175
219
  /** For serialization Only. The name of the onCreated function applied by the builder api */
176
220
  onCreatedName: string;
221
+ /**
222
+ * @summary Gets the collection of {@link IAnnotation} - annotations, markers or shapes drawn over the top of a {@link SciChartSurface}
223
+ * @description A {@link SciChartSurface} can have zero to many {@link IAnnotation | Annotations}.
224
+ *
225
+ * The Annotations are drawn using our WebGL / WebAssembly rendering engine, but some use SVG for maximum configurability.
226
+ * See derived types of {@link IAnnotation} such as {@link BoxAnnotation}, {@link LineAnnotation} etc...
227
+ *
228
+ * Use this collection to add and remove Annotations to the chart.
229
+ * @remarks
230
+ * Adding an Annotation to the chart causes it to automatically redraw. Note that annotations do not pariticpate in autoranging,
231
+ * meaning a chart will zoom to fit data and chart series but not annotations
232
+ */
233
+ readonly annotations: ObservableArray<IAnnotation>;
234
+ /**
235
+ * @summary Gets the collection of {@link IAnnotation} - modifier annotations, markers or shapes drawn over the top of a {@link SciChartSurface}
236
+ * @description A {@link SciChartSurface} can have zero to many {@link IAnnotation | Annotations}.
237
+ *
238
+ * The Annotations are drawn using our WebGL / WebAssembly rendering engine, but some use SVG for maximum configurability.
239
+ * See derived types of {@link IAnnotation} such as {@link BoxAnnotation}, {@link LineAnnotation} etc...
240
+ *
241
+ * Use this collection to add and remove Modifier Annotations to the chart.
242
+ * @remarks
243
+ * Adding an Modifier Annotation to the chart causes it to automatically redraw. Note that annotations do not pariticpate in autoranging,
244
+ * meaning a chart will zoom to fit data and chart series but not annotations
245
+ */
246
+ readonly modifierAnnotations: ObservableArray<IAnnotation>;
247
+ adornerLayer: AdornerLayer;
177
248
  protected destinations: TSciChartDestination[];
178
249
  protected themeProviderProperty: IThemeProvider;
179
250
  protected previousThemeProviderProperty: IThemeProvider;
@@ -181,11 +252,12 @@ export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBas
181
252
  protected isDeletedProperty: boolean;
182
253
  protected backgroundProperty: string;
183
254
  protected idProperty: string;
255
+ protected touchActionProperty: string;
184
256
  protected widthAspect: number;
185
257
  protected heightAspect: number;
186
258
  protected disableAspect: boolean;
187
259
  protected loaderJson: any;
188
- private readonly sharedWasmContext;
260
+ private sharedWasmContext;
189
261
  private readonly suspendableIdProperty;
190
262
  private seriesViewRectProperty;
191
263
  private isAlphaEnabledProperty;
@@ -286,6 +358,16 @@ export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBas
286
358
  * @param seriesViewRect a {@link Rect} which defines the portion of the view for drawing series
287
359
  */
288
360
  setSeriesViewRect(seriesViewRect: Rect): void;
361
+ /**
362
+ * Gets the {@link AxisCore | XAxis} which matches the axisId. Returns undefined if not axis found
363
+ * @param axisId The AxisId to search for
364
+ */
365
+ abstract getXAxisById(axisId: string): AxisCore;
366
+ /**
367
+ * Gets the {@link AxisCore | YAxis} which matches the axisId. Returns undefined if not axis found
368
+ * @param axisId The AxisId to search for
369
+ */
370
+ abstract getYAxisById(axisId: string): AxisCore;
289
371
  /**
290
372
  * Changes the Viewport Size of the {@link SciChartSurfaceBase}
291
373
  * @param width
@@ -309,7 +391,8 @@ export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBas
309
391
  */
310
392
  onDpiChanged(args: TDpiChangedEventArgs): void;
311
393
  get chartModifierGroups(): string[];
312
- protected applyOptions(options: I2DSurfaceOptions): void;
394
+ protected clearRootElement(clearHtml: boolean): void;
395
+ protected applyOptions(options: ISurfaceOptionsBase): void;
313
396
  /**
314
397
  * Detaches a {@link ChartModifierBase2D} from the {@link SciChartSurfaceBase}
315
398
  * @param chartModifier
@@ -339,6 +422,8 @@ export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBas
339
422
  protected abstract applySciChartBackground(htmlColor: string, alphaEnabled?: boolean): void;
340
423
  protected changeMasterCanvasViewportSize(wasmContext: TSciChart | TSciChart3D, pixelWidth: number, pixelHeight: number): void;
341
424
  protected changeWebGLCanvasViewportSize(wasmContext: TSciChart | TSciChart3D, pixelWidth: number, pixelHeight: number): void;
425
+ private detachAnnotation;
426
+ private attachAnnotation;
342
427
  }
343
428
  export declare const createChartDestination: (canvas: HTMLCanvasElement) => {
344
429
  canvas: HTMLCanvasElement;
@@ -346,6 +431,7 @@ export declare const createChartDestination: (canvas: HTMLCanvasElement) => {
346
431
  GetWidth(): any;
347
432
  GetID(): any;
348
433
  };
434
+ /** @ignore */
349
435
  export declare const getMasterCanvas: () => HTMLCanvasElement;
350
436
  export declare type TGetDestinationFn = (destinationId: string) => TSciChartDestination;
351
437
  export declare const copyToCanvas: (sourceCanvas: HTMLCanvasElement, getDestinationById: TGetDestinationFn) => (destinationId: string) => void;
@@ -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,96 @@ 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
+ _this.themeProviderProperty = SciChartSurfaceBase.DEFAULT_THEME;
72
+ _this.previousThemeProviderProperty = SciChartSurfaceBase.DEFAULT_THEME;
73
+ _this.isInitializedProperty = false;
74
+ _this.isDeletedProperty = false;
75
+ _this.backgroundProperty = SciChartSurfaceBase.DEFAULT_THEME.sciChartBackground;
76
+ _this.idProperty = (0, guid_1.generateGuid)();
77
+ _this.suspendableIdProperty = (0, guid_1.generateGuid)();
78
+ _this.isAlphaEnabledProperty = true;
79
+ _this.deletables = [];
61
80
  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();
81
+ _this.domChartRoot = canvases.domChartRoot;
82
+ _this.domCanvasWebGL = canvases.domCanvasWebGL;
83
+ _this.domCanvas2D = canvases.domCanvas2D;
84
+ _this.domSvgContainer = canvases.domSvgContainer;
85
+ _this.domSvgAdornerLayer = canvases.domSvgAdornerLayer;
86
+ _this.domDivContainer = canvases.domDivContainer;
87
+ _this.sharedWasmContext = webAssemblyContext;
88
+ _this.propertyChanged = new EventHandler_1.EventHandler();
70
89
  // Flag which ensures Typescript side drives emscripten rendering (one render per draw request)
71
90
  webAssemblyContext.TSRSetDrawRequestsEnabled(true);
72
91
  // 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) {
92
+ _this.detachChartModifier = _this.detachChartModifier.bind(_this);
93
+ _this.attachChartModifier = _this.attachChartModifier.bind(_this);
94
+ _this.chartModifiers = new ObservableArray_1.ObservableArray();
95
+ _this.chartModifiers.collectionChanged.subscribe(function (arg) {
77
96
  var _a, _b;
78
97
  (_a = arg.getOldItems()) === null || _a === void 0 ? void 0 : _a.forEach(function (cm) { return _this.detachChartModifier(cm); });
79
98
  (_b = arg.getNewItems()) === null || _b === void 0 ? void 0 : _b.forEach(function (cm) { return _this.attachChartModifier(cm); });
80
99
  });
100
+ // Setup annotations
101
+ _this.detachAnnotation = _this.detachAnnotation.bind(_this);
102
+ _this.attachAnnotation = _this.attachAnnotation.bind(_this);
103
+ _this.annotations = new ObservableArray_1.ObservableArray();
104
+ _this.modifierAnnotations = new ObservableArray_1.ObservableArray();
105
+ _this.annotations.collectionChanged.subscribe(function (arg) {
106
+ var _a, _b;
107
+ (_a = arg.getOldItems()) === null || _a === void 0 ? void 0 : _a.forEach(function (a) { return _this.detachAnnotation(a); });
108
+ (_b = arg.getNewItems()) === null || _b === void 0 ? void 0 : _b.forEach(function (a) { return _this.attachAnnotation(a); });
109
+ });
110
+ _this.modifierAnnotations.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
+ });
81
115
  // Setup mouse manager
82
- this.mouseManager = new MouseManager_1.MouseManager(this);
116
+ _this.mouseManager = new MouseManager_1.MouseManager(_this);
83
117
  if (canvases.domCanvasWebGL) {
84
- this.mouseManager.subscribe(canvases.domCanvasWebGL);
118
+ _this.mouseManager.subscribe(canvases.domCanvasWebGL);
85
119
  }
86
120
  else if (canvases.domCanvas2D) {
87
- this.mouseManager.subscribe(canvases.domCanvas2D);
121
+ _this.mouseManager.subscribe(canvases.domCanvas2D);
88
122
  }
89
123
  // Setup Dpi change listeners
90
- this.onDpiChanged = this.onDpiChanged.bind(this);
91
- DpiHelper_1.DpiHelper.dpiChanged.subscribe(this.onDpiChanged);
124
+ _this.onDpiChanged = _this.onDpiChanged.bind(_this);
125
+ DpiHelper_1.DpiHelper.dpiChanged.subscribe(_this.onDpiChanged);
126
+ if (process.env.NODE_ENV !== "production") {
127
+ if (MemoryUsageHelper_1.MemoryUsageHelper.isMemoryUsageDebugEnabled) {
128
+ var rootContainer = document.body;
129
+ var observer_1 = new MutationObserver(function () {
130
+ var isInDom = _this.domChartRoot.isConnected;
131
+ if (!isInDom && !_this.isDeleted) {
132
+ 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."));
133
+ }
134
+ });
135
+ observer_1.observe(rootContainer, { childList: true, subtree: true });
136
+ _this.addDeletable({
137
+ delete: function () { return observer_1.disconnect(); }
138
+ });
139
+ }
140
+ }
141
+ return _this;
92
142
  }
143
+ /**
144
+ * Deletes a {@link TSciChart | WebAssembly Context} used by the charts instantiated with wasmContext {@link SciChartSurface.create}.
145
+ */
146
+ SciChartSurfaceBase.disposeSharedWasmContext = function () {
147
+ if (Globals_1.sciChart3DDestinations.length === 0 && Globals_1.sciChartDestinations.length === 0) {
148
+ document.body.removeChild(SciChartSurfaceBase.domMasterCanvas);
149
+ SciChartSurfaceBase.domMasterCanvas = undefined;
150
+ }
151
+ if (process.env.NODE_ENV !== "production") {
152
+ if (MemoryUsageHelper_1.MemoryUsageHelper.isMemoryUsageDebugEnabled) {
153
+ // @ts-ignore
154
+ window.gc && window.gc();
155
+ // TODO add warning if there are undeleted or uncollected entities instead
156
+ // MemoryUsageHelper.objectRegistry.log();
157
+ }
158
+ }
159
+ };
93
160
  /**
94
161
  * Sets the runtime license key. Use for full licenses or trials only, not developer licenses.
95
162
  * @param keyCode
@@ -97,6 +164,13 @@ var SciChartSurfaceBase = /** @class */ (function () {
97
164
  SciChartSurfaceBase.setRuntimeLicenseKey = function (keyCode) {
98
165
  licenseManager2D_1.licenseManager.setRuntimeLicenseKey(keyCode);
99
166
  };
167
+ /**
168
+ * Causes SciChart to always use its built in community non-commercial license. This stops it attempting to look for the license wizard
169
+ * Usage of the community license constitutes acceptace of the EULA at https://scichart.com/JSCommunityEULA
170
+ */
171
+ SciChartSurfaceBase.UseCommunityLicense = function () {
172
+ licenseManager2D_1.licenseManager.setRuntimeLicenseKey("community");
173
+ };
100
174
  /**
101
175
  * Sets the endpoint for validating a runtime license key with the server. Must be a relative path.
102
176
  * @default api/license
@@ -309,16 +383,29 @@ var SciChartSurfaceBase = /** @class */ (function () {
309
383
  var _a;
310
384
  if (clearHtml === void 0) { clearHtml = true; }
311
385
  this.isDeletedProperty = true;
312
- var currentSurfaceIndex = (_a = this.destinations) === null || _a === void 0 ? void 0 : _a.findIndex(function (dest) { return dest.sciChartSurface === _this; });
386
+ // TODO probably this should be moved outside for Proxy === this comparison issue exists
387
+ var currentSurfaceIndex = (_a = this.destinations) === null || _a === void 0 ? void 0 : _a.findIndex(function (dest) { return dest.sciChartSurface.id === _this.id; });
313
388
  if (currentSurfaceIndex >= 0) {
314
389
  this.destinations.splice(currentSurfaceIndex, 1);
315
390
  }
316
391
  DpiHelper_1.DpiHelper.dpiChanged.unsubscribe(this.onDpiChanged);
317
392
  this.mouseManager.unsubscribe();
393
+ this.mouseManager = undefined;
394
+ this.chartModifiers.asArray().forEach(function (chm) { return chm.delete(); });
395
+ this.modifierAnnotations.asArray().forEach(function (annotation) { return annotation.delete(); });
396
+ this.annotations.asArray().forEach(function (annotation) { return annotation.delete(); });
397
+ this.adornerLayer = undefined;
318
398
  for (var _i = 0, _b = this.deletables; _i < _b.length; _i++) {
319
399
  var deletable = _b[_i];
320
400
  (0, Deleter_1.deleteSafe)(deletable);
321
401
  }
402
+ this.domChartRoot = undefined;
403
+ this.domCanvasWebGL = undefined;
404
+ this.domCanvas2D = undefined;
405
+ this.domSvgContainer = undefined;
406
+ this.domSvgAdornerLayer = undefined;
407
+ this.domDivContainer = undefined;
408
+ this.sharedWasmContext = undefined;
322
409
  this.deletables = [];
323
410
  };
324
411
  SciChartSurfaceBase.prototype.addDeletable = function (deletable) {
@@ -350,6 +437,8 @@ var SciChartSurfaceBase = /** @class */ (function () {
350
437
  * @inheritDoc
351
438
  */
352
439
  SciChartSurfaceBase.prototype.onDpiChanged = function (args) {
440
+ this.annotations.asArray().forEach(function (a) { return a.onDpiChanged(args); });
441
+ this.modifierAnnotations.asArray().forEach(function (a) { return a.onDpiChanged(args); });
353
442
  this.invalidateElement();
354
443
  };
355
444
  Object.defineProperty(SciChartSurfaceBase.prototype, "chartModifierGroups", {
@@ -363,6 +452,22 @@ var SciChartSurfaceBase = /** @class */ (function () {
363
452
  enumerable: false,
364
453
  configurable: true
365
454
  });
455
+ SciChartSurfaceBase.prototype.clearRootElement = function (clearHtml) {
456
+ if (clearHtml && this.domChartRoot) {
457
+ var style = this.domChartRoot.style;
458
+ if (style) {
459
+ style.background = "";
460
+ style.position = "";
461
+ }
462
+ if (this.domChartRoot.hasOwnProperty("replaceChildren")) {
463
+ // @ts-ignore
464
+ this.domChartRoot.replaceChildren();
465
+ }
466
+ else {
467
+ this.domChartRoot.innerHTML = "";
468
+ }
469
+ }
470
+ };
366
471
  SciChartSurfaceBase.prototype.applyOptions = function (options) {
367
472
  var _a;
368
473
  this.idProperty = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : this.idProperty;
@@ -429,7 +534,7 @@ var SciChartSurfaceBase = /** @class */ (function () {
429
534
  DpiHelper_1.DpiHelper.setSize(SciChartSurfaceBase.domMasterCanvas, newWidth, newHeight);
430
535
  var masterCanvasBackBufferWidth = SciChartSurfaceBase.domMasterCanvas.width;
431
536
  var masterCanvasBackBufferHeight = SciChartSurfaceBase.domMasterCanvas.height;
432
- wasmContext.TSRSetMainWindowSize(masterCanvasBackBufferWidth, masterCanvasBackBufferHeight);
537
+ wasmContext.SCRTSetMainWindowSize(masterCanvasBackBufferWidth, masterCanvasBackBufferHeight);
433
538
  };
434
539
  SciChartSurfaceBase.prototype.changeWebGLCanvasViewportSize = function (wasmContext, pixelWidth, pixelHeight) {
435
540
  if (!this.domCanvasWebGL)
@@ -437,7 +542,22 @@ var SciChartSurfaceBase = /** @class */ (function () {
437
542
  var backBufferWidth = pixelWidth * DpiHelper_1.DpiHelper.PIXEL_RATIO;
438
543
  var backBufferHeight = pixelHeight * DpiHelper_1.DpiHelper.PIXEL_RATIO;
439
544
  DpiHelper_1.DpiHelper.setSize(this.domCanvasWebGL, pixelWidth, pixelHeight);
440
- wasmContext.TSRSetMainWindowSize(backBufferWidth, backBufferHeight);
545
+ wasmContext.SCRTSetMainWindowSize(backBufferWidth, backBufferHeight);
546
+ };
547
+ SciChartSurfaceBase.prototype.detachAnnotation = function (annotation) {
548
+ annotation.onDetach();
549
+ annotation.invalidateParentCallback = undefined;
550
+ annotation.parentSurface = undefined;
551
+ this.invalidateElement();
552
+ };
553
+ SciChartSurfaceBase.prototype.attachAnnotation = function (annotation) {
554
+ if (annotation.invalidateParentCallback) {
555
+ 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");
556
+ }
557
+ annotation.parentSurface = this;
558
+ annotation.invalidateParentCallback = this.invalidateElement;
559
+ annotation.onAttach(this);
560
+ this.invalidateElement();
441
561
  };
442
562
  /**
443
563
  * Gets or sets the application-wide default theme. See {@link IThemeProvider} for details
@@ -450,8 +570,10 @@ var SciChartSurfaceBase = /** @class */ (function () {
450
570
  * chart parts are automatically anti-aliased
451
571
  */
452
572
  SciChartSurfaceBase.AntiAliasWebGlBackbuffer = false;
573
+ SciChartSurfaceBase.wasmContextDisposeTimeout = 0;
574
+ SciChartSurfaceBase.autoDisposeWasmContext = false;
453
575
  return SciChartSurfaceBase;
454
- }());
576
+ }(DeletableEntity_1.DeletableEntity));
455
577
  exports.SciChartSurfaceBase = SciChartSurfaceBase;
456
578
  var createChartDestination = function (canvas) {
457
579
  if (!canvas)
@@ -470,6 +592,7 @@ var createChartDestination = function (canvas) {
470
592
  };
471
593
  };
472
594
  exports.createChartDestination = createChartDestination;
595
+ /** @ignore */
473
596
  var getMasterCanvas = function () {
474
597
  /** @ignore */
475
598
  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;