scichart 3.2.491 → 3.2.516

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 (64) hide show
  1. package/Charting/ChartModifiers/CursorModifier.js +3 -7
  2. package/Charting/ChartModifiers/RolloverModifier.js +1 -2
  3. package/Charting/ChartModifiers/VerticalSliceModifier.js +6 -0
  4. package/Charting/LayoutManager/SynchronizedLayoutManager.js +12 -0
  5. package/Charting/Numerics/TickCoordinateProviders/DefaultTickCoordinatesProvider.d.ts +5 -0
  6. package/Charting/Numerics/TickCoordinateProviders/DefaultTickCoordinatesProvider.js +11 -1
  7. package/Charting/Numerics/TickCoordinateProviders/StaticTickCoordinatesProvider.d.ts +19 -0
  8. package/Charting/Numerics/TickCoordinateProviders/StaticTickCoordinatesProvider.js +86 -0
  9. package/Charting/Numerics/TickCoordinateProviders/TickCoordinatesProvider.d.ts +2 -0
  10. package/Charting/Numerics/TickProviders/LogarithmicTickProvider.d.ts +1 -0
  11. package/Charting/Numerics/TickProviders/LogarithmicTickProvider.js +6 -1
  12. package/Charting/Visuals/Annotations/AxisMarkerAnnotation.js +1 -2
  13. package/Charting/Visuals/Annotations/BoxAnnotation.js +1 -2
  14. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +1 -2
  15. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +2 -3
  16. package/Charting/Visuals/Annotations/LineAnnotation.js +1 -2
  17. package/Charting/Visuals/Annotations/NativeTextAnnotation.js +1 -2
  18. package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.js +1 -2
  19. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +1 -1
  20. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +1 -2
  21. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +16 -17
  22. package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +2 -0
  23. package/Charting/Visuals/Annotations/SvgAnnotationBase.js +11 -7
  24. package/Charting/Visuals/Axis/AxisBase2D.d.ts +14 -1
  25. package/Charting/Visuals/Axis/AxisBase2D.js +51 -19
  26. package/Charting/Visuals/Axis/AxisCore.d.ts +1 -1
  27. package/Charting/Visuals/Axis/DeltaCalculator/LogarithmicDeltaCalculator.d.ts +1 -0
  28. package/Charting/Visuals/Axis/DeltaCalculator/LogarithmicDeltaCalculator.js +13 -4
  29. package/Charting/Visuals/Axis/IAxisCoreOptions.d.ts +2 -2
  30. package/Charting/Visuals/Axis/LogarithmicAxis.d.ts +6 -1
  31. package/Charting/Visuals/Axis/LogarithmicAxis.js +27 -10
  32. package/Charting/Visuals/Axis/constants.d.ts +2 -1
  33. package/Charting/Visuals/Axis/constants.js +1 -0
  34. package/Charting/Visuals/Helpers/createPen.js +8 -0
  35. package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +1 -1
  36. package/Charting/Visuals/Legend/SciChartLegendBase.js +8 -3
  37. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +7 -0
  38. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +41 -16
  39. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +1 -1
  40. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.js +4 -4
  41. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +5 -0
  42. package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.js +7 -2
  43. package/Charting/Visuals/RenderableSeries/constants.d.ts +2 -1
  44. package/Charting/Visuals/RenderableSeries/constants.js +1 -0
  45. package/Charting/Visuals/SciChartOverview.js +3 -2
  46. package/Charting/Visuals/SciChartPieSurface/IPieSurfaceOptions.d.ts +1 -0
  47. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +9 -8
  48. package/Charting/Visuals/SciChartSurfaceBase.js +5 -1
  49. package/Charting3D/Visuals/Axis/AxisBase3D.d.ts +1 -1
  50. package/Core/BuildStamp.d.ts +1 -1
  51. package/Core/BuildStamp.js +2 -2
  52. package/README.md +10 -1
  53. package/_wasm/scichart.browser.js +1 -1
  54. package/_wasm/scichart2d.js +1 -1
  55. package/_wasm/scichart2d.wasm +0 -0
  56. package/_wasm/scichart3d.js +1 -1
  57. package/_wasm/scichart3d.wasm +0 -0
  58. package/index.d.ts +1 -0
  59. package/index.dev.js +323 -123
  60. package/index.js +13 -11
  61. package/index.min.js +1 -1
  62. package/package.json +1 -1
  63. package/types/TSciChart.d.ts +18 -17
  64. package/types/TSciChart3D.d.ts +1 -0
