scichart 2.0.2228 → 2.1.2273

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 (199) 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/WebGlRenderContext2D.d.ts +1 -0
  6. package/Charting/Drawing/WebGlRenderContext2D.js +4 -1
  7. package/Charting/Model/BaseDataSeries.d.ts +42 -15
  8. package/Charting/Model/BaseDataSeries.js +77 -28
  9. package/Charting/Model/BaseHeatmapDataSeries.d.ts +31 -23
  10. package/Charting/Model/BaseHeatmapDataSeries.js +45 -18
  11. package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.d.ts +23 -0
  12. package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.js +122 -0
  13. package/Charting/Model/DataDistributionCalculator/IDataDistributionCalculator.d.ts +57 -0
  14. package/Charting/Model/DataDistributionCalculator/IDataDistributionCalculator.js +2 -0
  15. package/Charting/Model/Filters/OhlcFilterBase.d.ts +2 -2
  16. package/Charting/Model/Filters/XyFilterBase.d.ts +3 -3
  17. package/Charting/Model/Filters/XyMovingAverageFilter.js +1 -1
  18. package/Charting/Model/Filters/XyyFilterBase.d.ts +4 -4
  19. package/Charting/Model/Filters/XyzFilterBase.d.ts +4 -4
  20. package/Charting/Model/IDataSeries.d.ts +37 -5
  21. package/Charting/Model/OhlcDataSeries.d.ts +12 -11
  22. package/Charting/Model/OhlcDataSeries.js +37 -34
  23. package/Charting/Model/PointSeries/BasePointSeriesResampled.d.ts +21 -0
  24. package/Charting/Model/PointSeries/BasePointSeriesResampled.js +56 -0
  25. package/Charting/Model/PointSeries/BasePointSeriesWrapped.d.ts +14 -0
  26. package/Charting/Model/PointSeries/BasePointSeriesWrapped.js +23 -0
  27. package/Charting/Model/PointSeries/IPointSeries.d.ts +31 -0
  28. package/Charting/Model/PointSeries/IPointSeries.js +2 -0
  29. package/Charting/Model/PointSeries/OhlcPointSeriesResampled.d.ts +13 -0
  30. package/Charting/Model/PointSeries/OhlcPointSeriesResampled.js +59 -0
  31. package/Charting/Model/PointSeries/OhlcPointSeriesWrapped.d.ts +11 -0
  32. package/Charting/Model/PointSeries/OhlcPointSeriesWrapped.js +32 -0
  33. package/Charting/Model/PointSeries/XyPointSeriesResampled.d.ts +7 -0
  34. package/Charting/Model/PointSeries/XyPointSeriesResampled.js +27 -0
  35. package/Charting/Model/PointSeries/XyPointSeriesWrapped.d.ts +6 -0
  36. package/Charting/Model/PointSeries/XyPointSeriesWrapped.js +27 -0
  37. package/Charting/Model/PointSeries/XyyPointSeriesResampled.d.ts +10 -0
  38. package/Charting/Model/PointSeries/XyyPointSeriesResampled.js +48 -0
  39. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.d.ts +8 -0
  40. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.js +29 -0
  41. package/Charting/Model/PointSeries/XyzPointSeriesWrapped.d.ts +8 -0
  42. package/Charting/Model/PointSeries/XyzPointSeriesWrapped.js +29 -0
  43. package/Charting/Model/XyDataSeries.d.ts +3 -2
  44. package/Charting/Model/XyDataSeries.js +22 -22
  45. package/Charting/Model/XyyDataSeries.d.ts +5 -5
  46. package/Charting/Model/XyyDataSeries.js +24 -21
  47. package/Charting/Model/XyzDataSeries.d.ts +5 -5
  48. package/Charting/Model/XyzDataSeries.js +24 -21
  49. package/Charting/Numerics/CoordinateCalculators/CategoryCoordinateCalculator.d.ts +2 -2
  50. package/Charting/Numerics/CoordinateCalculators/FlippedCategoryCoordinateCalculator.d.ts +2 -2
  51. package/Charting/Numerics/CoordinateCalculators/FlippedNumericCoordinateCalculator.d.ts +2 -1
  52. package/Charting/Numerics/CoordinateCalculators/FlippedNumericCoordinateCalculator.js +6 -2
  53. package/Charting/Numerics/CoordinateCalculators/NumericCoordinateCalculator.d.ts +2 -1
  54. package/Charting/Numerics/CoordinateCalculators/NumericCoordinateCalculator.js +6 -2
  55. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.d.ts +54 -0
  56. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +234 -0
  57. package/Charting/Numerics/Resamplers/ResamplingMode.d.ts +37 -0
  58. package/Charting/Numerics/Resamplers/ResamplingMode.js +41 -0
  59. package/Charting/Numerics/Resamplers/ResamplingParams.d.ts +39 -0
  60. package/Charting/Numerics/Resamplers/ResamplingParams.js +52 -0
  61. package/Charting/Services/RenderPassData.d.ts +6 -1
  62. package/Charting/Services/RenderPassData.js +5 -1
  63. package/Charting/Services/RenderPassInfo.d.ts +18 -0
  64. package/Charting/Services/RenderPassInfo.js +14 -0
  65. package/Charting/Services/SciChartRenderer.d.ts +14 -1
  66. package/Charting/Services/SciChartRenderer.js +125 -31
  67. package/Charting/Visuals/Axis/AxisCore.d.ts +11 -0
  68. package/Charting/Visuals/Axis/AxisCore.js +39 -18
  69. package/Charting/Visuals/Axis/AxisRenderer.d.ts +1 -0
  70. package/Charting/Visuals/Axis/AxisRenderer.js +6 -6
  71. package/Charting/Visuals/Axis/CategoryAxisBase.d.ts +52 -0
  72. package/Charting/Visuals/Axis/CategoryAxisBase.js +94 -20
  73. package/Charting/Visuals/Axis/IAxisCoreOptions.d.ts +5 -0
  74. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +7 -4
  75. package/Charting/Visuals/Axis/NumericAxis.js +2 -2
  76. package/Charting/Visuals/Axis/constants.d.ts +1 -0
  77. package/Charting/Visuals/Axis/constants.js +1 -0
  78. package/Charting/Visuals/Legend/SciChartLegend.d.ts +6 -0
  79. package/Charting/Visuals/Legend/SciChartLegend.js +30 -13
  80. package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +20 -6
  81. package/Charting/Visuals/Legend/SciChartLegendBase.js +22 -4
  82. package/Charting/Visuals/Legend/SciChartPieLegend.d.ts +2 -0
  83. package/Charting/Visuals/Legend/SciChartPieLegend.js +17 -6
  84. package/Charting/Visuals/RenderableSeries/Animations/FadeAnimation.d.ts +2 -2
  85. package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.d.ts +2 -2
  86. package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.d.ts +3 -3
  87. package/Charting/Visuals/RenderableSeries/Animations/SweepAnimation.d.ts +2 -2
  88. package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.d.ts +2 -2
  89. package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.d.ts +6 -6
  90. package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.js +2 -2
  91. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +9 -2
  92. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +45 -1
  93. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.d.ts +1 -0
  94. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.js +1 -0
  95. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.d.ts +1 -0
  96. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.js +1 -0
  97. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +12 -5
  98. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +113 -0
  99. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +42 -6
  100. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +129 -21
  101. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +36 -4
  102. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +51 -3
  103. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +38 -4
  104. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +54 -3
  105. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +1 -1
  106. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +8 -14
  107. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +4 -3
  108. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +5 -11
  109. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.d.ts +1 -0
  110. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +31 -19
  111. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.d.ts +2 -1
  112. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +17 -21
  113. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +6 -12
  114. package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.js +9 -15
  115. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.d.ts +4 -3
  116. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +16 -21
  117. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformContoursDrawingProvider.js +2 -9
  118. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +0 -7
  119. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +11 -2
  120. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +17 -0
  121. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +1 -0
  122. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.js +1 -0
  123. package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.d.ts +1 -0
  124. package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.js +6 -0
  125. package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +2 -2
  126. package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +1 -1
  127. package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +1 -1
  128. package/Charting/Visuals/RenderableSeries/HitTest/ColumnSeriesHitTestProvider.js +2 -2
  129. package/Charting/Visuals/RenderableSeries/HitTest/LineSeriesHitTestProvider.js +2 -2
  130. package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +1 -1
  131. package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.js +2 -2
  132. package/Charting/Visuals/RenderableSeries/HitTest/ScatterSeriesHitTestProvider.js +1 -1
  133. package/Charting/Visuals/RenderableSeries/HitTest/StackedColumnSeriesHitTestProvider.js +2 -2
  134. package/Charting/Visuals/RenderableSeries/HitTest/StackedMountainSeriesHitTestProvider.js +2 -2
  135. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +6 -6
  136. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +1 -1
  137. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +12 -1
  138. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +38 -2
  139. package/Charting/Visuals/RenderableSeries/ISpline.d.ts +3 -3
  140. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.d.ts +4 -4
  141. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +5 -5
  142. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +3 -3
  143. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +3 -3
  144. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.d.ts +3 -3
  145. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +3 -3
  146. package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +2 -7
  147. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +1 -1
  148. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +1 -7
  149. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.d.ts +5 -0
  150. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.js +6 -0
  151. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.d.ts +5 -0
  152. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +6 -0
  153. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -3
  154. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +6 -3
  155. package/Charting/Visuals/RenderableSeries/constants.d.ts +3 -0
  156. package/Charting/Visuals/RenderableSeries/constants.js +3 -0
  157. package/Charting/Visuals/SciChartDefaults.d.ts +9 -1
  158. package/Charting/Visuals/SciChartDefaults.js +9 -1
  159. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +4 -2
  160. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +46 -32
  161. package/Charting/Visuals/licenseManager2D.js +21 -20
  162. package/Charting/Visuals/licenseManager2dState.d.ts +4 -0
  163. package/Charting/Visuals/licenseManager2dState.js +12 -0
  164. package/Charting/Visuals/loader.js +2 -0
  165. package/Charting/Visuals/sciChartInitCommon.js +4 -0
  166. package/Charting3D/Model/DataSeries/XyzDataSeries3D.d.ts +7 -7
  167. package/Charting3D/Model/DataSeries/XyzDataSeries3D.js +3 -3
  168. package/Core/BuildStamp.d.ts +1 -1
  169. package/Core/BuildStamp.js +2 -2
  170. package/Core/OneTimePerformanceWarning.d.ts +6 -0
  171. package/Core/OneTimePerformanceWarning.js +19 -0
  172. package/Core/storage/localStorageApi.d.ts +9 -0
  173. package/Core/storage/localStorageApi.js +32 -0
  174. package/README.md +223 -1
  175. package/_wasm/scichart.browser.js +1 -1
  176. package/_wasm/scichart2d.js +12 -12
  177. package/_wasm/scichart2d.wasm +0 -0
  178. package/_wasm/scichart3d.js +13 -13
  179. package/_wasm/scichart3d.wasm +0 -0
  180. package/constants/performanceWarnings.d.ts +5 -0
  181. package/constants/performanceWarnings.js +8 -0
  182. package/package.json +1 -1
  183. package/types/SearchMode.d.ts +21 -0
  184. package/types/SearchMode.js +25 -0
  185. package/types/TSciChart.d.ts +144 -40
  186. package/types/TSciChart3D.d.ts +66 -28
  187. package/utils/array.d.ts +7 -0
  188. package/utils/array.js +19 -1
  189. package/utils/calcAverage.d.ts +2 -2
  190. package/utils/ccall/appendDoubleVectorFromJsArray.d.ts +19 -0
  191. package/utils/ccall/appendDoubleVectorFromJsArray.js +91 -0
  192. package/utils/hash.d.ts +7 -0
  193. package/utils/hash.js +35 -0
  194. package/utils/tooltip.d.ts +42 -0
  195. package/utils/tooltip.js +119 -0
  196. package/utils/ccall/fillDoubleVectorFromJsArray.d.ts +0 -3
  197. package/utils/ccall/fillDoubleVectorFromJsArray.js +0 -33
  198. package/utils/performance.d.ts +0 -5
  199. package/utils/performance.js +0 -11
