scichart 3.2.491 → 3.2.509

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 (55) 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/CursorTooltipSvgAnnotation.d.ts +1 -2
  13. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +2 -3
  14. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +1 -1
  15. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +1 -2
  16. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +16 -17
  17. package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +2 -0
  18. package/Charting/Visuals/Annotations/SvgAnnotationBase.js +9 -4
  19. package/Charting/Visuals/Axis/AxisBase2D.d.ts +14 -1
  20. package/Charting/Visuals/Axis/AxisBase2D.js +51 -19
  21. package/Charting/Visuals/Axis/AxisCore.d.ts +1 -1
  22. package/Charting/Visuals/Axis/DeltaCalculator/LogarithmicDeltaCalculator.d.ts +1 -0
  23. package/Charting/Visuals/Axis/DeltaCalculator/LogarithmicDeltaCalculator.js +13 -4
  24. package/Charting/Visuals/Axis/LogarithmicAxis.d.ts +6 -1
  25. package/Charting/Visuals/Axis/LogarithmicAxis.js +27 -10
  26. package/Charting/Visuals/Axis/constants.d.ts +2 -1
  27. package/Charting/Visuals/Axis/constants.js +1 -0
  28. package/Charting/Visuals/Helpers/createPen.js +8 -0
  29. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +7 -0
  30. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +41 -16
  31. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +1 -1
  32. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +5 -0
  33. package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.js +7 -2
  34. package/Charting/Visuals/RenderableSeries/constants.d.ts +2 -1
  35. package/Charting/Visuals/RenderableSeries/constants.js +1 -0
  36. package/Charting/Visuals/SciChartOverview.js +3 -2
  37. package/Charting/Visuals/SciChartPieSurface/IPieSurfaceOptions.d.ts +1 -0
  38. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +9 -8
  39. package/Charting/Visuals/SciChartSurfaceBase.js +5 -1
  40. package/Charting3D/Visuals/Axis/AxisBase3D.d.ts +1 -1
  41. package/Core/BuildStamp.d.ts +1 -1
  42. package/Core/BuildStamp.js +2 -2
  43. package/README.md +6 -1
  44. package/_wasm/scichart.browser.js +1 -1
  45. package/_wasm/scichart2d.js +1 -1
  46. package/_wasm/scichart2d.wasm +0 -0
  47. package/_wasm/scichart3d.js +1 -1
  48. package/_wasm/scichart3d.wasm +0 -0
  49. package/index.d.ts +1 -0
  50. package/index.dev.js +305 -103
  51. package/index.js +13 -11
  52. package/index.min.js +1 -1
  53. package/package.json +1 -1
  54. package/types/TSciChart.d.ts +18 -17
  55. 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
  }
