scichart 2.1.2301 → 2.2.2351

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 (95) hide show
  1. package/Builder/buildModifiers.d.ts +2 -1
  2. package/Charting/ChartModifiers/CursorModifier.d.ts +5 -0
  3. package/Charting/ChartModifiers/CursorModifier.js +15 -10
  4. package/Charting/ChartModifiers/LegendModifier.d.ts +31 -0
  5. package/Charting/ChartModifiers/LegendModifier.js +22 -0
  6. package/Charting/ChartModifiers/RolloverModifier.d.ts +10 -0
  7. package/Charting/ChartModifiers/RolloverModifier.js +76 -19
  8. package/Charting/LayoutManager/LayoutManager.js +6 -1
  9. package/Charting/Model/BaseHeatmapDataSeries.d.ts +1 -0
  10. package/Charting/Model/BaseHeatmapDataSeries.js +4 -1
  11. package/Charting/Model/PointSeries/BasePointSeriesWrapped.d.ts +1 -1
  12. package/Charting/Model/PointSeries/BasePointSeriesWrapped.js +2 -2
  13. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.d.ts +1 -1
  14. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.js +3 -3
  15. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +6 -1
  16. package/Charting/Visuals/Annotations/AnnotationBase.js +23 -2
  17. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +6 -0
  18. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +46 -5
  19. package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +3 -1
  20. package/Charting/Visuals/Annotations/CustomAnnotation.js +14 -3
  21. package/Charting/Visuals/Annotations/HorizontalLineAnnotation.d.ts +4 -0
  22. package/Charting/Visuals/Annotations/HorizontalLineAnnotation.js +3 -2
  23. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.d.ts +1 -1
  24. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.js +13 -3
  25. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +13 -0
  26. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +63 -14
  27. package/Charting/Visuals/Annotations/VerticalLineAnnotation.d.ts +2 -0
  28. package/Charting/Visuals/Annotations/VerticalLineAnnotation.js +3 -2
  29. package/Charting/Visuals/Annotations/constants.d.ts +2 -1
  30. package/Charting/Visuals/Annotations/constants.js +1 -0
  31. package/Charting/Visuals/Axis/AxisBase2D.d.ts +10 -0
  32. package/Charting/Visuals/Axis/AxisBase2D.js +72 -1
  33. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.d.ts +29 -0
  34. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +77 -0
  35. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.d.ts +2 -2
  36. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +21 -4
  37. package/Charting/Visuals/Helpers/drawLabel.d.ts +3 -3
  38. package/Charting/Visuals/Helpers/drawLabel.js +38 -18
  39. package/Charting/Visuals/I2DSurfaceOptions.d.ts +6 -0
  40. package/Charting/Visuals/Legend/SciChartLegend.d.ts +4 -0
  41. package/Charting/Visuals/Legend/SciChartLegend.js +7 -1
  42. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +16 -7
  43. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +56 -9
  44. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +3 -0
  45. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +8 -0
  46. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +17 -166
  47. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +35 -328
  48. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +5 -2
  49. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +5 -3
  50. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +8 -0
  51. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +6 -0
  52. package/Charting/Visuals/RenderableSeries/SeriesVisibleChangedArgs.d.ts +6 -0
  53. package/Charting/Visuals/RenderableSeries/SeriesVisibleChangedArgs.js +11 -0
  54. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.d.ts +22 -0
  55. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.js +38 -1
  56. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +2 -2
  57. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +26 -45
  58. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +77 -18
  59. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +139 -42
  60. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -0
  61. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +21 -1
  62. package/Charting/Visuals/RenderableSeries/constants.d.ts +2 -0
  63. package/Charting/Visuals/RenderableSeries/constants.js +2 -0
  64. package/Charting/Visuals/SciChartPieSurface/IPieSurfaceOptions.d.ts +24 -2
  65. package/Charting/Visuals/SciChartPieSurface/PieSegment/IPieSegment.d.ts +4 -1
  66. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.d.ts +13 -2
  67. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +66 -20
  68. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.d.ts +3 -1
  69. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.js +2 -0
  70. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +66 -2
  71. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +304 -52
  72. package/Charting/Visuals/SciChartPieSurface/constants.d.ts +6 -1
  73. package/Charting/Visuals/SciChartPieSurface/constants.js +5 -0
  74. package/Charting/Visuals/SciChartSurface.d.ts +13 -2
  75. package/Charting/Visuals/SciChartSurface.js +39 -3
  76. package/Charting/Visuals/createMaster.js +2 -2
  77. package/Charting/Visuals/createSingle.js +2 -2
  78. package/Charting/Visuals/sciChartInitCommon.d.ts +2 -2
  79. package/Charting/Visuals/sciChartInitCommon.js +13 -9
  80. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +6 -2
  81. package/Core/BuildStamp.d.ts +1 -1
  82. package/Core/BuildStamp.js +2 -2
  83. package/_wasm/scichart.browser.js +1 -1
  84. package/_wasm/scichart2d.js +1 -1
  85. package/_wasm/scichart2d.wasm +0 -0
  86. package/_wasm/scichart3d.js +95 -95
  87. package/_wasm/scichart3d.wasm +0 -0
  88. package/package.json +1 -1
  89. package/types/Color.d.ts +1 -0
  90. package/types/Color.js +1 -0
  91. package/types/LabelPlacement.d.ts +8 -0
  92. package/types/LabelPlacement.js +11 -1
  93. package/types/LabelProviderType.d.ts +5 -1
  94. package/types/LabelProviderType.js +4 -0
  95. package/types/TSciChartSurfaceCanvases.d.ts +1 -0
