scichart 3.2.476 → 3.2.481

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 (32) hide show
  1. package/Builder/buildModifiers.d.ts +4 -0
  2. package/Builder/buildModifiers.js +2 -0
  3. package/Charting/ChartModifiers/RolloverModifier.d.ts +20 -10
  4. package/Charting/ChartModifiers/RolloverModifier.js +108 -91
  5. package/Charting/ChartModifiers/VerticalSliceModifier.d.ts +76 -0
  6. package/Charting/ChartModifiers/VerticalSliceModifier.js +247 -0
  7. package/Charting/ChartModifiers/constants.d.ts +6 -1
  8. package/Charting/ChartModifiers/constants.js +5 -0
  9. package/Charting/Drawing/RenderSurface.js +1 -0
  10. package/Charting/Model/OhlcDataSeries.js +3 -3
  11. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +5 -1
  12. package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +2 -0
  13. package/Charting/Visuals/Annotations/SvgAnnotationBase.js +21 -0
  14. package/Charting/Visuals/Axis/AxisBase2D.d.ts +1 -0
  15. package/Charting/Visuals/Axis/AxisBase2D.js +18 -5
  16. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.d.ts +1 -0
  17. package/Charting/Visuals/RenderableSeries/DataLabels/BaseDataLabelProvider.js +14 -3
  18. package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.d.ts +2 -1
  19. package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.js +14 -0
  20. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +7 -1
  21. package/Core/BuildStamp.d.ts +1 -1
  22. package/Core/BuildStamp.js +2 -2
  23. package/_wasm/scichart.browser.js +1 -1
  24. package/_wasm/scichart2d.wasm +0 -0
  25. package/_wasm/scichart3d.wasm +0 -0
  26. package/index.d.ts +2 -0
  27. package/index.dev.js +417 -106
  28. package/index.js +16 -14
  29. package/index.min.js +1 -1
  30. package/package.json +1 -1
  31. package/types/ChartModifierType.d.ts +1 -0
  32. package/types/ChartModifierType.js +1 -0
