scichart 2.0.2186 → 2.0.2228

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 (68) hide show
  1. package/Charting/ChartModifiers/CursorModifier.d.ts +13 -1
  2. package/Charting/ChartModifiers/CursorModifier.js +14 -1
  3. package/Charting/ChartModifiers/RolloverModifier.d.ts +25 -0
  4. package/Charting/ChartModifiers/RolloverModifier.js +8 -0
  5. package/Charting/Drawing/BrushCache.d.ts +8 -2
  6. package/Charting/Drawing/BrushCache.js +16 -8
  7. package/Charting/LayoutManager/BaseAxisLayoutStrategy.d.ts +2 -0
  8. package/Charting/LayoutManager/BaseAxisLayoutStrategy.js +33 -0
  9. package/Charting/LayoutManager/BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +18 -2
  10. package/Charting/LayoutManager/LeftAlignedOuterVerticallyStackedAxisLayoutStrategy.js +19 -2
  11. package/Charting/LayoutManager/RightAlignedOuterVerticallyStackedAxisLayoutStrategy.js +18 -2
  12. package/Charting/LayoutManager/TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +18 -2
  13. package/Charting/Model/OhlcDataSeries.js +10 -10
  14. package/Charting/Model/XyDataSeries.js +4 -4
  15. package/Charting/Model/XyyDataSeries.js +6 -6
  16. package/Charting/Model/XyzDataSeries.js +6 -6
  17. package/Charting/Services/SciChartRenderer.js +3 -1
  18. package/Charting/Services/Workers/TextureWorker.js +5 -1
  19. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +1 -1
  20. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +1 -0
  21. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +6 -0
  22. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.d.ts +5 -0
  23. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +12 -1
  24. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +6 -8
  25. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +12 -9
  26. package/Charting/Visuals/Annotations/SvgAnnotationBase.js +7 -2
  27. package/Charting/Visuals/Axis/AxisBase2D.d.ts +23 -0
  28. package/Charting/Visuals/Axis/AxisBase2D.js +71 -24
  29. package/Charting/Visuals/Axis/AxisRenderer.js +31 -4
  30. package/Charting/Visuals/Axis/LabelProvider/LabelCache.js +2 -2
  31. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +9 -4
  32. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +2 -1
  33. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +10 -3
  34. package/Charting/Visuals/SciChartSurface.d.ts +4 -4
  35. package/Charting/Visuals/SciChartSurface.js +18 -13
  36. package/Charting/Visuals/SciChartSurfaceBase.d.ts +3 -2
  37. package/Charting/Visuals/SciChartSurfaceBase.js +4 -4
  38. package/Charting/Visuals/createMaster.d.ts +1 -1
  39. package/Charting/Visuals/createMaster.js +36 -15
  40. package/Charting/Visuals/createSingle.d.ts +1 -1
  41. package/Charting/Visuals/createSingle.js +11 -4
  42. package/Charting/Visuals/licenseManager2D.js +5 -1
  43. package/Charting/Visuals/sciChartInitCommon.d.ts +2 -2
  44. package/Charting/Visuals/sciChartInitCommon.js +18 -12
  45. package/Charting3D/Visuals/SciChart3DSurface.d.ts +2 -2
  46. package/Charting3D/Visuals/SciChart3DSurface.js +3 -3
  47. package/Charting3D/Visuals/createMaster3d.d.ts +1 -1
  48. package/Charting3D/Visuals/createMaster3d.js +42 -19
  49. package/Charting3D/Visuals/createSingle3d.d.ts +1 -1
  50. package/Charting3D/Visuals/createSingle3d.js +12 -5
  51. package/Core/BuildStamp.d.ts +4 -0
  52. package/Core/BuildStamp.js +23 -0
  53. package/Core/NumberRange.d.ts +1 -0
  54. package/Core/NumberRange.js +8 -0
  55. package/_wasm/scichart.browser.js +1 -1
  56. package/_wasm/scichart2d.js +10 -10
  57. package/_wasm/scichart2d.wasm +0 -0
  58. package/_wasm/scichart3d.js +12 -12
  59. package/_wasm/scichart3d.wasm +0 -0
  60. package/package.json +1 -1
  61. package/types/NumberArray.d.ts +1 -0
  62. package/types/NumberArray.js +5 -1
  63. package/types/TSciChart.d.ts +1 -0
  64. package/types/TSciChart3D.d.ts +1 -0
  65. package/types/TStackedAxisLength.d.ts +4 -0
  66. package/types/TStackedAxisLength.js +4 -0
  67. package/utils/performance.d.ts +5 -0
  68. package/utils/performance.js +11 -0
@@ -1,6 +1,7 @@
1
1
  import { IIncludeSeries } from "../../Core/IIncludeSeries";
2
2
  import { Point } from "../../Core/Point";
3
3
  import { EChart2DModifierType } from "../../types/ChartModifierType";
4
+ import { EMousePosition } from "../../types/MousePosition";
4
5
  import { SeriesInfo } from "../Model/ChartData/SeriesInfo";
5
6
  import { IThemeProvider } from "../Themes/IThemeProvider";
6
7
  import { CursorTooltipSvgAnnotation } from "../Visuals/Annotations/CursorTooltipSvgAnnotation";
@@ -117,7 +118,10 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
117
118
  private tooltipDataTemplateProperty?;
118
119
  private includedSeriesMap;
119
120
  /**
120
- * Creates an instance of the RolloverModifier
121
+ * Creates an instance of the CursorModifier
122
+ *
123
+ * If number of renderable series is more then 10 and showTooltip enabled consider passing {@link TCursorTooltipDataTemplate} or {@link TCursorTooltipSvgTemplate} to reduce the output for the tooltip
124
+ *
121
125
  * @param options Optional parameters {@link ICursorModifierOptions} used to configure the modifier
122
126
  */
123
127
  constructor(options?: ICursorModifierOptions);
@@ -173,6 +177,9 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
173
177
  * @inheritDoc
174
178
  */
175
179
  getIncludedRenderableSeries(): IRenderableSeries[];