@@ -1,16 +1,28 @@
1
1
  "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
2
17
  Object.defineProperty(exports, "__esModule", { value: true });
3
18
  exports.BaseStackedRenderableSeries = void 0;
4
19
  var Deleter_1 = require("../../../Core/Deleter");
5
- var EventHandler_1 = require("../../../Core/EventHandler");
6
20
  var guid_1 = require("../../../utils/guid");
7
- var WebGlRenderContext2D_1 = require("../../Drawing/WebGlRenderContext2D");
8
21
  var StackedXySeriesInfo_1 = require("../../Model/ChartData/StackedXySeriesInfo");
9
22
  var IDataSeries_1 = require("../../Model/IDataSeries");
10
- var constants_1 = require("./constants");
23
+ var ResamplingMode_1 = require("../../Numerics/Resamplers/ResamplingMode");
24
+ var BaseRenderableSeries_1 = require("./BaseRenderableSeries");
11
25
  var RolloverModifierRenderableSeriesProps_1 = require("./RolloverModifier/RolloverModifierRenderableSeriesProps");
12
- var SeriesHoveredArgs_1 = require("./SeriesHoveredArgs");
13
- var SeriesSelectedArgs_1 = require("./SeriesSelectedArgs");
14
26
  /**
15
27
  * Base class for stacked mountain, column series in SciChart's High Performance Real-time
16
28
  * {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}
@@ -18,127 +30,37 @@ var SeriesSelectedArgs_1 = require("./SeriesSelectedArgs");
18
30
  * See derived types {@link StackedMountainRenderableSeries} and {@link StackedColumnRenderableSeries} for
19
31
  * details on how to implement stacked column and mountain charts in SciChart
20
32
  */
