scichart 3.0.0-beta.224 → 3.0.0-beta.235

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 (31) hide show
  1. package/Charting/ChartModifiers/CursorModifier.d.ts +10 -10
  2. package/Charting/ChartModifiers/OverviewRangeSelectionModifier.d.ts +0 -5
  3. package/Charting/ChartModifiers/OverviewRangeSelectionModifier.js +14 -15
  4. package/Charting/ChartModifiers/RolloverModifier.d.ts +3 -21
  5. package/Charting/ChartModifiers/RolloverModifier.js +8 -26
  6. package/Charting/ChartModifiers/RubberBandXyZoomModifier.d.ts +9 -6
  7. package/Charting/ChartModifiers/RubberBandXyZoomModifier.js +8 -7
  8. package/Charting/Services/SciChartRenderer.js +16 -5
  9. package/Charting/Visuals/Annotations/NativeTextAnnotation.js +1 -1
  10. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +4 -4
  11. package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.d.ts +7 -2
  12. package/Charting/Visuals/SciChartOverview.d.ts +2 -2
  13. package/Charting/Visuals/SciChartOverview.js +10 -9
  14. package/Charting/Visuals/SciChartSurface.d.ts +13 -0
  15. package/Charting/Visuals/SciChartSurface.js +18 -0
  16. package/Charting/Visuals/sciChartInitCommon.js +1 -0
  17. package/Core/BuildStamp.d.ts +1 -1
  18. package/Core/BuildStamp.js +2 -2
  19. package/Core/Mouse/MouseManager.js +12 -10
  20. package/Core/Telemetry.js +1 -1
  21. package/_wasm/scichart.browser.js +1 -1
  22. package/_wasm/scichart2d.data +0 -0
  23. package/_wasm/scichart2d.js +1 -1
  24. package/_wasm/scichart2d.wasm +0 -0
  25. package/_wasm/scichart3d.js +10 -10
  26. package/_wasm/scichart3d.wasm +0 -0
  27. package/package.json +1 -1
  28. package/types/MousePosition.d.ts +1 -1
  29. package/types/MousePosition.js +1 -1
  30. package/utils/translate.d.ts +4 -2
  31. package/utils/translate.js +41 -7
@@ -175,11 +175,11 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
175
175
  protected xLineAnnotation: LineAnnotation;
176
176
  protected yLineAnnotation: LineAnnotation;
177
177
  protected tooltipAnnotation: CursorTooltipSvgAnnotation;
178
- private mousePosition;
179
- private crosshairStrokeProperty;
180
- private tooltipDataTemplateProperty?;
181
- private includedSeriesMap;
182
- private placementDivIdProperty;
178
+ protected mousePosition: EMousePosition;
179
+ protected crosshairStrokeProperty: string;
180
+ protected tooltipDataTemplateProperty?: TCursorTooltipDataTemplate;
181
+ protected includedSeriesMap: Map<IRenderableSeries, boolean>;
182
+ protected placementDivIdProperty: string;
183
183
  /**
184
184
  * Creates an instance of the CursorModifier
185
185
  *
@@ -269,16 +269,16 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
269
269
  options: Required<Omit<IChartModifierBaseOptions, never>>;
270
270
  };
271
271
  protected notifyPropertyChanged(propertyName: string): void;
272
- private getSeriesInfos;
273
- private update;
274
- private newLineAnnotation;
272
+ protected getSeriesInfos(): SeriesInfo[];
273
+ protected update(): void;
274
+ protected newLineAnnotation(axisLabelFill: string, axisLabelStroke: string): LineAnnotation;
275
275
  /**
276
276
  * Test if the series is included or excluded, by default it is included
277
277
  * @param series
278
278
  * @private
279
279
  */
280
- private testIsIncludedSeries;
281
- private isVerticalChart;
280
+ protected testIsIncludedSeries(series: IRenderableSeries): boolean;
281
+ protected isVerticalChart(): boolean;
282
282
  }
283
283
  /** Calculate the width and height of the tooltip based on the content array */
284
284
  export declare const calcTooltipSize: (valuesWithLabels: string[], fontSize?: number) => {
@@ -47,10 +47,6 @@ export declare class OverviewRangeSelectionModifier extends ChartModifierBase2D
47
47
  * @inheritDoc
48
48
  */
49
49
  onAttach(): void;
50
- /**
51
- * @inheritDoc
52
- */
53
- onDetach(): void;
54
50
  /**
55
51
  * @inheritDoc
56
52
  */
@@ -81,5 +77,4 @@ export declare class OverviewRangeSelectionModifier extends ChartModifierBase2D
81
77
  set selectedArea(value: NumberRange);
82
78
  createAnnotation(options: ICustomResizableAnnotationOptions): OverviewCustomResizableAnnotation;
83
79
  protected updateSelectionAnnotation(): void;
84
- private xVisibleRangeChangeHandler;
85
80
  }
@@ -67,7 +67,6 @@ var OverviewRangeSelectionModifier = /** @class */ (function (_super) {
67
67
  _this.onSelectedAreaChanged = options === null || options === void 0 ? void 0 : options.onSelectedAreaChanged;
68
68
  _this.xAxisId = (_a = options === null || options === void 0 ? void 0 : options.xAxisId) !== null && _a !== void 0 ? _a : _this.xAxisId;
69
69
  _this.yAxisId = (_b = options === null || options === void 0 ? void 0 : options.yAxisId) !== null && _b !== void 0 ? _b : _this.yAxisId;
70
- _this.xVisibleRangeChangeHandler = _this.xVisibleRangeChangeHandler.bind(_this);
71
70
  return _this;
72
71
  }
73
72
  /**
@@ -77,13 +76,6 @@ var OverviewRangeSelectionModifier = /** @class */ (function (_super) {
77
76
  _super.prototype.onAttach.call(this);
78
77
  this.updateSelectionAnnotation();
79
78
  };
80
- /**
81
- * @inheritDoc
82
- */
83
- OverviewRangeSelectionModifier.prototype.onDetach = function () {
84
- var xAxis = this.parentSurface.getXAxisById(this.xAxisId);
85
- xAxis.visibleRangeChanged.unsubscribe(this.xVisibleRangeChangeHandler);
86
- };
87
79
  /**
88
80
  * @inheritDoc
89
81
  */
@@ -251,25 +243,32 @@ var OverviewRangeSelectionModifier = /** @class */ (function (_super) {
251
243
  this.rangeSelectionAnnotationProperty = dragBox;
252
244
  this.annotationBeforeSelectedAreaProperty = annotationBeforeSelectedArea;
253
245
  this.annotationAfterSelectedAreaProperty = annotationAfterSelectedArea;
254
- xAxis.visibleRangeChanged.subscribe(this.xVisibleRangeChangeHandler);
255
246
  }
256
247
  };
257
- OverviewRangeSelectionModifier.prototype.xVisibleRangeChangeHandler = function (args) {
258
- this.annotationBeforeSelectedAreaProperty.x1 = args.visibleRange.min;
259
- this.annotationAfterSelectedAreaProperty.x2 = args.visibleRange.max;
260
- };
261
248
  return OverviewRangeSelectionModifier;
262
249
  }(ChartModifierBase2D_1.ChartModifierBase2D));
