scichart 3.0.0-beta.224 → 3.0.0-beta.230

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.
@@ -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) => {
@@ -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 () {
@@ -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;
@@ -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.
@@ -1,4 +1,4 @@
1
1
  import { TSciChart } from "../types/TSciChart";
2
2
  import { TSciChart3D } from "../types/TSciChart3D";
3
- export declare const libraryVersion = "3.0.0-beta.224";
3
+ export declare const libraryVersion = "3.0.0-beta.230";
4
4
  export declare const checkBuildStamp: (wasmContext: TSciChart | TSciChart3D) => boolean;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkBuildStamp = exports.libraryVersion = void 0;
4
- var buildStamp = "2022-12-10T00:00:00";
4
+ var buildStamp = "2022-12-15T00:00:00";
5
5
  var result;
6
6
  // tslint:disable-next-line:no-var-requires
7
- exports.libraryVersion = "3.0.0-beta.224";
7
+ exports.libraryVersion = "3.0.0-beta.230";
8
8
  var checkBuildStamp = function (wasmContext) {
9
9
  if (result !== undefined)
10
10
  return result;
@@ -479,8 +479,7 @@ var MouseManager = /** @class */ (function () {
479
479
  MouseManager.prototype.updateSubCharts = function (args, eventType) {
480
480
  var _this = this;
481
481
  var subCharts = this.sciChartSurface.subCharts;
482
- subCharts === null || subCharts === void 0 ? void 0 : subCharts.forEach(function (scs) {
483
- var subEventType = eventType;
482
+ var currentActiveSubChart = subCharts.find(function (scs) {
484
483
  var _a = scs.padding, top = _a.top, left = _a.left, bottom = _a.bottom, right = _a.right;
485
484
  var _b = args.mousePoint, x = _b.x, y = _b.y;
486
485
  var xns = x / DpiHelper_1.DpiHelper.PIXEL_RATIO;
@@ -488,14 +487,17 @@ var MouseManager = /** @class */ (function () {
488
487
  var _c = _this.sciChartSurface.renderSurface.viewportSize, width = _c.width, height = _c.height;
489
488
  var wns = width / DpiHelper_1.DpiHelper.PIXEL_RATIO;
490
489
  var hns = height / DpiHelper_1.DpiHelper.PIXEL_RATIO;
491
- var isNowOver = left <= xns && xns <= wns - right && top <= yns && yns <= hns - bottom;
490
+ return left <= xns && xns <= wns - right && top <= yns && yns <= hns - bottom;
491
+ });
492
+ subCharts === null || subCharts === void 0 ? void 0 : subCharts.forEach(function (scs) {
493
+ var subEventType = eventType;
492
494
  if (scs.mouseManager.isOver) {
493
- if (!isNowOver) {
495
+ if (scs !== currentActiveSubChart) {
494
496
  scs.mouseManager.isOver = false;
495
497
  // Leaving to surface
496
498
  if (subEventType === EMouseEventType.Move) {
497
499
  var leaveArgs = new ModifierMouseArgs_1.ModifierMouseArgs(args.mousePoint, args);
498
- _this.processSubChartEvent(EMouseEventType.Leave, scs, leaveArgs, subCharts);
500
+ _this.processSubChartEvent(EMouseEventType.Leave, scs, leaveArgs, subCharts, undefined);
499
501
  }
500
502
  // If not over the subchart, don't process anything except cancellation events
501
503
  if (subEventType !== EMouseEventType.Cancel && subEventType !== EMouseEventType.Up) {
@@ -504,12 +506,12 @@ var MouseManager = /** @class */ (function () {
504
506
  }
505
507
  }
506
508
  else {
507
- if (isNowOver) {
509
+ if (scs === currentActiveSubChart) {
508
510
  scs.mouseManager.isOver = true;
509
511
  // Entering from surface
510
512
  if (subEventType === EMouseEventType.Move) {
511
513
  var enterArgs = new ModifierMouseArgs_1.ModifierMouseArgs(args.mousePoint, args);
512
- _this.processSubChartEvent(EMouseEventType.Enter, scs, enterArgs, subCharts);
514
+ _this.processSubChartEvent(EMouseEventType.Enter, scs, enterArgs, subCharts, undefined);
513
515
  }
514
516
  }
515
517
  else {
@@ -520,14 +522,14 @@ var MouseManager = /** @class */ (function () {
520
522
  }
521
523
  }
522
524
  if (subEventType !== undefined) {
523
- _this.processSubChartEvent(subEventType, scs, args, subCharts);
525
+ var masterData = _this.getMasterData(currentActiveSubChart, args);
526
+ _this.processSubChartEvent(subEventType, scs, args, subCharts, masterData);
524
527
  }
525
528
  });
526
529
  };
527
- MouseManager.prototype.processSubChartEvent = function (eventType, scs, args, subCharts) {
530
+ MouseManager.prototype.processSubChartEvent = function (eventType, scs, args, subCharts, masterData) {
528
531
  var _this = this;
529
532
  this.callEvent(eventType, scs, args);
530
- var masterData = this.getMasterData(scs, args);
531
533
  scs.chartModifierGroups.forEach(function (modifierGroup) {
532
534
  subCharts
533
535
  .filter(function (sc) { return sc.id !== scs.id; })
package/Core/Telemetry.js CHANGED
@@ -103,7 +103,7 @@ var sendTelemetry = function () {
103
103
  "Content-Type": "application/json"
104
104
  },
105
105
  body: body
106
- }).catch();
106
+ }).catch(function (err) { });
107
107
  hasSent = true;
108
108
  };
109
109
  exports.sendTelemetry = sendTelemetry;