@@ -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) {
@@ -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
@@ -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;
@@ -43,6 +43,7 @@ var Pen2DCache_1 = require("../../Drawing/Pen2DCache");
43
43
  var SolidBrushCache_1 = require("../../Drawing/SolidBrushCache");
44
44
  var WebGlRenderContext2D_1 = require("../../Drawing/WebGlRenderContext2D");
45
45
  var DefaultTickCoordinatesProvider_1 = require("../../Numerics/TickCoordinateProviders/DefaultTickCoordinatesProvider");
46
+ var StaticTickCoordinatesProvider_1 = require("../../Numerics/TickCoordinateProviders/StaticTickCoordinatesProvider");
46
47
  var createNativeRect_1 = require("../Helpers/createNativeRect");
47
48
  var drawBorder_1 = require("../Helpers/drawBorder");
48
49
  var NativeObject_1 = require("../Helpers/NativeObject");
@@ -102,7 +103,7 @@ var AxisBase2D = /** @class */ (function (_super) {
102
103
  */
103
104
  function AxisBase2D(webAssemblyContext, options) {
104
105
  var _this = this;
105
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
106
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
106
107
  _this = _super.call(this, options) || this;
107
108
  /**
108
109
  * Gets the {@link AxisLayoutState} class which manages layout
@@ -142,6 +143,7 @@ var AxisBase2D = /** @class */ (function (_super) {
142
143
  _this.offsetOverrideProperty = undefined;
143
144
  _this.tickCache = undefined;
144
145
  _this.clipToXRangeProperty = true;
146
+ _this.isStaticAxisProperty = false;
145
147
  _this.webAssemblyContext2D = webAssemblyContext;
146
148
  _this.penCacheForMajorGridLines = new Pen2DCache_1.Pen2DCache(webAssemblyContext);
147
149
  _this.penCacheForMinorGridLines = new Pen2DCache_1.Pen2DCache(webAssemblyContext);
@@ -156,16 +158,18 @@ var AxisBase2D = /** @class */ (function (_super) {
156
158
  (_b = options === null || options === void 0 ? void 0 : options.hideOverlappingLabels) !== null && _b !== void 0 ? _b : _this.axisRenderer.hideOverlappingLabels;
157
159
  _this.axisRenderer.axisThickness = (_c = options === null || options === void 0 ? void 0 : options.axisThickness) !== null && _c !== void 0 ? _c : _this.axisRenderer.axisThickness;
158
160
  _this.axisTitleRenderer = new AxisTitleRenderer_1.AxisTitleRenderer(webAssemblyContext);
159
- _this.tickCoordinatesProvider = new DefaultTickCoordinatesProvider_1.DefaultTickCoordinatesProvider();
160
- _this.visibleRangeLimit = (_d = options === null || options === void 0 ? void 0 : options.visibleRangeLimit) !== null && _d !== void 0 ? _d : _this.visibleRangeLimit;
161
- _this.visibleRangeSizeLimit = (_e = options === null || options === void 0 ? void 0 : options.visibleRangeSizeLimit) !== null && _e !== void 0 ? _e : _this.visibleRangeSizeLimit;
161
+ _this.isStaticAxis = (_d = options === null || options === void 0 ? void 0 : options.isStaticAxis) !== null && _d !== void 0 ? _d : _this.isStaticAxisProperty;
162
+ // setting isStaticAxis sets the tickCoordinatesProvider
163
+ //this.tickCoordinatesProvider = new DefaultTickCoordinatesProvider();
164
+ _this.visibleRangeLimit = (_e = options === null || options === void 0 ? void 0 : options.visibleRangeLimit) !== null && _e !== void 0 ? _e : _this.visibleRangeLimit;
165
+ _this.visibleRangeSizeLimit = (_f = options === null || options === void 0 ? void 0 : options.visibleRangeSizeLimit) !== null && _f !== void 0 ? _f : _this.visibleRangeSizeLimit;
162
166
  _this.zoomExtentsRange = (options === null || options === void 0 ? void 0 : options.zoomExtentsToInitialRange) ? _this.visibleRange : options === null || options === void 0 ? void 0 : options.zoomExtentsRange;
163
- _this.axisAlignment = (_f = options === null || options === void 0 ? void 0 : options.axisAlignment) !== null && _f !== void 0 ? _f : _this.axisAlignment;
164
- _this.axisTitle = (_g = options === null || options === void 0 ? void 0 : options.axisTitle) !== null && _g !== void 0 ? _g : _this.axisTitle;
167
+ _this.axisAlignment = (_g = options === null || options === void 0 ? void 0 : options.axisAlignment) !== null && _g !== void 0 ? _g : _this.axisAlignment;
168
+ _this.axisTitle = (_h = options === null || options === void 0 ? void 0 : options.axisTitle) !== null && _h !== void 0 ? _h : _this.axisTitle;
165
169
  _this.labelStyle = _this.getlabelStyleProxy(__assign(__assign({}, _this.labelStyle), options === null || options === void 0 ? void 0 : options.labelStyle));
166
170
  _this.axisBorder = __assign(__assign({}, _this.axisBorder), options === null || options === void 0 ? void 0 : options.axisBorder);
167
- _this.isInnerAxis = (_h = options === null || options === void 0 ? void 0 : options.isInnerAxis) !== null && _h !== void 0 ? _h : _this.isInnerAxis;
168
- _this.stackedAxisLength = (_j = options === null || options === void 0 ? void 0 : options.stackedAxisLength) !== null && _j !== void 0 ? _j : _this.stackedAxisLength;
171
+ _this.isInnerAxis = (_j = options === null || options === void 0 ? void 0 : options.isInnerAxis) !== null && _j !== void 0 ? _j : _this.isInnerAxis;
172
+ _this.stackedAxisLength = (_k = options === null || options === void 0 ? void 0 : options.stackedAxisLength) !== null && _k !== void 0 ? _k : _this.stackedAxisLength;
169
173
  _this.solidBrushCacheBorder = new SolidBrushCache_1.SolidBrushCache(webAssemblyContext);
170
174
  if (options === null || options === void 0 ? void 0 : options.labelProvider) {
171
175
  if (!("getLabels" in (options === null || options === void 0 ? void 0 : options.labelProvider))) {
@@ -173,9 +177,9 @@ var AxisBase2D = /** @class */ (function (_super) {
173
177
  }
174
178
  }
175
179
  _this.autoRangeAnimationProperty = options === null || options === void 0 ? void 0 : options.autoRangeAnimation;
176
- _this.backgroundColor = (_k = options === null || options === void 0 ? void 0 : options.backgroundColor) !== null && _k !== void 0 ? _k : _this.backgroundColor;
180
+ _this.backgroundColor = (_l = options === null || options === void 0 ? void 0 : options.backgroundColor) !== null && _l !== void 0 ? _l : _this.backgroundColor;
177
181
  _this.offsetOverrideProperty = options === null || options === void 0 ? void 0 : options.overrideOffset; // undefined if not set
178
- _this.clipToXRangeProperty = (_l = options === null || options === void 0 ? void 0 : options.clipToXRange) !== null && _l !== void 0 ? _l : _this.clipToXRange;
182
+ _this.clipToXRangeProperty = (_m = options === null || options === void 0 ? void 0 : options.clipToXRange) !== null && _m !== void 0 ? _m : _this.clipToXRange;
179
183
  return _this;
180
184
  }
181
185
  Object.defineProperty(AxisBase2D.prototype, "labelProvider", {
@@ -595,6 +599,28 @@ var AxisBase2D = /** @class */ (function (_super) {
595
599
  enumerable: false,
596
600
  configurable: true
597
601
  });
602
+ Object.defineProperty(AxisBase2D.prototype, "isStaticAxis", {
603
+ /**
604
+ * Gets whether the gridlines and axis labels keep their initial position when the visible range changes.
605
+ */
606
+ get: function () {
607
+ return this.isStaticAxisProperty;
608
+ },
609
+ /**
610
+ * Sets whether the gridlines and axis labels keep their initial position when the visible range changes.
611
+ */
612
+ set: function (value) {
613
+ this.isStaticAxisProperty = value;
614
+ if (value) {
615
+ this.tickCoordinatesProvider = new StaticTickCoordinatesProvider_1.StaticTickCoordinatesProvider();
616
+ }
617
+ else {
618
+ this.tickCoordinatesProvider = new DefaultTickCoordinatesProvider_1.DefaultTickCoordinatesProvider();
619
+ }
620
+ },
621
+ enumerable: false,
622
+ configurable: true
623
+ });
598
624
  /** @inheritDoc */
599
625
  AxisBase2D.prototype.applyTheme = function (themeProvider) {
600
626
  var previousThemeProvider = this.parentSurface.previousThemeProvider;
@@ -1011,7 +1037,8 @@ var AxisBase2D = /** @class */ (function (_super) {
1011
1037
  // @ts-ignore
1012
1038
  labelProvider: this.labelProvider.toJSON(),
1013
1039
  keepLabelsWithinAxis: this.axisRenderer.keepLabelsWithinAxis,
1014
- clipToXRange: this.clipToXRange
1040
+ clipToXRange: this.clipToXRange,
1041
+ isStaticAxis: this.isStaticAxis
1015
1042
  };
1016
1043
  return { type: this.type, options: options };
1017
1044
  };
@@ -1207,13 +1234,15 @@ var AxisBase2D = /** @class */ (function (_super) {
1207
1234
  this.minorDeltaProperty = delta.min;
1208
1235
  this.majorDeltaProperty = delta.max;
1209
1236
  }
1237
+ // See if tickCoordinatesProvider has cached ticks (if isStaticAxis)
1238
+ var _c = this.tickCoordinatesProvider.getTickCoordinates(undefined, undefined), majorTickCoords = _c.majorTickCoords, minorTickCoords = _c.minorTickCoords, majorTickOverrides = _c.majorTickOverrides, minorTickOverRides = _c.minorTickOverRides;
1210
1239
  var majorTicks = this.drawLabels || this.drawMajorGridLines || this.drawMajorTickLines
1211
- ? this.tickProvider.getMajorTicks((_a = this.minorDeltaProperty) !== null && _a !== void 0 ? _a : this.majorDeltaProperty / this.minorsPerMajor, this.majorDeltaProperty, this.visibleRange)
1240
+ ? majorTickOverrides !== null && majorTickOverrides !== void 0 ? majorTickOverrides : this.tickProvider.getMajorTicks((_a = this.minorDeltaProperty) !== null && _a !== void 0 ? _a : this.majorDeltaProperty / this.minorsPerMajor, this.majorDeltaProperty, this.visibleRange)
1212
1241
  : [];
1213
1242
  var minorTicks = this.drawMinorGridLines || this.drawMinorTickLines
1214
- ? this.tickProvider.getMinorTicks((_b = this.minorDeltaProperty) !== null && _b !== void 0 ? _b : this.majorDeltaProperty / this.minorsPerMajor, this.majorDeltaProperty, this.visibleRange)
1243
+ ? minorTickOverRides !== null && minorTickOverRides !== void 0 ? minorTickOverRides : this.tickProvider.getMinorTicks((_b = this.minorDeltaProperty) !== null && _b !== void 0 ? _b : this.majorDeltaProperty / this.minorsPerMajor, this.majorDeltaProperty, this.visibleRange)
1215
1244
  : [];
1216
- var _c = this.visibleRange, min_1 = _c.min, max_1 = _c.max;
1245
+ var _d = this.visibleRange, min_1 = _d.min, max_1 = _d.max;
1217
1246
  majorTicks = majorTicks.filter(function (t) { return t >= min_1 && t <= max_1; });
1218
1247
  minorTicks = minorTicks.filter(function (t) { return t >= min_1 && t <= max_1; });
1219
1248
  var majorTickLabels = [];
@@ -1226,9 +1255,9 @@ var AxisBase2D = /** @class */ (function (_super) {
1226
1255
  this.tickCache = {
1227
1256
  majorTicks: majorTicks,
1228
1257
  majorTickLabels: majorTickLabels,
1229
- majorTickCoords: null,
1258
+ majorTickCoords: majorTickCoords,
1230
1259
  minorTicks: minorTicks,
1231
- minorTickCoords: null
1260
+ minorTickCoords: minorTickCoords // probably undefined unless isStaticAxis
1232
1261
  };
1233
1262
  }
1234
1263
  return this.tickCache;
@@ -1237,9 +1266,12 @@ var AxisBase2D = /** @class */ (function (_super) {
1237
1266
  if (!this.tickCache) {
1238
1267
  this.getTicks(true);
1239
1268
  }
1240
- var _a = this.tickCoordinatesProvider.getTickCoordinates(this.tickCache.majorTicks, this.tickCache.minorTicks), majorTickCoords = _a.majorTickCoords, minorTickCoords = _a.minorTickCoords;
1241
- this.tickCache.majorTickCoords = majorTickCoords;
1242
- this.tickCache.minorTickCoords = minorTickCoords;
1269
+ if (this.tickCache.majorTickCoords === undefined) {
1270
+ var _a = this.tickCoordinatesProvider.getTickCoordinates(this.tickCache.majorTicks, this.tickCache.minorTicks), majorTickCoords = _a.majorTickCoords, minorTickCoords = _a.minorTickCoords;
1271
+ // tick values are never overridden at this point. If they could be, it would have been done in the call from measure.
1272
+ this.tickCache.majorTickCoords = majorTickCoords;
1273
+ this.tickCache.minorTickCoords = minorTickCoords;
1274
+ }
1243
1275
  return this.tickCache;
1244
1276
  };
1245
1277
  AxisBase2D.prototype.applyVisibleRangeLimit = function (visibleRange) {
@@ -784,7 +784,7 @@ export declare abstract class AxisCore extends DeletableEntity implements IAxisP
784
784
  /**
785
785
  * Gets the long dimension of the axis, in pixels
786
786
  */
787
- protected abstract getAxisSize(): number;
787
+ abstract getAxisSize(): number;
788
788
  /**
789
789
  * SET INTERNALLY. Sets whether this axis is an XAxis or not
790
790
  * @remarks