263
250
  exports.OverviewRangeSelectionModifier = OverviewRangeSelectionModifier;
264
251
  /** @ignore */
265
252
  var horizontalAdornerSvgTemplate = function (x1, y1, x2, y2) {
266
253
  var colorLine = "black";
267
- return "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"".concat(x1, "\" y1=\"").concat(y1, "\" x2=\"").concat(x2, "\" y2=\"").concat(y1, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"").concat(x2, "\" y1=\"").concat(y1, "\" x2=\"").concat(x2, "\" y2=\"").concat(y2, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"").concat(x1, "\" y1=\"").concat(y2, "\" x2=\"").concat(x2, "\" y2=\"").concat(y2, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"").concat(x1, "\" y1=\"").concat(y1, "\" x2=\"").concat(x1, "\" y2=\"").concat(y2, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <rect x=\"").concat(x1 - 3, "\" y=\"30%\" width=\"7\" height=\"40%\" fill=\"#2e2e2e\" rx=\"5\" stroke=\"").concat(colorLine, "\" />\n <rect x=\"").concat(x2 - 3, "\" y=\"30%\" width=\"7\" height=\"40%\" fill=\"#2e2e2e\" rx=\"5\" stroke=\"").concat(colorLine, "\" />\n </svg>");
254
+ var gridpHandleFill = "#2e2e2e";
255
+ var gripHandleHalfWidth = 3;
256
+ var gripHandleHeight = "40%";
257
+ var gripHandleYCoord = "30%";
258
+ var width = x2 - x1;
259
+ var height = y2 - y1;
260
+ return "<svg x=\"".concat(x1, "\" y=\"").concat(y1, "\" width=\"").concat(width, "px\" height=\"").concat(height, "px\" viewBox=\"0 0 ").concat(width, " ").concat(height, "\" overflow=\"visible\" xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"0\" y1=\"0\" x2=\"").concat(width, "\" y2=\"0\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"0\" y1=\"").concat(height, "\" x2=\"").concat(width, "\" y2=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"").concat(width, "\" y1=\"0\" x2=\"").concat(width, "\" y2=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <rect x=\"").concat(0 - gripHandleHalfWidth, "\" y=\"").concat(gripHandleYCoord, "\" width=\"7\" height=\"").concat(gripHandleHeight, "\" fill=\"").concat(gridpHandleFill, "\" rx=\"5\" stroke=\"").concat(colorLine, "\" />\n <rect x=\"").concat(width - gripHandleHalfWidth, "\" y=\"").concat(gripHandleYCoord, "\" width=\"7\" height=\"").concat(gripHandleHeight, "\" fill=\"").concat(gridpHandleFill, "\" rx=\"5\" stroke=\"").concat(colorLine, "\" />\n </svg>");
268
261
  };
269
262
  /** @ignore */
270
263
  var verticalAdornerSvgTemplate = function (x1, y1, x2, y2) {
271
264
  var colorLine = "black";
272
- return "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"".concat(x1, "\" y1=\"").concat(y1, "\" x2=\"").concat(x2, "\" y2=\"").concat(y1, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"").concat(x2, "\" y1=\"").concat(y1, "\" x2=\"").concat(x2, "\" y2=\"").concat(y2, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"").concat(x1, "\" y1=\"").concat(y2, "\" x2=\"").concat(x2, "\" y2=\"").concat(y2, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"").concat(x1, "\" y1=\"").concat(y1, "\" x2=\"").concat(x1, "\" y2=\"").concat(y2, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <rect x=\"30%\" y=\"").concat(y1 - 3, "\" width=\"40%\" height=\"7\" fill=\"#2e2e2e\" rx=\"5\" stroke=\"").concat(colorLine, "\" />\n <rect x=\"30%\" y=\"").concat(y2 - 3, "\" width=\"40%\" height=\"7\" fill=\"#2e2e2e\" rx=\"5\" stroke=\"").concat(colorLine, "\" />\n </svg>");
265
+ var gridpHandleFill = "#2e2e2e";
266
+ var gripHandleWidth = "40%";
267
+ var gripHandleHalfHeight = 3;
268
+ var gripHandleXCoord = "30%";
269
+ var width = x2 - x1;
270
+ var height = y2 - y1;
271
+ return "<svg x=\"".concat(x1, "\" y=\"").concat(y1, "\" width=\"").concat(width, "px\" height=\"").concat(height, "px\" viewBox=\"0 0 ").concat(width, " ").concat(height, "\" overflow=\"visible\" xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"0\" y1=\"0\" x2=\"").concat(width, "\" y2=\"0\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"0\" y1=\"").concat(height, "\" x2=\"").concat(width, "\" y2=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"").concat(width, "\" y1=\"0\" x2=\"").concat(width, "\" y2=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <rect x=\"").concat(gripHandleXCoord, "\" y=\"").concat(0 - gripHandleHalfHeight, "\" width=\"").concat(gripHandleWidth, "\" height=\"7\" fill=\"").concat(gridpHandleFill, "\" rx=\"5\" stroke=\"").concat(colorLine, "\" />\n <rect x=\"").concat(gripHandleXCoord, "\" y=\"").concat(height - gripHandleHalfHeight, "\" width=\"").concat(gripHandleWidth, "\" height=\"7\" fill=\"").concat(gridpHandleFill, "\" rx=\"5\" stroke=\"").concat(colorLine, "\" />\n </svg>");
273
272
  };
