scichart 3.2.528 → 3.2.538

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 (74) hide show
  1. package/Charting/ChartModifiers/CursorModifier.js +0 -1
  2. package/Charting/ChartModifiers/DataPointSelectionModifier.js +2 -5
  3. package/Charting/ChartModifiers/RolloverModifier.d.ts +5 -0
  4. package/Charting/ChartModifiers/RolloverModifier.js +18 -18
  5. package/Charting/ChartModifiers/VerticalSliceModifier.js +8 -5
  6. package/Charting/Model/BaseDataSeries.d.ts +3 -2
  7. package/Charting/Model/BaseDataSeries.js +8 -4
  8. package/Charting/Model/HlcDataSeries.d.ts +2 -1
  9. package/Charting/Model/HlcDataSeries.js +4 -2
  10. package/Charting/Model/IDataSeries.d.ts +2 -1
  11. package/Charting/Model/IPaletteProvider.d.ts +24 -0
  12. package/Charting/Model/IPaletteProvider.js +23 -7
  13. package/Charting/Model/OhlcDataSeries.d.ts +2 -1
  14. package/Charting/Model/OhlcDataSeries.js +4 -2
  15. package/Charting/Model/XyyDataSeries.d.ts +2 -1
  16. package/Charting/Model/XyyDataSeries.js +4 -2
  17. package/Charting/Visuals/Annotations/AnnotationBase.js +3 -3
  18. package/Charting/Visuals/Legend/SciChartLegend.js +4 -4
  19. package/Charting/Visuals/Legend/SciChartLegendBase.js +3 -4
  20. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +3 -0
  21. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +15 -4
  22. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +55 -8
  23. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +7 -0
  24. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +22 -3
  25. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +2 -1
  26. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +0 -6
  27. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +18 -13
  28. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +10 -2
  29. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +83 -23
  30. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +4 -2
  31. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +1 -0
  32. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +22 -16
  33. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +16 -12
  34. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +17 -11
  35. package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.js +1 -1
  36. package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.js +78 -0
  37. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +4 -0
  38. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +6 -1
  39. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +3 -0
  40. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +5 -2
  41. package/Charting/Visuals/RenderableSeries/RenderDataTransforms/BaseRenderDataTransform.d.ts +30 -0
  42. package/Charting/Visuals/RenderableSeries/RenderDataTransforms/BaseRenderDataTransform.js +63 -0
  43. package/Charting/Visuals/RenderableSeries/RenderDataTransforms/SplineRenderDataTransform.d.ts +10 -0
  44. package/Charting/Visuals/RenderableSeries/RenderDataTransforms/SplineRenderDataTransform.js +53 -0
  45. package/Charting/Visuals/RenderableSeries/RenderDataTransforms/XyySplineRenderDataTransform.d.ts +10 -0
  46. package/Charting/Visuals/RenderableSeries/RenderDataTransforms/XyySplineRenderDataTransform.js +55 -0
  47. package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.js +2 -0
  48. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.d.ts +13 -8
  49. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +63 -46
  50. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +12 -13
  51. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +60 -52
  52. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.d.ts +12 -7
  53. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +54 -43
  54. package/Charting/Visuals/RenderableSeries/constants.d.ts +2 -1
  55. package/Charting/Visuals/RenderableSeries/constants.js +1 -0
  56. package/Charting/Visuals/createMaster.d.ts +12 -2
  57. package/Charting/Visuals/createMaster.js +14 -2
  58. package/Core/BuildStamp.d.ts +1 -1
  59. package/Core/BuildStamp.js +2 -2
  60. package/Core/ObservableArray.d.ts +11 -9
  61. package/Core/ObservableArray.js +44 -21
  62. package/_wasm/scichart.browser.js +1 -1
  63. package/_wasm/scichart2d.wasm +0 -0
  64. package/_wasm/scichart3d.wasm +0 -0
  65. package/index.d.ts +9 -0
  66. package/index.dev.js +754 -303
  67. package/index.js +27 -13
  68. package/index.min.js +1 -1
  69. package/package.json +1 -1
  70. package/types/TSciChart.d.ts +4 -0
  71. package/types/YRangeMode.d.ts +10 -0
  72. package/types/YRangeMode.js +14 -0
  73. package/utils/debug.d.ts +2 -0
  74. package/utils/debug.js +17 -0
@@ -16,13 +16,15 @@ var __extends = (this && this.__extends) || (function () {
16
16
  })();
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.SplineLineRenderableSeries = void 0;
19
- var Deleter_1 = require("../../../Core/Deleter");
20
19
  var SeriesType_1 = require("../../../types/SeriesType");
21
- var copyVector_1 = require("../../../utils/copyVector");
22
20
  var BaseDataSeries_1 = require("../../Model/BaseDataSeries");