@@ -5,6 +5,11 @@ import { TGridLineStyle, TTextStyle, TTickLineStyle } from "./AxisCore";
5
5
  * Optional parameters passed to {@link AxisCore} constructor to set defaults at construction time
6
6
  */
7
7
  export interface IAxisCoreOptions {
8
+ /**
9
+ * When true, 32-bit faster paths for coordinate calculation maths are used. This improves performance in
10
+ * edge-cases where every CPU cycle counts.
11
+ */
12
+ allowFastMath?: boolean;
8
13
  /**
9
14
  * The VisibleRange is the range of the Axis (min to max).
10
15
  * @description
@@ -117,7 +117,8 @@ var SmartDateLabelProvider = /** @class */ (function (_super) {
117
117
  };
118
118
  SmartDateLabelProvider.prototype.formatTradeChartLabel = function (tradeChartLabelFormat, value, prevValue, prevPrevValue) {
119
119
  if (tradeChartLabelFormat === ETradeChartLabelFormat.Minutes) {
120
- var newDate = !prevValue || (0, date_1.formatUnixDateToHumanStringMMMDD)(value) !== (0, date_1.formatUnixDateToHumanStringMMMDD)(prevValue);
120
+ var newDate = prevValue === undefined ||
121
+ (0, date_1.formatUnixDateToHumanStringMMMDD)(value) !== (0, date_1.formatUnixDateToHumanStringMMMDD)(prevValue);
121
122
  if (newDate) {
122
123
  return (0, date_1.formatUnixDateToHumanStringMMMDD)(value);
123
124
  }
@@ -126,7 +127,8 @@ var SmartDateLabelProvider = /** @class */ (function (_super) {
126
127
  }
127
128
  }
128
129
  else if (tradeChartLabelFormat === ETradeChartLabelFormat.Days) {
129
- var newMonth = !prevValue || (0, date_1.formatUnixDateToHumanStringMMM)(value) !== (0, date_1.formatUnixDateToHumanStringMMM)(prevValue);
130
+ var newMonth = prevValue === undefined ||
131
+ (0, date_1.formatUnixDateToHumanStringMMM)(value) !== (0, date_1.formatUnixDateToHumanStringMMM)(prevValue);
130
132
  if (newMonth) {
131
133
  return (0, date_1.formatUnixDateToHumanStringMMM)(value);
132
134
  }
@@ -135,12 +137,13 @@ var SmartDateLabelProvider = /** @class */ (function (_super) {
135
137
  }
136
138
  }
137
139
  else if (tradeChartLabelFormat === ETradeChartLabelFormat.Months) {
138
- var newYear = !prevValue || (0, date_1.formatUnixDateToHumanStringYYYY)(value) !== (0, date_1.formatUnixDateToHumanStringYYYY)(prevValue);
140
+ var newYear = prevValue === undefined ||
141
+ (0, date_1.formatUnixDateToHumanStringYYYY)(value) !== (0, date_1.formatUnixDateToHumanStringYYYY)(prevValue);
139
142
  if (newYear) {
140
143
  return (0, date_1.formatUnixDateToHumanStringYYYY)(value);
141
144
  }
142
145
  // If previous label was year, display month label
143
- var prevPrevNewYear = !prevPrevValue ||
146
+ var prevPrevNewYear = prevPrevValue === undefined ||
144
147
  (0, date_1.formatUnixDateToHumanStringYYYY)(prevValue) !== (0, date_1.formatUnixDateToHumanStringYYYY)(prevPrevValue);
145
148
  var newMonth = prevPrevNewYear || (0, date_1.formatUnixDateToHumanStringMMM)(value) !== (0, date_1.formatUnixDateToHumanStringMMM)(prevValue);
146
149
  if (newMonth) {
@@ -58,8 +58,8 @@ var NumericAxis = /** @class */ (function (_super) {
58
58
  var size = this.axisLength;
59
59
  var shouldFlip = this.isXAxis !== this.flippedCoordinatesProperty;
60
60
  return shouldFlip
61
- ? new FlippedNumericCoordinateCalculator_1.FlippedNumericCoordinateCalculator(this.webAssemblyContext2D, size, min, max, offset)
62
- : new NumericCoordinateCalculator_1.NumericCoordinateCalculator(this.webAssemblyContext2D, size, min, max, offset);
61
+ ? new FlippedNumericCoordinateCalculator_1.FlippedNumericCoordinateCalculator(this.webAssemblyContext2D, size, min, max, offset, this.allowFastMath)
62
+ : new NumericCoordinateCalculator_1.NumericCoordinateCalculator(this.webAssemblyContext2D, size, min, max, offset, this.allowFastMath);
63
63
  };
64
64
  return NumericAxis;
65
65
  }(AxisBase2D_1.AxisBase2D));
@@ -1,4 +1,5 @@
1
1
  export declare enum PROPERTY {
2
+ ALLOW_FAST_MATH = "ALLOW_FAST_MATH",
2
3
  AUTO_RANGE = "AUTO_RANGE",
3
4
  AUTO_TICKS = "AUTO_TICKS",
4
5
  AXIS_ALIGNMENT = "AXIS_ALIGNMENT",
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROPERTY = void 0;
4
4
  var PROPERTY;
5
5
  (function (PROPERTY) {
6
+ PROPERTY["ALLOW_FAST_MATH"] = "ALLOW_FAST_MATH";
6
7
  PROPERTY["AUTO_RANGE"] = "AUTO_RANGE";
7
8
  PROPERTY["AUTO_TICKS"] = "AUTO_TICKS";
8
9
  PROPERTY["AXIS_ALIGNMENT"] = "AXIS_ALIGNMENT";
@@ -35,5 +35,11 @@ export declare class SciChartLegend extends SciChartLegendBase {
35
35
  /** @inheritDoc */
36
36
  protected addEventListeners(): void;
37
37
  /** @inheritDoc */
38
+ protected removeEventListeners(): void;
39
+ /**
40
+ * adds event listeners to a specific {@link IRenderableSeries} series
41
+ */
42
+ protected addEventListenerToSeries(rs: IRenderableSeries): void;
43
+ /** @inheritDoc */
38
44
  protected getInnerHTML(): string;
39
45
  }
@@ -79,7 +79,36 @@ var SciChartLegend = /** @class */ (function (_super) {
79
79
  };
80
80
  /** @inheritDoc */
81
81
  SciChartLegend.prototype.addEventListeners = function () {
82
- this.renderableSeriesArray.forEach(function (rs) { return addEventListenerToSeries(rs); });
82
+ var _this = this;
83
+ this.renderableSeriesArray.forEach(function (rs) { return _this.addEventListenerToSeries(rs); });
84
+ };
85
+ /** @inheritDoc */
86
+ SciChartLegend.prototype.removeEventListeners = function () {
87
+ var _this = this;
88
+ this.renderableSeriesArray.forEach(function (rs) { return _this.removeEventListenerFromSeries(rs.id); });
89
+ };
90
+ /**
91
+ * adds event listeners to a specific {@link IRenderableSeries} series
92
+ */
93
+ SciChartLegend.prototype.addEventListenerToSeries = function (rs) {
94
+ var el = this.getParentDiv().querySelector("[id='".concat(rs.id, "']"));
95
+ if (el) {
96
+ var onChangeEventListener_1 = function (e) { return (rs.isVisible = e.target.checked); };
97
+ el.addEventListener("change", onChangeEventListener_1);
98
+ var eventSubscriptionItem = {
99
+ element: el,
100
+ eventType: "change",
101
+ eventListener: onChangeEventListener_1,
102
+ delete: function () { return el.removeEventListener("change", onChangeEventListener_1); }
103
+ };
104
+ var eventListenersForRenderableSeries = this.eventListenersCollection.get(rs.id);
105
+ if (eventListenersForRenderableSeries) {
106
+ eventListenersForRenderableSeries.push(eventSubscriptionItem);
107
+ }
108
+ else {
109
+ this.eventListenersCollection.set(rs.id, [eventSubscriptionItem]);
110
+ }
111
+ }
83
112
  };
84
113
  /** @inheritDoc */
85
114
  SciChartLegend.prototype.getInnerHTML = function () {
@@ -104,15 +133,3 @@ var SciChartLegend = /** @class */ (function (_super) {
104
133
  return SciChartLegend;
105
134
  }(SciChartLegendBase_1.SciChartLegendBase));
106
135
  exports.SciChartLegend = SciChartLegend;
107
- /** @ignore */
108
- var addEventListenerToSeries = function (rs) {
109
- var el = document.getElementById(rs.id);
110
- if (el) {
111
- // @ts-ignore
112
- el.addEventListener("change", function (e) { return (rs.isVisible = e.target.checked); });
113
- }
114
- };
115
- /** @ignore */
116
- var removeEventListenerFromSeries = function (renderableSeriesId) {
117
- // TODO: to think about how to remove event listeners when removing series
118
- };
@@ -10,6 +10,11 @@ export declare type TLegendItem = {
10
10
  checked: boolean;
11
11
  gradient?: GradientParams;
12
12
  };
13
+ export interface IEventSubscriptionItem extends IDeletable {
14
+ element: HTMLElement;
15
+ eventType: string;
16
+ eventListener: EventListener;
17
+ }
13
18
  /**
14
19
  * Enumeration constants to define legend orientation
15
20
  */
@@ -48,7 +53,8 @@ export declare abstract class SciChartLegendBase implements IDeletable {
48
53
  protected marginProperty: number;
49
54
  protected isDirty: boolean;
50
55
  protected parentSurfaceProperty: ISciChartSurfaceBase;
51
- protected placementDivIdProperty: string;
56
+ protected placementDivIdProperty: string | HTMLDivElement;
57
+ protected eventListenersCollection: Map<string, IEventSubscriptionItem[]>;
52
58
  /** @inheritDoc */
53
59
  abstract applyTheme(): void;
54
60
  setInvalidateParentSurface(value: () => void): void;
@@ -107,13 +113,13 @@ export declare abstract class SciChartLegendBase implements IDeletable {
107
113
  */
108
114
  set margin(value: number);
109
115
  /**
110
- * Gets or sets the parent div element for the Legend
116
+ * Gets or sets the parent div element reference or id for the Legend
111
117
  */
112
- get placementDivId(): string;
118
+ get placementDivId(): string | HTMLDivElement;
113
119
  /**
114
- * Gets or sets the parent div element for the Legend
120
+ * Gets or sets the parent div element reference or id for the Legend
115
121
  */
116
- set placementDivId(value: string);
122
+ set placementDivId(value: string | HTMLDivElement);
117
123
  /** @inheritDoc */
118
124
  delete(): void;
119
125
  /**
@@ -156,7 +162,15 @@ export declare abstract class SciChartLegendBase implements IDeletable {
156
162
  * When overridden in a derived class, will be called when its time to add event listeners to series
157
163
  */
158
164
  protected abstract addEventListeners(): void;
159
- private getParentDiv;
165
+ /**
166
+ * When overridden in a derived class, will be called when its time to remove event listeners from series
167
+ */
168
+ protected abstract removeEventListeners(): void;
169
+ /**
170
+ * removes event listeners from a specific {@link IRenderableSeries} series
171
+ */
172
+ protected removeEventListenerFromSeries: (renderableSeriesId: string) => void;
173
+ protected getParentDiv(): HTMLDivElement;
160
174
  }
161
175
  export declare const getLegendItemHtml: (orientation: ELegendOrientation, showCheckboxes: boolean, showSeriesMarkers: boolean, item: TLegendItem) => string;
162
176
  export declare const getLegendContainerHtml: (placement: ELegendPlacement, textColor: string, backgroundColor: string, margin: Thickness, body: string) => string;
@@ -35,11 +35,24 @@ var ELegendType;
35
35
  */
36
36
  var SciChartLegendBase = /** @class */ (function () {
37
37
  function SciChartLegendBase() {
38
+ var _this = this;
38
39
  this.orientationProperty = ELegendOrientation.Vertical;
39
40
  this.showLegendProperty = true;
40
41
  this.placementProperty = ELegendPlacement.TopLeft;
41
42
  this.marginProperty = 10;
42
43
  this.isDirty = true;
44
+ this.eventListenersCollection = new Map();
45
+ /**
46
+ * removes event listeners from a specific {@link IRenderableSeries} series
47
+ */
48
+ this.removeEventListenerFromSeries = function (renderableSeriesId) {
49
+ var _a;
50
+ (_a = _this.eventListenersCollection.get(renderableSeriesId)) === null || _a === void 0 ? void 0 : _a.forEach(function (_a) {
51
+ var element = _a.element, eventListener = _a.eventListener, eventType = _a.eventType;
52
+ element.removeEventListener(eventType, eventListener);
53
+ });
54
+ _this.eventListenersCollection.delete(renderableSeriesId);
55
+ };
43
56
  }
44
57
  SciChartLegendBase.prototype.setInvalidateParentSurface = function (value) {
45
58
  this.invalidateParentSurface = value;
@@ -156,13 +169,13 @@ var SciChartLegendBase = /** @class */ (function () {
156
169
  });
157
170
  Object.defineProperty(SciChartLegendBase.prototype, "placementDivId", {
158
171
  /**
159
- * Gets or sets the parent div element for the Legend
172
+ * Gets or sets the parent div element reference or id for the Legend
160
173
  */
161
174
  get: function () {
162
175
  return this.placementDivIdProperty;
163
176
  },
164
177
  /**
165
- * Gets or sets the parent div element for the Legend
178
+ * Gets or sets the parent div element reference or id for the Legend
166
179
  */
167
180
  set: function (value) {
168
181
  this.delete();
@@ -175,8 +188,8 @@ var SciChartLegendBase = /** @class */ (function () {
175
188
  /** @inheritDoc */
176
189
  SciChartLegendBase.prototype.delete = function () {
177
190
  var _a;
178
- // TODO: remove listeners from renderable series to prevent memory leaks in older browsers
179
191
  if (this.div) {
192
+ this.removeEventListeners();
180
193
  (_a = this.getParentDiv()) === null || _a === void 0 ? void 0 : _a.removeChild(this.div);
181
194
  this.div = undefined;
182
195
  }
@@ -239,7 +252,12 @@ var SciChartLegendBase = /** @class */ (function () {
239
252
  }
240
253
  };
241
254
  SciChartLegendBase.prototype.getParentDiv = function () {
242
- return this.placementDivId ? document.getElementById(this.placementDivId) : this.rootDiv;
255
+ if (this.placementDivId) {
256
+ return typeof this.placementDivId === "string"
257
+ ? document.getElementById(this.placementDivId)
258
+ : this.placementDivId;
259
+ }
260
+ return this.rootDiv;
243
261
  };
244
262
  return SciChartLegendBase;
245
263
  }());
@@ -43,6 +43,8 @@ export declare class SciChartPieLegend extends SciChartLegendBase {
43
43
  * @inheritDoc
44
44
  */
45
45
  protected addEventListeners(): void;
46
+ /** @inheritDoc */
47
+ protected removeEventListeners(): void;
46
48
  /**
47
49
  * @inheritDoc
48
50
  */
@@ -95,10 +95,25 @@ var SciChartPieLegend = /** @class */ (function (_super) {
95
95
  SciChartPieLegend.prototype.addEventListeners = function () {
96
96
  var _this = this;
97
97
  this.pieSegmentArray.forEach(function (ps) {
98
- var el = document.getElementById(getCheckboxId(ps.id));
99
- (0, SciChartPieSurface_1.addEventListenerToPieSegment)(ps, el, _this.animate);
98
+ var el = _this.getParentDiv().querySelector("#".concat(getCheckboxId(ps.id)));
99
+ if (!el) {
100
+ return;
101
+ }
102
+ var eventSubscriptionItem = (0, SciChartPieSurface_1.addEventListenerToPieSegment)(ps, el, _this.animate);
103
+ var eventListenersForRenderableSeries = _this.eventListenersCollection.get(ps.id);
104
+ if (eventListenersForRenderableSeries) {
105
+ eventListenersForRenderableSeries.push(eventSubscriptionItem);
106
+ }
107
+ else {
108
+ _this.eventListenersCollection.set(ps.id, [eventSubscriptionItem]);
109
+ }
100
110
  });
101
111
  };
112
+ /** @inheritDoc */
113
+ SciChartPieLegend.prototype.removeEventListeners = function () {
114
+ var _this = this;
115
+ this.pieSegmentArray.forEach(function (ps) { return _this.removeEventListenerFromSeries(ps.id); });
116
+ };
102
117
  /**
103
118
  * @inheritDoc
104
119
  */
@@ -123,7 +138,3 @@ var SciChartPieLegend = /** @class */ (function (_super) {
123
138
  exports.SciChartPieLegend = SciChartPieLegend;
124
139
  /** @ignore */
125
140
  var getCheckboxId = function (pieSegmentId) { return "check".concat(pieSegmentId); };
126
- /** @ignore */
127
- var removeEventListenerFromSeries = function (renderableSeriesId) {
128
- // TODO: to think about how to remove event listeners when removing series
129
- };
@@ -1,5 +1,5 @@
1
1
  import { EAnimationType } from "../../../../types/AnimationType";
2
- import { DoubleVector, TSciChart } from "../../../../types/TSciChart";
2
+ import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
3
3
  import { SeriesAnimation, IBaseAnimationOptions } from "./SeriesAnimation";
4
4
  export interface IFadeAnimationOptions extends IBaseAnimationOptions {
5
5
  }
@@ -8,5 +8,5 @@ export declare class FadeAnimation extends SeriesAnimation {
8
8
  readonly type = EAnimationType.Fade;
9
9
  constructor(options?: IFadeAnimationOptions);
10
10
  /** @inheritDoc */
11
- calculateAnimationValues(wasmContext: TSciChart, originalValues: DoubleVector, animationValues: DoubleVector, progress: number, noZeroLine?: boolean): void;
11
+ calculateAnimationValues(wasmContext: TSciChart, originalValues: SCRTDoubleVector, animationValues: SCRTDoubleVector, progress: number, noZeroLine?: boolean): void;
12
12
  }
@@ -1,5 +1,5 @@
1
1
  import { EAnimationType } from "../../../../types/AnimationType";
2
- import { DoubleVector, TSciChart } from "../../../../types/TSciChart";
2
+ import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
3
3
  import { SeriesAnimation, IBaseAnimationOptions } from "./SeriesAnimation";
4
4
  export interface IScaleAnimationOptions extends IBaseAnimationOptions {
5
5
  zeroLine?: number;
@@ -13,7 +13,7 @@ export declare class ScaleAnimation extends SeriesAnimation {
13
13
  zeroLine: number;
14
14
  constructor(options?: IScaleAnimationOptions);
15
15
  /** @inheritDoc */
16
- calculateAnimationValues(wasmContext: TSciChart, originalValues: DoubleVector, animationValues: DoubleVector, progress: number, noZeroLine?: boolean): void;
16
+ calculateAnimationValues(wasmContext: TSciChart, originalValues: SCRTDoubleVector, animationValues: SCRTDoubleVector, progress: number, noZeroLine?: boolean): void;
17
17
  toJSON(): {
18
18
  type: EAnimationType;
19
19
  options: Required<Omit<IBaseAnimationOptions, never>>;
@@ -1,7 +1,7 @@
1
1
  import { IAnimation } from "../../../../Core/Animations/AnimationFiniteStateMachine";
2
2
  import { TEasingFn } from "../../../../Core/Animations/EasingFunctions";
3
3
  import { EAnimationType } from "../../../../types/AnimationType";
4
- import { DoubleVector, TSciChart } from "../../../../types/TSciChart";
4
+ import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
5
5
  import { IDataSeries } from "../../../Model/IDataSeries";
6
6
  import { IRenderableSeries } from "../IRenderableSeries";
7
7
  import { BaseAnimationStyle } from "./BaseAnimationStyle";
@@ -65,7 +65,7 @@ export declare abstract class SeriesAnimation implements IAnimation {
65
65
  * @param progress Current animation progress
66
66
  * @param noZeroLine Sets zeroLine = 0, is used for XyzDataSeries
67
67
  */
68
- calculateAnimationValues(wasmContext: TSciChart, originalValues: DoubleVector, animationValues: DoubleVector, progress: number, noZeroLine?: boolean): void;
68
+ calculateAnimationValues(wasmContext: TSciChart, originalValues: SCRTDoubleVector, animationValues: SCRTDoubleVector, progress: number, noZeroLine?: boolean): void;
69
69
  /**
70
70
  * Runs for data animation to update animation vectors
71
71
  * @param wasmContext
@@ -74,7 +74,7 @@ export declare abstract class SeriesAnimation implements IAnimation {
74
74
  * @param interpolatedValues The vector which will be updated with interpolated values
75
75
  * @param progress Current animation progress
76
76
  */
77
- calculateDataSeriesAnimationValues(wasmContext: TSciChart, initialValues: DoubleVector, finalValues: DoubleVector, interpolatedValues: DoubleVector, progress: number): void;
77
+ calculateDataSeriesAnimationValues(wasmContext: TSciChart, initialValues: SCRTDoubleVector, finalValues: SCRTDoubleVector, interpolatedValues: SCRTDoubleVector, progress: number): void;
78
78
  /**
79
79
  * Returns {@link BaseAnimationStyle} object which is being used to create initial styles
80
80
  * @param renderableSeries The renderable series
@@ -1,5 +1,5 @@
1
1
  import { EAnimationType } from "../../../../types/AnimationType";
2
- import { DoubleVector, TSciChart } from "../../../../types/TSciChart";
2
+ import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
3
3
  import { SeriesAnimation, IBaseAnimationOptions } from "./SeriesAnimation";
4
4
  export interface ISweepAnimationOptions extends IBaseAnimationOptions {
5
5
  }
@@ -8,5 +8,5 @@ export declare class SweepAnimation extends SeriesAnimation {
8
8
  readonly type = EAnimationType.Sweep;
9
9
  constructor(options?: ISweepAnimationOptions);
10
10
  /** @inheritDoc */
11
- calculateAnimationValues(wasmContext: TSciChart, originalValues: DoubleVector, animationValues: DoubleVector, progress: number, noZeroLine?: boolean): void;
11
+ calculateAnimationValues(wasmContext: TSciChart, originalValues: SCRTDoubleVector, animationValues: SCRTDoubleVector, progress: number, noZeroLine?: boolean): void;
12
12
  }
@@ -1,5 +1,5 @@
1
1
  import { EAnimationType } from "../../../../types/AnimationType";
2
- import { DoubleVector, TSciChart } from "../../../../types/TSciChart";
2
+ import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
3
3
  import { SeriesAnimation, IBaseAnimationOptions } from "./SeriesAnimation";
4
4
  export interface IWaveAnimationOptions extends IBaseAnimationOptions {
5
5
  pointDurationFraction?: number;
@@ -18,7 +18,7 @@ export declare class WaveAnimation extends SeriesAnimation {
18
18
  zeroLine: number;
19
19
  constructor(options?: IWaveAnimationOptions);
20
20
  /** @inheritDoc */
21
- calculateAnimationValues(wasmContext: TSciChart, originalValues: DoubleVector, animationValues: DoubleVector, progress: number, noZeroLine?: boolean): void;
21
+ calculateAnimationValues(wasmContext: TSciChart, originalValues: SCRTDoubleVector, animationValues: SCRTDoubleVector, progress: number, noZeroLine?: boolean): void;
22
22
  toJSON(): {
23
23
  type: EAnimationType;
24
24
  options: Required<Omit<IBaseAnimationOptions, never>>;
@@ -1,5 +1,5 @@
1
1
  import { AnimationFiniteStateMachine, IAnimation, SeriesAnimationFiniteStateMachine } from "../../../../Core/Animations/AnimationFiniteStateMachine";
2
- import { DoubleVector, TSciChart } from "../../../../types/TSciChart";
2
+ import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
3
3
  import { BaseDataSeries } from "../../../Model/BaseDataSeries";
4
4
  import { XyyDataSeries } from "../../../Model/XyyDataSeries";
5
5
  import { CrossPointMarker } from "../../PointMarkers/CrossPointMarker";
@@ -17,9 +17,9 @@ export declare const animationHelpers: {
17
17
  createPointMarker: (wasmContext: TSciChart, pointMarkerStyle: BasePointMarkerStyle) => SpritePointMarker | CrossPointMarker | EllipsePointMarker | XPointMarker | SquarePointMarker | TrianglePointMarker;
18
18
  interpolateNumber: (from: number, to: number, progress: number) => number;
19
19
  interpolateColor: (from: number, to: number, progress: number) => number;
20
- copyVector: (sourceVector: DoubleVector, targetVector: DoubleVector) => void;
21
- setSplineAnimationVectors: (wasmContext: TSciChart, animation: SeriesAnimation, ds: BaseDataSeries, animationDS: BaseDataSeries, xSplineValues: DoubleVector, ySplineValues: DoubleVector, isCategoryAxis: boolean, interpolationPoints: number) => void;
22
- setSplineBandAnimationVectors: (wasmContext: TSciChart, animation: SeriesAnimation, ds: XyyDataSeries, animationDS: XyyDataSeries, xSplineValues: DoubleVector, ySplineValues: DoubleVector, y1SplineValues: DoubleVector, isCategoryAxis: boolean, interpolationPoints: number) => void;
23
- updateSplineAnimationProperties: (wasmContext: TSciChart, animation: SeriesAnimation, progress: number, dataSeries: BaseDataSeries, xSplineValues: DoubleVector, ySplineValues: DoubleVector) => void;
24
- updateSplineBandAnimationProperties: (wasmContext: TSciChart, animation: SeriesAnimation, progress: number, dataSeries: XyyDataSeries, xSplineValues: DoubleVector, ySplineValues: DoubleVector, y1SplineValues: DoubleVector) => void;
20
+ copyVector: (sourceVector: SCRTDoubleVector, targetVector: SCRTDoubleVector) => void;
21
+ setSplineAnimationVectors: (wasmContext: TSciChart, animation: SeriesAnimation, ds: BaseDataSeries, animationDS: BaseDataSeries, xSplineValues: SCRTDoubleVector, ySplineValues: SCRTDoubleVector, isCategoryAxis: boolean, interpolationPoints: number) => void;
22
+ setSplineBandAnimationVectors: (wasmContext: TSciChart, animation: SeriesAnimation, ds: XyyDataSeries, animationDS: XyyDataSeries, xSplineValues: SCRTDoubleVector, ySplineValues: SCRTDoubleVector, y1SplineValues: SCRTDoubleVector, isCategoryAxis: boolean, interpolationPoints: number) => void;
23
+ updateSplineAnimationProperties: (wasmContext: TSciChart, animation: SeriesAnimation, progress: number, dataSeries: BaseDataSeries, xSplineValues: SCRTDoubleVector, ySplineValues: SCRTDoubleVector) => void;
24
+ updateSplineBandAnimationProperties: (wasmContext: TSciChart, animation: SeriesAnimation, progress: number, dataSeries: XyyDataSeries, xSplineValues: SCRTDoubleVector, ySplineValues: SCRTDoubleVector, y1SplineValues: SCRTDoubleVector) => void;
25
25
  };
@@ -147,7 +147,7 @@ var setSplineAnimationVectors = function (wasmContext, animation, ds, animationD
147
147
  // set final animation values for the spline
148
148
  var dataSeries = animation.dataSeries;
149
149
  var xValues = isCategoryAxis ? dataSeries.getNativeIndexes() : dataSeries.getNativeXValues();
150
- wasmContext.SCRTSplineHelperCubicSpline(xValues, dataSeries.getNativeYValues(), ds.xFinalAnimationValues, ds.yFinalAnimationValues, xValues.size(), interpolationPoints, dataSeries.containsNaN);
150
+ wasmContext.SCRTSplineHelperCubicSpline(xValues, dataSeries.getNativeYValues(), ds.xFinalAnimationValues, ds.yFinalAnimationValues, xValues.size(), interpolationPoints, dataSeries.dataDistributionCalculator.containsNaN);
151
151
  }
152
152
  };
153
153
  var setSplineBandAnimationVectors = function (wasmContext, animation, ds, animationDS, xSplineValues, ySplineValues, y1SplineValues, isCategoryAxis, interpolationPoints) {
@@ -162,7 +162,7 @@ var setSplineBandAnimationVectors = function (wasmContext, animation, ds, animat
162
162
  exports.animationHelpers.copyVector(y1SplineValues, ds.y1InitialAnimationValues);
163
163
  // set final animation values for the spline
164
164
  var xValues = isCategoryAxis ? animationDS.getNativeIndexes() : animationDS.getNativeXValues();
165
- wasmContext.SCRTSplineHelperCubicSpline(xValues, animationDS.getNativeY1Values(), ds.xFinalAnimationValues, ds.y1FinalAnimationValues, xValues.size(), interpolationPoints, animationDS.containsNaN);
165
+ wasmContext.SCRTSplineHelperCubicSpline(xValues, animationDS.getNativeY1Values(), ds.xFinalAnimationValues, ds.y1FinalAnimationValues, xValues.size(), interpolationPoints, animationDS.dataDistributionCalculator.containsNaN);
166
166
  ds.validateAnimationVectors();
167
167
  }
168
168
  };
@@ -1,4 +1,7 @@
1
- import { DoubleVector, TSciChart } from "../../../types/TSciChart";
1
+ import { SCRTDoubleVector, TSciChart } from "../../../types/TSciChart";
2
+ import { IXyyPointSeries } from "../../Model/PointSeries/IPointSeries";
3
+ import { XyyPointSeriesResampled } from "../../Model/PointSeries/XyyPointSeriesResampled";
4
+ import { ResamplingParams } from "../../Numerics/Resamplers/ResamplingParams";
2
5
  import { IThemeProvider } from "../../Themes/IThemeProvider";
3
6
  import { BaseRenderableSeries } from "./BaseRenderableSeries";
4
7
  import { IHitTestProvider } from "./HitTest/IHitTestProvider";
@@ -32,11 +35,13 @@ export interface IBaseBandRenderableSeriesOptions extends IBaseRenderableSeriesO
32
35
  strokeY1DashArray?: number[];
33
36
  }
34
37
  export declare abstract class BaseBandRenderableSeries extends BaseRenderableSeries {
38
+ protected pointSeries: XyyPointSeriesResampled;
35
39
  private fillY1Property;
36
40
  private strokeY1Property;
37
41
  private fillProperty;
38
42
  private strokeDashArrayProperty;
39
43
  private strokeY1DashArrayProperty;
44
+ private xyyTempPointSeries;
40
45
  constructor(webAssemblyContext: TSciChart, options?: IBaseBandRenderableSeriesOptions);
41
46
  /**
42
47
  * @inheritDoc
@@ -91,10 +96,12 @@ export declare abstract class BaseBandRenderableSeries extends BaseRenderableSer
91
96
  /**
92
97
  * Returns the {@link XyyDataSeries.getNativeY1Values} for the associated {@link dataSeries}
93
98
  */
94
- getNativeY1Values(): DoubleVector;
99
+ getNativeY1Values(): SCRTDoubleVector;
95
100
  /** @inheritDoc */
96
101
  delete(): void;
97
102
  /** @inheritDoc */
103
+ toPointSeries(rp?: ResamplingParams): IXyyPointSeries;
104
+ /** @inheritDoc */
98
105
  toJSON(excludeData?: boolean): import("../../../Builder/buildSeries").TSeriesDefinition;
99
106
  /** @inheritDoc */
100
107
  protected newHitTestProvider(): IHitTestProvider;
@@ -16,6 +16,8 @@ var __extends = (this && this.__extends) || (function () {
16
16
  })();
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.BaseBandRenderableSeries = void 0;
19
+ var XyyPointSeriesResampled_1 = require("../../Model/PointSeries/XyyPointSeriesResampled");
20
+ var XyyPointSeriesWrapped_1 = require("../../Model/PointSeries/XyyPointSeriesWrapped");
19
21
  var SciChartSurfaceBase_1 = require("../SciChartSurfaceBase");
20
22
  var BaseRenderableSeries_1 = require("./BaseRenderableSeries");
21
23
  var constants_1 = require("./constants");
@@ -35,7 +37,7 @@ var BaseBandRenderableSeries = /** @class */ (function (_super) {
35
37
  _this.strokeDashArrayProperty = options === null || options === void 0 ? void 0 : options.strokeDashArray;
36
38
  _this.drawingProviders.push(new BandSeriesDrawingProvider_1.BandSeriesDrawingProvider(webAssemblyContext, _this));
37
39
  _this.drawingProviders.push(new PointMarkerDrawingProvider_1.PointMarkerDrawingProvider(webAssemblyContext, _this));
38
- _this.drawingProviders.push(new PointMarkerDrawingProvider_1.PointMarkerDrawingProvider(webAssemblyContext, _this, function (ds) { return ds.getNativeY1Values(); }, function (rs) { return rs.y1SplineValues; }));
40
+ _this.drawingProviders.push(new PointMarkerDrawingProvider_1.PointMarkerDrawingProvider(webAssemblyContext, _this, function (ps) { return ps.y1Values; }, function (rs) { return rs.y1SplineValues; }));
39
41
  if (options === null || options === void 0 ? void 0 : options.animation) {
40
42
  _this.animationQueue.push(options.animation);
41
43
  }
@@ -162,6 +164,48 @@ var BaseBandRenderableSeries = /** @class */ (function (_super) {
162
164
  _super.prototype.delete.call(this);
163
165
  };
164
166
  /** @inheritDoc */
167
+ BaseBandRenderableSeries.prototype.toPointSeries = function (rp) {
168
+ if (rp) {
169
+ if (!this.xyyTempPointSeries) {
170
+ this.xyyTempPointSeries = new XyyPointSeriesResampled_1.XyyPointSeriesResampled(this.webAssemblyContext, rp.xVisibleRange);
171
+ }
172
+ else {
173
+ this.xyyTempPointSeries.xRange = rp.xVisibleRange;
174
+ }
175
+ if (!this.pointSeries) {
176
+ this.pointSeries = new XyyPointSeriesResampled_1.XyyPointSeriesResampled(this.webAssemblyContext, rp.xVisibleRange);
177
+ }
178
+ else {
179
+ this.pointSeries.xRange = rp.xVisibleRange;
180
+ }
181
+ var ps = this.pointSeries;
182
+ var ds = this.dataSeries;
183
+ var xValues = ds.getNativeXValues();
184
+ var yValues = ds.getNativeYValues();
185
+ var y1Values = ds.getNativeY1Values();
186
+ this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext, rp, xValues, yValues, this.xyyTempPointSeries.intIndexes, this.xyyTempPointSeries.xValues, this.xyyTempPointSeries.yValues, false);
187
+ var xySize = this.xyyTempPointSeries.intIndexes.size();
188
+ this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext, rp, xValues, y1Values, this.xyyTempPointSeries.intIndexes, this.xyyTempPointSeries.xValues, this.xyyTempPointSeries.y1Values);
189
+ // Because intIndexes vector is not cleared indexes for rpLow are appended at the end of rpHigh indexes
190
+ var xy1Size = this.xyyTempPointSeries.intIndexes.size() - xySize;
191
+ // We merge indexes excluding duplicates for Y and Y1 into one vector
192
+ var mergedSize = this.resamplerHelper.mergeIndexes(this.xyyTempPointSeries.intIndexes, xySize, xy1Size, ps.intIndexes);
193
+ // Clear the intIndexes as long as we do not need them any more
194
+ this.xyyTempPointSeries.intIndexes.clear();
195
+ // Get values by indexes for Y and Y1 values
196
+ this.resamplerHelper.copyValuesByIndexes(ps.intIndexes, xValues, yValues, y1Values, mergedSize, rp.isCategoryAxis, ps.xValues, ps.yValues, ps.y1Values);
197
+ if (rp.isCategoryAxis) {
198
+ ps.updateIndexes();
199
+ }
200
+ ps.clearIntIndexes();
201
+ // ps.debugOutputForUnitTests();
202
+ return ps;
203
+ }
204
+ else {
205
+ return new XyyPointSeriesWrapped_1.XyyPointSeriesWrapped(this.dataSeries);
206
+ }
207
+ };
208
+ /** @inheritDoc */
165
209
  BaseBandRenderableSeries.prototype.toJSON = function (excludeData) {
166
210
  if (excludeData === void 0) { excludeData = false; }
167
211
  var json = _super.prototype.toJSON.call(this, excludeData);
@@ -25,6 +25,7 @@ export declare abstract class BaseLineRenderableSeries extends BaseRenderableSer
25
25
  * Accepts an array of values, e.g. [2,2] will have a line of length 2 and a gap of length 2.
26
26
  */
27
27
  set strokeDashArray(strokeDashArray: number[]);
28
+ /** @inheritDoc */
28
29
  toJSON(excludeData?: boolean): import("../../../Builder/buildSeries").TSeriesDefinition;
29
30
  /**
30
31
  * @inheritDoc
@@ -62,6 +62,7 @@ var BaseLineRenderableSeries = /** @class */ (function (_super) {
62
62
  enumerable: false,
63
63
  configurable: true
64
64
  });
65
+ /** @inheritDoc */
65
66
  BaseLineRenderableSeries.prototype.toJSON = function (excludeData) {
66
67
  if (excludeData === void 0) { excludeData = false; }
67
68
  var json = _super.prototype.toJSON.call(this, excludeData);
@@ -70,6 +70,7 @@ export declare abstract class BaseMountainRenderableSeries extends BaseRenderabl
70
70
  * Accepts an array of values, e.g. [2,2] will have a line of length 2 and a gap of length 2.
71
71
  */
72
72
  set strokeDashArray(strokeDashArray: number[]);
73
+ /** @inheritDoc */
73
74
  toJSON(excludeData?: boolean): import("../../../Builder/buildSeries").TSeriesDefinition;
74
75
  /**
75
76
  * @inheritDoc
@@ -128,6 +128,7 @@ var BaseMountainRenderableSeries = /** @class */ (function (_super) {
128
128
  enumerable: false,
129
129
  configurable: true
130
130
  });
131
+ /** @inheritDoc */
131
132
  BaseMountainRenderableSeries.prototype.toJSON = function (excludeData) {
132
133
  if (excludeData === void 0) { excludeData = false; }
133
134
  var json = _super.prototype.toJSON.call(this, excludeData);