scichart 2.0.2204 → 2.1.2267

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 (233) hide show
  1. package/Charting/ChartModifiers/DataPointSelectionModifier.js +0 -1
  2. package/Charting/ChartModifiers/LegendModifier.d.ts +2 -2
  3. package/Charting/ChartModifiers/RolloverModifier.d.ts +5 -3
  4. package/Charting/ChartModifiers/RolloverModifier.js +38 -80
  5. package/Charting/Drawing/BrushCache.d.ts +8 -2
  6. package/Charting/Drawing/BrushCache.js +16 -8
  7. package/Charting/Drawing/WebGlRenderContext2D.d.ts +1 -0
  8. package/Charting/Drawing/WebGlRenderContext2D.js +4 -1
  9. package/Charting/LayoutManager/BaseAxisLayoutStrategy.d.ts +2 -0
  10. package/Charting/LayoutManager/BaseAxisLayoutStrategy.js +33 -0
  11. package/Charting/LayoutManager/BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +18 -2
  12. package/Charting/LayoutManager/LeftAlignedOuterVerticallyStackedAxisLayoutStrategy.js +19 -2
  13. package/Charting/LayoutManager/RightAlignedOuterVerticallyStackedAxisLayoutStrategy.js +18 -2
  14. package/Charting/LayoutManager/TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +18 -2
  15. package/Charting/Model/BaseDataSeries.d.ts +42 -15
  16. package/Charting/Model/BaseDataSeries.js +77 -28
  17. package/Charting/Model/BaseHeatmapDataSeries.d.ts +31 -23
  18. package/Charting/Model/BaseHeatmapDataSeries.js +45 -18
  19. package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.d.ts +23 -0
  20. package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.js +122 -0
  21. package/Charting/Model/DataDistributionCalculator/IDataDistributionCalculator.d.ts +57 -0
  22. package/Charting/Model/DataDistributionCalculator/IDataDistributionCalculator.js +2 -0
  23. package/Charting/Model/Filters/OhlcFilterBase.d.ts +2 -2
  24. package/Charting/Model/Filters/XyFilterBase.d.ts +3 -3
  25. package/Charting/Model/Filters/XyMovingAverageFilter.js +1 -1
  26. package/Charting/Model/Filters/XyyFilterBase.d.ts +4 -4
  27. package/Charting/Model/Filters/XyzFilterBase.d.ts +4 -4
  28. package/Charting/Model/IDataSeries.d.ts +37 -5
  29. package/Charting/Model/OhlcDataSeries.d.ts +12 -11
  30. package/Charting/Model/OhlcDataSeries.js +47 -44
  31. package/Charting/Model/PointSeries/BasePointSeriesResampled.d.ts +21 -0
  32. package/Charting/Model/PointSeries/BasePointSeriesResampled.js +56 -0
  33. package/Charting/Model/PointSeries/BasePointSeriesWrapped.d.ts +14 -0
  34. package/Charting/Model/PointSeries/BasePointSeriesWrapped.js +23 -0
  35. package/Charting/Model/PointSeries/IPointSeries.d.ts +31 -0
  36. package/Charting/Model/PointSeries/IPointSeries.js +2 -0
  37. package/Charting/Model/PointSeries/OhlcPointSeriesResampled.d.ts +13 -0
  38. package/Charting/Model/PointSeries/OhlcPointSeriesResampled.js +59 -0
  39. package/Charting/Model/PointSeries/OhlcPointSeriesWrapped.d.ts +11 -0
  40. package/Charting/Model/PointSeries/OhlcPointSeriesWrapped.js +32 -0
  41. package/Charting/Model/PointSeries/XyPointSeriesResampled.d.ts +7 -0
  42. package/Charting/Model/PointSeries/XyPointSeriesResampled.js +27 -0
  43. package/Charting/Model/PointSeries/XyPointSeriesWrapped.d.ts +6 -0
  44. package/Charting/Model/PointSeries/XyPointSeriesWrapped.js +27 -0
  45. package/Charting/Model/PointSeries/XyyPointSeriesResampled.d.ts +10 -0
  46. package/Charting/Model/PointSeries/XyyPointSeriesResampled.js +48 -0
  47. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.d.ts +8 -0
  48. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.js +29 -0
  49. package/Charting/Model/PointSeries/XyzPointSeriesWrapped.d.ts +8 -0
  50. package/Charting/Model/PointSeries/XyzPointSeriesWrapped.js +29 -0
  51. package/Charting/Model/XyDataSeries.d.ts +3 -2
  52. package/Charting/Model/XyDataSeries.js +26 -26
  53. package/Charting/Model/XyyDataSeries.d.ts +5 -5
  54. package/Charting/Model/XyyDataSeries.js +30 -27
  55. package/Charting/Model/XyzDataSeries.d.ts +5 -5
  56. package/Charting/Model/XyzDataSeries.js +30 -27
  57. package/Charting/Numerics/CoordinateCalculators/CategoryCoordinateCalculator.d.ts +2 -2
  58. package/Charting/Numerics/CoordinateCalculators/FlippedCategoryCoordinateCalculator.d.ts +2 -2
  59. package/Charting/Numerics/CoordinateCalculators/FlippedNumericCoordinateCalculator.d.ts +2 -1
  60. package/Charting/Numerics/CoordinateCalculators/FlippedNumericCoordinateCalculator.js +6 -2
  61. package/Charting/Numerics/CoordinateCalculators/NumericCoordinateCalculator.d.ts +2 -1
  62. package/Charting/Numerics/CoordinateCalculators/NumericCoordinateCalculator.js +6 -2
  63. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.d.ts +54 -0
  64. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +234 -0
  65. package/Charting/Numerics/Resamplers/ResamplingMode.d.ts +37 -0
  66. package/Charting/Numerics/Resamplers/ResamplingMode.js +41 -0
  67. package/Charting/Numerics/Resamplers/ResamplingParams.d.ts +39 -0
  68. package/Charting/Numerics/Resamplers/ResamplingParams.js +52 -0
  69. package/Charting/Services/RenderPassData.d.ts +6 -1
  70. package/Charting/Services/RenderPassData.js +5 -1
  71. package/Charting/Services/RenderPassInfo.d.ts +18 -0
  72. package/Charting/Services/RenderPassInfo.js +14 -0
  73. package/Charting/Services/SciChartRenderer.d.ts +14 -1
  74. package/Charting/Services/SciChartRenderer.js +125 -31
  75. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +1 -1
  76. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +1 -1
  77. package/Charting/Visuals/Annotations/SvgAnnotationBase.js +7 -2
  78. package/Charting/Visuals/Axis/AxisBase2D.d.ts +23 -0
  79. package/Charting/Visuals/Axis/AxisBase2D.js +71 -24
  80. package/Charting/Visuals/Axis/AxisCore.d.ts +11 -0
  81. package/Charting/Visuals/Axis/AxisCore.js +39 -18
  82. package/Charting/Visuals/Axis/AxisRenderer.d.ts +1 -0
  83. package/Charting/Visuals/Axis/AxisRenderer.js +37 -10
  84. package/Charting/Visuals/Axis/CategoryAxisBase.d.ts +51 -0
  85. package/Charting/Visuals/Axis/CategoryAxisBase.js +85 -20
  86. package/Charting/Visuals/Axis/IAxisCoreOptions.d.ts +5 -0
  87. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +7 -4
  88. package/Charting/Visuals/Axis/NumericAxis.js +2 -2
  89. package/Charting/Visuals/Axis/constants.d.ts +1 -0
  90. package/Charting/Visuals/Axis/constants.js +1 -0
  91. package/Charting/Visuals/Legend/SciChartLegend.d.ts +6 -0
  92. package/Charting/Visuals/Legend/SciChartLegend.js +30 -13
  93. package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +20 -6
  94. package/Charting/Visuals/Legend/SciChartLegendBase.js +22 -4
  95. package/Charting/Visuals/Legend/SciChartPieLegend.d.ts +2 -0
  96. package/Charting/Visuals/Legend/SciChartPieLegend.js +17 -6
  97. package/Charting/Visuals/RenderableSeries/Animations/FadeAnimation.d.ts +2 -2
  98. package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.d.ts +2 -2
  99. package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.d.ts +3 -3
  100. package/Charting/Visuals/RenderableSeries/Animations/SweepAnimation.d.ts +2 -2
  101. package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.d.ts +2 -2
  102. package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.d.ts +6 -6
  103. package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.js +2 -2
  104. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +9 -2
  105. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +45 -1
  106. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.d.ts +1 -0
  107. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.js +1 -0
  108. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.d.ts +1 -0
  109. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.js +1 -0
  110. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +12 -5
  111. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +113 -0
  112. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +42 -6
  113. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +129 -21
  114. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +36 -4
  115. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +51 -3
  116. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +38 -4
  117. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +54 -3
  118. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +1 -1
  119. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +8 -14
  120. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +4 -3
  121. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +5 -11
  122. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.d.ts +1 -0
  123. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +31 -19
  124. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.d.ts +2 -1
  125. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +17 -21
  126. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +16 -15
  127. package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.js +9 -15
  128. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.d.ts +4 -3
  129. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +16 -21
  130. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformContoursDrawingProvider.js +2 -9
  131. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +0 -7
  132. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +11 -2
  133. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +17 -0
  134. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +1 -0
  135. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.js +1 -0
  136. package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.d.ts +1 -0
  137. package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.js +6 -0
  138. package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +2 -2
  139. package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +1 -1
  140. package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +1 -1
  141. package/Charting/Visuals/RenderableSeries/HitTest/ColumnSeriesHitTestProvider.js +2 -2
  142. package/Charting/Visuals/RenderableSeries/HitTest/LineSeriesHitTestProvider.js +2 -2
  143. package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +1 -1
  144. package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.js +2 -2
  145. package/Charting/Visuals/RenderableSeries/HitTest/ScatterSeriesHitTestProvider.js +1 -1
  146. package/Charting/Visuals/RenderableSeries/HitTest/StackedColumnSeriesHitTestProvider.js +2 -2
  147. package/Charting/Visuals/RenderableSeries/HitTest/StackedMountainSeriesHitTestProvider.js +2 -2
  148. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +6 -6
  149. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +1 -1
  150. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +12 -1
  151. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +38 -2
  152. package/Charting/Visuals/RenderableSeries/ISpline.d.ts +3 -3
  153. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.d.ts +4 -4
  154. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +5 -5
  155. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +3 -3
  156. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +3 -3
  157. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.d.ts +3 -3
  158. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +3 -3
  159. package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +0 -6
  160. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +1 -1
  161. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +1 -7
  162. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.d.ts +5 -0
  163. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.js +6 -0
  164. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.d.ts +5 -0
  165. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +6 -0
  166. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -3
  167. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +6 -3
  168. package/Charting/Visuals/RenderableSeries/constants.d.ts +3 -0
  169. package/Charting/Visuals/RenderableSeries/constants.js +3 -0
  170. package/Charting/Visuals/SciChartDefaults.d.ts +9 -1
  171. package/Charting/Visuals/SciChartDefaults.js +9 -1
  172. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +4 -2
  173. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +46 -32
  174. package/Charting/Visuals/SciChartSurface.d.ts +4 -4
  175. package/Charting/Visuals/SciChartSurface.js +18 -11
  176. package/Charting/Visuals/SciChartSurfaceBase.d.ts +3 -2
  177. package/Charting/Visuals/SciChartSurfaceBase.js +4 -4
  178. package/Charting/Visuals/createMaster.d.ts +1 -1
  179. package/Charting/Visuals/createMaster.js +11 -6
  180. package/Charting/Visuals/createSingle.d.ts +1 -1
  181. package/Charting/Visuals/createSingle.js +2 -2
  182. package/Charting/Visuals/licenseManager2D.js +21 -20
  183. package/Charting/Visuals/licenseManager2dState.d.ts +4 -0
  184. package/Charting/Visuals/licenseManager2dState.js +12 -0
  185. package/Charting/Visuals/loader.js +2 -0
  186. package/Charting/Visuals/sciChartInitCommon.d.ts +2 -2
  187. package/Charting/Visuals/sciChartInitCommon.js +22 -12
  188. package/Charting3D/Model/DataSeries/XyzDataSeries3D.d.ts +7 -7
  189. package/Charting3D/Model/DataSeries/XyzDataSeries3D.js +3 -3
  190. package/Charting3D/Visuals/SciChart3DSurface.d.ts +2 -2
  191. package/Charting3D/Visuals/SciChart3DSurface.js +3 -3
  192. package/Charting3D/Visuals/createMaster3d.d.ts +1 -1
  193. package/Charting3D/Visuals/createMaster3d.js +11 -6
  194. package/Charting3D/Visuals/createSingle3d.d.ts +1 -1
  195. package/Charting3D/Visuals/createSingle3d.js +2 -2
  196. package/Core/BuildStamp.d.ts +1 -1
  197. package/Core/BuildStamp.js +2 -2
  198. package/Core/NumberRange.d.ts +1 -0
  199. package/Core/NumberRange.js +8 -0
  200. package/Core/OneTimePerformanceWarning.d.ts +6 -0
  201. package/Core/OneTimePerformanceWarning.js +19 -0
  202. package/Core/storage/localStorageApi.d.ts +9 -0
  203. package/Core/storage/localStorageApi.js +32 -0
  204. package/README.md +223 -1
  205. package/_wasm/scichart.browser.js +1 -1
  206. package/_wasm/scichart2d.js +95 -95
  207. package/_wasm/scichart2d.wasm +0 -0
  208. package/_wasm/scichart3d.js +13 -13
  209. package/_wasm/scichart3d.wasm +0 -0
  210. package/constants/performanceWarnings.d.ts +5 -0
  211. package/constants/performanceWarnings.js +8 -0
  212. package/package.json +1 -1
  213. package/types/NumberArray.d.ts +1 -0
  214. package/types/NumberArray.js +5 -1
  215. package/types/SearchMode.d.ts +21 -0
  216. package/types/SearchMode.js +25 -0
  217. package/types/TSciChart.d.ts +144 -40
  218. package/types/TSciChart3D.d.ts +66 -28
  219. package/types/TStackedAxisLength.d.ts +4 -0
  220. package/types/TStackedAxisLength.js +4 -0
  221. package/utils/array.d.ts +7 -0
  222. package/utils/array.js +19 -1
  223. package/utils/calcAverage.d.ts +2 -2
  224. package/utils/ccall/appendDoubleVectorFromJsArray.d.ts +19 -0
  225. package/utils/ccall/appendDoubleVectorFromJsArray.js +91 -0
  226. package/utils/hash.d.ts +7 -0
  227. package/utils/hash.js +35 -0
  228. package/utils/tooltip.d.ts +42 -0
  229. package/utils/tooltip.js +119 -0
  230. package/utils/ccall/fillDoubleVectorFromJsArray.d.ts +0 -3
  231. package/utils/ccall/fillDoubleVectorFromJsArray.js +0 -33
  232. package/utils/performance.d.ts +0 -5
  233. package/utils/performance.js +0 -11