@@ -0,0 +1,247 @@
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
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.VerticalSliceModifier = void 0;
19
+ var RolloverModifier_1 = require("./RolloverModifier");
20
+ var translate_1 = require("../../utils/translate");
21
+ var Point_1 = require("../../Core/Point");
22
+ var MousePosition_1 = require("../../types/MousePosition");
23
+ var RolloverModifierRenderableSeriesProps_1 = require("../Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps");
24
+ var AnnotationBase_1 = require("../Visuals/Annotations/AnnotationBase");
25
+ var SeriesType_1 = require("../../types/SeriesType");
26
+ var constants_1 = require("./constants");
27
+ var ChartModifierType_1 = require("../../types/ChartModifierType");
28
+ var VerticalSliceModifier = /** @class */ (function (_super) {
29
+ __extends(VerticalSliceModifier, _super);
30
+ function VerticalSliceModifier(options) {
31
+ var _this = this;
32
+ var _a, _b, _c;
33
+ _this = _super.call(this, options) || this;
34
+ _this.xCoordinateModeProperty = AnnotationBase_1.ECoordinateMode.Pixel;
35
+ _this.isDraggableProperty = false;
36
+ _this.rmrsProps = new Map();
37
+ _this.rmrsProps1 = new Map();
38
+ // @ts-ignore
39
+ _this.type = ChartModifierType_1.EChart2DModifierType.VerticalSlice;
40
+ _this.x1Property = (_a = options.x1) !== null && _a !== void 0 ? _a : 0;
41
+ _this.mousePosition = MousePosition_1.EMousePosition.SeriesArea;
42
+ _this.xCoordinateModeProperty = (_b = options.xCoordinateMode) !== null && _b !== void 0 ? _b : _this.xCoordinateModeProperty;
43
+ _this.isDraggableProperty = (_c = options.isDraggable) !== null && _c !== void 0 ? _c : _this.isDraggableProperty;
44
+ _this.lineSelectionColorProperty = options.lineSelectionColor;
45
+ _this.rolloverLineAnnotation.isEditable = _this.isDraggableProperty;
46
+ _this.rolloverLineAnnotation.selectionBoxStroke = _this.lineSelectionColor;
47
+ return _this;
48
+ }
49
+ Object.defineProperty(VerticalSliceModifier.prototype, "x1", {
50
+ // properties - only update if changed
51
+ /** @inheritDoc */
52
+ get: function () {
53
+ return this.x1Property;
54
+ },
55
+ /** @inheritDoc */
56
+ set: function (value) {
57
+ if (value !== this.x1Property) {
58
+ this.x1Property = value;
59
+ this.notifyPropertyChanged(constants_1.PROPERTY.X1);
60
+ }
61
+ },
62
+ enumerable: false,
63
+ configurable: true
64
+ });
65
+ Object.defineProperty(VerticalSliceModifier.prototype, "xCoordinateMode", {
66
+ /** @inheritDoc */
67
+ get: function () {
68
+ return this.xCoordinateModeProperty;
69
+ },
70
+ /** @inheritDoc */
71
+ set: function (value) {
72
+ if (value !== this.xCoordinateModeProperty) {
73
+ this.xCoordinateModeProperty = value;
74
+ this.notifyPropertyChanged(constants_1.PROPERTY.X_COORDINATE_MODE);
75
+ }
76
+ },
77
+ enumerable: false,
78
+ configurable: true
79
+ });
80
+ Object.defineProperty(VerticalSliceModifier.prototype, "verticalLine", {
81
+ /** @inheritDoc */
82
+ get: function () {
83
+ // read only
84
+ return this.rolloverLineAnnotation;
85
+ },
86
+ enumerable: false,
87
+ configurable: true
88
+ });
89
+ Object.defineProperty(VerticalSliceModifier.prototype, "isDraggable", {
90
+ /** @inheritDoc */
91
+ get: function () {
92
+ return this.isDraggableProperty;
93
+ },
94
+ /** @inheritDoc */
95
+ set: function (value) {
96
+ if (value != this.isDraggableProperty) {
97
+ this.isDraggableProperty = value;
98
+ this.notifyPropertyChanged(constants_1.PROPERTY.IS_DRAGGABLE);
99
+ }
100
+ },
101
+ enumerable: false,
102
+ configurable: true
103
+ });
104
+ Object.defineProperty(VerticalSliceModifier.prototype, "lineSelectionColor", {
105
+ /** @inheritDoc */
106
+ get: function () {
107
+ return this.lineSelectionColorProperty;
108
+ },
109
+ /** @inheritDoc */
110
+ set: function (value) {
111
+ if (value != this.lineSelectionColorProperty) {
112
+ this.lineSelectionColorProperty = value;
113
+ this.notifyPropertyChanged(constants_1.PROPERTY.LINE_SELECTION_COLOR);
114
+ }
115
+ },
116
+ enumerable: false,
117
+ configurable: true
118
+ });
119
+ VerticalSliceModifier.prototype.modifierMouseMove = function (args) {
120
+ //this.lastPoint = args.mousePoint;
121
+ if (this.rolloverLineAnnotation.isDraggingStarted) {
122
+ this.mousePoint = new Point_1.Point(args.mousePoint.x, args.mousePoint.y);
123
+ var x = this.isVerticalChart() ? args.mousePoint.y : args.mousePoint.x;
124
+ var xAxis = this.parentSurface.getXAxisById(this.xAxisId);
125
+ var coordCalc = xAxis.getCurrentCoordinateCalculator();
126
+ if (this.xCoordinateMode === AnnotationBase_1.ECoordinateMode.Pixel) {
127
+ this.x1 = (0, translate_1.translateToNotScaled)(x);
128
+ }
129
+ else if (this.xCoordinateMode === AnnotationBase_1.ECoordinateMode.Relative) {
130
+ this.x1 =
131
+ (x - (this.isVerticalChart() ? xAxis.viewRect.top : xAxis.viewRect.left)) /
132
+ coordCalc.viewportDimension;
133
+ }
134
+ else {
135
+ // DataValue
136
+ var xt = this.isVerticalChart()
137
+ ? (0, translate_1.translateFromCanvasToSeriesViewRectY)(x, this.parentSurface.seriesViewRect)
138
+ : (0, translate_1.translateFromCanvasToSeriesViewRectX)(x, this.parentSurface.seriesViewRect);
139
+ this.x1 = coordCalc.getDataValue(xt);
140
+ }
141
+ // Consider optional snap to dataPoint here
142
+ this.update();
143
+ }
144
+ };
145
+ /**
146
+ * @inheritDoc
147
+ */
148
+ VerticalSliceModifier.prototype.modifierMouseLeave = function (args) {
149
+ // do nothing, keep showing modifier
150
+ };
151
+ VerticalSliceModifier.prototype.toJSON = function () {
152
+ var json = _super.prototype.toJSON.call(this);
153
+ var options = {
154
+ x1: this.x1,
155
+ xCoordinateMode: this.xCoordinateMode,
156
+ isDraggable: this.isDraggable,
157
+ lineSelectionColor: this.lineSelectionColor
158
+ };
159
+ Object.assign(json.options, options);
160
+ return json;
161
+ };
162
+ VerticalSliceModifier.prototype.getRolloverProps = function (rs) {
163
+ return this.rmrsProps.get(rs);
164
+ };
165
+ VerticalSliceModifier.prototype.getRolloverProps1 = function (rs) {
166
+ return this.rmrsProps.get(rs);
167
+ };
168
+ VerticalSliceModifier.prototype.removeSeriesAnnotationsFromParentSurface = function (rs) {
169
+ _super.prototype.removeSeriesAnnotationsFromParentSurface.call(this, rs); // will remove annotation
170
+ // clean up the dictionary
171
+ this.rmrsProps.get(rs).delete();
172
+ this.rmrsProps.delete(rs);
173
+ if (rs.type === SeriesType_1.ESeriesType.BandSeries) {
174
+ this.rmrsProps1.get(rs).delete();
175
+ this.rmrsProps1.delete(rs);
176
+ }
177
+ };
178
+ /**
179
+ * @param rs
180
+ */
181
+ VerticalSliceModifier.prototype.addSeriesAnnotationsToParentSurface = function (rs) {
182
+ var props = new RolloverModifierRenderableSeriesProps_1.RolloverModifierRenderableSeriesProps(rs, false); // true for second in band
183
+ RolloverModifierRenderableSeriesProps_1.RolloverModifierRenderableSeriesProps.copy(rs.rolloverModifierProps, props);
184
+ this.rmrsProps.set(rs, props);
185
+ if (rs.type === SeriesType_1.ESeriesType.BandSeries) {
186
+ var props1 = new RolloverModifierRenderableSeriesProps_1.RolloverModifierRenderableSeriesProps(rs, false); // true for second in band
187
+ RolloverModifierRenderableSeriesProps_1.RolloverModifierRenderableSeriesProps.copy(rs.rolloverModifierProps1, props1);
188
+ this.rmrsProps1.set(rs, props1);
189
+ }
190
+ _super.prototype.addSeriesAnnotationsToParentSurface.call(this, rs);
191
+ };
192
+ VerticalSliceModifier.prototype.createLine = function (options) {
193
+ var line = _super.prototype.createLine.call(this, options);
194
+ line.annotationsGripsRadius = 0;
195
+ // @ts-ignore
196
+ //line.updateAdornerInner = () => {};
197
+ return line;
198
+ };
199
+ VerticalSliceModifier.prototype.update = function () {
200
+ this.calculateXPosition();
201
+ this.updateLine();
202
+ this.updateSeriesAnnotations();
203
+ if (this.tooltipLegendTemplate) {
204
+ this.legendAnnotation.seriesInfos = this.getSeriesInfos();
205
+ }
206
+ };
207
+ /** @inheritDoc */
208
+ VerticalSliceModifier.prototype.notifyPropertyChanged = function (propertyName) {
209
+ _super.prototype.notifyPropertyChanged.call(this, propertyName);
210
+ // take action when property programmatically changed
211
+ switch (propertyName) {
212
+ case constants_1.PROPERTY.X1: {
213
+ this.calculateXPosition();
214
+ break;
215
+ }
216
+ case constants_1.PROPERTY.X_COORDINATE_MODE: {
217
+ this.calculateXPosition();
218
+ break;
219
+ }
220
+ case constants_1.PROPERTY.IS_DRAGGABLE: {
221
+ this.rolloverLineAnnotation.isEditable = this.isDraggableProperty;
222
+ break;
223
+ }
224
+ }
225
+ };
226
+ VerticalSliceModifier.prototype.calculateXPosition = function () {
227
+ // will need to recalculate mousepoint.x
228
+ var xAxis = this.parentSurface.getXAxisById(this.xAxisId);
229
+ var isVertical = this.isVerticalChart();
230
+ if (xAxis) {
231
+ var xCalc = xAxis.getCurrentCoordinateCalculator();
232
+ // @ts-ignore
233
+ var x1v = this.rolloverLineAnnotation.getCoordinate(this.x1Property, xCalc, this.xCoordinateModeProperty);
234
+ if (this.xCoordinateMode === AnnotationBase_1.ECoordinateMode.Relative ||
235
+ this.xCoordinateMode === AnnotationBase_1.ECoordinateMode.DataValue) {
236
+ x1v = x1v + (isVertical ? xAxis.viewRect.top : xAxis.viewRect.left);
237
+ }
238
+ // pick a y value in the view area
239
+ var y1v = isVertical
240
+ ? this.parentSurface.seriesViewRect.width / 2
241
+ : this.parentSurface.seriesViewRect.height / 2;
242
+ this.mousePoint = isVertical ? new Point_1.Point(y1v, x1v) : new Point_1.Point(x1v, y1v);
243
+ }
244
+ };
245
+ return VerticalSliceModifier;
246
+ }(RolloverModifier_1.RolloverModifier));
247
+ exports.VerticalSliceModifier = VerticalSliceModifier;
@@ -24,5 +24,10 @@ export declare enum PROPERTY {
24
24
  PLACEMENT_DIV_ID = "PLACEMENT_DIV_ID",
25
25
  X_LINE = "X_LINE",
26
26
  Y_LINE = "Y_LINE",
27
- AXIS_LABELS = "AXIS_LABELS"
27
+ AXIS_LABELS = "AXIS_LABELS",
28
+ X1 = "X1",
29
+ X_COORDINATE_MODE = "X_COORDINATE_MODE",
30
+ IS_DRAGGABLE = "IS_DRAGGABLE",
31
+ LINE_ANNOTATIONS_OPTIONS = "LINE_ANNOTATIONS_OPTIONS",
32
+ LINE_SELECTION_COLOR = "LINE_SELECTION_COLOR"
28
33
  }