21
- var BaseStackedRenderableSeries = /** @class */ (function () {
33
+ var BaseStackedRenderableSeries = /** @class */ (function (_super) {
34
+ __extends(BaseStackedRenderableSeries, _super);
22
35
  /**
23
36
  * Creates an instance of a {@link BaseStackedRenderableSeries}
24
37
  * @param webAssemblyContext The {@link TSciChart | SciChart WebAssembly Context} containing
25
38
  * native methods and access to our WebGL2 WebAssembly Drawing Engine
26
39
  */
27
40
  function BaseStackedRenderableSeries(webAssemblyContext, options) {
28
- var _a, _b;
41
+ var _this = _super.call(this, webAssemblyContext, options) || this;
29
42
  /** @inheritDoc */
30
- this.id = (0, guid_1.generateGuid)();
43
+ _this.id = (0, guid_1.generateGuid)();
31
44
  /** @inheritDoc */
32
- this.isStacked = true;
33
- /** @inheritDoc */
34
- this.supportsResampling = false;
35
- /** @inheritDoc */
36
- this.isSpline = false;
37
- this.rolloverModifierProps = new RolloverModifierRenderableSeriesProps_1.RolloverModifierRenderableSeriesProps(this);
38
- /** @inheritDoc */
39
- this.selected = new EventHandler_1.EventHandler();
40
- /** @inheritDoc */
41
- this.hovered = new EventHandler_1.EventHandler();
42
- /**
43
- * When true, enables drawing optimizations on the series for extra performance
44
- */
45
- this.enableDrawingOptimisations = true;
46
- this.drawNaNAsProperty = WebGlRenderContext2D_1.ELineDrawMode.DiscontinuousLine;
47
- this.isVisibleProperty = true;
48
- this.strokeThicknessProperty = 2;
49
- this.strokeProperty = "#b0c4de";
50
- this.opacityProperty = 1;
51
- this.opacityOriginalValue = 1;
52
- this.isSelectedProperty = false;
53
- this.isHoveredProperty = false;
54
- this.notifyDataSeriesChanged = this.notifyDataSeriesChanged.bind(this);
55
- this.notifyPointMarkerChanged = this.notifyPointMarkerChanged.bind(this);
56
- this.accumulatedValues = new webAssemblyContext.SCRTDoubleVector();
57
- this.accumulatedFinalAnimationValues = new webAssemblyContext.SCRTDoubleVector();
58
- this.dataSeries = (_a = options === null || options === void 0 ? void 0 : options.dataSeries) !== null && _a !== void 0 ? _a : this.dataSeriesProperty;
59
- this.opacityProperty = (_b = options === null || options === void 0 ? void 0 : options.opacity) !== null && _b !== void 0 ? _b : 1;
60
- this.webAssemblyContext = webAssemblyContext;
61
- this.hitTestProvider = this.newHitTestProvider();
45
+ _this.isStacked = true;
46
+ _this.rolloverModifierProps = new RolloverModifierRenderableSeriesProps_1.RolloverModifierRenderableSeriesProps(_this);
47
+ // used to track if registered types were used for function properties, so they can be serialized
48
+ _this.typeMap = new Map();
49
+ _this.opacityOriginalValue = 1;
50
+ _this.isStacked = true;
51
+ _this.accumulatedValues = new webAssemblyContext.SCRTDoubleVector();
52
+ _this.accumulatedFinalAnimationValues = new webAssemblyContext.SCRTDoubleVector();
53
+ return _this;
62
54
  }
63
- Object.defineProperty(BaseStackedRenderableSeries.prototype, "isSelected", {
64
- /** @inheritDoc */
65
- get: function () {
66
- return this.isSelectedProperty;
67
- },
68
- /** @inheritDoc */
69
- set: function (isSelected) {
70
- var _a;
71
- if (this.isSelectedProperty !== isSelected) {
72
- this.isSelectedProperty = isSelected;
73
- (_a = this.selected) === null || _a === void 0 ? void 0 : _a.raiseEvent(new SeriesSelectedArgs_1.SeriesSelectedArgs(this, isSelected));
74
- this.notifyPropertyChanged(constants_1.PROPERTY.IS_SELECTED);
75
- }
76
- },
77
- enumerable: false,
78
- configurable: true
79
- });
80
- Object.defineProperty(BaseStackedRenderableSeries.prototype, "isHovered", {
81
- /** @inheritDoc */
82
- get: function () {
83
- return this.isHoveredProperty;
84
- },
85
- /** @inheritDoc */
86
- set: function (isHovered) {
87
- var _a;
88
- if (this.isHoveredProperty !== isHovered) {
89
- this.isHoveredProperty = isHovered;
90
- (_a = this.hovered) === null || _a === void 0 ? void 0 : _a.raiseEvent(new SeriesHoveredArgs_1.SeriesHoveredArgs(this, isHovered));
91
- this.notifyPropertyChanged(constants_1.PROPERTY.HOVERED);
92
- }
93
- },
94
- enumerable: false,
95
- configurable: true
96
- });
97
- Object.defineProperty(BaseStackedRenderableSeries.prototype, "isDigitalLine", {
98
- // PUBLIC
99
- /** @inheritDoc */
100
- get: function () {
101
- return this.isDigitalLineProperty;
102
- },
103
- /** @inheritDoc */
104
- set: function (isDigitalLine) {
105
- this.isDigitalLineProperty = isDigitalLine;
106
- this.notifyPropertyChanged(constants_1.PROPERTY.IS_DIGITAL_LINE);
107
- },
108
- enumerable: false,
109
- configurable: true
110
- });
111
- /**
112
- * @inheritDoc
113
- */
114
- BaseStackedRenderableSeries.prototype.applyTheme = function (themeProvider) {
115
- // TODO
116
- };
55
+ // PUBLIC
117
56
  /**
118
57
  * @inheritDoc
119
58
  */
120
59
  BaseStackedRenderableSeries.prototype.delete = function () {
60
+ _super.prototype.delete.call(this);
121
61
  this.accumulatedValues = (0, Deleter_1.deleteSafe)(this.accumulatedValues);
122
62
  this.accumulatedFinalAnimationValues = (0, Deleter_1.deleteSafe)(this.accumulatedFinalAnimationValues);
123
63
  };
124
- /**
125
- * @inheritDoc
126
- */
127
- BaseStackedRenderableSeries.prototype.getDataSeriesName = function () {
128
- return this.dataSeries.dataSeriesName;
129
- };
130
- /**
131
- * @inheritDoc
132
- */
133
- BaseStackedRenderableSeries.prototype.getDataSeriesValuesCount = function () {
134
- return this.getNativeXValues().size();
135
- };
136
- /**
137
- * @inheritDoc
138
- */
139
- BaseStackedRenderableSeries.prototype.getNativeXValues = function () {
140
- return this.dataSeries.getNativeXValues();
141
- };
142
64
  /**
143
65
  * Called when the {@link BaseStackedRenderableSeries} is detached from its parent {@link BaseStackedCollection}
144
66
  */
@@ -156,12 +78,6 @@ var BaseStackedRenderableSeries = /** @class */ (function () {
156
78
  this.notifyParentPropertyChangedFn(propertyName);
157
79
  }
158
80
  };
159
- /**
160
- * @inheritDoc
161
- */
162
- BaseStackedRenderableSeries.prototype.onDpiChanged = function (args) {
163
- // Override in derived classes to be notified of dpi Change
164
- };
165
81
  /** @inheritDoc */
166
82
  BaseStackedRenderableSeries.prototype.checkIsOutOfDataRange = function (xValue, yValue) {
167
83
  var length = this.getDataSeriesValuesCount();
@@ -171,12 +87,6 @@ var BaseStackedRenderableSeries = /** @class */ (function () {
171
87
  return xValue < min || xValue > max;
172
88
  };
173
89
  // NOT SUPPORTED METHODS BEGIN
174
- /**
175
- * invalidateParentCallback() is not supported for BaseStackedRenderableSeries
176
- */
177
- BaseStackedRenderableSeries.prototype.invalidateParentCallback = function () {
178
- throw Error("invalidateParentCallback() is not supported for BaseStackedRenderableSeries");
179
- };
180
90
  /**
181
91
  * draw() is not supported for BaseStackedRenderableSeries
182
92
  */
@@ -243,22 +153,6 @@ var BaseStackedRenderableSeries = /** @class */ (function () {
243
153
  BaseStackedRenderableSeries.prototype.onDetach = function () {
244
154
  throw Error("onDetach() method is not supported for BaseStackedRenderableSeries");
245
155
  };
246
- Object.defineProperty(BaseStackedRenderableSeries.prototype, "rolloverModifierProps1", {
247
- /**
248
- * rolloverModifierProps1() is not supported for BaseStackedRenderableSeries
249
- */
250
- get: function () {
251
- throw Error("rolloverModifierProps1() method is not supported for BaseStackedRenderableSeries");
252
- },
253
- /**
254
- * rolloverModifierProps1() is not supported for BaseStackedRenderableSeries
255
- */
256
- set: function (value) {
257
- throw Error("rolloverModifierProps1() method is not supported for BaseStackedRenderableSeries");
258
- },
259
- enumerable: false,
260
- configurable: true
261
- });
262
156
  Object.defineProperty(BaseStackedRenderableSeries.prototype, "animation", {
263
157
  /**
264
158
  * animation() is not supported for BaseStackedRenderableSeries
@@ -284,10 +178,10 @@ var BaseStackedRenderableSeries = /** @class */ (function () {
284
178
  * resamplingMode property is not supported for BaseStackedRenderableSeries
285
179
  */
286
180
  get: function () {
287
- throw Error("resamplingMode property is not supported for BaseStackedRenderableSeries");
181
+ return ResamplingMode_1.EResamplingMode.None;
288
182
  },
289
183
  set: function (value) {
290
- throw Error("resamplingMode property is not supported for BaseStackedRenderableSeries");
184
+ throw Error("Setting resamplingMode property is not supported for BaseStackedRenderableSeries");
291
185
  },
292
186
  enumerable: false,
293
187
  configurable: true
@@ -322,150 +216,6 @@ var BaseStackedRenderableSeries = /** @class */ (function () {
322
216
  enumerable: false,
323
217
  configurable: true
324
218
  });
325
- Object.defineProperty(BaseStackedRenderableSeries.prototype, "dataSeries", {
326
- /**
327
- * @inheritDoc
328
- */
329
- get: function () {
330
- return this.dataSeriesProperty;
331
- },
332
- /**
333
- * @inheritDoc
334
- */
335
- set: function (dataSeries) {
336
- var _a, _b;
337
- (_a = this.dataSeriesProperty) === null || _a === void 0 ? void 0 : _a.dataChanged.unsubscribe(this.notifyDataSeriesChanged);
338
- this.dataSeriesProperty = dataSeries;
339
- (_b = this.dataSeriesProperty) === null || _b === void 0 ? void 0 : _b.dataChanged.subscribe(this.notifyDataSeriesChanged);
340
- this.notifyDataSeriesChanged();
341
- },
342
- enumerable: false,
343
- configurable: true
344
- });
345
- Object.defineProperty(BaseStackedRenderableSeries.prototype, "drawNaNAs", {
346
- /**
347
- * @inheritDoc
348
- */
349
- get: function () {
350
- return this.drawNaNAsProperty;
351
- },
352
- /**
353
- * @inheritDoc
354
- */
355
- set: function (drawNaNAs) {
356
- this.drawNaNAsProperty = drawNaNAs;
357
- this.notifyPropertyChanged(constants_1.PROPERTY.DRAW_NAN_AS);
358
- },
359
- enumerable: false,
360
- configurable: true
361
- });
362
- Object.defineProperty(BaseStackedRenderableSeries.prototype, "isVisible", {
363
- /**
364
- * @inheritDoc
365
- */
366
- get: function () {
367
- return this.isVisibleProperty;
368
- },
369
- /**
370
- * @inheritDoc
371
- */
372
- set: function (value) {
373
- this.isVisibleProperty = value;
374
- this.notifyPropertyChanged(constants_1.PROPERTY.IS_VISIBLE);
375
- },
376
- enumerable: false,
377
- configurable: true
378
- });
379
- Object.defineProperty(BaseStackedRenderableSeries.prototype, "paletteProvider", {
380
- /**
381
- * @inheritDoc
382
- */
383
- get: function () {
384
- return this.paletteProviderProperty;
385
- },
386
- /**
387
- * @inheritDoc
388
- */
389
- set: function (paletteProvider) {
390
- // TODO: fix
391
- // this.paletteProviderProperty?.onDetached();
392
- // this.paletteProviderProperty = paletteProvider;
393
- // this.paletteProviderProperty?.onAttached(this);
394
- this.notifyPropertyChanged(constants_1.PROPERTY.PALETTE_PROVIDER);
395
- },
396
- enumerable: false,
397
- configurable: true
398
- });
399
- Object.defineProperty(BaseStackedRenderableSeries.prototype, "pointMarker", {
400
- /**
401
- * @inheritDoc
402
- */
403
- get: function () {
404
- return this.pointMarkerProperty;
405
- },
406
- /**
407
- * @inheritDoc
408
- */
409
- set: function (pointMarker) {
410
- if (this.pointMarkerProperty) {
411
- this.pointMarkerProperty.invalidateParentCallback = undefined;
412
- }
413
- this.pointMarkerProperty = pointMarker;
414
- this.notifyPointMarkerChanged();
415
- if (this.pointMarkerProperty) {
416
- this.pointMarkerProperty.invalidateParentCallback = this.notifyPointMarkerChanged;
417
- }
418
- },
419
- enumerable: false,
420
- configurable: true
421
- });
422
- Object.defineProperty(BaseStackedRenderableSeries.prototype, "stroke", {
423
- /**
424
- * @inheritDoc
425
- */
426
- get: function () {
427
- return this.strokeProperty;
428
- },
429
- /**
430
- * @inheritDoc
431
- */
432
- set: function (htmlColorCode) {
433
- this.strokeProperty = htmlColorCode;
434
- this.notifyPropertyChanged(constants_1.PROPERTY.STROKE);
435
- },
436
- enumerable: false,
437
- configurable: true
438
- });
439
- Object.defineProperty(BaseStackedRenderableSeries.prototype, "strokeThickness", {
440
- /**
441
- * @inheritDoc
442
- */
443
- get: function () {
444
- return this.strokeThicknessProperty;
445
- },
446
- /**
447
- * @inheritDoc
448
- */
449
- set: function (value) {
450
- this.strokeThicknessProperty = value;
451
- this.notifyPropertyChanged(constants_1.PROPERTY.STROKE_THICKNESS);
452
- },
453
- enumerable: false,
454
- configurable: true
455
- });
456
- Object.defineProperty(BaseStackedRenderableSeries.prototype, "opacity", {
457
- /** @inheritDoc */
458
- get: function () {
459
- return this.opacityProperty;
460
- },
461
- /** @inheritDoc */
462
- set: function (value) {
463
- this.opacityProperty = value;
464
- this.notifyPropertyChanged(constants_1.PROPERTY.OPACITY);
465
- },
466
- enumerable: false,
467
- configurable: true
468
- });
469
219
  Object.defineProperty(BaseStackedRenderableSeries.prototype, "xAxis", {
470
220
  /** @inheritDoc */
471
221
  get: function () {
@@ -549,24 +299,6 @@ var BaseStackedRenderableSeries = /** @class */ (function () {
549
299
  BaseStackedRenderableSeries.prototype.getCurrentRenderPassData = function () {
550
300
  throw Error("getCurrentRenderPassData method is not supported for BaseStackedRenderableSeries");
551
301
  };
552
- Object.defineProperty(BaseStackedRenderableSeries.prototype, "drawingProviders", {
553
- /**
554
- * drawingProviders property is not supported for BaseStackedRenderableSeries
555
- * instead set on the {@link StackedColumnCollection} or {@link StackedMountainCollection}
556
- */
557
- get: function () {
558
- throw Error("drawingProviders property is not supported for BaseStackedRenderableSeries");
559
- },
560
- /**
561
- * drawingProviders property is not supported for BaseStackedRenderableSeries,
562
- * instead set on the {@link StackedColumnCollection} or {@link StackedMountainCollection}
563
- */
564
- set: function (value) {
565
- throw Error("drawingProviders property is not supported for BaseStackedRenderableSeries");
566
- },
567
- enumerable: false,
568
- configurable: true
569
- });
570
302
  Object.defineProperty(BaseStackedRenderableSeries.prototype, "xAxisId", {
571
303
  /**
572
304
  * xAxisId property is not supported for BaseStackedRenderableSeries,
@@ -603,24 +335,6 @@ var BaseStackedRenderableSeries = /** @class */ (function () {
603
335
  enumerable: false,
604
336
  configurable: true
605
337
  });
606
- Object.defineProperty(BaseStackedRenderableSeries.prototype, "effect", {
607
- /**
608
- * effect property is not supported for BaseStackedRenderableSeries,
609
- * instead set on the {@link StackedColumnCollection} or {@link StackedMountainCollection}
610
- */
611
- get: function () {
612
- throw Error("effect property is not supported for BaseStackedRenderableSeries");
613
- },
614
- /**
615
- * effect property is not supported for BaseStackedRenderableSeries,
616
- * instead set on the {@link StackedColumnCollection} or {@link StackedMountainCollection}
617
- */
618
- set: function (effect) {
619
- throw Error("effect property is not supported for BaseStackedRenderableSeries");
620
- },
621
- enumerable: false,
622
- configurable: true
623
- });
624
338
  BaseStackedRenderableSeries.prototype.onAnimate = function () {
625
339
  throw Error("onAnimate is not supported for BaseStackedRenderableSeries");
626
340
  };
@@ -637,13 +351,6 @@ var BaseStackedRenderableSeries = /** @class */ (function () {
637
351
  BaseStackedRenderableSeries.prototype.runAnimation = function (animation) {
638
352
  throw Error("runAnimation is not supported for BaseStackedRenderableSeries");
639
353
  };
640
- // PRIVATE
641
- BaseStackedRenderableSeries.prototype.notifyDataSeriesChanged = function () {
642
- this.notifyPropertyChanged(constants_1.PROPERTY.DATA_SERIES);
643
- };
644
- BaseStackedRenderableSeries.prototype.notifyPointMarkerChanged = function () {
645
- this.notifyPropertyChanged(constants_1.PROPERTY.POINT_MARKER);
646
- };
647
354
  return BaseStackedRenderableSeries;
648
- }());
355
+ }(BaseRenderableSeries_1.BaseRenderableSeries));
649
356
  exports.BaseStackedRenderableSeries = BaseStackedRenderableSeries;
@@ -1,5 +1,6 @@
1
- import { TSciChart } from "../../../../types/TSciChart";
1
+ import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
2
2
  import { WebGlRenderContext2D } from "../../../Drawing/WebGlRenderContext2D";
3
+ import { IPointSeries } from "../../../Model/PointSeries/IPointSeries";
3
4
  import { RenderPassData } from "../../../Services/RenderPassData";
4
5
  import { TDpiChangedEventArgs } from "../../TextureManager/DpiHelper";
5
6
  import { BaseBandRenderableSeries } from "../BaseBandRenderableSeries";
@@ -14,13 +15,15 @@ export declare class BandSeriesDrawingProvider extends BaseSeriesDrawingProvider
14
15
  private strokePenY1Cache;
15
16
  private fillBrushCache;
16
17
  private fillBrushY1Cache;
18
+ private ySelector;
19
+ private y1Selector;
17
20
  /**
18
21
  * Creates an instance of the {@link BandSeriesDrawingProvider}
19
22
  * @param webAssemblyContext The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and
20
23
  * access to our WebGL2 Engine and WebAssembly numerical methods
21
24
  * @param parentSeries the parent {@link BaseBandRenderableSeries} which this drawing provider is attached to
22
25
  */
23
- constructor(webAssemblyContext: TSciChart, parentSeries: BaseBandRenderableSeries);
26
+ constructor(webAssemblyContext: TSciChart, parentSeries: BaseBandRenderableSeries, ySelector?: (ps: IPointSeries) => SCRTDoubleVector, y1Selector?: (ps: IPointSeries) => SCRTDoubleVector);
24
27
  /**
25
28
  * @inheritDoc
26
29
  */
@@ -35,8 +35,10 @@ var BandSeriesDrawingProvider = /** @class */ (function (_super) {
35
35
  * access to our WebGL2 Engine and WebAssembly numerical methods
36
36
  * @param parentSeries the parent {@link BaseBandRenderableSeries} which this drawing provider is attached to
37
37
  */
38
- function BandSeriesDrawingProvider(webAssemblyContext, parentSeries) {
38
+ function BandSeriesDrawingProvider(webAssemblyContext, parentSeries, ySelector, y1Selector) {
39
39
  var _this = _super.call(this, webAssemblyContext, parentSeries) || this;
40
+ _this.ySelector = ySelector !== null && ySelector !== void 0 ? ySelector : (function (ps) { return ps.yValues; });
41
+ _this.y1Selector = y1Selector !== null && y1Selector !== void 0 ? y1Selector : (function (ps) { return ps.y1Values; });
40
42
  _this.linesPenCache = new Pen2DCache_1.Pen2DCache(webAssemblyContext);
41
43
  _this.strokePenY1Cache = new Pen2DCache_1.Pen2DCache(webAssemblyContext);
42
44
  _this.fillBrushCache = new BrushCache_1.BrushCache(webAssemblyContext);
@@ -108,8 +110,8 @@ var BandSeriesDrawingProvider = /** @class */ (function (_super) {
108
110
  var isCategoryAxis = renderPassData.xCoordinateCalculator.isCategoryCoordinateCalculator;
109
111
  var xValues = pointSeries.xValues;
110
112
  var xDrawValues = isCategoryAxis ? pointSeries.indexes : xValues;
111
- var yDrawValues = pointSeries.yValues;
112
- var y1DrawValues = pointSeries.y1Values;
113
+ var yDrawValues = this.ySelector(pointSeries);
114
+ var y1DrawValues = this.y1Selector(pointSeries);
113
115
  var isSplineBandSeries = this.parentSeries.type === SeriesType_1.ESeriesType.SplineBandSeries && xValues.size() > 1;
114
116
  if (isSplineBandSeries) {
115
117
  var splineBandSeries = this.parentSeries;
@@ -7,6 +7,10 @@ import { IPointMarker } from "../PointMarkers/IPointMarker";
7
7
  import { SeriesAnimation } from "./Animations/SeriesAnimation";
8
8
  import { IRenderableSeries } from "./IRenderableSeries";
9
9
  import { ShaderEffect } from "./ShaderEffect";
10
+ /**
11
+ * The type of the {@link IBaseRenderableSeriesOptions.onIsVisibleChanged } callback
12
+ */
13
+ export declare type TSeriesVisibleChangedCallback = (sourceSeries: IRenderableSeries, isVisible: boolean) => void;
10
14
  /**
11
15
  * The type of the {@link IBaseRenderableSeriesOptions.onSelectedChanged } callback
12
16
  */
@@ -149,6 +153,10 @@ export interface IBaseRenderableSeriesOptions {
149
153
  * Initial hovered state for the series. Default to false
150
154
  */
151
155
  isHovered?: boolean;
156
+ /**
157
+ * Optional callback function when isVisible changed. Also see {@link IRenderableSeries.isVisibleChanged} event handler
158
+ */
159
+ onIsVisibleChanged?: TSeriesVisibleChangedCallback | string;
152
160
  /**
153
161
  * Optional callback function when selected changed. Also see {@link IRenderableSeries.selected} event handler
154
162
  */
@@ -26,6 +26,7 @@ import { IHitTestProvider } from "./HitTest/IHitTestProvider";
26
26
  import { RolloverModifierRenderableSeriesProps } from "./RolloverModifier/RolloverModifierRenderableSeriesProps";
27
27
  import { SeriesHoveredArgs } from "./SeriesHoveredArgs";
28
28
  import { SeriesSelectedArgs } from "./SeriesSelectedArgs";
29
+ import { SeriesVisibleChangedArgs } from "./SeriesVisibleChangedArgs";
29
30
  /**
30
31
  * @summary Defines the interface to a Render Series (or Chart Type) in SciChart's High Performance Real-time
31
32
  * {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}
@@ -222,6 +223,11 @@ export interface IRenderableSeries extends IDeletable, IThemeable, INotifyOnDpiC
222
223
  * @remarks See {@link EventHandler} for how to subscribe
223
224
  */
224
225
  readonly hovered: EventHandler<SeriesHoveredArgs>;
226
+ /**
227
+ * An isVisible changed EventHandler. This event fires whenever the {@link IRenderableSeries | Series} isVisible changes.
228
+ * @remarks See {@link EventHandler} for how to subscribe
229
+ */
230
+ readonly isVisibleChanged: EventHandler<SeriesVisibleChangedArgs>;
225
231
  /**
226
232
  * gets if the animation is currently running
227
233
  */
@@ -0,0 +1,6 @@
1
+ import { IRenderableSeries } from "./IRenderableSeries";
2
+ export declare class SeriesVisibleChangedArgs {
3
+ readonly isVisible: boolean;
4
+ readonly sourceSeries: IRenderableSeries;
5
+ constructor(sourceSeries: IRenderableSeries, visible: boolean);
6
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SeriesVisibleChangedArgs = void 0;
4
+ var SeriesVisibleChangedArgs = /** @class */ (function () {
5
+ function SeriesVisibleChangedArgs(sourceSeries, visible) {
6
+ this.sourceSeries = sourceSeries;
7
+ this.isVisible = visible;
8
+ }
9
+ return SeriesVisibleChangedArgs;
10
+ }());
11
+ exports.SeriesVisibleChangedArgs = SeriesVisibleChangedArgs;
@@ -5,7 +5,9 @@ import { SciChartSurface } from "../SciChartSurface";
5
5
  import { TDpiChangedEventArgs } from "../TextureManager/DpiHelper";
6
6
  import { BaseStackedCollection } from "./BaseStackedCollection";
7
7
  import { BaseStackedRenderableSeries, IBasedStackedRenderableSeriesOptions } from "./BaseStackedRenderableSeries";
8
+ import { ISeriesDrawingProvider } from "./DrawingProviders/ISeriesDrawingProvider";
8
9
  import { IHitTestProvider } from "./HitTest/IHitTestProvider";
10
+ import { ShaderEffect } from "./ShaderEffect";
9
11
  /**
10
12
  * Options to pass to the {@link StackedColumnRenderableSeries} constructor
11
13
  */
@@ -137,6 +139,26 @@ export declare class StackedColumnRenderableSeries extends BaseStackedRenderable
137
139
  * Gets or sets the Fill of the column chart as an HTML color code
138
140
  */
139
141
  set fill(fill: string);
142
+ /**
143
+ * drawingProviders property is not supported for StackedColumnRenderableSeries
144
+ * instead set on the {@link StackedColumnCollection}
145
+ */
146
+ get drawingProviders(): ISeriesDrawingProvider[];
147
+ /**
148
+ * drawingProviders property is not supported for StackedColumnRenderableSeries,
149
+ * instead set on the {@link StackedColumnCollection}
150
+ */
151
+ set drawingProviders(value: ISeriesDrawingProvider[]);
152
+ /**
153
+ * effect property is not supported for StackedColumnRenderableSeries,
154
+ * instead set on the {@link StackedColumnCollection}
155
+ */
156
+ get effect(): ShaderEffect;
157
+ /**
158
+ * effect property is not supported for StackedColumnRenderableSeries,
159
+ * instead set on the {@link StackedColumnCollection}
160
+ */
161
+ set effect(effect: ShaderEffect);
140
162
  get spacing(): number;
141
163
  set spacing(value: number);
142
164
  /**
@@ -153,7 +153,8 @@ var StackedColumnRenderableSeries = /** @class */ (function (_super) {
153
153
  * @inheritDoc
154
154
  */
155
155
  StackedColumnRenderableSeries.prototype.onDpiChanged = function (args) {
156
- _super.prototype.onDpiChanged.call(this, args);
156
+ // TODO uncomment when point markers and drawingProviders props are supported
157
+ // super.onDpiChanged(args);
157
158
  this.notifyPropertyChanged(constants_1.PROPERTY.STROKE);
158
159
  };
159
160
  /**
@@ -188,6 +189,42 @@ var StackedColumnRenderableSeries = /** @class */ (function (_super) {
188
189
  enumerable: false,
189
190
  configurable: true
190
191
  });
192
+ Object.defineProperty(StackedColumnRenderableSeries.prototype, "drawingProviders", {
193
+ /**
194
+ * drawingProviders property is not supported for StackedColumnRenderableSeries
195
+ * instead set on the {@link StackedColumnCollection}
196
+ */
197
+ get: function () {
198
+ throw Error("drawingProviders property is not supported for StackedColumnRenderableSeries");
199
+ },
200
+ /**
201
+ * drawingProviders property is not supported for StackedColumnRenderableSeries,
202
+ * instead set on the {@link StackedColumnCollection}
203
+ */
204
+ set: function (value) {
205
+ throw Error("drawingProviders property is not supported for StackedColumnRenderableSeries");
206
+ },
207
+ enumerable: false,
208
+ configurable: true
209
+ });
210
+ Object.defineProperty(StackedColumnRenderableSeries.prototype, "effect", {
211
+ /**
212
+ * effect property is not supported for StackedColumnRenderableSeries,
213
+ * instead set on the {@link StackedColumnCollection}
214
+ */
215
+ get: function () {
216
+ throw Error("effect property is not supported for StackedColumnRenderableSeries");
217
+ },
218
+ /**
219
+ * effect property is not supported for StackedColumnRenderableSeries,
220
+ * instead set on the {@link StackedColumnCollection}
221
+ */
222
+ set: function (effect) {
223
+ throw Error("effect property is not supported for StackedColumnRenderableSeries");
224
+ },
225
+ enumerable: false,
226
+ configurable: true
227
+ });
191
228
  Object.defineProperty(StackedColumnRenderableSeries.prototype, "spacing", {
192
229
  // public get zeroLineY(): number {
193
230
  // return this.zeroLineYProperty;
@@ -32,8 +32,6 @@ import { StackedMountainRenderableSeries } from "./StackedMountainRenderableSeri
32
32
  */
33
33
  export declare class StackedMountainCollection extends BaseStackedCollection<StackedMountainRenderableSeries> {
34
34
  readonly type = ESeriesType.StackedMountainCollection;
35
- private nativeDrawingProvider;
36
- private transparentPenCache;
37
35
  /**
38
36
  * Creates an instance of the {@link StackedMountainCollection}
39
37
  * @param webAssemblyContext The {@link TSciChart | SciChart WebAssembly Context} containing
@@ -52,6 +50,8 @@ export declare class StackedMountainCollection extends BaseStackedCollection<Sta
52
50
  /** @inheritDoc */
53
51
  onAttach(scs: SciChartSurface): void;
54
52
  /** @inheritDoc */
53
+ onDetach(): void;
54
+ /** @inheritDoc */
55
55
  notifyPropertyChanged(propertyName: string): void;
56
56
  /** @inheritDoc */
57
57
  hasDataSeriesValues(): boolean;