@@ -335,12 +335,6 @@ var drawColumns = function (wasmContext, renderContext, xCoordinateCalculator, y
335
335
  args.SetFillBrush(fillBrush);
336
336
  }
337
337
  var nativeContext = renderContext.getNativeContext();
338
- nativeContext.PushMatrix();
339
- nativeContext.PushState();
340
- nativeContext.Translate(viewRect.x, viewRect.y);
341
- nativeContext.SetClipRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);
342
338
  nativeDrawingProvider.DrawPointsVec(nativeContext, xValues, y1Values, yValues, xCoordinateCalculator.nativeCalculator, yCoordinateCalculator.nativeCalculator, args);
343
- nativeContext.PopMatrix();
344
- nativeContext.PopState();
345
339
  args.delete();
346
340
  };
@@ -38,7 +38,7 @@ export declare class StackedMountainCollection extends BaseStackedCollection<Sta
38
38
  * Creates an instance of the {@link StackedMountainCollection}
39
39
  * @param webAssemblyContext The {@link TSciChart | SciChart WebAssembly Context} containing
40
40
  * native methods and access to our WebGL2 WebAssembly Drawing Engine
41
- * @param options Optional parameters of type {@link IBaseStackedCollectionOptions} to configure the
41
+ * @param options Optional parameters of type {@link IBaseStackedCollectionOptions} to configure the series
42
42
  */