274
273
  var defaultSelectionAnnotationSvgString = "<svg width=\"50\" height=\"50\" preserveAspectRatio=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"100%\" height=\"100%\" style=\"fill:transparent\">\n </rect>\n</svg>";
275
274
  var defaultUnSelectedAnnotationSvgString = "<svg width=\"50\" height=\"50\" preserveAspectRatio=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"100%\" height=\"100%\" style=\"fill:black\">\n </rect>\n </svg>";
@@ -2,12 +2,13 @@ import { IIncludeSeries } from "../../Core/IIncludeSeries";
2
2
  import { Point } from "../../Core/Point";
3
3
  import { Rect } from "../../Core/Rect";
4
4
  import { EChart2DModifierType } from "../../types/ChartModifierType";
5
+ import { EMousePosition } from "../../types/MousePosition";
5
6
  import { SeriesInfo } from "../Model/ChartData/SeriesInfo";
6
7
  import { IThemeProvider } from "../Themes/IThemeProvider";
7
8
  import { RolloverLegendSvgAnnotation } from "../Visuals/Annotations/RolloverLegendSvgAnnotation";
8
9
  import { HitTestInfo } from "../Visuals/RenderableSeries/HitTest/HitTestInfo";
9
10
  import { IRenderableSeries } from "../Visuals/RenderableSeries/IRenderableSeries";
10
- import { RolloverModifierRenderableSeriesProps } from "../Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps";
11
+ import { IRolloverModifier, RolloverModifierRenderableSeriesProps } from "../Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps";
11
12
  import { ChartModifierBase2D, IChartModifierBaseOptions } from "./ChartModifierBase2D";
12
13
  import { ModifierMouseArgs } from "./ModifierMouseArgs";
13
14
  export declare type TRolloverLegendSvgTemplate = (seriesInfos: SeriesInfo[], svgAnnotation: RolloverLegendSvgAnnotation) => string;
@@ -52,24 +53,6 @@ export declare type TTooltipProps = {
52
53
  width: number;
53
54
  seriesInfo: SeriesInfo;
54
55
  };
55
- /**
56
- * @ignore
57
- * Defines the MousePosition enum constants, used by the {@link RolloverModifier}
58
- */
59
- declare enum EMousePosition {
60
- /**
61
- * The mouse position is outside the main canvas
62
- */
63
- OutOfCanvas = "OutOfCanvas",
64
- /**
65
- * The mouse position is in the Axis area
66
- */
67
- AxisArea = "AxisArea",
68
- /**
69
- * The mouse position is in the Series area
70
- */
71
- SeriesArea = "SeriesArea"
72
- }
73
56
  /**
74
57
  * Optional parameters used to configure a {@link RolloverModifier} at construct time
75
58
  */