@@ -29,4 +29,9 @@ var PROPERTY;
29
29
  PROPERTY["X_LINE"] = "X_LINE";
30
30
  PROPERTY["Y_LINE"] = "Y_LINE";
31
31
  PROPERTY["AXIS_LABELS"] = "AXIS_LABELS";
32
+ PROPERTY["X1"] = "X1";
33
+ PROPERTY["X_COORDINATE_MODE"] = "X_COORDINATE_MODE";
34
+ PROPERTY["IS_DRAGGABLE"] = "IS_DRAGGABLE";
35
+ PROPERTY["LINE_ANNOTATIONS_OPTIONS"] = "LINE_ANNOTATIONS_OPTIONS";
36
+ PROPERTY["LINE_SELECTION_COLOR"] = "LINE_SELECTION_COLOR";
32
37
  })(PROPERTY = exports.PROPERTY || (exports.PROPERTY = {}));
@@ -26,6 +26,7 @@ var RenderSurface = /** @class */ (function () {
26
26
  // Don't try and draw in tests
27
27
  return;
28
28
  }
29
+ //console.log("Invalidate");
29
30
  // Prevent drawing request when WebGL context is lost
30
31
  if ((_a = WebGlHelper_1.WebGlHelper.getContext(this.webAssemblyContext.canvas)) === null || _a === void 0 ? void 0 : _a.isContextLost()) {
31
32
  return;
@@ -472,9 +472,9 @@ var OhlcDataSeries = /** @class */ (function (_super) {
472
472
  for (var i = 0; i < dataSize; i++) {
473
473
  xValues[i] = this.xValues.get(i);
474
474
  openValues[i] = this.openValues.get(i);
475
- closeValues[i] = this.highValues.get(i);
476
- highValues[i] = this.lowValues.get(i);
477
- lowValues[i] = this.yValues.get(i);
475
+ closeValues[i] = this.yValues.get(i);
476
+ highValues[i] = this.highValues.get(i);
477
+ lowValues[i] = this.lowValues.get(i);
478
478
  }
479
479
  }
480
480
  var options = {
@@ -275,7 +275,11 @@ export declare abstract class AnnotationBase extends DeletableEntity implements
275
275
  private isSelectedProperty;
276
276
  private resizeDirectionsProperty;
277
277
  private svgAdornerRootProperty;
278
- private invalidateState;
278
+ protected invalidateState: {
279
+ isHidden: boolean;
280
+ x1: number;
281
+ y1: number;
282
+ };
279
283
  /** @inheritDoc */
280
284
  get annotationLayer(): EAnnotationLayer;
281
285
  /** @inheritDoc */
@@ -78,6 +78,8 @@ export declare abstract class SvgAnnotationBase extends AnnotationBase {
78
78
  * Gets or sets horizontal anchor point
79
79
  */
80
80
  set horizontalAnchorPoint(value: EHorizontalAnchorPoint);
81
+ suspendInvalidate(): void;
82
+ resumeInvalidate(): void;
81
83
  /**
82
84
  * Updates the annotation position, with the {@link CoordinateCalculatorBase | Coordinate Calculators} passed in
83
85
  * @param xCalc The XAxis {@link CoordinateCalculatorBase | CoordinateCalculator} applied to this annotation
@@ -141,6 +141,27 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
141
141
  enumerable: false,
142
142
  configurable: true
143
143
  });
144
+ SvgAnnotationBase.prototype.suspendInvalidate = function () {
145
+ _super.prototype.suspendInvalidate.call(this);
146
+ //@ts-ignore
147
+ this.invalidateState.xCoordShift = this.xCoordShift;
148
+ //@ts-ignore
149
+ this.invalidateState.yCoordShift = this.yCoordShift;
150
+ };
151
+ SvgAnnotationBase.prototype.resumeInvalidate = function () {
152
+ if (!this.invalidateState)
153
+ return;
154
+ if (
155
+ //@ts-ignore
156
+ this.xCoordShift !== this.invalidateState.xCoordShift ||
157
+ //@ts-ignore
158
+ this.yCoordShift !== this.invalidateState.yCoordShift) {
159
+ if (this.invalidateParentCallback) {
160
+ this.invalidateParentCallback();
161
+ }
162
+ }
163
+ _super.prototype.resumeInvalidate.call(this);
164
+ };
144
165
  /**
145
166
  * Updates the annotation position, with the {@link CoordinateCalculatorBase | Coordinate Calculators} passed in
146
167
  * @param xCalc The XAxis {@link CoordinateCalculatorBase | CoordinateCalculator} applied to this annotation
@@ -362,6 +362,7 @@ export declare abstract class AxisBase2D extends AxisCore implements IThemeable
362
362
  protected webAssemblyContext2D: TSciChart;
363
363
  protected axisRendererProperty: AxisRenderer;
364
364
  protected autoRangeAnimationProperty: IAutoRangeAnimationOptions;
365
+ private getlabelStyleProxy;
365
366
  private labelStyleProperty;
366
367
  private axisAlignmentProperty;
367
368
  private isInnerAxisProperty;
@@ -108,7 +108,18 @@ var AxisBase2D = /** @class */ (function (_super) {
108
108
  * Gets the {@link AxisLayoutState} class which manages layout
109
109
  */
110
110
  _this.axisLayoutState = new AxisLayoutState_1.AxisLayoutState();
111
- _this.labelStyleProperty = {
111
+ _this.getlabelStyleProxy = function (newStyle) {
112
+ return new Proxy(newStyle, {
113
+ set: function (target, key, value) {
114
+ //@ts-ignore
115
+ target[key] = value;
116
+ _this.notifyPropertyChanged(constants_1.PROPERTY.TEXT_STYLE);
117
+ _this.dpiAdjustedLabelStyleCache = undefined;
118
+ return true;
119
+ }
120
+ });
121
+ };
122
+ _this.labelStyleProperty = _this.getlabelStyleProxy({
112
123
  fontSize: 14,
113
124
  fontFamily: "Arial",
114
125
  color: SciChartSurfaceBase_1.SciChartSurfaceBase.DEFAULT_THEME.tickTextBrush,
@@ -116,7 +127,7 @@ var AxisBase2D = /** @class */ (function (_super) {
116
127
  fontStyle: "normal",
117
128
  padding: Thickness_1.Thickness.fromString("2 4 2 4"),
118
129
  alignment: LabelAlignment_1.ELabelAlignment.Auto
119
- };
130
+ });
120
131
  _this.isInnerAxisProperty = false;
121
132
  _this.isPrimaryAxisProperty = false;
122
133
  _this.axisBorderProperty = {
@@ -151,7 +162,7 @@ var AxisBase2D = /** @class */ (function (_super) {
151
162
  _this.zoomExtentsRange = (options === null || options === void 0 ? void 0 : options.zoomExtentsToInitialRange) ? _this.visibleRange : options === null || options === void 0 ? void 0 : options.zoomExtentsRange;
152
163
  _this.axisAlignment = (_f = options === null || options === void 0 ? void 0 : options.axisAlignment) !== null && _f !== void 0 ? _f : _this.axisAlignment;
153
164
  _this.axisTitle = (_g = options === null || options === void 0 ? void 0 : options.axisTitle) !== null && _g !== void 0 ? _g : _this.axisTitle;
154
- _this.labelStyle = __assign(__assign({}, _this.labelStyle), options === null || options === void 0 ? void 0 : options.labelStyle);
165
+ _this.labelStyle = _this.getlabelStyleProxy(__assign(__assign({}, _this.labelStyle), options === null || options === void 0 ? void 0 : options.labelStyle));
155
166
  _this.axisBorder = __assign(__assign({}, _this.axisBorder), options === null || options === void 0 ? void 0 : options.axisBorder);
156
167
  _this.isInnerAxis = (_h = options === null || options === void 0 ? void 0 : options.isInnerAxis) !== null && _h !== void 0 ? _h : _this.isInnerAxis;
157
168
  _this.stackedAxisLength = (_j = options === null || options === void 0 ? void 0 : options.stackedAxisLength) !== null && _j !== void 0 ? _j : _this.stackedAxisLength;
@@ -514,9 +525,11 @@ var AxisBase2D = /** @class */ (function (_super) {
514
525
  * Gets or sets a {@link TTextStyle} object for styling axis labels
515
526
  */
516
527
  set: function (textStyle) {
517
- this.labelStyleProperty = __assign(__assign({}, this.labelStyle), textStyle);
518
- this.dpiAdjustedLabelStyleCache = undefined;
528
+ var newStyle = __assign(__assign({}, this.labelStyle), textStyle);
529
+ this.labelStyleProperty = this.getlabelStyleProxy(newStyle);
530
+ // Notify here as well since we are replacing the whole property
519
531
  this.notifyPropertyChanged(constants_1.PROPERTY.TEXT_STYLE);
532
+ this.dpiAdjustedLabelStyleCache = undefined;
520
533
  },
521
534
  enumerable: false,
522
535
  configurable: true
@@ -47,6 +47,7 @@ export declare abstract class BaseDataLabelProvider {
47
47
  protected parentSeries: IRenderableSeries;
48
48
  protected styleProperty: TDataLabelStyle;
49
49
  protected colorProperty: string;
50
+ private getstyleProxy;
50
51
  /**
51
52
  * Creates an instance of the {@link DataLabelProvider}
52
53
  */
@@ -23,11 +23,22 @@ var BaseDataLabelProvider = /** @class */ (function () {
23
23
  * Creates an instance of the {@link DataLabelProvider}
24
24
  */
25
25
  function BaseDataLabelProvider(options) {
26
+ var _this = this;
26
27
  /**
27
28
  * The text to draw, along with the sizes and positions. Usually generated, but can be updated before final drawing
28
29
  */
29
30
  this.dataLabels = [];
30
- this.styleProperty = options === null || options === void 0 ? void 0 : options.style;
31
+ this.getstyleProxy = function (newStyle) {
32
+ return new Proxy(newStyle, {
33
+ set: function (target, key, value) {
34
+ //@ts-ignore
35
+ target[key] = value;
36
+ _this.invalidateParent();
37
+ return true;
38
+ }
39
+ });
40
+ };
41
+ this.styleProperty = (options === null || options === void 0 ? void 0 : options.style) ? this.getstyleProxy(options === null || options === void 0 ? void 0 : options.style) : undefined;
31
42
  this.colorProperty = options === null || options === void 0 ? void 0 : options.color;
32
43
  }
33
44
  /**
@@ -57,7 +68,7 @@ var BaseDataLabelProvider = /** @class */ (function () {
57
68
  * Gets or sets the text style used for data labels. The style must be set, with fontFamily and fontSize set, in order for text to be drawn.
58
69
  */
59
70
  set: function (value) {
60
- this.styleProperty = value;
71
+ this.styleProperty = this.getstyleProxy(value);
61
72
  this.invalidateParent();
62
73
  },
63
74
  enumerable: false,
@@ -86,7 +97,7 @@ var BaseDataLabelProvider = /** @class */ (function () {
86
97
  });
87
98
  /** Update the style. Only the properties passed will be updated */
88
99
  BaseDataLabelProvider.prototype.updateStyle = function (value) {
89
- this.styleProperty = __assign(__assign({}, this.styleProperty), value);
100
+ this.styleProperty = this.getstyleProxy(__assign(__assign({}, this.styleProperty), value));
90
101
  this.invalidateParent();
91
102
  };
92
103
  /**
@@ -10,6 +10,7 @@ export interface IRolloverModifier {
10
10
  tooltipDataTemplate: TRolloverTooltipDataTemplate;
11
11
  }
12
12
  export declare class RolloverModifierRenderableSeriesProps {
13
+ static copy(from: RolloverModifierRenderableSeriesProps, to: RolloverModifierRenderableSeriesProps): void;
13
14
  tooltip: RolloverTooltipSvgAnnotation;
14
15
  marker: RolloverMarkerSvgAnnotation;
15
16
  width: number;
@@ -20,6 +21,7 @@ export declare class RolloverModifierRenderableSeriesProps {
20
21
  tooltipLegendOffsetX: number;
21
22
  tooltipLegendOffsetY: number;
22
23
  rolloverModifier: IRolloverModifier;
24
+ renderableSeries: IRenderableSeries;
23
25
  private tooltipLegendTemplateProperty;
24
26
  private invalidateParentCallback;
25
27
  private showsRolloverProperty;
@@ -28,7 +30,6 @@ export declare class RolloverModifierRenderableSeriesProps {
28
30
  private tooltipTitleProperty;
29
31
  private markerColorProperty;
30
32
  private tooltipDataTemplateProperty?;
31
- private renderableSeries;
32
33
  private isY1;
33
34
  constructor(renderableSeries: IRenderableSeries, isY1?: boolean);
34
35
  setInvalidateParentCallback(callback: () => void): void;
@@ -14,6 +14,20 @@ var RolloverModifierRenderableSeriesProps = /** @class */ (function () {
14
14
  this.renderableSeries = renderableSeries;
15
15
  this.isY1 = isY1;
16
16
  }
17
+ RolloverModifierRenderableSeriesProps.copy = function (from, to) {
18
+ to.markerColorProperty = from.markerColor;
19
+ to.showsRolloverProperty = from.showRollover;
20
+ to.tooltipColorProperty = from.tooltipColor;
21
+ to.tooltipDataTemplateProperty = from.tooltipDataTemplate;
22
+ to.tooltipLabelX = from.tooltipLabelX;
23
+ to.tooltipLabelY = from.tooltipLabelY;
24
+ to.tooltipLegendOffsetX = from.tooltipLegendOffsetX;
25
+ to.tooltipLegendOffsetY = from.tooltipLegendOffsetY;
26
+ to.tooltipTemplate = from.tooltipTemplate;
27
+ to.tooltipTextColorProperty = from.tooltipTextColorProperty;
28
+ to.tooltipTitleProperty = from.tooltipTitle;
29
+ to.invalidateParentCallback = from.invalidateParentCallback;
30
+ };
17
31
  RolloverModifierRenderableSeriesProps.prototype.setInvalidateParentCallback = function (callback) {
18
32
  this.invalidateParentCallback = callback;
19
33
  };
@@ -705,10 +705,13 @@ var SciChartPieSurface = /** @class */ (function (_super) {
705
705
  SciChartPieSurface.prototype.drawChart = function (animationProgress) {
706
706
  var _this = this;
707
707
  if (animationProgress === void 0) { animationProgress = 1; }
708
+ var totalValue = this.pieSegmentsTotalValue();
709
+ if (!totalValue) {
710
+ return;
711
+ }
708
712
  var strokeWidth = 2;
709
713
  var strokeColor = this.themeProviderProperty.sciChartBackground;
710
714
  var segments = this.pieSegments.asArray();
711
- var totalValue = this.pieSegmentsTotalValue();
712
715
  var totalOldValue = this.pieSegmentsTotalOldValue();
713
716
  var outerRadius = (Math.min(this.calculateViewRectWidth(this.viewRect.width), this.calculateViewRectHeight(this.viewRect.height)) *
714
717
  0.8) /
@@ -727,6 +730,9 @@ var SciChartPieSurface = /** @class */ (function (_super) {
727
730
  var currentOldValue = 0;
728
731
  segments.forEach(function (el, index) {
729
732
  var _a;
733
+ if (el.value === 0) {
734
+ return;
735
+ }
730
736
  var oldValue = (_a = el.oldValue) !== null && _a !== void 0 ? _a : 0;
731
737
  var newFrom = (360 * currentValue) / totalValue - START_ANGLE;
732
738
  var newTo = (360 * (currentValue + el.value)) / totalValue - START_ANGLE;
@@ -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.476";
3
+ export declare const libraryVersion = "3.2.481";
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-09-28T00:00:00";
4
+ var buildStamp = "2023-10-05T00:00:00";
5
5
  var result;
6
6
  // tslint:disable-next-line:no-var-requires
7
- exports.libraryVersion = "3.2.476";
7
+ exports.libraryVersion = "3.2.481";
8
8
  var checkBuildStamp = function (wasmContext) {
9
9
  if (result !== undefined)
10
10
  return result;