@@ -222,18 +222,14 @@ var CursorModifier = /** @class */ (function (_super) {
222
222
  * @inheritDoc
223
223
  */
224
224
  CursorModifier.prototype.onDetach = function () {
225
- var _a;
226
225
  _super.prototype.onDetach.call(this);
227
226
  if (this.xLineAnnotation) {
228
- (_a = this.xLineAnnotation) === null || _a === void 0 ? void 0 : _a.delete();
229
- this.parentSurface.modifierAnnotations.remove(this.xLineAnnotation);
227
+ this.parentSurface.modifierAnnotations.remove(this.xLineAnnotation, true);
230
228
  }
231
229
  if (this.yLineAnnotation) {
232
- this.yLineAnnotation.delete();
233
- this.parentSurface.modifierAnnotations.remove(this.yLineAnnotation);
230
+ this.parentSurface.modifierAnnotations.remove(this.yLineAnnotation, true);
234
231
  }
235
- this.tooltipAnnotation.delete();
236
- this.parentSurface.modifierAnnotations.remove(this.tooltipAnnotation);
232
+ this.parentSurface.modifierAnnotations.remove(this.tooltipAnnotation, true);
237
233
  };
238
234
  /**
239
235
  * @inheritDoc
@@ -250,8 +250,7 @@ var RolloverModifier = /** @class */ (function (_super) {
250
250
  RolloverModifier.prototype.onDetach = function () {
251
251
  var _this = this;
252
252
  _super.prototype.onDetach.call(this);
253
- this.rolloverLineAnnotation.delete();
254
- this.parentSurface.modifierAnnotations.remove(this.rolloverLineAnnotation);
253
+ this.parentSurface.modifierAnnotations.remove(this.rolloverLineAnnotation, true);
255
254
  this.parentSurface.modifierAnnotations.remove(this.legendAnnotation);
256
255
  this.getIncludedRenderableSeries().forEach(function (rs) { return _this.removeSeriesAnnotationsFromParentSurface(rs); });
257
256
  };
@@ -200,6 +200,12 @@ var VerticalSliceModifier = /** @class */ (function (_super) {
200
200
  this.calculateXPosition();
201
201
  this.updateLine();
202
202
  this.updateSeriesAnnotations();
203
+ Array.from(this.rmrsProps.values()).forEach(function (rmrsp) {
204
+ if (!rmrsp.renderableSeries.isVisible || !rmrsp.showRollover) {
205
+ rmrsp.tooltip.isHidden = true;
206
+ rmrsp.marker.isHidden = true;
207
+ }
208
+ });
203
209
  if (this.tooltipLegendTemplate) {
204
210
  this.legendAnnotation.seriesInfos = this.getSeriesInfos();
205
211
  }
@@ -46,6 +46,12 @@ var SynchronizedLayoutManager = /** @class */ (function (_super) {
46
46
  _super.prototype.measureLeftOuterAxes.call(this);
47
47
  this.verticalGroup.onLeftSizeChanged(this.id, this.chartLayoutState.leftOuterAreaSize);
48
48
  var newSize = Math.max(this.chartLayoutState.leftOuterAreaSize, this.verticalGroup.groupLeftSize);
49
+ // Sync axis widths. Expand the outer one only.
50
+ if (this.axesGroupedByLayoutStrategy.leftOuterAxes.length > 0) {
51
+ var axis = this.axesGroupedByLayoutStrategy.leftOuterAxes[this.axesGroupedByLayoutStrategy.leftOuterAxes.length - 1];
52
+ var otherSize = this.chartLayoutState.leftOuterAreaSize - axis.axisLayoutState.axisSize;
53
+ axis.axisLayoutState.axisSize = newSize - otherSize;
54
+ }
49
55
  this.chartLayoutState.leftOuterAreaSize = newSize;
50
56
  this.lastLeftOuterAreaSize = newSize;
51
57
  };
@@ -53,6 +59,12 @@ var SynchronizedLayoutManager = /** @class */ (function (_super) {
53
59
  _super.prototype.measureRightOuterAxes.call(this);
54
60
  this.verticalGroup.onRightSizeChanged(this.id, this.chartLayoutState.rightOuterAreaSize);
55
61
  var newSize = Math.max(this.chartLayoutState.rightOuterAreaSize, this.verticalGroup.groupRightSize);
62
+ // Sync axis widths. Expand the outer one only.
63
+ if (this.axesGroupedByLayoutStrategy.rightOuterAxes.length > 0) {
64
+ var axis = this.axesGroupedByLayoutStrategy.rightOuterAxes[this.axesGroupedByLayoutStrategy.rightOuterAxes.length - 1];
65
+ var otherSize = this.chartLayoutState.rightOuterAreaSize - axis.axisLayoutState.axisSize;
66
+ axis.axisLayoutState.axisSize = newSize - otherSize;
67
+ }
56
68
  this.chartLayoutState.rightOuterAreaSize = newSize;
57
69
  this.lastRightOuterAreaSize = newSize;
58
70
  };
@@ -1,7 +1,12 @@
1
1
  import { TickCoordinatesProvider } from "./TickCoordinatesProvider";
2
2
  export declare class DefaultTickCoordinatesProvider extends TickCoordinatesProvider {
3
+ /**
4
+ * @inheritDoc
5
+ */
3
6
  getTickCoordinates(majorTicks: number[], minorTicks: number[]): {
4
7
  majorTickCoords: number[];
5
8
  minorTickCoords: number[];
9
+ majorTickOverrides: number[];
10
+ minorTickOverRides: number[];
6
11
  };
7
12
  }
@@ -22,12 +22,22 @@ var DefaultTickCoordinatesProvider = /** @class */ (function (_super) {
22
22
  function DefaultTickCoordinatesProvider() {
23
23
  return _super !== null && _super.apply(this, arguments) || this;
24
24
  }
25
+ /**
26
+ * @inheritDoc
27
+ */
25
28
  DefaultTickCoordinatesProvider.prototype.getTickCoordinates = function (majorTicks, minorTicks) {
29
+ if (majorTicks === undefined)
30
+ return {
31
+ majorTickCoords: undefined,
32
+ minorTickCoords: undefined,
33
+ majorTickOverrides: undefined,
34
+ minorTickOverRides: undefined
35
+ };
26
36
  var coordinateCalculator = this.parentAxis.getCurrentCoordinateCalculator();
27
37
  // Rounding and +0.5 required to have lines on exact pixel boundaries.
28
38
  var majorTickCoords = majorTicks.map(function (t) { return Math.round(coordinateCalculator.getCoordinate(t)) + 0.5; });
29
39
  var minorTickCoords = minorTicks.map(function (t) { return Math.round(coordinateCalculator.getCoordinate(t)) + 0.5; });
30
- return { majorTickCoords: majorTickCoords, minorTickCoords: minorTickCoords };
40
+ return { majorTickCoords: majorTickCoords, minorTickCoords: minorTickCoords, majorTickOverrides: majorTicks, minorTickOverRides: minorTicks };
31
41
  };
32
42
  return DefaultTickCoordinatesProvider;
33
43
  }(TickCoordinatesProvider_1.TickCoordinatesProvider));
@@ -0,0 +1,19 @@
1
+ import { DefaultTickCoordinatesProvider } from "./DefaultTickCoordinatesProvider";
2
+ export declare class StaticTickCoordinatesProvider extends DefaultTickCoordinatesProvider {
3
+ private tickCoords;
4
+ private prevRange;
5
+ private prevSize;
6
+ /**
7
+ * @inheritDoc
8
+ */
9
+ getTickCoordinates(majorTicks: number[], minorTicks: number[]): {
10
+ majorTickCoords: number[];
11
+ minorTickCoords: number[];
12
+ majorTickOverrides: number[];
13
+ minorTickOverRides: number[];
14
+ };
15
+ /** Update the static tick positions to correspond with the current calculated tick values */
16
+ forceRecalculateCoords(): void;
17
+ private OverrideTickValues;
18
+ private OverrideTickCoordinates;
19
+ }
@@ -0,0 +1,86 @@
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.StaticTickCoordinatesProvider = void 0;
19
+ var DefaultTickCoordinatesProvider_1 = require("./DefaultTickCoordinatesProvider");
20
+ var StaticTickCoordinatesProvider = /** @class */ (function (_super) {
21
+ __extends(StaticTickCoordinatesProvider, _super);
22
+ function StaticTickCoordinatesProvider() {
23
+ return _super !== null && _super.apply(this, arguments) || this;
24
+ }
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ StaticTickCoordinatesProvider.prototype.getTickCoordinates = function (majorTicks, minorTicks) {
29
+ var visibleRangeChanged = !this.parentAxis.visibleRange.equals(this.prevRange);
30
+ var axisSizeChanged = this.parentAxis.getAxisSize() !== this.prevSize;
31
+ var coordinateCalculator = this.parentAxis.getCurrentCoordinateCalculator();
32
+ var majorTickOverrides;
33
+ var minorTickOverRides;
34
+ if (this.tickCoords === undefined || axisSizeChanged) {
35
+ if (majorTicks === undefined) {
36
+ return {
37
+ majorTickCoords: undefined,
38
+ minorTickCoords: undefined,
39
+ majorTickOverrides: undefined,
40
+ minorTickOverRides: undefined
41
+ };
42
+ }
43
+ var majorTickCoords = majorTicks.map(function (t) { return coordinateCalculator.getCoordinate(t); });
44
+ var minorTickCoords = minorTicks.map(function (t) { return coordinateCalculator.getCoordinate(t); });
45
+ this.tickCoords = { majorTickCoords: majorTickCoords, minorTickCoords: minorTickCoords, majorTicks: majorTicks, minorTicks: minorTicks, majorTickLabels: undefined };
46
+ }
47
+ else if (visibleRangeChanged) {
48
+ this.OverrideTickValues(this.tickCoords);
49
+ (majorTickOverrides = this.tickCoords.majorTicks), (minorTickOverRides = this.tickCoords.minorTicks);
50
+ }
51
+ else {
52
+ this.OverrideTickCoordinates(this.tickCoords);
53
+ }
54
+ this.prevRange = this.parentAxis.visibleRange;
55
+ this.prevSize = this.parentAxis.getAxisSize();
56
+ //console.log(this.tickCoords.majorTickCoords, this.tickCoords.majorTicks);
57
+ return {
58
+ majorTickCoords: this.tickCoords.majorTickCoords.map(function (t) { return Math.round(t + 0.5); }),
59
+ minorTickCoords: this.tickCoords.minorTickCoords.map(function (t) { return Math.round(t + 0.5); }),
60
+ majorTickOverrides: majorTickOverrides,
61
+ minorTickOverRides: minorTickOverRides
62
+ };
63
+ };
64
+ /** Update the static tick positions to correspond with the current calculated tick values */
65
+ StaticTickCoordinatesProvider.prototype.forceRecalculateCoords = function () {
66
+ this.tickCoords = undefined;
67
+ };
68
+ StaticTickCoordinatesProvider.prototype.OverrideTickValues = function (tickCoords) {
69
+ var coordinateCalculator = this.parentAxis.getCurrentCoordinateCalculator();
70
+ if (coordinateCalculator != null) {
71
+ tickCoords.minorTickCoords.forEach(function (t, i) { return (tickCoords.minorTicks[i] = coordinateCalculator.getDataValue(t)); });
72
+ tickCoords.majorTickCoords.forEach(function (t, i) { return (tickCoords.majorTicks[i] = coordinateCalculator.getDataValue(t)); });
73
+ }
74
+ };
75
+ StaticTickCoordinatesProvider.prototype.OverrideTickCoordinates = function (tickCoords) {
76
+ var coordinateCalculator = this.parentAxis.getCurrentCoordinateCalculator();
77
+ if (coordinateCalculator != null) {
78
+ if (coordinateCalculator != null) {
79
+ tickCoords.minorTicks.forEach(function (t, i) { return (tickCoords.minorTickCoords[i] = coordinateCalculator.getCoordinate(t)); });
80
+ tickCoords.majorTicks.forEach(function (t, i) { return (tickCoords.majorTickCoords[i] = coordinateCalculator.getCoordinate(t)); });
81
+ }
82
+ }
83
+ };
84
+ return StaticTickCoordinatesProvider;
85
+ }(DefaultTickCoordinatesProvider_1.DefaultTickCoordinatesProvider));
86
+ exports.StaticTickCoordinatesProvider = StaticTickCoordinatesProvider;
@@ -25,5 +25,7 @@ export declare abstract class TickCoordinatesProvider {
25
25
  abstract getTickCoordinates(majorTicks: number[], minorTicks: number[]): {
26
26
  majorTickCoords: number[];
27
27
  minorTickCoords: number[];
28
+ majorTickOverrides: number[];
29
+ minorTickOverRides: number[];
28
30
  };
29
31
  }
@@ -25,6 +25,7 @@ export declare enum ELogarithmicMajorTickMode {
25
25
  */
26
26
  export declare class LogarithmicTickProvider extends TickProvider {
27
27
  logarithmicBase: number;
28
+ isHighPrecisionTicks: boolean;
28
29
  private wasmContext;
29
30
  private majorTickModeProperty;
30
31
  private minorTickModeProperty;
@@ -48,6 +48,7 @@ var LogarithmicTickProvider = /** @class */ (function (_super) {
48
48
  function LogarithmicTickProvider(wasmContext) {
49
49
  var _this = _super.call(this) || this;
50
50
  _this.logarithmicBase = 10;
51
+ _this.isHighPrecisionTicks = true;
51
52
  _this.majorTickModeProperty = ELogarithmicMajorTickMode.EqualSpacing;
52
53
  _this.minorTickModeProperty = ELogarithmicMinorTickMode.Linear;
53
54
  _this.wasmContext = wasmContext;
@@ -121,11 +122,14 @@ var LogarithmicTickProvider = /** @class */ (function (_super) {
121
122
  }
122
123
  else {
123
124
  var results = [];
125
+ if (this.logarithmicBase === 0)
126
+ return results;
124
127
  var current = visibleRange.min;
125
128
  var min = visibleRange.min;
126
129
  var max = visibleRange.max;
127
130
  var numberUtil = this.wasmContext.NumberUtil;
128
- if (!numberUtil.IsPowerOf(current, this.logarithmicBase, this.logarithmicBase)) {
131
+ if (!this.isHighPrecisionTicks &&
132
+ !numberUtil.IsPowerOf(current, this.logarithmicBase, this.logarithmicBase)) {
129
133
  current = numberUtil.RoundDownPower(current, this.logarithmicBase, this.logarithmicBase);
130
134
  }
131
135
  var start = numberUtil.Log(current, this.logarithmicBase);
@@ -144,6 +148,7 @@ var LogarithmicTickProvider = /** @class */ (function (_super) {
144
148
  exp = start + ++tickCount * majorDelta;
145
149
  current = Math.pow(this.logarithmicBase, exp);
146
150
  }
151
+ //console.log(majorDelta, minorDelta, results);
147
152
  if (adj === -1) {
148
153
  return results.reverse();
149
154
  }
@@ -400,8 +400,7 @@ var AxisMarkerAnnotation = /** @class */ (function (_super) {
400
400
  if (this.isSelected) {
401
401
  var _a = this.getAdornerAnnotationBorders(true, true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
402
402
  var svgString = this.svgStringAdornerTemplate(x1, y1, x2, y2);
403
- var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
404
- this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
403
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgAdornerRoot);
405
404
  }
406
405
  };
407
406
  AxisMarkerAnnotation.prototype.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
@@ -299,12 +299,11 @@ var BoxAnnotation = /** @class */ (function (_super) {
299
299
  }
300
300
  };
301
301
  BoxAnnotation.prototype.updateAdornerInner = function () {
302
- var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
303
302
  this.deleteAdorner();
304
303
  if (this.isSelected) {
305
304
  var _a = this.getAdornerAnnotationBorders(true, true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
306
305
  var svgString = this.svgStringAdornerTemplate(x1, y1, x2, y2);
307
- this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
306
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgAdornerRoot);
308
307
  }
309
308
  };
310
309
  BoxAnnotation.prototype.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
@@ -65,8 +65,7 @@ export declare class CursorTooltipSvgAnnotation extends SvgAnnotationBase {
65
65
  * @inheritDoc
66
66
  */
67
67
  update(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
68
- /** @inheritDoc */
69
- delete(): void;
68
+ clear(): void;
70
69
  /**
71
70
  * @inheritDoc
72
71
  */
@@ -179,7 +179,7 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
179
179
  }
180
180
  this.previousMousePosition = this.cursorModifier.getMousePosition();
181
181
  if (this.svg) {
182
- this.delete();
182
+ this.clear();
183
183
  }
184
184
  this.create(xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans);
185
185
  if (this.placementDivId) {
@@ -190,8 +190,7 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
190
190
  this.updateLegendTooltip();
191
191
  }
192
192
  };
193
- /** @inheritDoc */
194
- CursorTooltipSvgAnnotation.prototype.delete = function () {
193
+ CursorTooltipSvgAnnotation.prototype.clear = function () {
195
194
  if (!this.parentSurface || this.parentSurface.isDeleted || !this.svg)
196
195
  return;
197
196
  if (this.placementDivId) {
@@ -443,12 +443,11 @@ var LineAnnotation = /** @class */ (function (_super) {
443
443
  }
444
444
  };
445
445
  LineAnnotation.prototype.updateAdornerInner = function () {
446
- var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
447
446
  this.deleteAdorner();
448
447
  if (this.isSelected) {
449
448
  var _a = this.getAdornerAnnotationBorders(), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
450
449
  var svgString = this.svgStringAdornerTemplate(x1, y1, x2, y2);
451
- this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
450
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgAdornerRoot);
452
451
  }
453
452
  };
454
453
  LineAnnotation.prototype.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
@@ -543,12 +543,11 @@ var NativeTextAnnotation = /** @class */ (function (_super) {
543
543
  return (0, pointUtil_1.testIsInBounds)(x, y, x1, y2, x2, y1);
544
544
  };
545
545
  NativeTextAnnotation.prototype.updateAdornerInner = function () {
546
- var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
547
546
  this.deleteAdorner();
548
547
  if (this.isSelected) {
549
548
  var _a = this.getAdornerAnnotationBorders(), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
550
549
  var svgString = this.svgStringAdornerTemplate(x1, y1, x2, y2);
551
- this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
550
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgAdornerRoot);
552
551
  }
553
552
  };
554
553
  NativeTextAnnotation.prototype.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
@@ -444,9 +444,8 @@ var OverviewCustomResizableAnnotation = /** @class */ (function (_super) {
444
444
  this.deleteAdorner();
445
445
  if (this.adornerSvgStringTemplate) {
446
446
  var _a = this.getAdornerAnnotationBorders(true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
447
- var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
448
447
  var svgString = this.adornerSvgStringTemplate(x1, y1, x2, y2);
449
- this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
448
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgAdornerRoot);
450
449
  }
451
450
  };
452
451
  OverviewCustomResizableAnnotation.prototype.checkIsClickedOnAnnotationInternal = function (x, y) {
@@ -46,7 +46,7 @@ var RolloverMarkerSvgAnnotation = /** @class */ (function (_super) {
46
46
  /** @inheritDoc */
47
47
  RolloverMarkerSvgAnnotation.prototype.create = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
48
48
  if (this.svg) {
49
- this.delete();
49
+ this.clear();
50
50
  }
51
51
  var _a = this.tooltipProps, tooltipColor = _a.tooltipColor, markerColor = _a.markerColor;
52
52
  var svgString = tooltipSvgTemplate(markerColor !== null && markerColor !== void 0 ? markerColor : tooltipColor);
@@ -38,13 +38,12 @@ export declare class RolloverTooltipSvgAnnotation extends SvgAnnotationBase {
38
38
  */
39
39
  set seriesInfo(value: SeriesInfo);
40
40
  /** @inheritDoc */
41
- delete(): void;
42
- /** @inheritDoc */
43
41
  update(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
44
42
  /**
45
43
  * Updates size of the tooltip
46
44
  */
47
45
  updateSize(width: number, height: number): void;
46
+ protected clear(): void;
48
47
  /** @inheritDoc */
49
48
  protected create(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, xCoordSvgTrans: number, yCoordSvgTrans: number): void;
50
49
  private generateSvgString;
@@ -71,22 +71,6 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
71
71
  configurable: true
72
72
  });
73
73
  /** @inheritDoc */
74
- RolloverTooltipSvgAnnotation.prototype.delete = function () {
75
- var _a, _b, _c, _d;
76
- if (!this.parentSurface || this.parentSurface.isDeleted)
77
- return;
78
- if (this.svg) {
79
- if (this.placementDivId) {
80
- (_b = (_a = this.svg) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.svg);
81
- return;
82
- }
83
- (_c = this.svgRoot) === null || _c === void 0 ? void 0 : _c.removeChild(this.svg);
84
- }
85
- if (this.svgLegend) {
86
- (_d = this.svgLegend.parentNode) === null || _d === void 0 ? void 0 : _d.removeChild(this.svgLegend);
87
- }
88
- };
89
- /** @inheritDoc */
90
74
  RolloverTooltipSvgAnnotation.prototype.update = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
91
75
  var currentMousePosition = this.tooltipProps.rolloverModifier.getMousePosition();
92
76
  if (this.previousMousePosition === currentMousePosition && currentMousePosition !== MousePosition_1.EMousePosition.SeriesArea) {
@@ -94,7 +78,7 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
94
78
  }
95
79
  this.previousMousePosition = this.tooltipProps.rolloverModifier.getMousePosition();
96
80
  if (this.svg) {
97
- this.delete();
81
+ this.clear();
98
82
  }
99
83
  if (this.placementDivId) {
100
84
  this.updateExternalLegendTooltip();
@@ -111,6 +95,21 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
111
95
  this.width = width;
112
96
  this.height = height;
113
97
  };
98
+ RolloverTooltipSvgAnnotation.prototype.clear = function () {
99
+ var _a, _b, _c, _d;
100
+ if (!this.parentSurface || this.parentSurface.isDeleted)
101
+ return;
102
+ if (this.svg) {
103
+ if (this.placementDivId) {
104
+ (_b = (_a = this.svg) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.svg);
105
+ return;
106
+ }
107
+ (_c = this.svgRoot) === null || _c === void 0 ? void 0 : _c.removeChild(this.svg);
108
+ }
109
+ if (this.svgLegend) {
110
+ (_d = this.svgLegend.parentNode) === null || _d === void 0 ? void 0 : _d.removeChild(this.svgLegend);
111
+ }
112
+ };
114
113
  /** @inheritDoc */
115
114
  RolloverTooltipSvgAnnotation.prototype.create = function (xCalc, yCalc, xCoordSvgTrans, yCoordSvgTrans) {
116
115
  var svgString;
@@ -25,6 +25,7 @@ export interface ISvgAnnotationBaseOptions extends IAnnotationBaseOptions {
25
25
  export declare abstract class SvgAnnotationBase extends AnnotationBase {
26
26
  /** @inheritDoc */
27
27
  readonly isSvgAnnotation: boolean;
28
+ isDeleted: boolean;
28
29
  /**
29
30
  * The {@link SVGElement} which will be added to the chart
30
31
  */
@@ -97,6 +98,7 @@ export declare abstract class SvgAnnotationBase extends AnnotationBase {
97
98
  options: Required<Omit<IAnnotationBaseOptions, never>>;
98
99
  };
99
100
  get svg(): SVGElement;
101
+ protected clear(): void;
100
102
  protected checkIsClickedOnAnnotationInternal(x: number, y: number): boolean;
101
103
  protected updateAdornerInner(): void;
102
104
  /**
@@ -39,6 +39,7 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
39
39
  _this = _super.call(this, options) || this;
40
40
  /** @inheritDoc */
41
41
  _this.isSvgAnnotation = true;
42
+ _this.isDeleted = false;
42
43
  /**
43
44
  * The {@link SVGElement} which will be added to the chart
44
45
  */
@@ -253,10 +254,8 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
253
254
  };
254
255
  /** @inheritDoc */
255
256
  SvgAnnotationBase.prototype.delete = function () {
256
- if (!this.parentSurface || this.parentSurface.isDeleted || !this.svg)
257
- return;
258
- this.svgRoot.removeChild(this.svg);
259
- this.setSvg(undefined);
257
+ this.clear();
258
+ this.isDeleted = true;
260
259
  };
261
260
  SvgAnnotationBase.prototype.toJSON = function () {
262
261
  var json = _super.prototype.toJSON.call(this);
@@ -276,6 +275,12 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
276
275
  enumerable: false,
277
276
  configurable: true
278
277
  });
278
+ SvgAnnotationBase.prototype.clear = function () {
279
+ if (!this.parentSurface || this.parentSurface.isDeleted || !this.svg)
280
+ return;
281
+ this.svgRoot.removeChild(this.svg);
282
+ this.setSvg(undefined);
283
+ };
279
284
  SvgAnnotationBase.prototype.checkIsClickedOnAnnotationInternal = function (x, y) {
280
285
  var _a = this.getAnnotationBorders(true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
281
286
  // For SVG annotations we need to use not scaled coordinates
@@ -284,12 +289,11 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
284
289
  return (0, pointUtil_1.testIsInBounds)(notScaledX, notScaledY, x1, y2, x2, y1);
285
290
  };
286
291
  SvgAnnotationBase.prototype.updateAdornerInner = function () {
287
- var _a = this.getAdornerAnnotationBorders(true, true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
288
- var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
289
292
  this.deleteAdorner();
290
293
  if (this.isSelected) {
294
+ var _a = this.getAdornerAnnotationBorders(true, true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
291
295
  var svgString = this.svgStringAdornerTemplate(x1, y1, x2, y2);
292
- this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
296
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgAdornerRoot);
293
297
  }
294
298
  };
295
299
  Object.defineProperty(SvgAnnotationBase.prototype, "svgRoot", {
@@ -161,6 +161,10 @@ export interface IAxisBase2dOptions extends IAxisCoreOptions {
161
161
  * You may want to set this false if you have stacked horizontal axes, or are using {@link offsetOverride}.
162
162
  */
163
163
  clipToXRange?: boolean;
164
+ /**
165
+ * Sets whether the gridlines and axis labels keep their initial position when the visible range changes.
166
+ */
167
+ isStaticAxis?: boolean;
164
168
  }
165
169
  /**
166
170
  * The base class for 2D Chart Axis within SciChart - High Performance {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}.
@@ -338,6 +342,14 @@ export declare abstract class AxisBase2D extends AxisCore implements IThemeable
338
342
  * You may want to set this false if you have stacked horizontal axes, or are using {@link offsetOverride}.
339
343
  */
340
344
  set clipToXRange(clipToXRange: boolean);
345
+ /**
346
+ * Gets whether the gridlines and axis labels keep their initial position when the visible range changes.
347
+ */
348
+ get isStaticAxis(): boolean;
349
+ /**
350
+ * Sets whether the gridlines and axis labels keep their initial position when the visible range changes.
351
+ */
352
+ set isStaticAxis(value: boolean);
341
353
  abstract type: EAxisType.CategoryAxis | EAxisType.LogarithmicAxis | EAxisType.NumericAxis | EAxisType.DateTimeNumericAxis;
342
354
  /**
343
355
  * Gets the parent {@link SciChartSurface} that this axis is attached to
@@ -386,6 +398,7 @@ export declare abstract class AxisBase2D extends AxisCore implements IThemeable
386
398
  private backgroundColorProperty;
387
399
  private dpiAdjustedLabelStyleCache;
388
400
  private clipToXRangeProperty;
401
+ private isStaticAxisProperty;
389
402
  /**
390
403
  * Creates an instance of the {@link AxisBase2D}
391
404
  * @param webAssemblyContext The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and
@@ -523,7 +536,7 @@ export declare abstract class AxisBase2D extends AxisCore implements IThemeable
523
536
  */
524
537
  protected notifyPropertyChanged(propertyName: string): void;
525
538
  protected getMaxXRange(): NumberRange;
526
- protected getAxisSize(): number;
539
+ getAxisSize(): number;
527
540
  private getMajorTickIndex;
528
541
  private getTicks;
529
542
  private getTicksWithCoords;