@@ -119,7 +102,7 @@ export interface IRolloverModifierOptions extends IChartModifierBaseOptions {
119
102
  * sciChartSurface.chartModifiers.add(new RolloverModifier());
120
103
  * ```
121
104
  */
122
- export declare class RolloverModifier extends ChartModifierBase2D implements IIncludeSeries {
105
+ export declare class RolloverModifier extends ChartModifierBase2D implements IIncludeSeries, IRolloverModifier {
123
106
  readonly type = EChart2DModifierType.Rollover;
124
107
  /**
125
108
  * Gets or sets the template for the legend
@@ -300,4 +283,3 @@ export declare const calcTooltipProps: (index: number, rs: IRenderableSeries, ro
300
283
  * @param isVerticalChart
301
284
  */
302
285
  export declare const calcTooltipPositions: (tooltipArray: TTooltipProps[], allowTooltipOverlapping: boolean, spacing: number, seriesViewRect: Rect, pixelRatio: number, isVerticalChart?: boolean) => TTooltipProps[];
303
- export {};
@@ -19,6 +19,7 @@ exports.calcTooltipPositions = exports.calcTooltipProps = exports.RolloverModifi
19
19
  var classFactory_1 = require("../../Builder/classFactory");
20
20
  var BaseType_1 = require("../../types/BaseType");
21
21
  var ChartModifierType_1 = require("../../types/ChartModifierType");
22
+ var MousePosition_1 = require("../../types/MousePosition");
22
23
  var SeriesType_1 = require("../../types/SeriesType");
23
24
  var tooltip_1 = require("../../utils/tooltip");
24
25
  var translate_1 = require("../../utils/translate");
@@ -31,25 +32,6 @@ var SciChartSurfaceBase_1 = require("../Visuals/SciChartSurfaceBase");
31
32
  var DpiHelper_1 = require("../Visuals/TextureManager/DpiHelper");
32
33
  var ChartModifierBase2D_1 = require("./ChartModifierBase2D");
33
34
  var constants_1 = require("./constants");
34
- /**
35
- * @ignore
36
- * Defines the MousePosition enum constants, used by the {@link RolloverModifier}
37
- */
38
- var EMousePosition;
39
- (function (EMousePosition) {
40
- /**
41
- * The mouse position is outside the main canvas
42
- */
43
- EMousePosition["OutOfCanvas"] = "OutOfCanvas";
44
- /**
45
- * The mouse position is in the Axis area
46
- */
47
- EMousePosition["AxisArea"] = "AxisArea";
48
- /**
49
- * The mouse position is in the Series area
50
- */
51
- EMousePosition["SeriesArea"] = "SeriesArea";
52
- })(EMousePosition || (EMousePosition = {}));
53
35
  /** @ignore */
54
36
  var TOOLTIP_SPACING = 4;
55
37
  /**
@@ -93,7 +75,7 @@ var RolloverModifier = /** @class */ (function (_super) {
93
75
  * If this is set greater than the default of zero, the toolip will only show values for points in this radius, rather than all points on the vertical line
94
76
  */
95
77
  _this.hitTestRadius = 0;
96
- _this.mousePosition = EMousePosition.OutOfCanvas;
78
+ _this.mousePosition = MousePosition_1.EMousePosition.OutOfCanvas;
97
79
  _this.showRolloverLineProperty = true;
98
80
  _this.showTooltipProperty = true;
99
81
  _this.allowTooltipOverlappingProperty = false;
@@ -290,15 +272,15 @@ var RolloverModifier = /** @class */ (function (_super) {
290
272
  _super.prototype.modifierMouseMove.call(this, args);
291
273
  var translatedMousePoint;
292
274
  if (!this.mousePoint) {
293
- this.mousePosition = EMousePosition.OutOfCanvas;
275
+ this.mousePosition = MousePosition_1.EMousePosition.OutOfCanvas;
294
276
  }
295
277
  else {
296
278
  translatedMousePoint = (0, translate_1.translateFromCanvasToSeriesViewRect)(this.mousePoint, this.parentSurface.seriesViewRect);
297
279
  if (!translatedMousePoint) {
298
- this.mousePosition = EMousePosition.AxisArea;
280
+ this.mousePosition = MousePosition_1.EMousePosition.AxisArea;
299
281
  }
300
282
  else {
301
- this.mousePosition = EMousePosition.SeriesArea;
283
+ this.mousePosition = MousePosition_1.EMousePosition.SeriesArea;
302
284
  }
303
285
  }
304
286
  this.update();
@@ -308,7 +290,7 @@ var RolloverModifier = /** @class */ (function (_super) {
308
290
  */
309
291
  RolloverModifier.prototype.modifierMouseLeave = function (args) {
310
292
  _super.prototype.modifierMouseLeave.call(this, args);
311
- this.mousePosition = EMousePosition.OutOfCanvas;
293
+ this.mousePosition = MousePosition_1.EMousePosition.OutOfCanvas;
312
294
  this.update();
313
295
  };
314
296
  /**
@@ -477,7 +459,7 @@ var RolloverModifier = /** @class */ (function (_super) {
477
459
  }
478
460
  };
479
461
  RolloverModifier.prototype.updateLine = function () {
480
- if (this.mousePosition !== EMousePosition.SeriesArea) {
462
+ if (this.mousePosition !== MousePosition_1.EMousePosition.SeriesArea) {
481
463
  this.rolloverLineAnnotation.isHidden = true;
482
464
  return;
483
465
  }
@@ -551,7 +533,7 @@ var RolloverModifier = /** @class */ (function (_super) {
551
533
  rs.rolloverModifierProps1.tooltip.y1 = undefined;
552
534
  }
553
535
  });
554
- if (this.mousePosition !== EMousePosition.SeriesArea) {
536
+ if (this.mousePosition !== MousePosition_1.EMousePosition.SeriesArea) {
555
537
  rsList.forEach(function (rs) {
556
538
  rs.rolloverModifierProps.marker.resumeInvalidate();
557
539
  rs.rolloverModifierProps.tooltip.resumeInvalidate();
@@ -5,6 +5,7 @@ import { EChart2DModifierType } from "../../types/ChartModifierType";
5
5
  import { EXyDirection } from "../../types/XyDirection";
6
6
  import { IThemeProvider } from "../Themes/IThemeProvider";
7
7
  import { AxisBase2D } from "../Visuals/Axis/AxisBase2D";
8
+ import { RubberBandSvgRect } from "../Visuals/RubberBandSvgRect/RubberBandSvgRect";
8
9
  import { ChartModifierBase2D, IChartModifierBaseOptions } from "./ChartModifierBase2D";
9
10
  import { ModifierMouseArgs } from "./ModifierMouseArgs";
10
11
  /**
@@ -53,6 +54,7 @@ export interface IRubberBandXyZoomModifierOptions extends IChartModifierBaseOpti
53
54
  * {@link RubberBandXyZoomModifier.animationDuration} and {@link RubberBandXyZoomModifier.easingFunction} properties.
54
55
  */
55
56
  export declare class RubberBandXyZoomModifier extends ChartModifierBase2D {
57
+ static readonly MIN_DRAG_SENSITIVITY = 5;
56
58
  readonly type = EChart2DModifierType.RubberBandXYZoom;
57
59
  /**
58
60
  * When true, the Zoom operations are animated. See also {@link animationDuration} and {@link easingFunction}
@@ -66,10 +68,10 @@ export declare class RubberBandXyZoomModifier extends ChartModifierBase2D {
66
68
  * Defines the easing function for animation. See {@link TEasingFn} for a range of functions
67
69
  */
68
70
  easingFunction: TEasingFn;
69
- private rubberBandRect;
70
- private pointFrom;
71
- private pointTo;
72
- private isClicked;
71
+ protected rubberBandRect: RubberBandSvgRect;
72
+ protected pointFrom: Point;
73
+ protected pointTo: Point;
74
+ protected isClicked: boolean;
73
75
  private fillProperty;
74
76
  private strokeProperty;
75
77
  private strokeThicknessProperty;
@@ -145,13 +147,14 @@ export declare class RubberBandXyZoomModifier extends ChartModifierBase2D {
145
147
  */
146
148
  protected performZoomOnAxis(axis: AxisBase2D, fromCoord: number, toCoord: number): void;
147
149
  protected notifyPropertyChanged(propertyName: string): void;
148
- private calculateDraggedDistance;
149
- private updateRubberBandRect;
150
+ protected calculateDraggedDistance(): number;
151
+ protected updateRubberBandRect(): void;
150
152
  }
151
153
  /**
152
154
  * Given the starting and end mouse-point, computes a rectangle to perform zoom over. Takes into account the xyDirection
153
155
  * @param pointFrom the starting point of the mouse
154
156
  * @param pointTo the end point of the mouse
155
157
  * @param xyDirection the XyDirection
158
+ * @param viewportRect
156
159
  */
157
160
  export declare function getRubberBandRect(pointFrom: Point, pointTo: Point, xyDirection: EXyDirection, viewportRect: Rect): Rect;
@@ -27,8 +27,6 @@ var translate_1 = require("../../utils/translate");
27
27
  var RubberBandSvgRect_1 = require("../Visuals/RubberBandSvgRect/RubberBandSvgRect");
28
28
  var ChartModifierBase2D_1 = require("./ChartModifierBase2D");
29
29
  var constants_1 = require("./constants");
30
- /** @ignore */
31
- var MIN_DRAG_SENSITIVITY = 5;
32
30
  /**
33
31
  * The RubberBandXyZoomModifier provides drag-rectangle to zoom behavior on a 2D {@link SciChartSurface}
34
32
  * within SciChart - High Performance {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}
@@ -134,12 +132,13 @@ var RubberBandXyZoomModifier = /** @class */ (function (_super) {
134
132
  var seriesViewRect = this.parentSurface.seriesViewRect;
135
133
  if (this.isClicked) {
136
134
  this.pointTo = (0, translate_1.translateFromCanvasToSeriesViewRect)(Rect_1.Rect.clipPointToRect(args.mousePoint, seriesViewRect), seriesViewRect);
135
+ var coordSvgTranslation = this.parentSurface.getCoordSvgTranslation();
137
136
  var _a = getRubberBandRect(this.pointFrom, this.pointTo, this.xyDirection, this.parentSurface.seriesViewRect), x = _a.x, right = _a.right, y = _a.y, bottom = _a.bottom;
138
137
  this.rubberBandRect.isHidden = false;
139
- this.rubberBandRect.x1 = (0, translate_1.translateToNotScaled)(x);
140
- this.rubberBandRect.x2 = (0, translate_1.translateToNotScaled)(right);
141
- this.rubberBandRect.y1 = (0, translate_1.translateToNotScaled)(y);
142
- this.rubberBandRect.y2 = (0, translate_1.translateToNotScaled)(bottom);
138
+ this.rubberBandRect.x1 = (0, translate_1.translateToNotScaled)(x + coordSvgTranslation.x);
139
+ this.rubberBandRect.x2 = (0, translate_1.translateToNotScaled)(right + coordSvgTranslation.x);
140
+ this.rubberBandRect.y1 = (0, translate_1.translateToNotScaled)(y + coordSvgTranslation.y);
141
+ this.rubberBandRect.y2 = (0, translate_1.translateToNotScaled)(bottom + coordSvgTranslation.y);
143
142
  }
144
143
  };
145
144
  /**
@@ -156,7 +155,7 @@ var RubberBandXyZoomModifier = /** @class */ (function (_super) {
156
155
  var _a = getRubberBandRect(this.pointFrom, this.pointTo, this.xyDirection, this.parentSurface.seriesViewRect), x = _a.x, right = _a.right, y = _a.y, bottom = _a.bottom;
157
156
  this.isClicked = false;
158
157
  this.rubberBandRect.isHidden = true;
159
- if (this.calculateDraggedDistance() > MIN_DRAG_SENSITIVITY) {
158
+ if (this.calculateDraggedDistance() > RubberBandXyZoomModifier.MIN_DRAG_SENSITIVITY) {
160
159
  this.performZoom(new Point_1.Point(x, y), new Point_1.Point(right, bottom));
161
160
  }
162
161
  }
@@ -271,6 +270,7 @@ var RubberBandXyZoomModifier = /** @class */ (function (_super) {
271
270
  this.rubberBandRect = new RubberBandSvgRect_1.RubberBandSvgRect(this.parentSurface.domSvgContainer, this.fill, this.stroke, this.strokeThickness);
272
271
  }
273
272
  };
273
+ RubberBandXyZoomModifier.MIN_DRAG_SENSITIVITY = 5;
274
274
  return RubberBandXyZoomModifier;
275
275
  }(ChartModifierBase2D_1.ChartModifierBase2D));
276
276
  exports.RubberBandXyZoomModifier = RubberBandXyZoomModifier;
@@ -279,6 +279,7 @@ exports.RubberBandXyZoomModifier = RubberBandXyZoomModifier;
279
279
  * @param pointFrom the starting point of the mouse
280
280
  * @param pointTo the end point of the mouse
281
281
  * @param xyDirection the XyDirection
282
+ * @param viewportRect
282
283
  */
283
284
  function getRubberBandRect(pointFrom, pointTo, xyDirection, viewportRect) {
284
285
  var x1 = pointTo.x <= pointFrom.x ? pointTo.x : pointFrom.x;
@@ -129,6 +129,7 @@ var SciChartRenderer = /** @class */ (function () {
129
129
  // Step 3 layout
130
130
  var seriesViewRect = this.sciChartSurface.layoutManager.layoutChart(renderContext.viewportSize);
131
131
  var viewportSvgRect = this.getViewportRect(renderContext.viewportSize, seriesViewRect);
132
+ this.sciChartSurface.setCoordSvgTranslation(seriesViewRect.x - viewportSvgRect.x, seriesViewRect.y - viewportSvgRect.y);
132
133
  this.updateSvgCanvasSize(viewportSvgRect);
133
134
  // Step 4 prepare render data
134
135
  var _a = this.prepareAxesRenderData(), xAxesById = _a.xAxesById, yAxesById = _a.yAxesById;
@@ -176,7 +177,7 @@ var SciChartRenderer = /** @class */ (function () {
176
177
  el.type === IAnnotation_1.EAnnotationType.SVGTextAnnotation ||
177
178
  el.type === IAnnotation_1.EAnnotationType.SVGCustomAnnotation;
178
179
  });
179
- this.drawSvgAnnotations(svgAnnotations, xAxesById, yAxesById, seriesViewRect, viewportSvgRect);
180
+ this.drawSvgAnnotations(svgAnnotations, xAxesById, yAxesById, this.sciChartSurface.getCoordSvgTranslation());
180
181
  // Update watermark
181
182
  this.updateWatermark(renderContext, seriesViewRect);
182
183
  // Step 10 Call OnParentSurfaceRendered
@@ -214,9 +215,7 @@ var SciChartRenderer = /** @class */ (function () {
214
215
  }
215
216
  });
216
217
  };
217
- SciChartRenderer.prototype.drawSvgAnnotations = function (annotations, xAxisById, yAxisById, seriesViewRect, viewportRect) {
218
- var xCoordSvgTranslation = (seriesViewRect.x - viewportRect.x) / DpiHelper_1.DpiHelper.PIXEL_RATIO;
219
- var yCoordSvgTranslation = (seriesViewRect.y - viewportRect.y) / DpiHelper_1.DpiHelper.PIXEL_RATIO;
218
+ SciChartRenderer.prototype.drawSvgAnnotations = function (annotations, xAxisById, yAxisById, coordSvgTranslation) {
220
219
  annotations.forEach(function (a) {
221
220
  var xAxis = xAxisById.item(a.xAxisId) || xAxisById.values[0];
222
221
  var yAxis = yAxisById.item(a.yAxisId) || yAxisById.values[0];
@@ -229,7 +228,7 @@ var SciChartRenderer = /** @class */ (function () {
229
228
  }
230
229
  a.showWarning = false;
231
230
  }
232
- a.update(xAxis.getCurrentCoordinateCalculator(), yAxis.getCurrentCoordinateCalculator(), xCoordSvgTranslation, yCoordSvgTranslation);
231
+ a.update(xAxis.getCurrentCoordinateCalculator(), yAxis.getCurrentCoordinateCalculator(), coordSvgTranslation.x / DpiHelper_1.DpiHelper.PIXEL_RATIO, coordSvgTranslation.y / DpiHelper_1.DpiHelper.PIXEL_RATIO);
233
232
  });
234
233
  };
235
234
  SciChartRenderer.prototype.validate = function () {
@@ -240,6 +239,18 @@ var SciChartRenderer = /** @class */ (function () {
240
239
  // Is XAxes and YAxes collection null or empty
241
240
  // is XAxis a CategoryAxis and renderableseries is null or empty
242
241
  // Do all renderableseries have dataseries
242
+ var errors = [];
243
+ if (this.sciChartSurface.renderableSeries.size() > 0) {
244
+ if (this.sciChartSurface.xAxes.size() === 0) {
245
+ errors.push("Chart must have at least one X axis");
246
+ }
247
+ if (this.sciChartSurface.yAxes.size() === 0) {
248
+ errors.push("Chart must have at least one Y axis");
249
+ }
250
+ }
251
+ if (errors.length > 0) {
252
+ throw new Error(errors.join("\n"));
253
+ }
243
254
  };
244
255
  SciChartRenderer.prototype.updateSvgCanvasSize = function (seriesViewRect) {
245
256
  // Convert seriesViewRect back to device pixels
@@ -303,7 +303,7 @@ var NativeTextAnnotation = /** @class */ (function (_super) {
303
303
  var y1 = this.getY1Coordinate(xCalc, yCalc);
304
304
  var style = {
305
305
  fontFamily: this.fontFamily,
306
- fontSize: this.fontSize
306
+ fontSize: Math.round(this.fontSize * DpiHelper_1.DpiHelper.PIXEL_RATIO)
307
307
  };
308
308
  var colorNum = (0, parseColor_1.parseColorToUIntArgb)(this.textColor);
309
309
  colorNum = (0, colorUtil_1.uintArgbColorOverrideOpacity)(colorNum, this.opacity);
@@ -230,16 +230,16 @@ var defaultTooltipDataTemplate = function (seriesInfo, tooltipTitle, tooltipLabe
230
230
  };
231
231
  /** @ignore */
232
232
  var defaultTooltipTemplate = function (id, seriesInfo, rolloverTooltip) {
233
- var _a, _b, _c, _d;
233
+ var _a, _b, _c, _d, _e;
234
234
  var valuesBlock = "";
235
235
  var tooltipProps = rolloverTooltip.tooltipProps;
236
236
  var tooltipTitle = tooltipProps.tooltipTitle, tooltipColor = tooltipProps.tooltipColor, tooltipTextColor = tooltipProps.tooltipTextColor, tooltipLabelX = tooltipProps.tooltipLabelX, tooltipLabelY = tooltipProps.tooltipLabelY;
237
- var tooltipDataTemplate = (_b = (_a = rolloverTooltip.tooltipProps.tooltipDataTemplate) !== null && _a !== void 0 ? _a : rolloverTooltip.tooltipProps.rolloverModifier.tooltipDataTemplate) !== null && _b !== void 0 ? _b : defaultTooltipDataTemplate;
237
+ var tooltipDataTemplate = (_c = (_a = rolloverTooltip.tooltipProps.tooltipDataTemplate) !== null && _a !== void 0 ? _a : (_b = rolloverTooltip.tooltipProps.rolloverModifier) === null || _b === void 0 ? void 0 : _b.tooltipDataTemplate) !== null && _c !== void 0 ? _c : defaultTooltipDataTemplate;
238
238
  var valuesWithLabels = tooltipDataTemplate(seriesInfo, tooltipTitle, tooltipLabelX, tooltipLabelY);
239
239
  // tooltip width
240
- var width = (_c = tooltipProps.width) !== null && _c !== void 0 ? _c : calcTooltipWidth(valuesWithLabels.reduce(function (prev, cur) { return (cur.length > prev ? cur.length : prev); }, 0));
240
+ var width = (_d = tooltipProps.width) !== null && _d !== void 0 ? _d : calcTooltipWidth(valuesWithLabels.reduce(function (prev, cur) { return (cur.length > prev ? cur.length : prev); }, 0));
241
241
  // tooltip height
242
- var height = (_d = tooltipProps.height) !== null && _d !== void 0 ? _d : calcTooltipHeight(valuesWithLabels.length);
242
+ var height = (_e = tooltipProps.height) !== null && _e !== void 0 ? _e : calcTooltipHeight(valuesWithLabels.length);
243
243
  rolloverTooltip.updateSize(width, height);
244
244
  valuesWithLabels.forEach(function (val, index) {
245
245
  valuesBlock += "<tspan x=\"8\" dy=\"1.2em\">".concat(val, "</tspan>");
@@ -1,9 +1,14 @@
1
- import { RolloverModifier, TRolloverTooltipDataTemplate } from "../../../ChartModifiers/RolloverModifier";
1
+ import { TRolloverTooltipDataTemplate } from "../../../ChartModifiers/RolloverModifier";
2
2
  import { SeriesInfo } from "../../../Model/ChartData/SeriesInfo";
3
3
  import { RolloverMarkerSvgAnnotation } from "../../Annotations/RolloverMarkerSvgAnnotation";
4
4
  import { RolloverTooltipSvgAnnotation } from "../../Annotations/RolloverTooltipSvgAnnotation";
5
5
  import { IRenderableSeries } from "../IRenderableSeries";
6
+ import { EMousePosition } from "../../../../types/MousePosition";
6
7
  export declare type TRolloverTooltipSvgTemplate = (id: string, seriesInfo: SeriesInfo, rolloverTooltip: RolloverTooltipSvgAnnotation) => string;
8
+ export interface IRolloverModifier {
9
+ getMousePosition: () => EMousePosition;
10
+ tooltipDataTemplate: TRolloverTooltipDataTemplate;
11
+ }
7
12
  export declare class RolloverModifierRenderableSeriesProps {
8
13
  tooltip: RolloverTooltipSvgAnnotation;
9
14
  marker: RolloverMarkerSvgAnnotation;
@@ -14,7 +19,7 @@ export declare class RolloverModifierRenderableSeriesProps {
14
19
  tooltipTemplate: TRolloverTooltipSvgTemplate;
15
20
  tooltipLegendOffsetX: number;
16
21
  tooltipLegendOffsetY: number;
17
- rolloverModifier: RolloverModifier;
22
+ rolloverModifier: IRolloverModifier;
18
23
  private tooltipLegendTemplateProperty;
19
24
  private invalidateParentCallback;
20
25
  private showsRolloverProperty;
@@ -32,10 +32,10 @@ export declare class SciChartOverview implements IDeletable, IThemeable {
32
32
  * Creates a {@link SciChartOverview} and {@link TSciChart | WebAssembly Context} to occupy the div by element ID in your DOM.
33
33
  * @remarks This method is async and must be awaited
34
34
  * @param parentChart The {@link SciChartSurface} of the {@link SciChartOverview} will reside
35
- * @param overviewRootElementId The Div Element ID where the {@link SciChartSurface} of the {@link SciChartOverview} will reside
35
+ * @param overviewRootElementId The Div Element ID or reference where the {@link SciChartSurface} of the {@link SciChartOverview} will reside
36
36
  * @param options Optional - Optional parameters for chart creation. See {@link IOverviewOptions for more details}
37
37
  */
38
- static create(parentChart: SciChartSurface, overviewRootElementId: string, options?: IOverviewOptions): Promise<SciChartOverview>;
38
+ static create(parentChart: SciChartSurface, overviewRootElement?: string | HTMLDivElement, options?: IOverviewOptions): Promise<SciChartOverview>;
39
39
  private readonly overviewXAxisProperty;
40
40
  private readonly overviewYAxisProperty;
41
41
  private readonly rangeSelectionModifierProperty;
@@ -79,15 +79,15 @@ var SciChartOverview = /** @class */ (function () {
79
79
  * Creates a {@link SciChartOverview} and {@link TSciChart | WebAssembly Context} to occupy the div by element ID in your DOM.
80
80
  * @remarks This method is async and must be awaited
81
81
  * @param parentChart The {@link SciChartSurface} of the {@link SciChartOverview} will reside
82
- * @param overviewRootElementId The Div Element ID where the {@link SciChartSurface} of the {@link SciChartOverview} will reside
82
+ * @param overviewRootElementId The Div Element ID or reference where the {@link SciChartSurface} of the {@link SciChartOverview} will reside
83
83
  * @param options Optional - Optional parameters for chart creation. See {@link IOverviewOptions for more details}
84
84
  */
85
- SciChartOverview.create = function (parentChart, overviewRootElementId, options) {
85
+ SciChartOverview.create = function (parentChart, overviewRootElement, options) {
86
86
  return __awaiter(this, void 0, void 0, function () {
87
87
  var _a, sciChartSurface, wasmContext, rangeSelectionModifier, xAxis, yAxis;
88
88
  return __generator(this, function (_b) {
89
89
  switch (_b.label) {
90
- case 0: return [4 /*yield*/, createSciChartOverview(parentChart, overviewRootElementId, options)];
90
+ case 0: return [4 /*yield*/, createSciChartOverview(parentChart, overviewRootElement, options)];
91
91
  case 1:
92
92
  _a = _b.sent(), sciChartSurface = _a.sciChartSurface, wasmContext = _a.wasmContext, rangeSelectionModifier = _a.rangeSelectionModifier, xAxis = _a.xAxis, yAxis = _a.yAxis;
93
93
  return [2 /*return*/, new SciChartOverview(parentChart, sciChartSurface, wasmContext, rangeSelectionModifier, xAxis, yAxis)];
@@ -158,13 +158,13 @@ var SciChartOverview = /** @class */ (function () {
158
158
  }());
159
159
  exports.SciChartOverview = SciChartOverview;
160
160
  /** @ignore */
161
- var createSciChartOverview = function (originalSciChartSurface, overviewRootElementId, options) { return __awaiter(void 0, void 0, void 0, function () {
161
+ var createSciChartOverview = function (originalSciChartSurface, overviewRootElement, options) { return __awaiter(void 0, void 0, void 0, function () {
162
162
  var _a, wasmContext, sciChartSurface, mainAxisId, secondaryAxisId, originalMainAxis, originalSecondaryAxis, originalXAxis, originalYAxis, xAxisOptions, yAxisOptions, xAxis, yAxis, mainOverviewAxis, defaultTransform, renderableSeries, rangeSelectionModifier;
163
163
  var _b;
164
164
  var _c, _d, _e, _f;
165
165
  return __generator(this, function (_g) {
166
166
  switch (_g.label) {
167
- case 0: return [4 /*yield*/, SciChartSurface_1.SciChartSurface.create(overviewRootElementId, options)];
167
+ case 0: return [4 /*yield*/, SciChartSurface_1.SciChartSurface.create(overviewRootElement, options)];
168
168
  case 1:
169
169
  _a = _g.sent(), wasmContext = _a.wasmContext, sciChartSurface = _a.sciChartSurface;
170
170
  mainAxisId = (_c = options === null || options === void 0 ? void 0 : options.mainAxisId) !== null && _c !== void 0 ? _c : AxisBase2D_1.AxisBase2D.DEFAULT_AXIS_ID;
@@ -225,12 +225,13 @@ var createSciChartOverview = function (originalSciChartSurface, overviewRootElem
225
225
  if ((options === null || options === void 0 ? void 0 : options.rangeSelectionAnnotationSvgString) !== undefined) {
226
226
  rangeSelectionModifier.rangeSelectionAnnotation.svgString = options.rangeSelectionAnnotationSvgString;
227
227
  }
228
+ xAxis.visibleRangeChanged.subscribe(function (_a) {
229
+ var overviewVisibleRange = _a.visibleRange;
230
+ var updatedSelectedRange = originalMainAxis.visibleRange.clip(overviewVisibleRange);
231
+ rangeSelectionModifier.selectedArea = updatedSelectedRange;
232
+ });
228
233
  originalMainAxis.visibleRangeChanged.subscribe(function (_a) {
229
234
  var visibleRange = _a.visibleRange;
230
- if (visibleRange.min < mainOverviewAxis.visibleRange.min ||
231
- visibleRange.max > mainOverviewAxis.visibleRange.max) {
232
- mainOverviewAxis.visibleRange = new NumberRange_1.NumberRange(Math.min(visibleRange.min, mainOverviewAxis.visibleRange.min), Math.max(visibleRange.max, mainOverviewAxis.visibleRange.max));
233
- }
234
235
  var updatedSelectedRange = visibleRange.clip(mainOverviewAxis.visibleRange);
235
236
  var shouldUpdateSelectedRange = !updatedSelectedRange.equals(rangeSelectionModifier.selectedArea);
236
237
  if (shouldUpdateSelectedRange) {
@@ -27,6 +27,7 @@ import { IDataLabelLayoutManager } from "./RenderableSeries/DataLabels/DataLabel
27
27
  import { IRenderableSeries } from "./RenderableSeries/IRenderableSeries";
28
28
  import { ESurfaceType, SciChartSurfaceBase, TSciChartConfig } from "./SciChartSurfaceBase";
29
29
  import { TDpiChangedEventArgs } from "./TextureManager/DpiHelper";
30
+ import { Point } from "../../Core/Point";
30
31
  export declare type TWebAssemblyChart = {
31
32
  wasmContext: TSciChart;
32
33
  sciChartSurface: SciChartSurface;
@@ -223,6 +224,8 @@ export declare class SciChartSurface extends SciChartSurfaceBase {
223
224
  private drawSeriesBehindAxisProperty;
224
225
  private autoColorModeProperty;
225
226
  private autoColorRequired;
227
+ private xCoordSvgTrans;
228
+ private yCoordSvgTrans;
226
229
  /**
227
230
  * Creates an instance of the {@link SciChartSurface}
228
231
  * @param webAssemblyContext The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and
@@ -454,6 +457,16 @@ export declare class SciChartSurface extends SciChartSurfaceBase {
454
457
  getSeriesViewRectPadding(scaled?: boolean): Thickness;
455
458
  /** Calls resolveAutoColors on each series to resolve colors marked as auto based on the seriesColorPalette */
456
459
  resolveAutoColors(maxSeries?: number): void;
460
+ /**
461
+ * Used internally - sets SVG Canvas Translation
462
+ * @param x
463
+ * @param y
464
+ */
465
+ setCoordSvgTranslation(x: number, y: number): void;
466
+ /**
467
+ * Gets SVG Canvas Translation, used to draw on SVG Canvas using different {@link ESvgClippingMode}
468
+ */
469
+ getCoordSvgTranslation(): Point;
457
470
  /**
458
471
  * Convert the object to a definition that can be serialized to JSON, or used directly with the builder api
459
472
  * @param excludeData if set true, data values will not be included in the json.
@@ -71,6 +71,7 @@ var sciChartInitCommon_1 = require("./sciChartInitCommon");
71
71
  var SciChartSurfaceBase_1 = require("./SciChartSurfaceBase");
72
72
  var DpiHelper_1 = require("./TextureManager/DpiHelper");
73
73
  var UpdateSuspender_1 = require("./UpdateSuspender");
74
+ var Point_1 = require("../../Core/Point");
74
75
  exports.sciChartConfig = {};
75
76
  // To force the worker to be created before it is needed, so we know if it alive or not
76
77
  var t = TextureWorker_1.textureWorker;
@@ -150,6 +151,8 @@ var SciChartSurface = /** @class */ (function (_super) {
150
151
  _this.drawSeriesBehindAxisProperty = false;
151
152
  _this.autoColorModeProperty = AutoColorMode_1.EAutoColorMode.OnAddRemoveSeries;
152
153
  _this.autoColorRequired = true;
154
+ _this.xCoordSvgTrans = 0;
155
+ _this.yCoordSvgTrans = 0;
153
156
  _this.subChartCounter = 0;
154
157
  var canvasWidth = (_b = (_a = _this.domCanvas2D) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : app_1.DEFAULT_WIDTH;
155
158
  var canvasHeight = (_d = (_c = _this.domCanvas2D) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : app_1.DEFAULT_HEIGHT;
@@ -980,6 +983,21 @@ var SciChartSurface = /** @class */ (function (_super) {
980
983
  }
981
984
  }
982
985
  };
986
+ /**
987
+ * Used internally - sets SVG Canvas Translation
988
+ * @param x
989
+ * @param y
990
+ */
991
+ SciChartSurface.prototype.setCoordSvgTranslation = function (x, y) {
992
+ this.xCoordSvgTrans = x;
993
+ this.yCoordSvgTrans = y;
994
+ };
995
+ /**
996
+ * Gets SVG Canvas Translation, used to draw on SVG Canvas using different {@link ESvgClippingMode}
997
+ */
998
+ SciChartSurface.prototype.getCoordSvgTranslation = function () {
999
+ return new Point_1.Point(this.xCoordSvgTrans, this.yCoordSvgTrans);
1000
+ };
983
1001
  /**
984
1002
  * Convert the object to a definition that can be serialized to JSON, or used directly with the builder api
985
1003
  * @param excludeData if set true, data values will not be included in the json.