43
43
  constructor(webAssemblyContext: TSciChart, options?: IBaseStackedCollectionOptions);
44
44
  /** @inheritDoc */
@@ -52,7 +52,7 @@ var StackedMountainCollection = /** @class */ (function (_super) {
52
52
  * Creates an instance of the {@link StackedMountainCollection}
53
53
  * @param webAssemblyContext The {@link TSciChart | SciChart WebAssembly Context} containing
54
54
  * native methods and access to our WebGL2 WebAssembly Drawing Engine
55
- * @param options Optional parameters of type {@link IBaseStackedCollectionOptions} to configure the
55
+ * @param options Optional parameters of type {@link IBaseStackedCollectionOptions} to configure the series
56
56
  */
57
57
  function StackedMountainCollection(webAssemblyContext, options) {
58
58
  var _this = _super.call(this, webAssemblyContext, options) || this;
@@ -213,12 +213,6 @@ var drawBand = function (wasmContext, renderContext, renderPassData, nativeDrawi
213
213
  args.SetLinesPen1(strokePenY1);
214
214
  }
215
215
  var nativeContext = renderContext.getNativeContext();
216
- nativeContext.PushMatrix();
217
- nativeContext.PushState();
218
- nativeContext.Translate(viewRect.x, viewRect.y);
219
- nativeContext.SetClipRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);
220
216
  nativeDrawingProvider.DrawPointsVec(nativeContext, xValues, yValues, y1Values, renderPassData.xCoordinateCalculator.nativeCalculator, renderPassData.yCoordinateCalculator.nativeCalculator, args);
221
- nativeContext.PopMatrix();
222
- nativeContext.PopState();
223
217
  args.delete();
224
218
  };
@@ -1,7 +1,9 @@
1
1
  import { PropertyChangedEventArgs } from "../../../Core/PropertyChangedEventArgs";
2
2
  import { ESeriesType } from "../../../types/SeriesType";
3
3
  import { TSciChart } from "../../../types/TSciChart";
4
+ import { IPointSeries } from "../../Model/PointSeries/IPointSeries";
4
5
  import { UniformHeatmapDataSeries } from "../../Model/UniformHeatmapDataSeries";
6
+ import { ResamplingParams } from "../../Numerics/Resamplers/ResamplingParams";
5
7
  import { BaseRenderableSeries } from "./BaseRenderableSeries";
6
8
  import { HeatmapColorMap, IHeatmapColorMapOptions } from "./HeatmapColorMap";
7
9
  import { IHitTestProvider } from "./HitTest/IHitTestProvider";
@@ -106,6 +108,9 @@ export declare class UniformContoursRenderableSeries extends BaseRenderableSerie
106
108
  get minorsPerMajor(): number;
107
109
  set minorsPerMajor(minorsPerMajor: number);
108
110
  getContourDrawingParams(): IContourDrawingParams;
111
+ /** @inheritDoc */
112
+ toPointSeries(resamplingParams?: ResamplingParams): IPointSeries;
113
+ /** @inheritDoc */
109
114
  toJSON(excludeData?: boolean): import("../../../Builder/buildSeries").TSeriesDefinition;
110
115
  /**
111
116
  * Called when a property changes on {@link HeatmapColorMap}, and notifies the parent {@link SciChartSurface}
@@ -206,6 +206,12 @@ var UniformContoursRenderableSeries = /** @class */ (function (_super) {
206
206
  };
207
207
  return result;
208
208
  };
209
+ /** @inheritDoc */
210
+ UniformContoursRenderableSeries.prototype.toPointSeries = function (resamplingParams) {
211
+ // not used for Contours
212
+ return undefined;
213
+ };
214
+ /** @inheritDoc */
209
215
  UniformContoursRenderableSeries.prototype.toJSON = function (excludeData) {
210
216
  var _a;
211
217
  if (excludeData === void 0) { excludeData = false; }
@@ -1,7 +1,9 @@
1
1
  import { PropertyChangedEventArgs } from "../../../Core/PropertyChangedEventArgs";
2
2
  import { ESeriesType } from "../../../types/SeriesType";
3
3
  import { TSciChart } from "../../../types/TSciChart";
4
+ import { IPointSeries } from "../../Model/PointSeries/IPointSeries";
4
5
  import { UniformHeatmapDataSeries } from "../../Model/UniformHeatmapDataSeries";
6
+ import { ResamplingParams } from "../../Numerics/Resamplers/ResamplingParams";
5
7
  import { LabelProvider } from "../Axis/LabelProvider/LabelProvider";
6
8
  import { BaseRenderableSeries } from "./BaseRenderableSeries";
7
9
  import { HeatmapColorMap, IHeatmapColorMapOptions } from "./HeatmapColorMap";
@@ -98,6 +100,9 @@ export declare class UniformHeatmapRenderableSeries extends BaseRenderableSeries
98
100
  checkIsOutOfDataRange(xValue: number, yValue: number): boolean;
99
101
  get zLabelProvider(): LabelProvider;
100
102
  set zLabelProvider(labelProvider: LabelProvider);
103
+ /** @inheritDoc */
104
+ toPointSeries(resamplingParams?: ResamplingParams): IPointSeries;
105
+ /** @inheritDoc */
101
106
  toJSON(excludeData?: boolean): import("../../../Builder/buildSeries").TSeriesDefinition;
102
107
  /**
103
108
  * Called when a property changes on {@link HeatmapColorMap}, and notifies the parent {@link SciChartSurface}
@@ -159,6 +159,12 @@ var UniformHeatmapRenderableSeries = /** @class */ (function (_super) {
159
159
  enumerable: false,
160
160
  configurable: true
161
161
  });
162
+ /** @inheritDoc */
163
+ UniformHeatmapRenderableSeries.prototype.toPointSeries = function (resamplingParams) {
164
+ // not used for Heatmap
165
+ return undefined;
166
+ };
167
+ /** @inheritDoc */
162
168
  UniformHeatmapRenderableSeries.prototype.toJSON = function (excludeData) {
163
169
  var _a;
164
170
  if (excludeData === void 0) { excludeData = false; }
@@ -1,5 +1,7 @@
1
1
  import { ESeriesType } from "../../../types/SeriesType";
2
2
  import { TSciChart } from "../../../types/TSciChart";
3
+ import { IPointSeries } from "../../Model/PointSeries/IPointSeries";
4
+ import { ResamplingParams } from "../../Numerics/Resamplers/ResamplingParams";
3
5
  import { BaseRenderableSeries } from "./BaseRenderableSeries";
4
6
  import { IHitTestProvider } from "./HitTest/IHitTestProvider";
5
7
  import { IBaseRenderableSeriesOptions } from "./IBaseRenderableSeriesOptions";
@@ -45,8 +47,8 @@ export declare class XyScatterRenderableSeries extends BaseRenderableSeries {
45
47
  * @param options Optional parameters of type {@link IBaseRenderableSeriesOptions} to configure the series
46
48
  */
47
49
  constructor(webAssemblyContext: TSciChart, options?: IXyScatterRenderableSeriesOptions);
48
- /**
49
- * @inheritDoc
50
- */
50
+ /** @inheritDoc */
51
+ toPointSeries(rp?: ResamplingParams): IPointSeries;
52
+ /** @inheritDoc */
51
53
  protected newHitTestProvider(): IHitTestProvider;
52
54
  }
@@ -17,6 +17,7 @@ var __extends = (this && this.__extends) || (function () {
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.XyScatterRenderableSeries = void 0;
19
19
  var SeriesType_1 = require("../../../types/SeriesType");
20
+ var XyPointSeriesWrapped_1 = require("../../Model/PointSeries/XyPointSeriesWrapped");
20
21
  var EllipsePointMarker_1 = require("../PointMarkers/EllipsePointMarker");
21
22
  var BaseRenderableSeries_1 = require("./BaseRenderableSeries");
22
23
  var PointMarkerDrawingProvider_1 = require("./DrawingProviders/PointMarkerDrawingProvider");
@@ -75,9 +76,11 @@ var XyScatterRenderableSeries = /** @class */ (function (_super) {
75
76
  }
76
77
  return _this;
77
78
  }
78
- /**
79
- * @inheritDoc
80
- */
79
+ /** @inheritDoc */
80
+ XyScatterRenderableSeries.prototype.toPointSeries = function (rp) {
81
+ return new XyPointSeriesWrapped_1.XyPointSeriesWrapped(this.dataSeries);
82
+ };
83
+ /** @inheritDoc */
81
84
  XyScatterRenderableSeries.prototype.newHitTestProvider = function () {
82
85
  return new ScatterSeriesHitTestProvider_1.ScatterSeriesHitTestProvider(this, this.webAssemblyContext);
83
86
  };
@@ -12,6 +12,7 @@ export declare enum PROPERTY {
12
12
  DATA_SERIES = "dataSeries",
13
13
  DRAW_NAN_AS = "drawNaNAs",
14
14
  EFFECT = "EFFECT",
15
+ ENABLE_DRAWING_OPTIMISATIONS = "ENABLE_DRAWING_OPTIMISATIONS",
15
16
  FILL = "fill",
16
17
  FILL_Y1 = "FILL_Y1",
17
18
  FILL_LINEAR_GRADIENT = "FILL_LINEAR_GRADIENT",
@@ -30,6 +31,8 @@ export declare enum PROPERTY {
30
31
  PALETTE_PROVIDER = "PALETTE_PROVIDER",
31
32
  POINT_MARKER = "pointMarker",
32
33
  RANGE = "RANGE",
34
+ RESAMPLING_MODE = "RESAMPLING_MODE",
35
+ RESAMPLING_PRECISION = "RESAMPLING_PRECISION",
33
36
  SPACING = "SPACING",
34
37
  STACKED_GROUP_ID = "STACKED_GROUP_ID",
35
38
  STROKE = "STROKE",
@@ -16,6 +16,7 @@ var PROPERTY;
16
16
  PROPERTY["DATA_SERIES"] = "dataSeries";
17
17
  PROPERTY["DRAW_NAN_AS"] = "drawNaNAs";
18
18
  PROPERTY["EFFECT"] = "EFFECT";
19
+ PROPERTY["ENABLE_DRAWING_OPTIMISATIONS"] = "ENABLE_DRAWING_OPTIMISATIONS";
19
20
  PROPERTY["FILL"] = "fill";
20
21
  PROPERTY["FILL_Y1"] = "FILL_Y1";
21
22
  PROPERTY["FILL_LINEAR_GRADIENT"] = "FILL_LINEAR_GRADIENT";
@@ -34,6 +35,8 @@ var PROPERTY;
34
35
  PROPERTY["PALETTE_PROVIDER"] = "PALETTE_PROVIDER";
35
36
  PROPERTY["POINT_MARKER"] = "pointMarker";
36
37
  PROPERTY["RANGE"] = "RANGE";
38
+ PROPERTY["RESAMPLING_MODE"] = "RESAMPLING_MODE";
39
+ PROPERTY["RESAMPLING_PRECISION"] = "RESAMPLING_PRECISION";
37
40
  PROPERTY["SPACING"] = "SPACING";
38
41
  PROPERTY["STACKED_GROUP_ID"] = "STACKED_GROUP_ID";
39
42
  PROPERTY["STROKE"] = "STROKE";
@@ -5,7 +5,15 @@ export declare class SciChartDefaults {
5
5
  */
6
6
  static asyncLabels: boolean;
7
7
  /**
8
- * Set this true to allow resuse of label textures across diferent axes and different charts
8
+ * Set this true to allow reuse of label textures across different axes and different charts
9
9
  */
10
10
  static useSharedCache: boolean;
11
+ /**
12
+ * Turn on/off resampling
13
+ */
14
+ static enableResampling: boolean;
15
+ /**
16
+ * Turn on/off warnings to optimize performance
17
+ */
18
+ static performanceWarnings: boolean;
11
19
  }
@@ -10,9 +10,17 @@ var SciChartDefaults = /** @class */ (function () {
10
10
  */
11
11
  SciChartDefaults.asyncLabels = false;
12
12
  /**
13
- * Set this true to allow resuse of label textures across diferent axes and different charts
13
+ * Set this true to allow reuse of label textures across different axes and different charts
14
14
  */
15
15
  SciChartDefaults.useSharedCache = false;
16
+ /**
17
+ * Turn on/off resampling
18
+ */
19
+ SciChartDefaults.enableResampling = true;
20
+ /**
21
+ * Turn on/off warnings to optimize performance
22
+ */
23
+ SciChartDefaults.performanceWarnings = true;
16
24
  return SciChartDefaults;
17
25
  }());
18
26
  exports.SciChartDefaults = SciChartDefaults;
@@ -4,6 +4,7 @@ import { ObservableArray } from "../../../Core/ObservableArray";
4
4
  import { ESciChartSurfaceType } from "../../../types/SciChartSurfaceType";
5
5
  import { TSciChartSurfaceCanvases } from "../../../types/TSciChartSurfaceCanvases";
6
6
  import { IThemeProvider } from "../../Themes/IThemeProvider";
7
+ import { IEventSubscriptionItem } from "../Legend/SciChartLegendBase";
7
8
  import { SciChartPieLegend } from "../Legend/SciChartPieLegend";
8
9
  import { ISciChartSurfaceBase } from "../SciChartSurfaceBase";
9
10
  import { IPieSurfaceOptions } from "./IPieSurfaceOptions";
@@ -45,7 +46,7 @@ export declare class SciChartPieSurface implements ISciChartSurfaceBase {
45
46
  * @param width Optional - the width of the {@link SciChartPieSurface} in pixels. By default SciChart will scale to fit the parent Div
46
47
  * @param height Optional - the height of the {@link SciChartPieSurface} in pixels. By default SciChart will scale to fit the parent Div
47
48
  */
48
- static create(divElementId: string, options?: IPieSurfaceOptions): Promise<SciChartPieSurface>;
49
+ static create(divElement: string | HTMLDivElement, options?: IPieSurfaceOptions): Promise<SciChartPieSurface>;
49
50
  /**
50
51
  * @summary Gets the collection of {@link IPieSegment} - the pie segments or slices on this {@link SciChartPieSurface}
51
52
  * @description A {@link SciChartPieSurface} can have one to many {@link IPieSegment | Pie Segments}. *
@@ -57,6 +58,7 @@ export declare class SciChartPieSurface implements ISciChartSurfaceBase {
57
58
  readonly domChartRoot: HTMLDivElement;
58
59
  readonly domCanvas2D: HTMLCanvasElement;
59
60
  readonly domSvgContainer: SVGSVGElement;
61
+ readonly domSvgAdornerLayer: SVGSVGElement;
60
62
  readonly domDivContainer: HTMLDivElement;
61
63
  animate: boolean;
62
64
  /**
@@ -177,4 +179,4 @@ export declare class SciChartPieSurface implements ISciChartSurfaceBase {
177
179
  private applySciChartBackground;
178
180
  }
179
181
  /** @ignore */
180
- export declare const addEventListenerToPieSegment: (ps: IPieSegment, el: HTMLElement, animate: boolean) => void;
182
+ export declare const addEventListenerToPieSegment: (ps: IPieSegment, el: HTMLElement, animate: boolean) => IEventSubscriptionItem;
@@ -79,6 +79,7 @@ var SciChartPieSurface = /** @class */ (function () {
79
79
  this.domChartRoot = canvases.domChartRoot;
80
80
  this.domCanvas2D = canvases.domCanvas2D;
81
81
  this.domSvgContainer = canvases.domSvgContainer;
82
+ this.domSvgAdornerLayer = canvases.domSvgAdornerLayer;
82
83
  this.domDivContainer = canvases.domDivContainer;
83
84
  this.viewRect = new Rect_1.Rect(0, 0, this.domCanvas2D.width, this.domCanvas2D.height);
84
85
  this.drawChart = this.drawChart.bind(this);
@@ -117,10 +118,10 @@ var SciChartPieSurface = /** @class */ (function () {
117
118
  * @param width Optional - the width of the {@link SciChartPieSurface} in pixels. By default SciChart will scale to fit the parent Div
118
119
  * @param height Optional - the height of the {@link SciChartPieSurface} in pixels. By default SciChart will scale to fit the parent Div
119
120
  */
120
- SciChartPieSurface.create = function (divElementId, options) {
121
+ SciChartPieSurface.create = function (divElement, options) {
121
122
  var _a, _b;
122
123
  (0, chartBuilder_1.ensureRegistrations)();
123
- var canvases = sciChartInitCommon_1.default.initCanvas(divElementId, (_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.svg);
124
+ 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, sciChartInitCommon_1.default.ECanvasType.svg);
124
125
  return new Promise(function (resolve) {
125
126
  var conflictingRenderContextDestinations = __spreadArray(__spreadArray(__spreadArray([], createMaster_1.sciChartDestinations, true), createMaster3d_1.sciChartDestinations, true), createSingle_1.sciChartSingleDestinations, true).filter(function (destination) { return destination.sciChartSurface.domChartRoot.id === canvases.domChartRoot.id; });
126
127
  conflictingRenderContextDestinations.forEach(function (destination) { return destination.sciChartSurface.delete(); });
@@ -128,6 +129,7 @@ var SciChartPieSurface = /** @class */ (function () {
128
129
  var scps = new SciChartPieSurface(canvases, options);
129
130
  scps.applyTheme(options === null || options === void 0 ? void 0 : options.theme);
130
131
  var unsub = sciChartInitCommon_1.default.subscribeToResize(canvases.domChartRoot, canvases.aspect, scps);
132
+ scps.addDeletable(unsub);
131
133
  // setTimeout is used to make function async like createSciChartSurface, to have a consistent API
132
134
  setTimeout(function () { return resolve(scps); }, 0);
133
135
  });
@@ -328,13 +330,17 @@ var SciChartPieSurface = /** @class */ (function () {
328
330
  this.domChartRoot.style.height = "".concat(height, "px");
329
331
  }
330
332
  if (this.domCanvas2D) {
331
- this.domCanvas2D.width = width;
332
- this.domCanvas2D.height = height;
333
+ this.domCanvas2D.style.width = "".concat(width, "px");
334
+ this.domCanvas2D.style.height = "".concat(height, "px");
333
335
  }
334
336
  if (this.domSvgContainer) {
335
337
  this.domSvgContainer.setAttribute("width", width.toString());
336
338
  this.domSvgContainer.setAttribute("height", height.toString());
337
339
  }
340
+ if (this.domSvgAdornerLayer) {
341
+ this.domSvgAdornerLayer.setAttribute("width", width.toString());
342
+ this.domSvgAdornerLayer.setAttribute("height", height.toString());
343
+ }
338
344
  if (this.domDivContainer) {
339
345
  this.domDivContainer.style.height = "".concat(height, "px");
340
346
  }
@@ -387,8 +393,11 @@ var SciChartPieSurface = /** @class */ (function () {
387
393
  // ADD EVENT LISTENERS
388
394
  if (!app_1.IS_TEST_ENV) {
389
395
  this.pieSegments.asArray().forEach(function (ps) {
390
- var el = document.getElementById(ps.id);
391
- (0, exports.addEventListenerToPieSegment)(ps, el, _this.animate);
396
+ var el = _this.domChartRoot.querySelector("[id='".concat(ps.id, "']"));
397
+ if (el) {
398
+ var subscriptionToken = (0, exports.addEventListenerToPieSegment)(ps, el, _this.animate);
399
+ _this.addDeletable(subscriptionToken);
400
+ }
392
401
  });
393
402
  }
394
403
  this.drawSegmentTitles();
@@ -556,31 +565,36 @@ var calcTitlePosition = function (x, y, outerRadius, innerRadius, a1, a2, delta,
556
565
  var isListenerBlocked = false;
557
566
  /** @ignore */
558
567
  var addEventListenerToPieSegment = function (ps, el, animate) {
559
- if (el) {
560
- el.addEventListener("click", function (e) {
561
- if (!animate) {
562
- ps.isSelected = !ps.isSelected;
563
- return;
564
- }
565
- // ANIMATE
566
- if (!isListenerBlocked) {
567
- var ROUNDS_1 = 10;
568
- var directionDown = ps.isSelected;
569
- var start_1 = directionDown ? PieSegment_1.PieSegment.DEFAULT_DELTA : 0;
570
- var d_1 = directionDown ? -PieSegment_1.PieSegment.DEFAULT_DELTA / ROUNDS_1 : PieSegment_1.PieSegment.DEFAULT_DELTA / ROUNDS_1;
571
- isListenerBlocked = true;
572
- (function myLoop(k) {
573
- setTimeout(function () {
574
- ps.delta = start_1 + d_1 * k;
575
- if (k === ROUNDS_1) {
576
- isListenerBlocked = false;
577
- }
578
- if (++k <= ROUNDS_1)
579
- myLoop(k);
580
- }, 20);
581
- })(1);
582
- }
583
- });
584
- }
568
+ var eventListener = function (e) {
569
+ if (!animate) {
570
+ ps.isSelected = !ps.isSelected;
571
+ return;
572
+ }
573
+ // ANIMATE
574
+ if (!isListenerBlocked) {
575
+ var ROUNDS_1 = 10;
576
+ var directionDown = ps.isSelected;
577
+ var start_1 = directionDown ? PieSegment_1.PieSegment.DEFAULT_DELTA : 0;
578
+ var d_1 = directionDown ? -PieSegment_1.PieSegment.DEFAULT_DELTA / ROUNDS_1 : PieSegment_1.PieSegment.DEFAULT_DELTA / ROUNDS_1;
579
+ isListenerBlocked = true;
580
+ (function myLoop(k) {
581
+ setTimeout(function () {
582
+ ps.delta = start_1 + d_1 * k;
583
+ if (k === ROUNDS_1) {
584
+ isListenerBlocked = false;
585
+ }
586
+ if (++k <= ROUNDS_1)
587
+ myLoop(k);
588
+ }, 20);
589
+ })(1);
590
+ }
591
+ };
592
+ el.addEventListener("click", eventListener);
593
+ return {
594
+ eventListener: eventListener,
595
+ eventType: "click",
596
+ element: el,
597
+ delete: function () { return el.removeEventListener("click", eventListener); }
598
+ };
585
599
  };
586
600
  exports.addEventListenerToPieSegment = addEventListenerToPieSegment;
@@ -53,16 +53,16 @@ export declare class SciChartSurface extends SciChartSurfaceBase {
53
53
  /**
54
54
  * Creates a {@link SciChartSurface} and {@link TSciChart | WebAssembly Context} to occupy the div by element ID in your DOM.
55
55
  * @remarks This method is async and must be awaited
56
- * @param divElementId The Div Element ID where the {@link SciChartSurface} will reside
56
+ * @param divElement The Div Element ID or reference where the {@link SciChartSurface} will reside
57
57
  * @param options Optional - Optional parameters for chart creation. See {@link I2DSurfaceOptions} for more details
58
58
  */
59
- static create(divElementId: string, options?: I2DSurfaceOptions): Promise<TWebAssemblyChart>;
59
+ static create(divElement: string | HTMLDivElement, options?: I2DSurfaceOptions): Promise<TWebAssemblyChart>;
60
60
  /**
61
61
  * USED INTERNALLY - performs a similar operation to {@link SciChartSurface.create} but used internally for testing
62
- * @param divElementId
62
+ * @param divElement The Div Element ID or reference where the {@link SciChartSurface} will reside
63
63
  * @param options - optional parameters for chart creation. See {@link I2DSurfaceOptions} for more details
64
64
  */
65
- static createSingle(divElementId: string, options?: I2DSurfaceOptions): Promise<TWebAssemblyChart>;
65
+ static createSingle(divElement: string | HTMLDivElement, options?: I2DSurfaceOptions): Promise<TWebAssemblyChart>;
66
66
  /**
67
67
  * Allows setting of web URL for Wasm and Data files, in the case you are loading SciChart outside of npm/webpack environment.
68
68
  * Note if loading from CDN the version number of data/wasm Urls must match the version number of SciChart.js you are using.
@@ -195,17 +195,17 @@ var SciChartSurface = /** @class */ (function (_super) {
195
195
  /**
196
196
  * Creates a {@link SciChartSurface} and {@link TSciChart | WebAssembly Context} to occupy the div by element ID in your DOM.
197
197
  * @remarks This method is async and must be awaited
198
- * @param divElementId The Div Element ID where the {@link SciChartSurface} will reside
198
+ * @param divElement The Div Element ID or reference where the {@link SciChartSurface} will reside
199
199
  * @param options Optional - Optional parameters for chart creation. See {@link I2DSurfaceOptions} for more details
200
200
  */
201
- SciChartSurface.create = function (divElementId, options) {
201
+ SciChartSurface.create = function (divElement, options) {
202
202
  (0, chartBuilder_1.ensureRegistrations)();
203
203
  options = SciChartSurface.resolveOptions(options);
204
204
  if (app_1.IS_TEST_ENV) {
205
- return this.createTest(divElementId, options);
205
+ return this.createTest(divElement, options);
206
206
  }
207
207
  else {
208
- return (0, createMaster_1.createMultichart)(divElementId, options).then(function (result) {
208
+ return (0, createMaster_1.createMultichart)(divElement, options).then(function (result) {
209
209
  result.sciChartSurface.applyOptions(options);
210
210
  return result;
211
211
  });
@@ -213,17 +213,17 @@ var SciChartSurface = /** @class */ (function (_super) {
213
213
  };
214
214
  /**
215
215
  * USED INTERNALLY - performs a similar operation to {@link SciChartSurface.create} but used internally for testing
216
- * @param divElementId
216
+ * @param divElement The Div Element ID or reference where the {@link SciChartSurface} will reside
217
217
  * @param options - optional parameters for chart creation. See {@link I2DSurfaceOptions} for more details
218
218
  */
219
- SciChartSurface.createSingle = function (divElementId, options) {
219
+ SciChartSurface.createSingle = function (divElement, options) {
220
220
  (0, chartBuilder_1.ensureRegistrations)();
221
221
  options = SciChartSurface.resolveOptions(options);
222
222
  if (app_1.IS_TEST_ENV) {
223
- return this.createTest(divElementId, options);
223
+ return this.createTest(divElement, options);
224
224
  }
225
225
  else {
226
- return (0, createSingle_1.createSingleInternal)(divElementId, options).then(function (result) {
226
+ return (0, createSingle_1.createSingleInternal)(divElement, options).then(function (result) {
227
227
  result.sciChartSurface.applyOptions(options);
228
228
  return result;
229
229
  });
@@ -246,9 +246,9 @@ var SciChartSurface = /** @class */ (function (_super) {
246
246
  exports.sciChartConfig.dataUrl = (_a = config === null || config === void 0 ? void 0 : config.dataUrl) !== null && _a !== void 0 ? _a : undefined;
247
247
  exports.sciChartConfig.wasmUrl = (_b = config === null || config === void 0 ? void 0 : config.wasmUrl) !== null && _b !== void 0 ? _b : undefined;
248
248
  };
249
- SciChartSurface.createTest = function (divElementId, options) {
249
+ SciChartSurface.createTest = function (divElement, options) {
250
250
  var _a, _b;
251
- var canvases = sciChartInitCommon_1.default.initCanvas(divElementId, (_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);
251
+ 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, sciChartInitCommon_1.default.ECanvasType.canvas2D);
252
252
  var sciChartSurface = new SciChartSurface(exports.sciChartConfig.testWasm, { canvases: canvases });
253
253
  sciChartSurface.applyTheme(options === null || options === void 0 ? void 0 : options.theme);
254
254
  sciChartSurface.applyOptions(options);
@@ -385,13 +385,20 @@ var SciChartSurface = /** @class */ (function (_super) {
385
385
  // Logger.log("SciChartSurface.isSuspended = true. Ignoring invalidateElement() call");
386
386
  return;
387
387
  }
388
+ // console.log("Invalidating ", this.domChartRoot.id);
388
389
  var canvasId = this.domCanvas2D ? this.domCanvas2D.id : "undefinedCanvasId";
389
390
  this.renderSurface.invalidateElement(canvasId);
390
391
  };
391
392
  // Step_5: Get context and pass drawing to SciChartRenderer
392
393
  SciChartSurface.prototype.doDrawingLoop = function () {
393
394
  var context = this.renderSurface.getRenderContext();
394
- this.sciChartRenderer.render(context);
395
+ try {
396
+ // console.log("Drawing ", this.domChartRoot.id);
397
+ this.sciChartRenderer.render(context);
398
+ }
399
+ catch (err) {
400
+ console.error("Error from chart in div ".concat(this.domChartRoot.id), err);
401
+ }
395
402
  };
396
403
  /**
397
404
  * @inheritDoc
@@ -325,13 +325,14 @@ export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBas
325
325
  protected changeMasterCanvasViewportSize(wasmContext: TSciChart | TSciChart3D, pixelWidth: number, pixelHeight: number): void;
326
326
  protected changeWebGLCanvasViewportSize(wasmContext: TSciChart | TSciChart3D, pixelWidth: number, pixelHeight: number): void;
327
327
  }
328
- export declare const createChartDestination: (canvasId: string) => {
328
+ export declare const createChartDestination: (canvas: HTMLCanvasElement) => {
329
329
  canvas: HTMLCanvasElement;
330
330
  GetHeight(): any;
331
331
  GetWidth(): any;
332
332
  GetID(): any;
333
333
  };
334
334
  export declare const getMasterCanvas: () => HTMLCanvasElement;
335
- export declare const copyToCanvas: (sourceCanvas: HTMLCanvasElement) => (destinationId: string) => void;
335
+ export declare type TGetDestinationFn = (destinationId: string) => TSciChartDestination;
336
+ export declare const copyToCanvas: (sourceCanvas: HTMLCanvasElement, getDestinationById: TGetDestinationFn) => (destinationId: string) => void;
336
337
  /** @ignore */
337
338
  export declare const getLocateFile: (sciChartConfig: TSciChartConfig) => (path: string, prefix: string) => string;
@@ -420,8 +420,7 @@ var SciChartSurfaceBase = /** @class */ (function () {
420
420
  return SciChartSurfaceBase;
421
421
  }());
422
422
  exports.SciChartSurfaceBase = SciChartSurfaceBase;
423
- var createChartDestination = function (canvasId) {
424
- var canvas = document.querySelector("#".concat(canvasId));
423
+ var createChartDestination = function (canvas) {
425
424
  if (!canvas)
426
425
  return undefined;
427
426
  return {
@@ -475,8 +474,9 @@ var getMasterCanvas = function () {
475
474
  return SciChartSurfaceBase.domMasterCanvas;
476
475
  };
477
476
  exports.getMasterCanvas = getMasterCanvas;
478
- var copyToCanvas = function (sourceCanvas) { return function (destinationId) {
479
- var destinationCanvas = document.querySelector("#".concat(destinationId));
477
+ var copyToCanvas = function (sourceCanvas, getDestinationById) { return function (destinationId) {
478
+ var destination = getDestinationById(destinationId);
479
+ var destinationCanvas = destination === null || destination === void 0 ? void 0 : destination.sciChartSurface.domCanvas2D;
480
480
  if (destinationCanvas) {
481
481
  var destinationCanvasContext = destinationCanvas.getContext("2d");
482
482
  destinationCanvasContext.clearRect(0, 0, destinationCanvasContext.canvas.width, destinationCanvasContext.canvas.height);
@@ -2,6 +2,6 @@ import { I2DSurfaceOptions } from "./I2DSurfaceOptions";
2
2
  import { TWebAssemblyChart } from "./SciChartSurface";
3
3
  import { TSciChartDestination } from "./SciChartSurfaceBase";
4
4
  /** @ignore */
5
- export declare const createMultichart: (divElementId: string, options?: I2DSurfaceOptions) => Promise<TWebAssemblyChart>;
5
+ export declare const createMultichart: (divElement: string | HTMLDivElement, options?: I2DSurfaceOptions) => Promise<TWebAssemblyChart>;
6
6
  /** @ignore */
7
7
  export declare const sciChartDestinations: TSciChartDestination[];
@@ -57,14 +57,14 @@ var sciChartMaster = {
57
57
  /** @ignore */
58
58
  var sciChartMasterPromise;
59
59
  /** @ignore */
60
- var createMultichart = function (divElementId, options) { return __awaiter(void 0, void 0, void 0, function () {
61
- var canvases, loader, loaderDiv, master, createChildSurface, wasmContext_1, sciChartSurface_1, err_1;
60
+ var createMultichart = function (divElement, options) { return __awaiter(void 0, void 0, void 0, function () {
61
+ var canvases, loader, loaderDiv, master, createChildSurface, wasmContext_1, divElementId, sciChartSurface_1, err_1;
62
62
  var _a, _b, _c;
63
63
  return __generator(this, function (_d) {
64
64
  switch (_d.label) {
65
65
  case 0:
66
- sciChartInitCommon_1.default.checkChartDivExists(divElementId);
67
- canvases = sciChartInitCommon_1.default.initCanvas(divElementId, (_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);
66
+ sciChartInitCommon_1.default.checkChartDivExists(divElement);
67
+ 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);
68
68
  loader = (_c = options === null || options === void 0 ? void 0 : options.loader) !== null && _c !== void 0 ? _c : new loader_1.DefaultSciChartLoader();
69
69
  loaderDiv = loader.addChartLoader(canvases.domDivContainer, options === null || options === void 0 ? void 0 : options.theme);
70
70
  _d.label = 1;
@@ -85,6 +85,7 @@ var createMultichart = function (divElementId, options) { return __awaiter(void
85
85
  _d.label = 3;
86
86
  case 3:
87
87
  createChildSurface = sciChartMaster.createChildSurface, wasmContext_1 = sciChartMaster.wasmContext;
88
+ divElementId = canvases.domChartRoot.id;
88
89
  sciChartSurface_1 = createChildSurface(divElementId, canvases, options === null || options === void 0 ? void 0 : options.theme);
89
90
  return [2 /*return*/, new Promise(function (resolve) {
90
91
  setTimeout(function () {
@@ -147,7 +148,7 @@ var createMaster = function () {
147
148
  return sciChartSurface;
148
149
  };
149
150
  var addDestination = function (wasmContext, canvasElementId, sciChartSurface, width, height, chartInitObj) {
150
- var newDestination = (0, SciChartSurfaceBase_1.createChartDestination)(canvasElementId);
151
+ var newDestination = (0, SciChartSurfaceBase_1.createChartDestination)(sciChartSurface.domCanvas2D);
151
152
  if (!newDestination) {
152
153
  sciChartSurface.delete();
153
154
  return;
@@ -212,7 +213,7 @@ var createMaster = function () {
212
213
  wasmContext.SCRTSetGlobalSampleChartInterface(chartInitObj);
213
214
  /// create an object that native side can trigger the copy to from...
214
215
  var canvasCopyObj = wasmContext.SCRTCopyToDestinationInterface.implement({
215
- CopyToDestination: (0, SciChartSurfaceBase_1.copyToCanvas)(SciChartSurfaceBase_1.SciChartSurfaceBase.domMasterCanvas)
216
+ CopyToDestination: (0, SciChartSurfaceBase_1.copyToCanvas)(SciChartSurfaceBase_1.SciChartSurfaceBase.domMasterCanvas, getDestinationById)
216
217
  });
217
218
  wasmContext.SCRTSetGlobalCopyToDestinationInterface(canvasCopyObj);
218
219
  wasmContext.TSRSetDrawRequestsEnabled(true);
@@ -224,3 +225,7 @@ var createMaster = function () {
224
225
  });
225
226
  });
226
227
  };
228
+ /** @ignore */
229
+ var getDestinationById = function (destinationId) {
230
+ return exports.sciChartDestinations.find(function (dest) { return dest.canvasElementId === destinationId; });
231
+ };
@@ -6,6 +6,6 @@ import { TWebAssemblyChart } from "./SciChartSurface";
6
6
  import { TSciChartDestination } from "./SciChartSurfaceBase";
7
7
  export declare const sciChartSingleDestinations: TSciChartDestination[];
8
8
  /** @ignore */
9
- export declare const createSingleInternal: (divElementId: string, options?: I2DSurfaceOptions) => Promise<TWebAssemblyChart>;
9
+ export declare const createSingleInternal: (divElement: string | HTMLDivElement, options?: I2DSurfaceOptions) => Promise<TWebAssemblyChart>;
10
10
  /** @ignore */
11
11
  export declare const initDrawEngineSingleChart: (wasmContext: TSciChart, canvases: TSciChartSurfaceCanvases, resolve: (value: TWebAssemblyChart) => void, theme: IThemeProvider) => void;
@@ -15,10 +15,10 @@ var SciChartSurfaceBase_1 = require("./SciChartSurfaceBase");
15
15
  // Global variables
16
16
  exports.sciChartSingleDestinations = [];
17
17
  /** @ignore */
18
- var createSingleInternal = function (divElementId, options) {
18
+ var createSingleInternal = function (divElement, options) {
19
19
  return new Promise(function (resolve, reject) {
20
20
  var _a;
21
- var canvases = sciChartInitCommon_1.default.initCanvas(divElementId, options === null || options === void 0 ? void 0 : options.widthAspect, options === null || options === void 0 ? void 0 : options.heightAspect);
21
+ var canvases = sciChartInitCommon_1.default.initCanvas(divElement, options === null || options === void 0 ? void 0 : options.widthAspect, options === null || options === void 0 ? void 0 : options.heightAspect);
22
22
  var loader = (_a = options === null || options === void 0 ? void 0 : options.loader) !== null && _a !== void 0 ? _a : new loader_1.DefaultSciChartLoader();
23
23
  var loaderDiv = loader.addChartLoader(canvases.domDivContainer, options === null || options === void 0 ? void 0 : options.theme);
24
24
  var webGLSupport = WebGlHelper_1.WebGlHelper.getWebGlSupport();