21
+ var IDataSeries_1 = require("../../Model/IDataSeries");
22
+ var XyPointSeriesWrapped_1 = require("../../Model/PointSeries/XyPointSeriesWrapped");
23
+ var RenderPassData_1 = require("../../Services/RenderPassData");
23
24
  var animationHelpers_1 = require("./Animations/animationHelpers");
24
25
  var BaseLineRenderableSeries_1 = require("./BaseLineRenderableSeries");
25
26
  var constants_1 = require("./constants");
27
+ var SplineRenderDataTransform_1 = require("./RenderDataTransforms/SplineRenderDataTransform");
26
28
  /**
27
29
  * Defines a line-series or line chart type with Cubic Spline interpolation in the SciChart's High Performance Real-time
28
30
  * {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}
@@ -57,19 +59,41 @@ var SplineLineRenderableSeries = /** @class */ (function (_super) {
57
59
  var _a, _b, _c;
58
60
  _this = _super.call(this, webAssemblyContext, options) || this;
59
61
  _this.type = SeriesType_1.ESeriesType.SplineLineSeries;
60
- _this.warnOnSplineFailure = true;
62
+ // public xSplineValues: SCRTDoubleVector;
63
+ // public ySplineValues: SCRTDoubleVector;
61
64
  _this.isSplineProperty = true;
62
65
  _this.interpolationPointsProperty = 10;
63
- _this.recalculateSpline = true;
64
- _this.xSplineValues = new webAssemblyContext.SCRTDoubleVector();
65
- _this.ySplineValues = new webAssemblyContext.SCRTDoubleVector();
66
+ // this.xSplineValues = new webAssemblyContext.SCRTDoubleVector();
67
+ // this.ySplineValues = new webAssemblyContext.SCRTDoubleVector();
66
68
  _this.interpolationPointsProperty = (_a = options === null || options === void 0 ? void 0 : options.interpolationPoints) !== null && _a !== void 0 ? _a : _this.interpolationPointsProperty;
69
+ _this.renderDataTransform = new SplineRenderDataTransform_1.SplineRenderDataTransform(_this, webAssemblyContext, [_this.drawingProviders[0]]);
70
+ _this.renderDataTransform.interpolationPoints = _this.interpolationPoints;
67
71
  // Must be called here for the series type to be available
68
72
  if ((_b = _this.paletteProvider) === null || _b === void 0 ? void 0 : _b.onAttached) {
69
73
  (_c = _this.paletteProvider) === null || _c === void 0 ? void 0 : _c.onAttached(_this);
70
74
  }
71
75
  return _this;
72
76
  }
77
+ Object.defineProperty(SplineLineRenderableSeries.prototype, "xSplineValues", {
78
+ get: function () {
79
+ if (!this.splineRenderPassData) {
80
+ throw Error("Spline values are not available until after first render, or call updateSplineValues");
81
+ }
82
+ return this.splineRenderPassData.pointSeries.xValues;
83
+ },
84
+ enumerable: false,
85
+ configurable: true
86
+ });
87
+ Object.defineProperty(SplineLineRenderableSeries.prototype, "ySplineValues", {
88
+ get: function () {
89
+ if (!this.splineRenderPassData) {
90
+ throw Error("Spline values are not available until after first render, or call updateSplineValues");
91
+ }
92
+ return this.splineRenderPassData.pointSeries.yValues;
93
+ },
94
+ enumerable: false,
95
+ configurable: true
96
+ });
73
97
  Object.defineProperty(SplineLineRenderableSeries.prototype, "isSpline", {
74
98
  get: function () {
75
99
  return this.isSplineProperty;
@@ -89,59 +113,57 @@ var SplineLineRenderableSeries = /** @class */ (function (_super) {
89
113
  */
90
114
  set: function (value) {
91
115
  this.interpolationPointsProperty = value;
116
+ this.renderDataTransform.interpolationPoints = this.interpolationPoints;
117
+ this.renderDataTransform.requiresTransform = true;
92
118
  this.notifyPropertyChanged(constants_1.PROPERTY.INTERPOLATION_POINTS);
93
119
  },
94
120
  enumerable: false,
95
121
  configurable: true
96
122
  });
123
+ Object.defineProperty(SplineLineRenderableSeries.prototype, "warnOnSplineFailure", {
124
+ /**
125
+ * Set false to disable the warning if the spline cannot be calculated
126
+ */
127
+ get: function () {
128
+ return this.renderDataTransform.warnOnSplineFailure;
129
+ },
130
+ /**
131
+ * Set false to disable the warning if the spline cannot be calculated
132
+ */
133
+ set: function (value) {
134
+ this.renderDataTransform.warnOnSplineFailure = value;
135
+ },
136
+ enumerable: false,
137
+ configurable: true
138
+ });
97
139
  /** @inheritDoc */
98
140
  SplineLineRenderableSeries.prototype.delete = function () {
99
- this.xSplineValues = (0, Deleter_1.deleteSafe)(this.xSplineValues);
100
- this.ySplineValues = (0, Deleter_1.deleteSafe)(this.ySplineValues);
141
+ // this.xSplineValues = deleteSafe(this.xSplineValues);
142
+ // this.ySplineValues = deleteSafe(this.ySplineValues);
101
143
  _super.prototype.delete.call(this);
102
144
  };
103
145
  /**
104
146
  * Updates spline values
105
147
  */
106
148
  SplineLineRenderableSeries.prototype.updateSplineValues = function () {
107
- if (!this.dataSeries || !this.recalculateSpline || !this.parentSurface) {
149
+ if (!this.dataSeries || !this.parentSurface) {
108
150
  return;
109
151
  }
110
- this.isSplineProperty = true;
111
- var dataSeries = this.dataSeries;
112
- if (dataSeries.fifoCapacity) {
113
- throw new Error("Sorry, fifo is not currently supported for spline series");
114
- }
115
- var xValues = this.xAxis.isCategoryAxis ? dataSeries.getNativeIndexes() : dataSeries.getNativeXValues();
116
- var yValues = dataSeries.getNativeYValues();
117
- var initialSize = xValues.size();
118
- this.webAssemblyContext.SCRTSplineHelperCubicSpline(xValues, yValues, this.xSplineValues, this.ySplineValues, initialSize, this.interpolationPoints, dataSeries.dataDistributionCalculator.containsNaN);
119
- if (isNaN(this.ySplineValues.get(0))) {
120
- this.onSplineFailure();
121
- }
122
- this.recalculateSpline = false;
123
- };
124
- /** @inheritDoc */
125
- SplineLineRenderableSeries.prototype.onSplineFailure = function () {
126
- if (this.warnOnSplineFailure) {
127
- console.warn("Could not calculate spline values. X data may contain duplicates. Falling back to original values.\nTo disable this warning set warnOnSplineFailure = false. To change this behaviour, override onSplineFailure");
152
+ if (!this.currentRenderPassData) {
153
+ this.currentRenderPassData = new RenderPassData_1.RenderPassData(this.getIndicesRange(this.xAxis.visibleRange, this.xAxis.isCategoryAxis), this.xAxis.getCurrentCoordinateCalculator, this.yAxis.getCurrentCoordinateCalculator, this.xAxis.isVerticalChart, new XyPointSeriesWrapped_1.XyPointSeriesWrapped(this.dataSeries));
128
154
  }
129
- var xValues = this.xAxis.isCategoryAxis
130
- ? this.dataSeries.getNativeIndexes()
131
- : this.dataSeries.getNativeXValues();
132
- (0, copyVector_1.copyDoubleVector)(xValues, this.xSplineValues, this.webAssemblyContext);
133
- (0, copyVector_1.copyDoubleVector)(this.dataSeries.getNativeYValues(), this.ySplineValues, this.webAssemblyContext);
134
- // This tells the drawing providers not to treat the data as interpolated
135
- this.isSplineProperty = false;
155
+ this.splineRenderPassData = this.renderDataTransform.runTransform(this.currentRenderPassData);
136
156
  };
157
+ /** @deprecated This is now handled within the renderDataTransform */
158
+ SplineLineRenderableSeries.prototype.onSplineFailure = function () { };
137
159
  /** @inheritDoc */
138
160
  SplineLineRenderableSeries.prototype.getYRange = function (xVisibleRange, isXCategoryAxis) {
139
161
  if (isXCategoryAxis === void 0) { isXCategoryAxis = false; }
140
162
  if (this.isRunningAnimation) {
141
- return this.dataSeries.getWindowedYRange(xVisibleRange, true, isXCategoryAxis);
163
+ return this.dataSeries.getWindowedYRange(xVisibleRange, true, isXCategoryAxis, IDataSeries_1.EDataSeriesValueType.Default, this.yRangeMode);
142
164
  }
143
165
  this.updateSplineValues();
144
- return (0, BaseDataSeries_1.getWindowedYRange)(this.webAssemblyContext, this.xSplineValues, this.ySplineValues, xVisibleRange, true, isXCategoryAxis, this.dataSeries.dataDistributionCalculator.isSortedAscending);
166
+ return (0, BaseDataSeries_1.getWindowedYRange)(this.webAssemblyContext, this.splineRenderPassData.pointSeries.xValues, this.splineRenderPassData.pointSeries.yValues, xVisibleRange, true, isXCategoryAxis, this.dataSeries.dataDistributionCalculator.isSortedAscending);
145
167
  };
146
168
  /** @inheritDoc */
147
169
  SplineLineRenderableSeries.prototype.toJSON = function (excludeData) {
@@ -153,15 +175,6 @@ var SplineLineRenderableSeries = /** @class */ (function (_super) {
153
175
  Object.assign(json.options, options);
154
176
  return json;
155
177
  };
156
- /**
157
- * @param color The color for palette
158
- * @param palettingState The palleting state
159
- */
160
- SplineLineRenderableSeries.prototype.pushPalettedColors = function (color, palettingState) {
161
- for (var i = 0; i <= this.interpolationPoints; i++) {
162
- palettingState.palettedColors.push_back(color);
163
- }
164
- };
165
178
  /** @inheritDoc */
166
179
  SplineLineRenderableSeries.prototype.setAnimationVectors = function (animation) {
167
180
  var ds = this.dataSeries;
@@ -169,7 +182,7 @@ var SplineLineRenderableSeries = /** @class */ (function (_super) {
169
182
  ds.createAnimationVectors();
170
183
  }
171
184
  this.updateSplineValues();
172
- animationHelpers_1.animationHelpers.setSplineAnimationVectors(this.webAssemblyContext, animation, this.dataSeries, animation.dataSeries, this.xSplineValues, this.ySplineValues, this.xAxis.isCategoryAxis, this.interpolationPoints);
185
+ animationHelpers_1.animationHelpers.setSplineAnimationVectors(this.webAssemblyContext, animation, this.dataSeries, animation.dataSeries, this.splineRenderPassData.pointSeries.xValues, this.splineRenderPassData.pointSeries.yValues, this.xAxis.isCategoryAxis, this.interpolationPoints);
173
186
  };
174
187
  /** @inheritDoc */
175
188
  SplineLineRenderableSeries.prototype.updateAnimationProperties = function (progress, animationFSM) {
@@ -177,17 +190,12 @@ var SplineLineRenderableSeries = /** @class */ (function (_super) {
177
190
  animation.updateSeriesProperties(this, animationFSM.initialStyles, animationFSM.animationProgress);
178
191
  var dataSeries = this.dataSeries;
179
192
  if (dataSeries) {
180
- animationHelpers_1.animationHelpers.updateSplineAnimationProperties(this.webAssemblyContext, animation, progress, dataSeries, this.xSplineValues, this.ySplineValues);
193
+ animationHelpers_1.animationHelpers.updateSplineAnimationProperties(this.webAssemblyContext, animation, progress, dataSeries, this.splineRenderPassData.pointSeries.xValues, this.splineRenderPassData.pointSeries.yValues);
181
194
  }
182
195
  if (this.invalidateParentCallback) {
183
196
  this.invalidateParentCallback();
184
197
  }
185
198
  };
186
- /** @inheritDoc */
187
- SplineLineRenderableSeries.prototype.dataSeriesDataChanged = function () {
188
- this.recalculateSpline = true;
189
- _super.prototype.dataSeriesDataChanged.call(this);
190
- };
191
199
  return SplineLineRenderableSeries;
192
200
  }(BaseLineRenderableSeries_1.BaseLineRenderableSeries));
193
201
  exports.SplineLineRenderableSeries = SplineLineRenderableSeries;
@@ -38,12 +38,9 @@ export interface ISplineMountainRenderableSeriesOptions extends IBaseMountainRen
38
38
  */
39
39
  export declare class SplineMountainRenderableSeries extends BaseMountainRenderableSeries implements ISpline {
40
40
  readonly type = ESeriesType.SplineMountainSeries;
41
- xSplineValues: SCRTDoubleVector;
42
- ySplineValues: SCRTDoubleVector;
43
- warnOnSplineFailure: boolean;
44
41
  protected isSplineProperty: boolean;
45
- private recalculateSpline;
46
42
  private interpolationPointsProperty;
43
+ private splineRenderPassData;
47
44
  /**
48
45
  * Creates an instance of the {@link SplineMountainRenderableSeries}
49
46
  * @param webAssemblyContext The {@link TSciChart | SciChart WebAssembly Context} containing
@@ -60,13 +57,23 @@ export declare class SplineMountainRenderableSeries extends BaseMountainRenderab
60
57
  * Gets or sets the interpolationPoints being used for the Spline
61
58
  */
62
59
  set interpolationPoints(value: number);
60
+ get xSplineValues(): SCRTDoubleVector;
61
+ get ySplineValues(): SCRTDoubleVector;
62
+ /**
63
+ * Set false to disable the warning if the spline cannot be calculated
64
+ */
65
+ get warnOnSplineFailure(): boolean;
66
+ /**
67
+ * Set false to disable the warning if the spline cannot be calculated
68
+ */
69
+ set warnOnSplineFailure(value: boolean);
63
70
  /** @inheritDoc */
64
71
  delete(): void;
65
72
  /**
66
73
  * Updates spline values
67
74
  */
68
75
  updateSplineValues(): void;
69
- /** @inheritDoc */
76
+ /** @deprecated This is now handled within the renderDataTransform */
70
77
  onSplineFailure(): void;
71
78
  /** @inheritDoc */
72
79
  getYRange(xVisibleRange: NumberRange, isXCategoryAxis?: boolean): NumberRange;
@@ -76,6 +83,4 @@ export declare class SplineMountainRenderableSeries extends BaseMountainRenderab
76
83
  protected setAnimationVectors(animation: SeriesAnimation): void;
77
84
  /** @inheritDoc */
78
85
  protected updateAnimationProperties(progress: number, animationFSM: SeriesAnimationFiniteStateMachine): void;
79
- /** @inheritDoc */
80
- protected dataSeriesDataChanged(): void;
81
86
  }
@@ -16,13 +16,15 @@ var __extends = (this && this.__extends) || (function () {
16
16
  })();
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.SplineMountainRenderableSeries = void 0;
19
- var Deleter_1 = require("../../../Core/Deleter");
20
19
  var SeriesType_1 = require("../../../types/SeriesType");
21
- var copyVector_1 = require("../../../utils/copyVector");
22
20
  var BaseDataSeries_1 = require("../../Model/BaseDataSeries");
21
+ var IDataSeries_1 = require("../../Model/IDataSeries");
22
+ var XyPointSeriesWrapped_1 = require("../../Model/PointSeries/XyPointSeriesWrapped");
23
+ var RenderPassData_1 = require("../../Services/RenderPassData");
23
24
  var animationHelpers_1 = require("./Animations/animationHelpers");
24
25
  var BaseMountainRenderableSeries_1 = require("./BaseMountainRenderableSeries");
25
26
  var constants_1 = require("./constants");
27
+ var SplineRenderDataTransform_1 = require("./RenderDataTransforms/SplineRenderDataTransform");
26
28
  /**
27
29
  * Defines a mountain/area series or JavaScript mountain chart type in the SciChart's High Performance Real-time
28
30
  * {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}
@@ -57,13 +59,11 @@ var SplineMountainRenderableSeries = /** @class */ (function (_super) {
57
59
  var _a, _b, _c;
58
60
  _this = _super.call(this, webAssemblyContext, options) || this;
59
61
  _this.type = SeriesType_1.ESeriesType.SplineMountainSeries;
60
- _this.warnOnSplineFailure = true;
61
62
  _this.isSplineProperty = true;
62
- _this.recalculateSpline = true;
63
63
  _this.interpolationPointsProperty = 10;
64
- _this.xSplineValues = new webAssemblyContext.SCRTDoubleVector();
65
- _this.ySplineValues = new webAssemblyContext.SCRTDoubleVector();
66
64
  _this.interpolationPointsProperty = (_a = options === null || options === void 0 ? void 0 : options.interpolationPoints) !== null && _a !== void 0 ? _a : _this.interpolationPointsProperty;
65
+ _this.renderDataTransform = new SplineRenderDataTransform_1.SplineRenderDataTransform(_this, webAssemblyContext, [_this.drawingProviders[0]]);
66
+ _this.renderDataTransform.interpolationPoints = _this.interpolationPoints;
67
67
  // Must be called here for the series type to be available
68
68
  if ((_b = _this.paletteProvider) === null || _b === void 0 ? void 0 : _b.onAttached) {
69
69
  (_c = _this.paletteProvider) === null || _c === void 0 ? void 0 : _c.onAttached(_this);
@@ -89,59 +89,75 @@ var SplineMountainRenderableSeries = /** @class */ (function (_super) {
89
89
  */
90
90
  set: function (value) {
91
91
  this.interpolationPointsProperty = value;
92
+ this.renderDataTransform.interpolationPoints = this.interpolationPoints;
93
+ this.renderDataTransform.requiresTransform = true;
92
94
  this.notifyPropertyChanged(constants_1.PROPERTY.INTERPOLATION_POINTS);
93
95
  },
94
96
  enumerable: false,
95
97
  configurable: true
96
98
  });
99
+ Object.defineProperty(SplineMountainRenderableSeries.prototype, "xSplineValues", {
100
+ get: function () {
101
+ if (!this.splineRenderPassData) {
102
+ throw Error("Spline values are not available until after first render, or call updateSplineValues");
103
+ }
104
+ return this.splineRenderPassData.pointSeries.xValues;
105
+ },
106
+ enumerable: false,
107
+ configurable: true
108
+ });
109
+ Object.defineProperty(SplineMountainRenderableSeries.prototype, "ySplineValues", {
110
+ get: function () {
111
+ if (!this.splineRenderPassData) {
112
+ throw Error("Spline values are not available until after first render, or call updateSplineValues");
113
+ }
114
+ return this.splineRenderPassData.pointSeries.yValues;
115
+ },
116
+ enumerable: false,
117
+ configurable: true
118
+ });
119
+ Object.defineProperty(SplineMountainRenderableSeries.prototype, "warnOnSplineFailure", {
120
+ /**
121
+ * Set false to disable the warning if the spline cannot be calculated
122
+ */
123
+ get: function () {
124
+ return this.renderDataTransform.warnOnSplineFailure;
125
+ },
126
+ /**
127
+ * Set false to disable the warning if the spline cannot be calculated
128
+ */
129
+ set: function (value) {
130
+ this.renderDataTransform.warnOnSplineFailure = value;
131
+ },
132
+ enumerable: false,
133
+ configurable: true
134
+ });
97
135
  /** @inheritDoc */
98
136
  SplineMountainRenderableSeries.prototype.delete = function () {
99
- this.xSplineValues = (0, Deleter_1.deleteSafe)(this.xSplineValues);
100
- this.ySplineValues = (0, Deleter_1.deleteSafe)(this.ySplineValues);
101
137
  _super.prototype.delete.call(this);
102
138
  };
103
139
  /**
104
140
  * Updates spline values
105
141
  */
106
142
  SplineMountainRenderableSeries.prototype.updateSplineValues = function () {
107
- if (!(this.dataSeries && this.recalculateSpline && this.parentSurface)) {
143
+ if (!this.dataSeries || !this.parentSurface) {
108
144
  return;
109
145
  }
110
- this.isSplineProperty = true;
111
- var dataSeries = this.dataSeries;
112
- if (dataSeries.fifoCapacity) {
113
- throw new Error("Sorry, fifo is not currently supported for spline series");
114
- }
115
- var xValues = this.xAxis.isCategoryAxis ? dataSeries.getNativeIndexes() : dataSeries.getNativeXValues();
116
- var yValues = dataSeries.getNativeYValues();
117
- var initialSize = xValues.size();
118
- this.webAssemblyContext.SCRTSplineHelperCubicSpline(xValues, yValues, this.xSplineValues, this.ySplineValues, initialSize, this.interpolationPoints, dataSeries.dataDistributionCalculator.containsNaN);
119
- if (isNaN(this.ySplineValues.get(0))) {
120
- this.onSplineFailure();
146
+ if (!this.currentRenderPassData) {
147
+ this.currentRenderPassData = new RenderPassData_1.RenderPassData(this.getIndicesRange(this.xAxis.visibleRange, this.xAxis.isCategoryAxis), this.xAxis.getCurrentCoordinateCalculator, this.yAxis.getCurrentCoordinateCalculator, this.xAxis.isVerticalChart, new XyPointSeriesWrapped_1.XyPointSeriesWrapped(this.dataSeries));
121
148
  }
122
- this.recalculateSpline = false;
123
- };
124
- /** @inheritDoc */
125
- SplineMountainRenderableSeries.prototype.onSplineFailure = function () {
126
- if (this.warnOnSplineFailure) {
127
- console.warn("Could not calculate spline values. X data may contain duplicates. Falling back to original values.\nTo disable this warning set warnOnSplineFailure = false. To change this behaviour, override onSplineFailure");
128
- }
129
- var xValues = this.xAxis.isCategoryAxis
130
- ? this.dataSeries.getNativeIndexes()
131
- : this.dataSeries.getNativeXValues();
132
- (0, copyVector_1.copyDoubleVector)(xValues, this.xSplineValues, this.webAssemblyContext);
133
- (0, copyVector_1.copyDoubleVector)(this.dataSeries.getNativeYValues(), this.ySplineValues, this.webAssemblyContext);
134
- // This tells the drawing providers not to treat the data as interpolated
135
- this.isSplineProperty = false;
149
+ this.splineRenderPassData = this.renderDataTransform.runTransform(this.currentRenderPassData);
136
150
  };
151
+ /** @deprecated This is now handled within the renderDataTransform */
152
+ SplineMountainRenderableSeries.prototype.onSplineFailure = function () { };
137
153
  /** @inheritDoc */
138
154
  SplineMountainRenderableSeries.prototype.getYRange = function (xVisibleRange, isXCategoryAxis) {
139
155
  if (isXCategoryAxis === void 0) { isXCategoryAxis = false; }
140
156
  if (this.isRunningAnimation) {
141
- return this.dataSeries.getWindowedYRange(xVisibleRange, true, isXCategoryAxis);
157
+ return this.dataSeries.getWindowedYRange(xVisibleRange, true, isXCategoryAxis, IDataSeries_1.EDataSeriesValueType.Default, this.yRangeMode);
142
158
  }
143
159
  this.updateSplineValues();
144
- return (0, BaseDataSeries_1.getWindowedYRange)(this.webAssemblyContext, this.xSplineValues, this.ySplineValues, xVisibleRange, true, isXCategoryAxis, this.dataSeries.dataDistributionCalculator.isSortedAscending);
160
+ return (0, BaseDataSeries_1.getWindowedYRange)(this.webAssemblyContext, this.splineRenderPassData.pointSeries.xValues, this.splineRenderPassData.pointSeries.yValues, xVisibleRange, true, isXCategoryAxis, this.dataSeries.dataDistributionCalculator.isSortedAscending);
145
161
  };
146
162
  /** @inheritDoc */
147
163
  SplineMountainRenderableSeries.prototype.toJSON = function (excludeData) {
@@ -160,7 +176,7 @@ var SplineMountainRenderableSeries = /** @class */ (function (_super) {
160
176
  ds.createAnimationVectors();
161
177
  }
162
178
  this.updateSplineValues();
163
- animationHelpers_1.animationHelpers.setSplineAnimationVectors(this.webAssemblyContext, animation, this.dataSeries, animation.dataSeries, this.xSplineValues, this.ySplineValues, this.xAxis.isCategoryAxis, this.interpolationPoints);
179
+ animationHelpers_1.animationHelpers.setSplineAnimationVectors(this.webAssemblyContext, animation, this.dataSeries, animation.dataSeries, this.splineRenderPassData.pointSeries.xValues, this.splineRenderPassData.pointSeries.yValues, this.xAxis.isCategoryAxis, this.interpolationPoints);
164
180
  };
165
181
  /** @inheritDoc */
166
182
  SplineMountainRenderableSeries.prototype.updateAnimationProperties = function (progress, animationFSM) {
@@ -168,17 +184,12 @@ var SplineMountainRenderableSeries = /** @class */ (function (_super) {
168
184
  animation.updateSeriesProperties(this, animationFSM.initialStyles, animationFSM.animationProgress);
169
185
  var dataSeries = this.dataSeries;
170
186
  if (dataSeries) {
171
- animationHelpers_1.animationHelpers.updateSplineAnimationProperties(this.webAssemblyContext, animation, progress, dataSeries, this.xSplineValues, this.ySplineValues);
187
+ animationHelpers_1.animationHelpers.updateSplineAnimationProperties(this.webAssemblyContext, animation, progress, dataSeries, this.splineRenderPassData.pointSeries.xValues, this.splineRenderPassData.pointSeries.yValues);
172
188
  }
173
189
  if (this.invalidateParentCallback) {
174
190
  this.invalidateParentCallback();
175
191
  }
176
192
  };
177
- /** @inheritDoc */
178
- SplineMountainRenderableSeries.prototype.dataSeriesDataChanged = function () {
179
- this.recalculateSpline = true;
180
- _super.prototype.dataSeriesDataChanged.call(this);
181
- };
182
193
  return SplineMountainRenderableSeries;
183
194
  }(BaseMountainRenderableSeries_1.BaseMountainRenderableSeries));
184
195
  exports.SplineMountainRenderableSeries = SplineMountainRenderableSeries;
@@ -62,5 +62,6 @@ export declare enum PROPERTY {
62
62
  Z_MULTIPLIER = "Z_MULTIPLIER",
63
63
  Z_LABEL_PROVIDER = "Z_LABEL_PROVIDER",
64
64
  SERIES_TEXT_PROVIDER = "SERIES_TEXT_PROVIDER",
65
- CLIPTOYRANGE = "CLIPTOYRANGE"
65
+ CLIPTOYRANGE = "CLIPTOYRANGE",
66
+ YRANGEMODE = "YRANGEMODE"
66
67
  }
@@ -67,4 +67,5 @@ var PROPERTY;
67
67
  PROPERTY["Z_LABEL_PROVIDER"] = "Z_LABEL_PROVIDER";
68
68
  PROPERTY["SERIES_TEXT_PROVIDER"] = "SERIES_TEXT_PROVIDER";
69
69
  PROPERTY["CLIPTOYRANGE"] = "CLIPTOYRANGE";
70
+ PROPERTY["YRANGEMODE"] = "YRANGEMODE";
70
71
  })(PROPERTY = exports.PROPERTY || (exports.PROPERTY = {}));
@@ -1,10 +1,20 @@
1
1
  import { TSciChart } from "../../types/TSciChart";
2
+ import { TSciChartSurfaceCanvases } from "../../types/TSciChartSurfaceCanvases";
3
+ import { IThemeProvider } from "../Themes/IThemeProvider";
2
4
  import { I2DSurfaceOptions } from "./I2DSurfaceOptions";
3
- import { TWebAssemblyChart } from "./SciChartSurface";
5
+ import { SciChartSurface, TWebAssemblyChart } from "./SciChartSurface";
6
+ /** @ignore */
7
+ declare type TSciChartMaster = {
8
+ wasmContext: TSciChart;
9
+ createChildSurface: (divElementId: string, canvases: TSciChartSurfaceCanvases, theme: IThemeProvider) => SciChartSurface;
10
+ getChildSurfaces: () => SciChartSurface[];
11
+ };
4
12
  /** @ignore */
5
13
  export declare const createMultichart: (divElement: string | HTMLDivElement, options?: I2DSurfaceOptions) => Promise<TWebAssemblyChart>;
6
- export declare const initializeChartEngine2D: () => Promise<void>;
14
+ export declare const getSharedWasmContext: () => Promise<TSciChart>;
15
+ export declare const initializeChartEngine2D: () => Promise<TSciChartMaster>;
7
16
  /** @ignore */
8
17
  export declare const disposeMultiChart: () => void;
9
18
  /** @ignore */
10
19
  export declare const monitorWebGL: (wasmContext: TSciChart) => void;
20
+ export {};
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.monitorWebGL = exports.disposeMultiChart = exports.initializeChartEngine2D = exports.createMultichart = void 0;
39
+ exports.monitorWebGL = exports.disposeMultiChart = exports.initializeChartEngine2D = exports.getSharedWasmContext = exports.createMultichart = void 0;
40
40
  // @ts-ignore
41
41
  var WasmModule2D = require("../../_wasm/scichart2d");
42
42
  var BuildStamp_1 = require("../../Core/BuildStamp");
@@ -102,6 +102,18 @@ var createMultichart = function (divElement, options) { return __awaiter(void 0,
102
102
  });
103
103
  }); };
104
104
  exports.createMultichart = createMultichart;
105
+ var getSharedWasmContext = function () { return __awaiter(void 0, void 0, void 0, function () {
106
+ var wasmContext;
107
+ return __generator(this, function (_a) {
108
+ switch (_a.label) {
109
+ case 0: return [4 /*yield*/, (0, exports.initializeChartEngine2D)()];
110
+ case 1:
111
+ wasmContext = (_a.sent()).wasmContext;
112
+ return [2 /*return*/, wasmContext];
113
+ }
114
+ });
115
+ }); };
116
+ exports.getSharedWasmContext = getSharedWasmContext;
105
117
  var initializeChartEngine2D = function () { return __awaiter(void 0, void 0, void 0, function () {
106
118
  var master;
107
119
  return __generator(this, function (_a) {
@@ -122,7 +134,7 @@ var initializeChartEngine2D = function () { return __awaiter(void 0, void 0, voi
122
134
  sciChartMaster.getChildSurfaces = master.getChildSurfaces;
123
135
  (0, exports.monitorWebGL)(master.wasmContext);
124
136
  _a.label = 2;
125
- case 2: return [2 /*return*/];
137
+ case 2: return [2 /*return*/, sciChartMasterPromise];
126
138
  }
127
139
  });
128
140
  }); };
@@ -1,4 +1,4 @@
1
1
  import { TSciChart } from "../types/TSciChart";
2
2
  import { TSciChart3D } from "../types/TSciChart3D";
3
- export declare const libraryVersion = "3.2.528";
3
+ export declare const libraryVersion = "3.2.538";
4
4
  export declare const checkBuildStamp: (wasmContext: TSciChart | TSciChart3D) => boolean;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkBuildStamp = exports.libraryVersion = void 0;
4
- var buildStamp = "2023-11-24T00:00:00";
4
+ var buildStamp = "2023-12-15T00:00:00";
5
5
  var result;
6
6
  // tslint:disable-next-line:no-var-requires
7
- exports.libraryVersion = "3.2.528";
7
+ exports.libraryVersion = "3.2.538";
8
8
  var checkBuildStamp = function (wasmContext) {
9
9
  if (result !== undefined)
10
10
  return result;
@@ -3,14 +3,12 @@ import { ObservableArrayChangedArgs } from "./ObservableArrayChangedArgs";
3
3
  /**
4
4
  * An Observable array which raises {@link collectionChanged} events when an item is added, removed or the collection cleared
5
5
  */
6
- export declare class ObservableArray<T extends {
7
- id: string;
8
- }> {
6
+ export declare class ObservableArrayBase<T> {
9
7
  /**
10
8
  * Event handler which fires when the collection changes. See {@link ObservableArrayChangedArgs} for args
11
9
  */
12
10
  readonly collectionChanged: EventHandler<ObservableArrayChangedArgs>;
13
- private items;
11
+ protected items: T[];
14
12
  /**
15
13
  * Creates an instance of the {@link ObservableArray}
16
14
  */
@@ -64,11 +62,6 @@ export declare class ObservableArray<T extends {
64
62
  * @param index
65
63
  */
66
64
  get(index: number): T;
67
- /**
68
- * Gets an item by Id
69
- * @param id
70
- */
71
- getById(id: string): T;
72
65
  /**
73
66
  * Sets an item at index. Raises the {@link collectionChanged} event to subscribers
74
67
  * @param index
@@ -76,3 +69,12 @@ export declare class ObservableArray<T extends {
76
69
  */
77
70
  set(index: number, item: T): void;
78
71
  }
72
+ export declare class ObservableArray<T extends {
73
+ id: string;
74
+ }> extends ObservableArrayBase<T> {
75
+ /**
76
+ * Gets an item by Id
77
+ * @param id
78
+ */
79
+ getById(id: string): T;
80
+ }