180
+ /**
181
+ * Gets or sets the tooltipDataTemplate, which allows to customize content for the tooltip
182
+ */
176
183
  get tooltipDataTemplate(): TCursorTooltipDataTemplate;
177
184
  set tooltipDataTemplate(value: TCursorTooltipDataTemplate);
178
185
  /**
@@ -181,6 +188,11 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
181
188
  * @param mousePoint
182
189
  */
183
190
  hitTestRenderableSeries(rs: IRenderableSeries, mousePoint: Point): HitTestInfo;
191
+ /**
192
+ * Returns current mouse position
193
+ */
194
+ getMousePosition(): EMousePosition;
195
+ /** @inheritDoc */
184
196
  toJSON(): {
185
197
  type: string;
186
198
  options: Required<Omit<IChartModifierBaseOptions, never>>;
@@ -44,7 +44,10 @@ var constants_1 = require("./constants");
44
44
  var CursorModifier = /** @class */ (function (_super) {
45
45
  __extends(CursorModifier, _super);
46
46
  /**
47
- * Creates an instance of the RolloverModifier
47
+ * Creates an instance of the CursorModifier
48
+ *
49
+ * If number of renderable series is more then 10 and showTooltip enabled consider passing {@link TCursorTooltipDataTemplate} or {@link TCursorTooltipSvgTemplate} to reduce the output for the tooltip
50
+ *
48
51
  * @param options Optional parameters {@link ICursorModifierOptions} used to configure the modifier
49
52
  */
50
53
  function CursorModifier(options) {
@@ -297,6 +300,9 @@ var CursorModifier = /** @class */ (function (_super) {
297
300
  return allSeries;
298
301
  };
299
302
  Object.defineProperty(CursorModifier.prototype, "tooltipDataTemplate", {
303
+ /**
304
+ * Gets or sets the tooltipDataTemplate, which allows to customize content for the tooltip
305
+ */
300
306
  get: function () {
301
307
  return this.tooltipDataTemplateProperty;
302
308
  },
@@ -318,6 +324,13 @@ var CursorModifier = /** @class */ (function (_super) {
318
324
  }
319
325
  return rs.hitTestProvider.hitTestXSlice(mousePoint.x, mousePoint.y);
320
326
  };
327
+ /**
328
+ * Returns current mouse position
329
+ */
330
+ CursorModifier.prototype.getMousePosition = function () {
331
+ return this.mousePosition;
332
+ };
333
+ /** @inheritDoc */
321
334
  CursorModifier.prototype.toJSON = function () {
322
335
  var json = _super.prototype.toJSON.call(this);
323
336
  var options = {
@@ -51,6 +51,24 @@ export declare type TTooltipProps = {
51
51
  height: number;
52
52
  seriesInfo: SeriesInfo;
53
53
  };
54
+ /**
55
+ * @ignore
56
+ * Defines the MousePosition enum constants, used by the {@link RolloverModifier}
57
+ */
58
+ declare enum EMousePosition {
59
+ /**
60
+ * The mouse position is outside the main canvas
61
+ */
62
+ OutOfCanvas = "OutOfCanvas",
63
+ /**
64
+ * The mouse position is in the Axis area
65
+ */
66
+ AxisArea = "AxisArea",
67
+ /**
68
+ * The mouse position is in the Series area
69
+ */
70
+ SeriesArea = "SeriesArea"
71
+ }
54
72
  /**
55
73
  * Optional parameters used to configure a {@link RolloverModifier} at construct time
56
74
  */
@@ -173,10 +191,16 @@ export declare class RolloverModifier extends ChartModifierBase2D implements IIn
173
191
  * @param mousePoint
174
192
  */
175
193
  hitTestRenderableSeries(rs: IRenderableSeries, mousePoint: Point): HitTestInfo;
194
+ /**
195
+ * Returns current mouse position
196
+ */
197
+ getMousePosition(): EMousePosition;
198
+ /** @inheritDoc */
176
199
  toJSON(): {
177
200
  type: string;
178
201
  options: Required<Omit<IChartModifierBaseOptions, never>>;
179
202
  };
203
+ /** @inheritDoc */
180
204
  protected notifyPropertyChanged(propertyName: string): void;
181
205
  private isVerticalChart;
182
206
  private removeSeriesAnnotationsFromParentSurface;
@@ -224,3 +248,4 @@ export declare const calcTooltipProps: (index: number, rs: IRenderableSeries, ro
224
248
  * @param pixelRatio
225
249
  */
226
250
  export declare const calcTooltipPositions: (tooltipArray: TTooltipProps[], allowTooltipOverlapping: boolean, tooltipPaddingTop: number, seriesViewRect: Rect, pixelRatio: number) => TTooltipProps[];
251
+ export {};
@@ -346,6 +346,13 @@ var RolloverModifier = /** @class */ (function (_super) {
346
346
  }
347
347
  return rs.hitTestProvider.hitTestXSlice(mousePoint.x, mousePoint.y);
348
348
  };
349
+ /**
350
+ * Returns current mouse position
351
+ */
352
+ RolloverModifier.prototype.getMousePosition = function () {
353
+ return this.mousePosition;
354
+ };
355
+ /** @inheritDoc */
349
356
  RolloverModifier.prototype.toJSON = function () {
350
357
  var json = _super.prototype.toJSON.call(this);
351
358
  var options = {
@@ -361,6 +368,7 @@ var RolloverModifier = /** @class */ (function (_super) {
361
368
  Object.assign(json.options, options);
362
369
  return json;
363
370
  };
371
+ /** @inheritDoc */
364
372
  RolloverModifier.prototype.notifyPropertyChanged = function (propertyName) {
365
373
  _super.prototype.notifyPropertyChanged.call(this, propertyName);
366
374
  if (propertyName === constants_1.PROPERTY.X_AXIS_ID) {
@@ -10,14 +10,18 @@ export declare class BrushCache extends BaseCache<WebGlBrush> {
10
10
  private opacity;
11
11
  private fillLinearGradient;
12
12
  private canvasTexture;
13
+ private textureHeightRatio;
14
+ private textureWidthRatio;
13
15
  get value(): WebGlBrush;
14
16
  /**
15
17
  * Creates or fetches a new brush with the specified params
16
18
  * @param fill
17
19
  * @param opacity
20
+ * @param textureHeightRatio
21
+ * @param textureWidthRatio
18
22
  * @param fillLinearGradient
19
23
  */
20
- create(fill: string, opacity: number, fillLinearGradient?: GradientParams): WebGlBrush;
24
+ create(fill: string, opacity: number, textureHeightRatio?: number, textureWidthRatio?: number, fillLinearGradient?: GradientParams): WebGlBrush;
21
25
  invalidateCache(): void;
22
26
  reset(): void;
23
27
  delete(): void;
@@ -43,7 +47,9 @@ export declare const getScrtBrushFromCache: (cache: BrushCache) => SCRTBrush;
43
47
  * @param cache The object that will store a brush
44
48
  * @param fill The HTML Color code
45
49
  * @param opacity The opacity factor.
50
+ * @param textureHeightRatio The height ratio of the main canvas to the WebGl canvas.
51
+ * @param textureWidthRatio The width ratio of the main canvas to the WebGl canvas.
46
52
  * @param fillGradientLinear The gradient params.
47
53
  * @returns new or existing instance of {@link SCRTBrush}}
48
54
  */
49
- export declare const createBrushInCache: (cache: BrushCache, fill: string, opacity: number, fillGradientLinear?: GradientParams) => SCRTBrush;
55
+ export declare const createBrushInCache: (cache: BrushCache, fill: string, opacity: number, textureHeightRatio?: number, textureWidthRatio?: number, fillGradientLinear?: GradientParams) => SCRTBrush;
@@ -35,7 +35,7 @@ var BrushCache = /** @class */ (function (_super) {
35
35
  Object.defineProperty(BrushCache.prototype, "value", {
36
36
  get: function () {
37
37
  if (!this.cachedEntity && (this.fill || this.fillLinearGradient)) {
38
- this.cachedEntity = this.create(this.fill, this.opacity, this.fillLinearGradient);
38
+ this.cachedEntity = this.create(this.fill, this.opacity, this.textureHeightRatio, this.textureWidthRatio, this.fillLinearGradient);
39
39
  }
40
40
  return this.cachedEntity;
41
41
  },
@@ -46,18 +46,24 @@ var BrushCache = /** @class */ (function (_super) {
46
46
  * Creates or fetches a new brush with the specified params
47
47
  * @param fill
48
48
  * @param opacity
49
+ * @param textureHeightRatio
50
+ * @param textureWidthRatio
49
51
  * @param fillLinearGradient
50
52
  */
51
- BrushCache.prototype.create = function (fill, opacity, fillLinearGradient) {
53
+ BrushCache.prototype.create = function (fill, opacity, textureHeightRatio, textureWidthRatio, fillLinearGradient) {
52
54
  if (this.cachedEntity &&
53
55
  fill === this.fill &&
54
56
  opacity === this.opacity &&
57
+ textureHeightRatio === this.textureHeightRatio &&
58
+ textureWidthRatio === this.textureWidthRatio &&
55
59
  fillLinearGradient === this.fillLinearGradient) {
56
60
  return this.cachedEntity;
57
61
  }
58
62
  this.invalidateCache();
59
63
  this.fill = fill;
60
64
  this.opacity = opacity;
65
+ this.textureHeightRatio = textureHeightRatio;
66
+ this.textureWidthRatio = textureWidthRatio;
61
67
  this.fillLinearGradient = fillLinearGradient;
62
68
  var brush = fillLinearGradient ? this.createGradientBrush() : this.createSolidBrush(fill, opacity);
63
69
  return (this.cachedEntity = new WebGlBrush_1.WebGlBrush(brush));
@@ -89,10 +95,10 @@ var BrushCache = /** @class */ (function (_super) {
89
95
  this.canvasTexture.clear();
90
96
  var ctx = this.canvasTexture.getContext();
91
97
  // BEGIN: Drawing gradient rectangle on canvas2D
92
- var x1 = convertRelativeToAbsolute(startPoint.x, TEXTURE_SIZE);
93
- var y1 = convertRelativeToAbsolute(startPoint.y, TEXTURE_SIZE);
94
- var x2 = convertRelativeToAbsolute(endPoint.x, TEXTURE_SIZE);
95
- var y2 = convertRelativeToAbsolute(endPoint.y, TEXTURE_SIZE);
98
+ var x1 = convertRelativeToAbsolute(startPoint.x, TEXTURE_SIZE * this.textureWidthRatio);
99
+ var y1 = convertRelativeToAbsolute(startPoint.y, TEXTURE_SIZE * this.textureHeightRatio);
100
+ var x2 = convertRelativeToAbsolute(endPoint.x, TEXTURE_SIZE * this.textureWidthRatio);
101
+ var y2 = convertRelativeToAbsolute(endPoint.y, TEXTURE_SIZE * this.textureHeightRatio);
96
102
  var gradient = ctx.createLinearGradient(x1, y1, x2, y2);
97
103
  gradientStops.forEach(function (el) {
98
104
  gradient.addColorStop(el.offset, el.color);
@@ -133,12 +139,14 @@ exports.getScrtBrushFromCache = getScrtBrushFromCache;
133
139
  * @param cache The object that will store a brush
134
140
  * @param fill The HTML Color code
135
141
  * @param opacity The opacity factor.
142
+ * @param textureHeightRatio The height ratio of the main canvas to the WebGl canvas.
143
+ * @param textureWidthRatio The width ratio of the main canvas to the WebGl canvas.
136
144
  * @param fillGradientLinear The gradient params.
137
145
  * @returns new or existing instance of {@link SCRTBrush}}
138
146
  */
139
- var createBrushInCache = function (cache, fill, opacity, fillGradientLinear) {
147
+ var createBrushInCache = function (cache, fill, opacity, textureHeightRatio, textureWidthRatio, fillGradientLinear) {
140
148
  Guard_1.Guard.notNull(cache, "brushCache");
141
- var brush = cache.create(fill, opacity, fillGradientLinear);
149
+ var brush = cache.create(fill, opacity, textureHeightRatio, textureWidthRatio, fillGradientLinear);
142
150
  return brush.scrtBrush;
143
151
  };
144
152
  exports.createBrushInCache = createBrushInCache;
@@ -36,4 +36,6 @@ export declare abstract class BaseAxisLayoutStrategy {
36
36
  protected layoutAxesFromTopToBottom(left: number, top: number, right: number, bottom: number, axes: AxisBase2D[]): void;
37
37
  protected layoutAxesFromLeftToRight(left: number, top: number, right: number, bottom: number, axes: AxisBase2D[]): void;
38
38
  protected layoutAxesFromRightToLeft(left: number, top: number, right: number, bottom: number, axes: AxisBase2D[]): void;
39
+ protected calculateTotalAxisHeight(axis: AxisBase2D, totalAxisAreaHeight: number): number;
40
+ protected calculateTotalAxisWidth(axis: AxisBase2D, totalAxisAreaHeight: number): number;
39
41
  }
@@ -56,6 +56,39 @@ var BaseAxisLayoutStrategy = /** @class */ (function () {
56
56
  (0, AxisLayoutHelpers_1.layoutAxisParts)(axis, _this.layoutAxisPartsStrategy);
57
57
  });
58
58
  };
59
+ BaseAxisLayoutStrategy.prototype.calculateTotalAxisHeight = function (axis, totalAxisAreaHeight) {
60
+ return (parseSize(axis.stackedAxisLength, totalAxisAreaHeight) +
61
+ axis.axisLayoutState.additionalBottomSize +
62
+ axis.axisLayoutState.additionalTopSize);
63
+ };
64
+ BaseAxisLayoutStrategy.prototype.calculateTotalAxisWidth = function (axis, totalAxisAreaHeight) {
65
+ return (parseSize(axis.stackedAxisLength, totalAxisAreaHeight) +
66
+ axis.axisLayoutState.additionalRightSize +
67
+ axis.axisLayoutState.additionalLeftSize);
68
+ };
59
69
  return BaseAxisLayoutStrategy;
60
70
  }());
61
71
  exports.BaseAxisLayoutStrategy = BaseAxisLayoutStrategy;
72
+ var parseSize = function (value, containerSize) {
73
+ if (typeof value === "number") {
74
+ if (value < 0) {
75
+ throw new Error("stackedAxisLength must be a positive value!");
76
+ }
77
+ return value;
78
+ }
79
+ if (value.includes("%")) {
80
+ return parsePc(value, containerSize);
81
+ }
82
+ var parsedValue = parseFloat(value);
83
+ if (!isNaN(parsedValue)) {
84
+ return parsedValue;
85
+ }
86
+ throw new Error("stackedAxisLength must be a number or a percentage");
87
+ };
88
+ var parsePc = function (value, containerSize) {
89
+ var parsedPercentageValue = parseFloat(value);
90
+ if (parsedPercentageValue < 0 || parsedPercentageValue > 100) {
91
+ throw new Error("stackedAxisLength percentage must be from 0 to 100");
92
+ }
93
+ return Math.round((containerSize * parsedPercentageValue) / 10) / 10;
94
+ };
@@ -50,14 +50,30 @@ var BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy = /** @class */ (fun
50
50
  BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy.prototype.layoutAxes = function (left, top, right, bottom, axes) {
51
51
  var _this = this;
52
52
  var totalAxisAreaWidth = right - left;
53
- var singleAxisReservedWidth = totalAxisAreaWidth / axes.length;
54
53
  var firstAxis = axes[0];
54
+ var lastAxis = axes[axes.length - 1];
55
+ var axesWithDefinedLength = axes.filter(function (axis) { return axis.stackedAxisLength; });
56
+ var spaceWithoutBorders = axes.reduce(function (acc, axis) { return acc - axis.axisLayoutState.additionalBottomSize - axis.axisLayoutState.additionalTopSize; }, totalAxisAreaWidth +
57
+ (firstAxis === null || firstAxis === void 0 ? void 0 : firstAxis.axisLayoutState.additionalLeftSize) +
58
+ (lastAxis === null || lastAxis === void 0 ? void 0 : lastAxis.axisLayoutState.additionalRightSize));
59
+ var totalDefinedAxesLength = axesWithDefinedLength.reduce(function (acc, axis) { return acc + _this.calculateTotalAxisWidth(axis, spaceWithoutBorders); }, 0);
60
+ var availableSpaceForAxes = totalAxisAreaWidth +
61
+ (firstAxis === null || firstAxis === void 0 ? void 0 : firstAxis.axisLayoutState.additionalLeftSize) +
62
+ (lastAxis === null || lastAxis === void 0 ? void 0 : lastAxis.axisLayoutState.additionalRightSize) -
63
+ totalDefinedAxesLength;
64
+ if (availableSpaceForAxes < 0) {
65
+ throw new Error("Bottom stacked axes with defined size total ".concat(totalDefinedAxesLength, " pixels which is ").concat(-availableSpaceForAxes, " more than the space available"));
66
+ }
67
+ var defaultAxisReservedHeight = availableSpaceForAxes / (axes.length - axesWithDefinedLength.length);
55
68
  var leftOffset = left - (firstAxis === null || firstAxis === void 0 ? void 0 : firstAxis.axisLayoutState.additionalLeftSize);
56
69
  axes.forEach(function (axis) {
57
70
  var _a = axis.axisLayoutState, axisSize = _a.axisSize, additionalLeftSize = _a.additionalLeftSize, additionalRightSize = _a.additionalRightSize, additionalTopSize = _a.additionalTopSize;
58
71
  var topOffset = top + additionalTopSize;
59
72
  var bottomOffset = topOffset + axisSize;
60
- var rightOffset = leftOffset + singleAxisReservedWidth - additionalRightSize;
73
+ var axisReservedHeight = axis.stackedAxisLength
74
+ ? _this.calculateTotalAxisWidth(axis, spaceWithoutBorders)
75
+ : defaultAxisReservedHeight;
76
+ var rightOffset = leftOffset + axisReservedHeight - additionalRightSize;
61
77
  leftOffset += additionalLeftSize;
62
78
  axis.offset = leftOffset - left;
63
79
  axis.axisLength = rightOffset - leftOffset;
@@ -49,15 +49,32 @@ var LeftAlignedOuterVerticallyStackedAxisLayoutStrategy = /** @class */ (functio
49
49
  };
50
50
  LeftAlignedOuterVerticallyStackedAxisLayoutStrategy.prototype.layoutAxes = function (left, top, right, bottom, axes) {
51
51
  var _this = this;
52
+ // doesn't include top border of the first and bottom border of the last axis
52
53
  var totalAxisAreaHeight = bottom - top;
53
- var singleAxisReservedHeight = totalAxisAreaHeight / axes.length;
54
54
  var firstAxis = axes[0];
55
+ var lastAxis = axes[axes.length - 1];
56
+ var axesWithDefinedLength = axes.filter(function (axis) { return axis.stackedAxisLength; });
57
+ var spaceWithoutBorders = axes.reduce(function (acc, axis) { return acc - axis.axisLayoutState.additionalBottomSize - axis.axisLayoutState.additionalTopSize; }, totalAxisAreaHeight +
58
+ (firstAxis === null || firstAxis === void 0 ? void 0 : firstAxis.axisLayoutState.additionalTopSize) +
59
+ (lastAxis === null || lastAxis === void 0 ? void 0 : lastAxis.axisLayoutState.additionalBottomSize));
60
+ var totalDefinedAxesLength = axesWithDefinedLength.reduce(function (acc, axis) { return acc + _this.calculateTotalAxisHeight(axis, spaceWithoutBorders); }, 0);
61
+ var availableSpaceForAxes = totalAxisAreaHeight +
62
+ (firstAxis === null || firstAxis === void 0 ? void 0 : firstAxis.axisLayoutState.additionalTopSize) +
63
+ (lastAxis === null || lastAxis === void 0 ? void 0 : lastAxis.axisLayoutState.additionalBottomSize) -
64
+ totalDefinedAxesLength;
65
+ if (availableSpaceForAxes < 0) {
66
+ throw new Error("Left stacked axes with defined size total ".concat(totalDefinedAxesLength, " pixels which is ").concat(-availableSpaceForAxes, " more than the space available"));
67
+ }
68
+ var defaultAxisReservedHeight = availableSpaceForAxes / (axes.length - axesWithDefinedLength.length);
55
69
  var topOffset = top - (firstAxis === null || firstAxis === void 0 ? void 0 : firstAxis.axisLayoutState.additionalTopSize);
56
70
  axes.forEach(function (axis) {
57
71
  var _a = axis.axisLayoutState, axisSize = _a.axisSize, additionalRightSize = _a.additionalRightSize, additionalBottomSize = _a.additionalBottomSize, additionalTopSize = _a.additionalTopSize;
58
72
  var rightOffset = right - additionalRightSize;
59
73
  var leftOffset = rightOffset - axisSize;
60
- var bottomOffset = topOffset + singleAxisReservedHeight - additionalBottomSize;
74
+ var axisReservedHeight = axis.stackedAxisLength
75
+ ? _this.calculateTotalAxisHeight(axis, spaceWithoutBorders)
76
+ : defaultAxisReservedHeight;
77
+ var bottomOffset = topOffset + axisReservedHeight - additionalBottomSize;
61
78
  topOffset += additionalTopSize;
62
79
  axis.offset = topOffset - top;
63
80
  axis.axisLength = bottomOffset - topOffset;
@@ -50,14 +50,30 @@ var RightAlignedOuterVerticallyStackedAxisLayoutStrategy = /** @class */ (functi
50
50
  RightAlignedOuterVerticallyStackedAxisLayoutStrategy.prototype.layoutAxes = function (left, top, right, bottom, axes) {
51
51
  var _this = this;
52
52
  var totalAxisAreaHeight = bottom - top;
53
- var singleAxisReservedHeight = totalAxisAreaHeight / axes.length;
54
53
  var firstAxis = axes[0];
54
+ var lastAxis = axes[axes.length - 1];
55
+ var axesWithDefinedLength = axes.filter(function (axis) { return axis.stackedAxisLength; });
56
+ var spaceWithoutBorders = axes.reduce(function (acc, axis) { return acc - axis.axisLayoutState.additionalBottomSize - axis.axisLayoutState.additionalTopSize; }, totalAxisAreaHeight +
57
+ (firstAxis === null || firstAxis === void 0 ? void 0 : firstAxis.axisLayoutState.additionalTopSize) +
58
+ (lastAxis === null || lastAxis === void 0 ? void 0 : lastAxis.axisLayoutState.additionalBottomSize));
59
+ var totalDefinedAxesLength = axesWithDefinedLength.reduce(function (acc, axis) { return acc + _this.calculateTotalAxisHeight(axis, spaceWithoutBorders); }, 0);
60
+ var availableSpaceForAxes = totalAxisAreaHeight +
61
+ (firstAxis === null || firstAxis === void 0 ? void 0 : firstAxis.axisLayoutState.additionalTopSize) +
62
+ (lastAxis === null || lastAxis === void 0 ? void 0 : lastAxis.axisLayoutState.additionalBottomSize) -
63
+ totalDefinedAxesLength;
64
+ if (availableSpaceForAxes < 0) {
65
+ throw new Error("Right stacked axes with defined size total ".concat(totalDefinedAxesLength, " pixels which is ").concat(-availableSpaceForAxes, " more than the space available"));
66
+ }
67
+ var defaultAxisReservedHeight = availableSpaceForAxes / (axes.length - axesWithDefinedLength.length);
55
68
  var topOffset = top - (firstAxis === null || firstAxis === void 0 ? void 0 : firstAxis.axisLayoutState.additionalTopSize);
56
69
  axes.forEach(function (axis) {
57
70
  var _a = axis.axisLayoutState, axisSize = _a.axisSize, additionalLeftSize = _a.additionalLeftSize, additionalBottomSize = _a.additionalBottomSize, additionalTopSize = _a.additionalTopSize;
58
71
  var leftOffset = left + additionalLeftSize;
59
72
  var rightOffset = leftOffset + axisSize;
60
- var bottomOffset = topOffset + singleAxisReservedHeight - additionalBottomSize;
73
+ var axisReservedHeight = axis.stackedAxisLength
74
+ ? _this.calculateTotalAxisHeight(axis, spaceWithoutBorders)
75
+ : defaultAxisReservedHeight;
76
+ var bottomOffset = topOffset + axisReservedHeight - additionalBottomSize;
61
77
  topOffset += additionalTopSize;
62
78
  axis.offset = topOffset - top;
63
79
  axis.axisLength = bottomOffset - topOffset;
@@ -50,14 +50,30 @@ var TopAlignedOuterHorizontallyStackedAxisLayoutStrategy = /** @class */ (functi
50
50
  TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.prototype.layoutAxes = function (left, top, right, bottom, axes) {
51
51
  var _this = this;
52
52
  var totalAxisAreaWidth = right - left;
53
- var singleAxisReservedWidth = totalAxisAreaWidth / axes.length;
54
53
  var firstAxis = axes[0];
54
+ var lastAxis = axes[axes.length - 1];
55
+ var axesWithDefinedLength = axes.filter(function (axis) { return axis.stackedAxisLength; });
56
+ var spaceWithoutBorders = axes.reduce(function (acc, axis) { return acc - axis.axisLayoutState.additionalBottomSize - axis.axisLayoutState.additionalTopSize; }, totalAxisAreaWidth +
57
+ (firstAxis === null || firstAxis === void 0 ? void 0 : firstAxis.axisLayoutState.additionalLeftSize) +
58
+ (lastAxis === null || lastAxis === void 0 ? void 0 : lastAxis.axisLayoutState.additionalRightSize));
59
+ var totalDefinedAxesLength = axesWithDefinedLength.reduce(function (acc, axis) { return acc + _this.calculateTotalAxisWidth(axis, spaceWithoutBorders); }, 0);
60
+ var availableSpaceForAxes = totalAxisAreaWidth +
61
+ (firstAxis === null || firstAxis === void 0 ? void 0 : firstAxis.axisLayoutState.additionalLeftSize) +
62
+ (lastAxis === null || lastAxis === void 0 ? void 0 : lastAxis.axisLayoutState.additionalRightSize) -
63
+ totalDefinedAxesLength;
64
+ if (availableSpaceForAxes < 0) {
65
+ throw new Error("Top stacked axes with defined size total ".concat(totalDefinedAxesLength, " pixels which is ").concat(-availableSpaceForAxes, " more than the space available"));
66
+ }
67
+ var defaultAxisReservedHeight = availableSpaceForAxes / (axes.length - axesWithDefinedLength.length);
55
68
  var leftOffset = left - (firstAxis === null || firstAxis === void 0 ? void 0 : firstAxis.axisLayoutState.additionalLeftSize);
56
69
  axes.forEach(function (axis) {
57
70
  var _a = axis.axisLayoutState, axisSize = _a.axisSize, additionalLeftSize = _a.additionalLeftSize, additionalRightSize = _a.additionalRightSize, additionalBottomSize = _a.additionalBottomSize;
58
71
  var bottomOffset = bottom - additionalBottomSize;
59
72
  var topOffset = bottomOffset - axisSize;
60
- var rightOffset = leftOffset + singleAxisReservedWidth - additionalRightSize;
73
+ var axisReservedHeight = axis.stackedAxisLength
74
+ ? _this.calculateTotalAxisWidth(axis, spaceWithoutBorders)
75
+ : defaultAxisReservedHeight;
76
+ var rightOffset = leftOffset + axisReservedHeight - additionalRightSize;
61
77
  leftOffset += additionalLeftSize;
62
78
  axis.offset = leftOffset - left;
63
79
  axis.axisLength = rightOffset - leftOffset;
@@ -130,11 +130,11 @@ var OhlcDataSeries = /** @class */ (function (_super) {
130
130
  */
131
131
  OhlcDataSeries.prototype.appendRange = function (xValues, openValues, highValues, lowValues, closeValues, metadata) {
132
132
  if (!this.getIsDeleted()) {
133
- Guard_1.Guard.isTrue(Array.isArray(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
134
- Guard_1.Guard.isTrue(Array.isArray(openValues) || (0, NumberArray_1.isTypedArray)(openValues), "openValues must be an array of numbers");
135
- Guard_1.Guard.isTrue(Array.isArray(highValues) || (0, NumberArray_1.isTypedArray)(highValues), "highValues must be an array of numbers");
136
- Guard_1.Guard.isTrue(Array.isArray(lowValues) || (0, NumberArray_1.isTypedArray)(lowValues), "lowValues must be an array of numbers");
137
- Guard_1.Guard.isTrue(Array.isArray(closeValues) || (0, NumberArray_1.isTypedArray)(closeValues), "closeValues must be an array of numbers");
133
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
134
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(openValues) || (0, NumberArray_1.isTypedArray)(openValues), "openValues must be an array of numbers");
135
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(highValues) || (0, NumberArray_1.isTypedArray)(highValues), "highValues must be an array of numbers");
136
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(lowValues) || (0, NumberArray_1.isTypedArray)(lowValues), "lowValues must be an array of numbers");
137
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(closeValues) || (0, NumberArray_1.isTypedArray)(closeValues), "closeValues must be an array of numbers");
138
138
  Guard_1.Guard.arraysSameLengthArr([
139
139
  { arg: xValues, name: "xValues" },
140
140
  { arg: openValues, name: "openValues" },
@@ -240,11 +240,11 @@ var OhlcDataSeries = /** @class */ (function (_super) {
240
240
  */
241
241
  OhlcDataSeries.prototype.insertRange = function (startIndex, xValues, openValues, highValues, lowValues, closeValues, metadata) {
242
242
  if (!this.getIsDeleted()) {
243
- Guard_1.Guard.isTrue(Array.isArray(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
244
- Guard_1.Guard.isTrue(Array.isArray(openValues) || (0, NumberArray_1.isTypedArray)(openValues), "openValues must be an array of numbers");
245
- Guard_1.Guard.isTrue(Array.isArray(highValues) || (0, NumberArray_1.isTypedArray)(highValues), "highValues must be an array of numbers");
246
- Guard_1.Guard.isTrue(Array.isArray(lowValues) || (0, NumberArray_1.isTypedArray)(lowValues), "lowValues must be an array of numbers");
247
- Guard_1.Guard.isTrue(Array.isArray(closeValues) || (0, NumberArray_1.isTypedArray)(closeValues), "closeValues must be an array of numbers");
243
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
244
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(openValues) || (0, NumberArray_1.isTypedArray)(openValues), "openValues must be an array of numbers");
245
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(highValues) || (0, NumberArray_1.isTypedArray)(highValues), "highValues must be an array of numbers");
246
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(lowValues) || (0, NumberArray_1.isTypedArray)(lowValues), "lowValues must be an array of numbers");
247
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(closeValues) || (0, NumberArray_1.isTypedArray)(closeValues), "closeValues must be an array of numbers");
248
248
  this.validateIndex(startIndex, "Start index is out of range");
249
249
  Guard_1.Guard.arraysSameLengthArr([
250
250
  { arg: xValues, name: "xValues" },
@@ -98,8 +98,8 @@ var XyDataSeries = /** @class */ (function (_super) {
98
98
  */
99
99
  XyDataSeries.prototype.appendRange = function (xValues, yValues, metadata) {
100
100
  if (!this.getIsDeleted()) {
101
- Guard_1.Guard.isTrue(Array.isArray(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
102
- Guard_1.Guard.isTrue(Array.isArray(yValues) || (0, NumberArray_1.isTypedArray)(yValues), "yValues must be an array of numbers");
101
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
102
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(yValues) || (0, NumberArray_1.isTypedArray)(yValues), "yValues must be an array of numbers");
103
103
  Guard_1.Guard.arraysSameLength(xValues, "xValues", yValues, "yValues");
104
104
  if (metadata) {
105
105
  Guard_1.Guard.isTrue(Array.isArray(metadata), "metadata must be an array of IPointMetadata");
@@ -184,8 +184,8 @@ var XyDataSeries = /** @class */ (function (_super) {
184
184
  */
185
185
  XyDataSeries.prototype.insertRange = function (startIndex, xValues, yValues, metadata) {
186
186
  if (!this.getIsDeleted()) {
187
- Guard_1.Guard.isTrue(Array.isArray(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
188
- Guard_1.Guard.isTrue(Array.isArray(yValues) || (0, NumberArray_1.isTypedArray)(xValues), "yValues must be an array of numbers");
187
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
188
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(yValues) || (0, NumberArray_1.isTypedArray)(yValues), "yValues must be an array of numbers");
189
189
  this.validateIndex(startIndex, "Start index is out of range");
190
190
  Guard_1.Guard.arraysSameLength(xValues, "xValues", yValues, "yValues");
191
191
  if (metadata) {
@@ -99,9 +99,9 @@ var XyyDataSeries = /** @class */ (function (_super) {
99
99
  */
100
100
  XyyDataSeries.prototype.appendRange = function (xValues, yValues, y1Values, metadata) {
101
101
  if (!this.getIsDeleted()) {
102
- Guard_1.Guard.isTrue(Array.isArray(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
103
- Guard_1.Guard.isTrue(Array.isArray(yValues) || (0, NumberArray_1.isTypedArray)(yValues), "yValues must be an array of numbers");
104
- Guard_1.Guard.isTrue(Array.isArray(y1Values) || (0, NumberArray_1.isTypedArray)(y1Values), "y1Values must be an array of numbers");
102
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
103
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(yValues) || (0, NumberArray_1.isTypedArray)(yValues), "yValues must be an array of numbers");
104
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(y1Values) || (0, NumberArray_1.isTypedArray)(y1Values), "y1Values must be an array of numbers");
105
105
  Guard_1.Guard.arraysSameLengthArr([
106
106
  { arg: xValues, name: "xValues" },
107
107
  { arg: yValues, name: "yValues" },
@@ -201,9 +201,9 @@ var XyyDataSeries = /** @class */ (function (_super) {
201
201
  */
202
202
  XyyDataSeries.prototype.insertRange = function (startIndex, xValues, yValues, y1Values, metadata) {
203
203
  if (!this.getIsDeleted()) {
204
- Guard_1.Guard.isTrue(Array.isArray(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
205
- Guard_1.Guard.isTrue(Array.isArray(yValues) || (0, NumberArray_1.isTypedArray)(yValues), "yValues must be an array of numbers");
206
- Guard_1.Guard.isTrue(Array.isArray(y1Values) || (0, NumberArray_1.isTypedArray)(y1Values), "y1Values must be an array of numbers");
204
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
205
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(yValues) || (0, NumberArray_1.isTypedArray)(yValues), "yValues must be an array of numbers");
206
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(y1Values) || (0, NumberArray_1.isTypedArray)(y1Values), "y1Values must be an array of numbers");
207
207
  this.validateIndex(startIndex, "Start index is out of range");
208
208
  Guard_1.Guard.arraysSameLengthArr([
209
209
  { arg: xValues, name: "xValues" },
@@ -98,9 +98,9 @@ var XyzDataSeries = /** @class */ (function (_super) {
98
98
  */
99
99
  XyzDataSeries.prototype.appendRange = function (xValues, yValues, zValues, metadata) {
100
100
  if (!this.getIsDeleted()) {
101
- Guard_1.Guard.isTrue(Array.isArray(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
102
- Guard_1.Guard.isTrue(Array.isArray(yValues) || (0, NumberArray_1.isTypedArray)(yValues), "yValues must be an array of numbers");
103
- Guard_1.Guard.isTrue(Array.isArray(zValues) || (0, NumberArray_1.isTypedArray)(zValues), "zValues must be an array of numbers");
101
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
102
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(yValues) || (0, NumberArray_1.isTypedArray)(yValues), "yValues must be an array of numbers");
103
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(zValues) || (0, NumberArray_1.isTypedArray)(zValues), "zValues must be an array of numbers");
104
104
  Guard_1.Guard.arraysSameLengthArr([
105
105
  { arg: xValues, name: "xValues" },
106
106
  { arg: yValues, name: "yValues" },
@@ -193,9 +193,9 @@ var XyzDataSeries = /** @class */ (function (_super) {
193
193
  */
194
194
  XyzDataSeries.prototype.insertRange = function (startIndex, xValues, yValues, zValues, metadata) {
195
195
  if (!this.getIsDeleted()) {
196
- Guard_1.Guard.isTrue(Array.isArray(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
197
- Guard_1.Guard.isTrue(Array.isArray(yValues) || (0, NumberArray_1.isTypedArray)(yValues), "yValues must be an array of numbers");
198
- Guard_1.Guard.isTrue(Array.isArray(zValues) || (0, NumberArray_1.isTypedArray)(zValues), "zValues must be an array of numbers");
196
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(xValues) || (0, NumberArray_1.isTypedArray)(xValues), "xValues must be an array of numbers");
197
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(yValues) || (0, NumberArray_1.isTypedArray)(yValues), "yValues must be an array of numbers");
198
+ Guard_1.Guard.isTrue((0, NumberArray_1.isNumberArray)(zValues) || (0, NumberArray_1.isTypedArray)(zValues), "zValues must be an array of numbers");
199
199
  this.validateIndex(startIndex, "Start index is out of range");
200
200
  Guard_1.Guard.arraysSameLengthArr([
201
201
  { arg: xValues, name: "xValues" },
@@ -80,7 +80,9 @@ var SciChartRenderer = /** @class */ (function () {
80
80
  el.type === IAnnotation_1.EAnnotationType.RenderContextVerticalLineAnnotation ||
81
81
  el.type === IAnnotation_1.EAnnotationType.RenderContextAxisMarkerAnnotation);
82
82
  });
83
- this.drawRenderContextAnnotations(renderContextAnnotations, xyAxesById[0], xyAxesById[1], IAnnotation_1.EAnnotationLayer.BelowChart, renderContext, seriesViewRect);
83
+ renderContext.enqueueLayeredDraw(function () {
84
+ _this.drawRenderContextAnnotations(renderContextAnnotations, xyAxesById[0], xyAxesById[1], IAnnotation_1.EAnnotationLayer.BelowChart, renderContext, seriesViewRect);
85
+ }, RenderLayer_1.ERenderLayer.Third);
84
86
  // queue series rendering after grid lines and bands, but before the axes
85
87
  renderContext.enqueueLayeredDraw(function () { return _this.drawSeries(_this.sciChartSurface, _this.sciChartSurface.renderableSeries.asArray(), renderContext); }, RenderLayer_1.ERenderLayer.Third);
86
88
  // Execute rendering of queued elements
@@ -87,7 +87,11 @@ var TextureWorkerWrapper = /** @class */ (function () {
87
87
  var _this = this;
88
88
  this.timeout = 200;
89
89
  this.isActiveProperty = true;
90
- if (!app_1.IS_TEST_ENV && typeof window !== "undefined" && !!window.Worker) {
90
+ if (!app_1.IS_TEST_ENV &&
91
+ typeof window !== "undefined" &&
92
+ !!window.Worker &&
93
+ // @ts-ignore
94
+ typeof OffscreenCanvas !== "undefined") {
91
95
  this.worker = this.makeWorker(); // new Worker("./TextureWorkerSource.ts", { type: "module" });
92
96
  this.worker.onmessage = handleMsg;
93
97
  this.worker.onerror = function (ev) {
@@ -227,7 +227,7 @@ export declare abstract class AnnotationBase implements IAnnotation, IAdornerPro
227
227
  private opacityProperty;
228
228
  private annotationLayerProperty;
229
229
  private isEditableProperty;
230
- private isHiddenProperty;
230
+ protected isHiddenProperty: boolean;
231
231
  private parentSurfaceProperty;
232
232
  private x1Property;
233
233
  private x2Property;
@@ -30,6 +30,7 @@ export declare class CursorTooltipSvgAnnotation extends SvgAnnotationBase {
30
30
  private tooltipLegendOffsetXProperty;
31
31
  private tooltipLegendOffsetYProperty;
32
32
  private svgLegend;
33
+ private previousMousePosition;
33
34
  /**
34
35
  * Creates an instance of the {@link CursorTooltipSvgAnnotation}
35
36
  * @param options
@@ -16,6 +16,7 @@ var __extends = (this && this.__extends) || (function () {
16
16
  })();
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.CursorTooltipSvgAnnotation = void 0;
19
+ var MousePosition_1 = require("../../../types/MousePosition");
19
20
  var constants_1 = require("./constants");
20
21
  var IAnnotation_1 = require("./IAnnotation");
21
22
  var SvgAnnotationBase_1 = require("./SvgAnnotationBase");
@@ -164,6 +165,11 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
164
165
  * @inheritDoc
165
166
  */
166
167
  CursorTooltipSvgAnnotation.prototype.update = function (xCalc, yCalc) {
168
+ var currentMousePosition = this.cursorModifier.getMousePosition();
169
+ if (this.previousMousePosition === currentMousePosition && currentMousePosition !== MousePosition_1.EMousePosition.SeriesArea) {
170
+ return;
171
+ }
172
+ this.previousMousePosition = this.cursorModifier.getMousePosition();
167
173
  if (this.svg) {
168
174
  this.delete();
169
175
  }