scichart 3.0.280 → 3.0.300

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 (84) hide show
  1. package/Builder/chartBuilder.d.ts +7 -7
  2. package/Charting/ChartModifiers/ChartModifierBase.d.ts +1 -1
  3. package/Charting/ChartModifiers/CursorModifier.d.ts +0 -4
  4. package/Charting/ChartModifiers/CursorModifier.js +4 -6
  5. package/Charting/ChartModifiers/RolloverModifier.d.ts +2 -6
  6. package/Charting/ChartModifiers/RolloverModifier.js +17 -11
  7. package/Charting/LayoutManager/BaseCenteredAxisLayoutStrategy.d.ts +1 -1
  8. package/Charting/LayoutManager/CentralAxesLayoutManager.d.ts +1 -1
  9. package/Charting/Model/BaseDataSeries.d.ts +5 -1
  10. package/Charting/Model/BaseDataSeries.js +24 -14
  11. package/Charting/Model/ChartData/SeriesInfo.d.ts +1 -0
  12. package/Charting/Model/ChartData/SeriesInfo.js +1 -0
  13. package/Charting/Model/Filters/HlcCustomFilter.js +19 -7
  14. package/Charting/Model/Filters/OhlcCustomFilter.js +20 -8
  15. package/Charting/Model/Filters/XyCustomFilter.js +15 -5
  16. package/Charting/Model/Filters/XyRatioFilter.js +1 -0
  17. package/Charting/Model/Filters/XyyCustomFilter.js +17 -6
  18. package/Charting/Model/Filters/XyzCustomFilter.js +17 -6
  19. package/Charting/Services/SciChartRenderer.js +42 -2
  20. package/Charting/Visuals/Annotations/AdornerLayer.d.ts +1 -0
  21. package/Charting/Visuals/Annotations/AdornerLayer.js +6 -3
  22. package/Charting/Visuals/Annotations/AnnotationBase.js +4 -0
  23. package/Charting/Visuals/Axis/AxisBase2D.d.ts +1 -1
  24. package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +1 -0
  25. package/Charting/Visuals/Axis/LogarithmicAxis.d.ts +2 -2
  26. package/Charting/Visuals/PointMarkers/SpritePointMarker.d.ts +1 -1
  27. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +1 -1
  28. package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.d.ts +1 -1
  29. package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.d.ts +1 -1
  30. package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.d.ts +1 -1
  31. package/Charting/Visuals/RenderableSeries/DataLabels/BandSeriesDataLabelProvider.d.ts +1 -1
  32. package/Charting/Visuals/RenderableSeries/DataLabels/ColumnSeriesDataLabelProvider.d.ts +1 -1
  33. package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.d.ts +1 -1
  34. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.d.ts +1 -1
  35. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.d.ts +1 -1
  36. package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.d.ts +1 -1
  37. package/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider.d.ts +1 -1
  38. package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.d.ts +1 -1
  39. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +1 -1
  40. package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.d.ts +1 -1
  41. package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.d.ts +1 -1
  42. package/Charting/Visuals/RenderableSeries/FastOhlcRenderableSeries.d.ts +1 -1
  43. package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +2 -0
  44. package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +1 -0
  45. package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.d.ts +4 -0
  46. package/Charting/Visuals/RenderableSeries/HitTest/LineSeriesHitTestProvider.js +2 -0
  47. package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +1 -0
  48. package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.js +5 -2
  49. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.d.ts +1 -1
  50. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +1 -1
  51. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.d.ts +1 -1
  52. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.d.ts +1 -1
  53. package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.d.ts +1 -1
  54. package/Charting/Visuals/SciChartDefaults.d.ts +7 -0
  55. package/Charting/Visuals/SciChartDefaults.js +7 -0
  56. package/Charting/Visuals/SciChartSurface.d.ts +7 -1
  57. package/Charting/Visuals/SciChartSurface.js +5 -0
  58. package/Charting/Visuals/licenseManager2D.js +10 -4
  59. package/Charting3D/Visuals/Axis/NumericAxis3D.d.ts +1 -1
  60. package/Charting3D/Visuals/SciChart3DRenderer.d.ts +1 -0
  61. package/Charting3D/Visuals/SciChart3DRenderer.js +29 -1
  62. package/Charting3D/Visuals/SciChart3DSurface.d.ts +5 -1
  63. package/Charting3D/Visuals/SciChart3DSurface.js +7 -2
  64. package/Core/BuildStamp.d.ts +1 -1
  65. package/Core/BuildStamp.js +2 -2
  66. package/README.md +12 -7
  67. package/_wasm/scichart.browser.js +1 -1
  68. package/_wasm/scichart2d.js +10 -10
  69. package/_wasm/scichart2d.wasm +0 -0
  70. package/_wasm/scichart3d.js +16 -16
  71. package/_wasm/scichart3d.wasm +0 -0
  72. package/index.d.ts +960 -0
  73. package/index.js +1302 -2
  74. package/index.min.js +1 -0
  75. package/package.json +18 -4
  76. package/types/ExecuteOn.d.ts +9 -1
  77. package/types/ExecuteOn.js +9 -1
  78. package/types/MousePosition.d.ts +0 -1
  79. package/types/MousePosition.js +0 -1
  80. package/types/WatermarkPosition.d.ts +6 -0
  81. package/types/WatermarkPosition.js +10 -0
  82. package/types/licensingClasses.d.ts +8 -7
  83. package/types/licensingClasses.js +8 -7
  84. package/utils/ccall/appendDoubleVectorFromJsArray.js +1 -1
@@ -50,19 +50,19 @@ export declare const chartBuilder: {
50
50
  /** @inheritdoc */
51
51
  configureChart: (sciChartSurface: SciChartSurfaceBase, wasmContext: TSciChart, definition: string | TSurfaceDefinition) => void;
52
52
  /** @inheritdoc */
53
- buildSeries: (wasmContext: TSciChart, definition: import("./buildSeries").TSeriesDefinition | import("./buildSeries").TSeriesDefinition[], sharedData?: import("./buildDataSeries").TSharedDataDefinition) => import("../Charting/Visuals/RenderableSeries/IRenderableSeries").IRenderableSeries[];
53
+ buildSeries: (wasmContext: TSciChart, definition: import("./buildSeries").TSeriesDefinition | import("./buildSeries").TSeriesDefinition[], sharedData?: import("./buildDataSeries").TSharedDataDefinition) => import("..").IRenderableSeries[];
54
54
  /** @inheritdoc */
55
- buildDataSeries: (wasmContext: TSciChart, seriesDefinition: import("./buildSeries").TSeriesDefinition, sharedData?: import("./buildDataSeries").TSharedDataDefinition) => import("../Charting/Model/IDataSeries").IDataSeries;
55
+ buildDataSeries: (wasmContext: TSciChart, seriesDefinition: import("./buildSeries").TSeriesDefinition, sharedData?: import("./buildDataSeries").TSharedDataDefinition) => import("..").IDataSeries;
56
56
  /** @inheritdoc */
57
- buildModifiers: (definition: import("./buildModifiers").TModifierDefinition | import("./buildModifiers").TModifierDefinition[]) => import("../Charting/ChartModifiers/ChartModifierBase2D").ChartModifierBase2D[];
57
+ buildModifiers: (definition: import("./buildModifiers").TModifierDefinition | import("./buildModifiers").TModifierDefinition[]) => import("..").ChartModifierBase2D[];
58
58
  /** @inheritdoc */
59
- buildAxes: (wasmContext: TSciChart, definition: import("./buildAxis").TAxisDefinition | import("./buildAxis").TAxisDefinition[]) => import("../Charting/Visuals/Axis/AxisBase2D").AxisBase2D[];
59
+ buildAxes: (wasmContext: TSciChart, definition: import("./buildAxis").TAxisDefinition | import("./buildAxis").TAxisDefinition[]) => import("..").AxisBase2D[];
60
60
  /** @inheritdoc */
61
61
  buildAnnotations: (definition: import("./buildAnnotations").TAnnotationDefinition | import("./buildAnnotations").TAnnotationDefinition[]) => any[];
62
62
  /** @inheritdoc */
63
- registerType: <T extends object>(baseType: import("../types/BaseType").EBaseType, type: string, constructor: (options?: any) => T, overWrite?: boolean) => void;
63
+ registerType: <T extends object>(baseType: import("..").EBaseType, type: string, constructor: (options?: any) => T, overWrite?: boolean) => void;
64
64
  /** @inheritdoc */
65
- registerWasmType: <T_1 extends object>(baseType: import("../types/BaseType").EBaseType, type: string, constructor: (wasmContext: TSciChart | TSciChart3D, options?: any) => T_1, overWrite?: boolean) => void;
65
+ registerWasmType: <T_1 extends object>(baseType: import("..").EBaseType, type: string, constructor: (wasmContext: TSciChart | TSciChart3D, options?: any) => T_1, overWrite?: boolean) => void;
66
66
  /** @inheritdoc */
67
- registerFunction: <T_2 extends Function>(baseType: import("../types/BaseType").EBaseType, type: string, constructor: T_2, overWrite?: boolean) => void;
67
+ registerFunction: <T_2 extends Function>(baseType: import("..").EBaseType, type: string, constructor: T_2, overWrite?: boolean) => void;
68
68
  };
@@ -164,7 +164,7 @@ export declare abstract class ChartModifierBase<TSurfaceType extends SciChartSur
164
164
  protected isAttachedProperty: boolean;
165
165
  protected receiveHandledEventsProperty: boolean;
166
166
  protected mousePoint: Point;
167
- private executeOnProperty;
167
+ protected executeOnProperty: EExecuteOn;
168
168
  private parentSurfaceProperty;
169
169
  constructor(options?: {
170
170
  id?: string;
@@ -207,10 +207,6 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
207
207
  * @inheritDoc
208
208
  */
209
209
  modifierMouseLeave(args: ModifierMouseArgs): void;
210
- /**
211
- * @inheritDoc
212
- */
213
- modifierMouseEnter(args: ModifierMouseArgs): void;
214
210
  /**
215
211
  * @inheritDoc
216
212
  */
@@ -275,12 +275,6 @@ var CursorModifier = /** @class */ (function (_super) {
275
275
  this.mousePosition = MousePosition_1.EMousePosition.OutOfCanvas;
276
276
  this.update();
277
277
  };
278
- /**
279
- * @inheritDoc
280
- */
281
- CursorModifier.prototype.modifierMouseEnter = function (args) {
282
- _super.prototype.modifierMouseEnter.call(this, args);
283
- };
284
278
  /**
285
279
  * @inheritDoc
286
280
  */
@@ -481,8 +475,12 @@ var CursorModifier = /** @class */ (function (_super) {
481
475
  crosshairStroke: this.crosshairStroke,
482
476
  crosshairStrokeDashArray: this.crosshairStrokeDashArray,
483
477
  crosshairStrokeThickness: this.crosshairStrokeThickness,
478
+ hitTestRadius: this.hitTestRadius,
479
+ placementDivId: this.placementDivId,
484
480
  showAxisLabels: this.showAxisLabels,
485
481
  showTooltip: this.showTooltip,
482
+ showXLine: this.showXLine,
483
+ showYLine: this.showYLine,
486
484
  tooltipContainerBackground: this.tooltipContainerBackground,
487
485
  tooltipDataTemplate: this.typeMap.get("tooltipDataTemplate"),
488
486
  tooltipLegendOffsetX: this.tooltipLegendOffsetX,
@@ -125,12 +125,12 @@ export declare class RolloverModifier extends ChartModifierBase2D implements IIn
125
125
  * 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
126
126
  */
127
127
  hitTestRadius: number;
128
+ protected showRolloverLineProperty: boolean;
129
+ protected showTooltipProperty: boolean;
128
130
  private readonly rolloverLineAnnotation;
129
131
  private readonly legendAnnotation;
130
132
  private mousePosition;
131
133
  private tooltipDataTemplateProperty?;
132
- private showRolloverLineProperty;
133
- private showTooltipProperty;
134
134
  private allowTooltipOverlappingProperty;
135
135
  private includedSeriesMap;
136
136
  private placementDivIdProperty;
@@ -195,10 +195,6 @@ export declare class RolloverModifier extends ChartModifierBase2D implements IIn
195
195
  * @inheritDoc
196
196
  */
197
197
  modifierMouseLeave(args: ModifierMouseArgs): void;
198
- /**
199
- * @inheritDoc
200
- */
201
- modifierMouseEnter(args: ModifierMouseArgs): void;
202
198
  /**
203
199
  * @inheritDoc
204
200
  */
@@ -23,6 +23,7 @@ var MousePosition_1 = require("../../types/MousePosition");
23
23
  var SeriesType_1 = require("../../types/SeriesType");
24
24
  var tooltip_1 = require("../../utils/tooltip");
25
25
  var translate_1 = require("../../utils/translate");
26
+ var IThemeProvider_1 = require("../Themes/IThemeProvider");
26
27
  var AnnotationBase_1 = require("../Visuals/Annotations/AnnotationBase");
27
28
  var LineAnnotation_1 = require("../Visuals/Annotations/LineAnnotation");
28
29
  var RolloverLegendSvgAnnotation_1 = require("../Visuals/Annotations/RolloverLegendSvgAnnotation");
@@ -75,9 +76,9 @@ var RolloverModifier = /** @class */ (function (_super) {
75
76
  * 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
76
77
  */
77
78
  _this.hitTestRadius = 0;
78
- _this.mousePosition = MousePosition_1.EMousePosition.OutOfCanvas;
79
79
  _this.showRolloverLineProperty = true;
80
80
  _this.showTooltipProperty = true;
81
+ _this.mousePosition = MousePosition_1.EMousePosition.OutOfCanvas;
81
82
  _this.allowTooltipOverlappingProperty = false;
82
83
  _this.includedSeriesMap = new Map();
83
84
  _this.hitTestRenderableSeries = _this.hitTestRenderableSeries.bind(_this);
@@ -293,12 +294,6 @@ var RolloverModifier = /** @class */ (function (_super) {
293
294
  this.mousePosition = MousePosition_1.EMousePosition.OutOfCanvas;
294
295
  this.update();
295
296
  };
296
- /**
297
- * @inheritDoc
298
- */
299
- RolloverModifier.prototype.modifierMouseEnter = function (args) {
300
- _super.prototype.modifierMouseEnter.call(this, args);
301
- };
302
297
  /**
303
298
  * @inheritDoc
304
299
  */
@@ -377,6 +372,11 @@ var RolloverModifier = /** @class */ (function (_super) {
377
372
  RolloverModifier.prototype.toJSON = function () {
378
373
  var json = _super.prototype.toJSON.call(this);
379
374
  var options = {
375
+ snapToDataPoint: this.snapToDataPoint,
376
+ placementDivId: this.placementDivId,
377
+ hitTestRadius: this.hitTestRadius,
378
+ allowTooltipOverlapping: this.allowTooltipOverlapping,
379
+ rolloverLineStrokeDashArray: this.rolloverLineStrokeDashArray,
380
380
  rolloverLineStroke: this.rolloverLineStroke,
381
381
  rolloverLineStrokeThickness: this.rolloverLineStrokeThickness,
382
382
  showRolloverLine: this.showRolloverLine,
@@ -743,7 +743,7 @@ exports.calcTooltipPositions = calcTooltipPositions;
743
743
  * @param rs RenderableSeries
744
744
  */
745
745
  var createAnnotations = function (rs, placementDivId) {
746
- var _a, _b, _c, _d, _e, _f;
746
+ var _a, _b, _c, _d;
747
747
  if (!rs.rolloverModifierProps.marker) {
748
748
  rs.rolloverModifierProps.marker = new RolloverMarkerSvgAnnotation_1.RolloverMarkerSvgAnnotation(rs.rolloverModifierProps);
749
749
  // Rollover tooltips for multiple Y-Axes are not supported for stacked series
@@ -754,7 +754,7 @@ var createAnnotations = function (rs, placementDivId) {
754
754
  }
755
755
  if (!rs.rolloverModifierProps.tooltip) {
756
756
  rs.rolloverModifierProps.tooltipTitle = (_b = (_a = rs.rolloverModifierProps.tooltipTitle) !== null && _a !== void 0 ? _a : rs.getDataSeriesName()) !== null && _b !== void 0 ? _b : "";
757
- rs.rolloverModifierProps.tooltipColor = (_c = rs.rolloverModifierProps.tooltipColor) !== null && _c !== void 0 ? _c : rs.stroke;
757
+ rs.rolloverModifierProps.tooltipColor = rs.rolloverModifierProps.tooltipColor;
758
758
  rs.rolloverModifierProps.tooltip = new RolloverTooltipSvgAnnotation_1.RolloverTooltipSvgAnnotation(rs.rolloverModifierProps, {
759
759
  seriesType: rs.type,
760
760
  placementDivId: placementDivId
@@ -774,8 +774,8 @@ var createAnnotations = function (rs, placementDivId) {
774
774
  }
775
775
  if (!bandRs.rolloverModifierProps1.tooltip) {
776
776
  bandRs.rolloverModifierProps1.tooltipTitle =
777
- (_e = (_d = bandRs.rolloverModifierProps1.tooltipTitle) !== null && _d !== void 0 ? _d : bandRs.getDataSeriesName()) !== null && _e !== void 0 ? _e : "";
778
- bandRs.rolloverModifierProps1.tooltipColor = (_f = bandRs.rolloverModifierProps1.tooltipColor) !== null && _f !== void 0 ? _f : bandRs.strokeY1;
777
+ (_d = (_c = bandRs.rolloverModifierProps1.tooltipTitle) !== null && _c !== void 0 ? _c : bandRs.getDataSeriesName()) !== null && _d !== void 0 ? _d : "";
778
+ bandRs.rolloverModifierProps1.tooltipColor = bandRs.rolloverModifierProps1.tooltipColor;
779
779
  bandRs.rolloverModifierProps1.tooltip = new RolloverTooltipSvgAnnotation_1.RolloverTooltipSvgAnnotation(bandRs.rolloverModifierProps1, {
780
780
  placementDivId: placementDivId
781
781
  });
@@ -794,6 +794,9 @@ var updateRolloverModifierProps = function (rolloverRSProps, rs, tooltipProps, s
794
794
  rolloverRSProps.marker.isHidden = false;
795
795
  rolloverRSProps.marker.x1 = tooltipProps.xValue;
796
796
  rolloverRSProps.marker.y1 = tooltipProps.yValue;
797
+ if (rolloverRSProps.markerColor.startsWith(IThemeProvider_1.AUTO_COLOR)) {
798
+ rolloverRSProps.markerColor = tooltipProps.isY1 ? rs.strokeY1 : rs.stroke;
799
+ }
797
800
  }
798
801
  // Update tooltips
799
802
  if (showTooltip) {
@@ -802,6 +805,9 @@ var updateRolloverModifierProps = function (rolloverRSProps, rs, tooltipProps, s
802
805
  rolloverRSProps.tooltip.y1 = tooltipProps.yValue;
803
806
  rolloverRSProps.tooltip.xCoordShift = tooltipProps.xCoordShift;
804
807
  rolloverRSProps.tooltip.yCoordShift = tooltipProps.yCoordShift;
808
+ if (rolloverRSProps.tooltipColor.startsWith(IThemeProvider_1.AUTO_COLOR)) {
809
+ rolloverRSProps.tooltipColor = tooltipProps.isY1 ? rs.strokeY1 : rs.stroke;
810
+ }
805
811
  }
806
812
  else {
807
813
  if (placementDivId) {
@@ -68,7 +68,7 @@ export declare abstract class BaseCenteredAxisLayoutStrategy extends BaseAxisLay
68
68
  */
69
69
  constructor(options?: IInnerAxisLayoutStrategyOptions);
70
70
  toJSON(): {
71
- type: import("../../types/LayoutStrategyType").ELayoutStrategyType;
71
+ type: import("../..").ELayoutStrategyType;
72
72
  options: Required<Omit<IInnerAxisLayoutStrategyOptions, never>>;
73
73
  };
74
74
  /**
@@ -65,7 +65,7 @@ export declare class CentralAxesLayoutManager extends LayoutManager {
65
65
  * @remarks The axisPosition obeys {@link coordinateMode} which defines whether it is a pixel, data-value or relative coordinate
66
66
  */
67
67
  set verticalAxisPosition(value: number);
68
- toJSON(): import("../../Builder/buildSurface").TLayoutManagerDefinition;
68
+ toJSON(): import("../..").TLayoutManagerDefinition;
69
69
  /**
70
70
  * @summary Notifies subscribers that a property has changed and the chart requires redrawing
71
71
  * @description SciChart provides fully reactive components, changing any property or changing data will cause the {@link SciChartSurface} to
@@ -162,7 +162,7 @@ export declare abstract class BaseDataSeries implements IDataSeries {
162
162
  /** @inheritDoc */
163
163
  get hasValues(): boolean;
164
164
  /**
165
- * Check if the series has an existing metadaGenerator
165
+ * Check if the series has an existing metadataGenerator
166
166
  */
167
167
  hasMetadataGenerator(): boolean;
168
168
  /**
@@ -179,6 +179,10 @@ export declare abstract class BaseDataSeries implements IDataSeries {
179
179
  * Gets the metadata array length
180
180
  */
181
181
  getMetadataLength(): number;
182
+ /**
183
+ * Check if the series has an existing metadata
184
+ */
185
+ get hasMetadata(): boolean;
182
186
  /**
183
187
  * Sets initial values for the data animation
184
188
  * @param dataSeries The {@link BaseDataSeries} to be used for initial values
@@ -10,15 +10,6 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
- if (ar || !(i in from)) {
16
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
17
- ar[i] = from[i];
18
- }
19
- }
20
- return to.concat(ar || Array.prototype.slice.call(from));
21
- };
22
13
  Object.defineProperty(exports, "__esModule", { value: true });
23
14
  exports.getWindowedYRange = exports.getIndicesRange = exports.BaseDataSeries = void 0;
24
15
  var classFactory_1 = require("../../Builder/classFactory");
@@ -271,7 +262,7 @@ var BaseDataSeries = /** @class */ (function () {
271
262
  configurable: true
272
263
  });
273
264
  /**
274
- * Check if the series has an existing metadaGenerator
265
+ * Check if the series has an existing metadataGenerator
275
266
  */
276
267
  BaseDataSeries.prototype.hasMetadataGenerator = function () {
277
268
  return typeof this.metadataGeneratorProperty !== "undefined";
@@ -311,6 +302,16 @@ var BaseDataSeries = /** @class */ (function () {
311
302
  }
312
303
  return this.metadataProperty.length;
313
304
  };
305
+ Object.defineProperty(BaseDataSeries.prototype, "hasMetadata", {
306
+ /**
307
+ * Check if the series has an existing metadata
308
+ */
309
+ get: function () {
310
+ return this.metadataProperty !== undefined;
311
+ },
312
+ enumerable: false,
313
+ configurable: true
314
+ });
314
315
  /**
315
316
  * Sets initial values for the data animation
316
317
  * @param dataSeries The {@link BaseDataSeries} to be used for initial values
@@ -408,7 +409,6 @@ var BaseDataSeries = /** @class */ (function () {
408
409
  this.metadataProperty.push(metadata);
409
410
  };
410
411
  BaseDataSeries.prototype.appendMetadataRange = function (metadata, length) {
411
- var _a;
412
412
  var _this = this;
413
413
  if (!metadata) {
414
414
  if (!this.metadataGeneratorProperty) {
@@ -421,7 +421,15 @@ var BaseDataSeries = /** @class */ (function () {
421
421
  }
422
422
  }
423
423
  this.fillMetadataIfUndefined();
424
- (_a = this.metadataProperty).push.apply(_a, metadata);
424
+ var startIndex = this.metadataProperty.length;
425
+ // reserve space for new values
426
+ this.metadataProperty.length += length;
427
+ // merge new values into th collection
428
+ for (var i = 0; i < length; ++i) {
429
+ this.metadataProperty[startIndex + i] = metadata[i];
430
+ }
431
+ // Alternative approach
432
+ // this.metadataProperty = this.metadataProperty.concat(metadata);
425
433
  };
426
434
  BaseDataSeries.prototype.insertMetadata = function (startIndex, metadata) {
427
435
  if (!metadata) {
@@ -436,7 +444,6 @@ var BaseDataSeries = /** @class */ (function () {
436
444
  this.metadataProperty.splice(startIndex, 0, metadata);
437
445
  };
438
446
  BaseDataSeries.prototype.insertMetadataRange = function (startIndex, metadata) {
439
- var _a;
440
447
  var _this = this;
441
448
  if (!metadata) {
442
449
  if (!this.metadataGeneratorProperty) {
@@ -449,7 +456,10 @@ var BaseDataSeries = /** @class */ (function () {
449
456
  }
450
457
  }
451
458
  this.fillMetadataIfUndefined();
452
- (_a = this.metadataProperty).splice.apply(_a, __spreadArray([startIndex, 0], metadata, false));
459
+ // TODO probably this could be optimized
460
+ var previousValues = this.metadataProperty.slice(0, startIndex);
461
+ var nextValues = this.metadataProperty.slice(startIndex);
462
+ this.metadataProperty = previousValues.concat(metadata, nextValues);
453
463
  };
454
464
  BaseDataSeries.prototype.removeMetadataAt = function (index) {
455
465
  if (!this.metadataProperty) {
@@ -24,6 +24,7 @@ export declare class SeriesInfo {
24
24
  */
25
25
  isWithinDataBounds: boolean;
26
26
  pointMetadata: unknown;
27
+ point2metadata: unknown;
27
28
  constructor(renderableSeries: IRenderableSeries, hitTestInfo: HitTestInfo);
28
29
  get isVisible(): boolean;
29
30
  get formattedYValue(): string;
@@ -22,6 +22,7 @@ var SeriesInfo = /** @class */ (function () {
22
22
  this.point2xCoordinate = hitTestInfo.point2xCoord;
23
23
  this.point2yCoordinate = hitTestInfo.point2yCoord;
24
24
  this.pointMetadata = hitTestInfo.metadata;
25
+ this.point2metadata = hitTestInfo.point2metadata;
25
26
  if (renderableSeries.type === SeriesType_1.ESeriesType.ColumnSeries) {
26
27
  this.fill = renderableSeries.fill;
27
28
  }
@@ -107,13 +107,25 @@ var HlcCustomFilter = /** @class */ (function (_super) {
107
107
  var highValues = [];
108
108
  var lowValues = [];
109
109
  var closeValues = [];
110
- var metadata = [];
111
- for (var i = startIndex; i < startIndex + count; i++) {
112
- xValues.push(rawX.get(i));
113
- highValues.push(this.highfilterFunction(i, rawHigh.get(i)));
114
- lowValues.push(this.lowfilterFunction(i, rawLow.get(i)));
115
- closeValues.push(this.closefilterFunction(i, rawClose.get(i)));
116
- metadata.push(this.originalSeries.getMetadataAt(i));
110
+ var metadata = undefined;
111
+ // leave metadata unset if if original series has no metadata
112
+ if (this.originalSeries.hasMetadata) {
113
+ metadata = [];
114
+ for (var i = startIndex; i < startIndex + count; i++) {
115
+ xValues.push(rawX.get(i));
116
+ highValues.push(this.highfilterFunction(i, rawHigh.get(i)));
117
+ lowValues.push(this.lowfilterFunction(i, rawLow.get(i)));
118
+ closeValues.push(this.closefilterFunction(i, rawClose.get(i)));
119
+ metadata.push(this.originalSeries.getMetadataAt(i));
120
+ }
121
+ }
122
+ else {
123
+ for (var i = startIndex; i < startIndex + count; i++) {
124
+ xValues.push(rawX.get(i));
125
+ highValues.push(this.highfilterFunction(i, rawHigh.get(i)));
126
+ lowValues.push(this.lowfilterFunction(i, rawLow.get(i)));
127
+ closeValues.push(this.closefilterFunction(i, rawClose.get(i)));
128
+ }
117
129
  }
118
130
  return { xValues: xValues, highValues: highValues, lowValues: lowValues, closeValues: closeValues, metadata: metadata };
119
131
  };
@@ -124,14 +124,26 @@ var OhlcCustomFilter = /** @class */ (function (_super) {
124
124
  var highValues = [];
125
125
  var lowValues = [];
126
126
  var closeValues = [];
127
- var metadata = [];
128
- for (var i = startIndex; i < startIndex + count; i++) {
129
- xValues.push(rawX.get(i));
130
- openValues.push(this.openfilterFunction(i, ohlcSeries.getNativeOpenValues().get(i)));
131
- highValues.push(this.highfilterFunction(i, ohlcSeries.getNativeHighValues().get(i)));
132
- lowValues.push(this.lowfilterFunction(i, ohlcSeries.getNativeLowValues().get(i)));
133
- closeValues.push(this.closefilterFunction(i, ohlcSeries.getNativeCloseValues().get(i)));
134
- metadata.push(this.originalSeries.getMetadataAt(i));
127
+ var metadata = undefined;
128
+ if (this.originalSeries.hasMetadata) {
129
+ metadata = [];
130
+ for (var i = startIndex; i < startIndex + count; i++) {
131
+ xValues.push(rawX.get(i));
132
+ openValues.push(this.openfilterFunction(i, ohlcSeries.getNativeOpenValues().get(i)));
133
+ highValues.push(this.highfilterFunction(i, ohlcSeries.getNativeHighValues().get(i)));
134
+ lowValues.push(this.lowfilterFunction(i, ohlcSeries.getNativeLowValues().get(i)));
135
+ closeValues.push(this.closefilterFunction(i, ohlcSeries.getNativeCloseValues().get(i)));
136
+ metadata.push(this.originalSeries.getMetadataAt(i));
137
+ }
138
+ }
139
+ else {
140
+ for (var i = startIndex; i < startIndex + count; i++) {
141
+ xValues.push(rawX.get(i));
142
+ openValues.push(this.openfilterFunction(i, ohlcSeries.getNativeOpenValues().get(i)));
143
+ highValues.push(this.highfilterFunction(i, ohlcSeries.getNativeHighValues().get(i)));
144
+ lowValues.push(this.lowfilterFunction(i, ohlcSeries.getNativeLowValues().get(i)));
145
+ closeValues.push(this.closefilterFunction(i, ohlcSeries.getNativeCloseValues().get(i)));
146
+ }
135
147
  }
136
148
  return { xValues: xValues, openValues: openValues, highValues: highValues, lowValues: lowValues, closeValues: closeValues, metadata: metadata };
137
149
  };
@@ -81,11 +81,21 @@ var XyCustomFilter = /** @class */ (function (_super) {
81
81
  var rawY = this.getOriginalYValues();
82
82
  var xValues = [];
83
83
  var yValues = [];
84
- var metadata = [];
85
- for (var i = startIndex; i < startIndex + count; i++) {
86
- xValues.push(rawX.get(i));
87
- yValues.push(this.filterFunction(i, rawY.get(i)));
88
- metadata.push(this.originalSeries.getMetadataAt(i));
84
+ var metadata = undefined;
85
+ // leave metadata unset if if original series has no metadata
86
+ if (this.originalSeries.hasMetadata) {
87
+ metadata = [];
88
+ for (var i = startIndex; i < startIndex + count; i++) {
89
+ xValues.push(rawX.get(i));
90
+ yValues.push(this.filterFunction(i, rawY.get(i)));
91
+ metadata.push(this.originalSeries.getMetadataAt(i));
92
+ }
93
+ }
94
+ else {
95
+ for (var i = startIndex; i < startIndex + count; i++) {
96
+ xValues.push(rawX.get(i));
97
+ yValues.push(this.filterFunction(i, rawY.get(i)));
98
+ }
89
99
  }
90
100
  return { xValues: xValues, yValues: yValues, metadata: metadata };
91
101
  };
@@ -102,6 +102,7 @@ var XyRatioFilter = /** @class */ (function (_super) {
102
102
  var rawY = this.getOriginalYValues();
103
103
  var xValues = [];
104
104
  var yValues = [];
105
+ // TODO check if metadata is needed here
105
106
  for (var i = startIndex; i < startIndex + count; i++) {
106
107
  xValues.push(rawX.get(i));
107
108
  yValues.push(rawY.get(i) / this.getDivisorYValues().get(i));
@@ -88,12 +88,23 @@ var XyyCustomFilter = /** @class */ (function (_super) {
88
88
  var xValues = [];
89
89
  var yValues = [];
90
90
  var y1Values = [];
91
- var metadata = [];
92
- for (var i = startIndex; i < startIndex + count; i++) {
93
- xValues.push(rawX.get(i));
94
- yValues.push(this.filterFunction(i, rawY.get(i)));
95
- y1Values.push(this.y1filterFunction(i, rawY1.get(i)));
96
- metadata.push(this.originalSeries.getMetadataAt(i));
91
+ var metadata = undefined;
92
+ // leave metadata unset if if original series has no metadata
93
+ if (this.originalSeries.hasMetadata) {
94
+ metadata = [];
95
+ for (var i = startIndex; i < startIndex + count; i++) {
96
+ xValues.push(rawX.get(i));
97
+ yValues.push(this.filterFunction(i, rawY.get(i)));
98
+ y1Values.push(this.y1filterFunction(i, rawY1.get(i)));
99
+ metadata.push(this.originalSeries.getMetadataAt(i));
100
+ }
101
+ }
102
+ else {
103
+ for (var i = startIndex; i < startIndex + count; i++) {
104
+ xValues.push(rawX.get(i));
105
+ yValues.push(this.filterFunction(i, rawY.get(i)));
106
+ y1Values.push(this.y1filterFunction(i, rawY1.get(i)));
107
+ }
97
108
  }
98
109
  return { xValues: xValues, yValues: yValues, y1Values: y1Values, metadata: metadata };
99
110
  };
@@ -84,12 +84,23 @@ var XyzCustomFilter = /** @class */ (function (_super) {
84
84
  var xValues = [];
85
85
  var yValues = [];
86
86
  var zValues = [];
87
- var metadata = [];
88
- for (var i = startIndex; i < startIndex + count; i++) {
89
- xValues.push(rawX.get(i));
90
- yValues.push(this.filterFunction(i, rawY.get(i)));
91
- zValues.push(this.zfilterFunction(i, rawZ.get(i)));
92
- metadata.push(this.originalSeries.getMetadataAt(i));
87
+ var metadata = undefined;
88
+ // leave metadata unset if if original series has no metadata
89
+ if (this.originalSeries.hasMetadata) {
90
+ metadata = [];
91
+ for (var i = startIndex; i < startIndex + count; i++) {
92
+ xValues.push(rawX.get(i));
93
+ yValues.push(this.filterFunction(i, rawY.get(i)));
94
+ zValues.push(this.zfilterFunction(i, rawZ.get(i)));
95
+ metadata.push(this.originalSeries.getMetadataAt(i));
96
+ }
97
+ }
98
+ else {
99
+ for (var i = startIndex; i < startIndex + count; i++) {
100
+ xValues.push(rawX.get(i));
101
+ yValues.push(this.filterFunction(i, rawY.get(i)));
102
+ zValues.push(this.zfilterFunction(i, rawZ.get(i)));
103
+ }
93
104
  }
94
105
  return { xValues: xValues, yValues: yValues, zValues: zValues, metadata: metadata };
95
106
  };
@@ -25,6 +25,7 @@ var DpiHelper_1 = require("../Visuals/TextureManager/DpiHelper");
25
25
  var RenderPassData_1 = require("./RenderPassData");
26
26
  var RenderPassInfo_1 = require("./RenderPassInfo");
27
27
  var SvgClippingMode_1 = require("../../types/SvgClippingMode");
28
+ var WatermarkPosition_1 = require("../../types/WatermarkPosition");
28
29
  /**
29
30
  * A class used internally in SciChart to perform layout, arrangement, data-preparation and rendering on the Cartesian 2D {@link SciChartSurface}
30
31
  */
@@ -425,11 +426,50 @@ var SciChartRenderer = /** @class */ (function () {
425
426
  this.sciChartSurface.rendered.raiseEvent();
426
427
  };
427
428
  SciChartRenderer.prototype.updateWatermark = function (renderContext, seriesViewRect) {
428
- var left = seriesViewRect.x + 5;
429
429
  var chartHeight = this.sciChartSurface.isCopyCanvasSurface
430
430
  ? SciChartSurfaceBase_1.SciChartSurfaceBase.domMasterCanvas.height
431
431
  : renderContext.viewportSize.height;
432
- var bottom = chartHeight - (seriesViewRect.top + seriesViewRect.height) + 5;
432
+ var left = seriesViewRect.x + 5;
433
+ var bottom = chartHeight - (seriesViewRect.top + seriesViewRect.height) + 10;
434
+ var wmWidth = Math.max(72, Math.min(0.25 * renderContext.viewportSize.width, 256));
435
+ var wmHeight = (42 * wmWidth) / 256;
436
+ if (this.sciChartSurface.watermarkRelativeToCanvas) {
437
+ switch (this.sciChartSurface.watermarkPosition) {
438
+ case WatermarkPosition_1.EWatermarkPosition.BottomRight:
439
+ left = renderContext.viewportSize.width - wmWidth - 5;
440
+ bottom = chartHeight - renderContext.viewportSize.height + 12;
441
+ break;
442
+ case WatermarkPosition_1.EWatermarkPosition.TopLeft:
443
+ bottom = chartHeight - (5 + wmHeight);
444
+ left = 5;
445
+ break;
446
+ case WatermarkPosition_1.EWatermarkPosition.TopRight:
447
+ left = renderContext.viewportSize.width - wmWidth - 5;
448
+ bottom = chartHeight - (5 + wmHeight);
449
+ break;
450
+ case WatermarkPosition_1.EWatermarkPosition.BottomLeft:
451
+ left = 5;
452
+ bottom = chartHeight - renderContext.viewportSize.height + 12;
453
+ break;
454
+ }
455
+ }
456
+ else {
457
+ switch (this.sciChartSurface.watermarkPosition) {
458
+ case WatermarkPosition_1.EWatermarkPosition.BottomRight:
459
+ left = seriesViewRect.left + seriesViewRect.width - wmWidth - 5;
460
+ break;
461
+ case WatermarkPosition_1.EWatermarkPosition.TopLeft:
462
+ bottom = chartHeight - (seriesViewRect.top + 5 + wmHeight);
463
+ break;
464
+ case WatermarkPosition_1.EWatermarkPosition.TopRight:
465
+ left = seriesViewRect.left + seriesViewRect.width - wmWidth - 5;
466
+ bottom = chartHeight - (seriesViewRect.top + 5 + wmHeight);
467
+ break;
468
+ case WatermarkPosition_1.EWatermarkPosition.BottomLeft:
469
+ default:
470
+ break;
471
+ }
472
+ }
433
473
  this.sciChartSurface.updateWatermark(left, bottom);
434
474
  };
435
475
  SciChartRenderer.prototype.getViewportRect = function (viewportSize, seriesViewRect) {
@@ -9,5 +9,6 @@ export declare class AdornerLayer {
9
9
  selectAnnotation(args: ModifierMouseArgs): boolean;
10
10
  deselectAnnotation(annotation: IAnnotation): void;
11
11
  get selectedAnnotation(): AnnotationBase;
12
+ set selectedAnnotation(value: AnnotationBase);
12
13
  get isAnnotationSelected(): boolean;
13
14
  }
@@ -9,14 +9,14 @@ var AdornerLayer = /** @class */ (function () {
9
9
  var scs = this.parentSurface;
10
10
  var selectedAnnotation;
11
11
  var selectAnnotationHelper = function (annotations) {
12
- annotations.forEach(function (an) {
13
- var anBase = an;
12
+ for (var i = annotations.length - 1; i >= 0; i--) {
13
+ var anBase = annotations[i];
14
14
  /** Allow all annotations to be clicked. Only select if editable */
15
15
  var isAnnotationSelected = anBase.click(args, !selectedAnnotation && anBase.isEditable);
16
16
  if (isAnnotationSelected) {
17
17
  selectedAnnotation = anBase;
18
18
  }
19
- });
19
+ }
20
20
  };
21
21
  selectAnnotationHelper(scs.annotations.asArray());
22
22
  selectAnnotationHelper(scs.modifierAnnotations.asArray());
@@ -31,6 +31,9 @@ var AdornerLayer = /** @class */ (function () {
31
31
  get: function () {
32
32
  return this.selectedAnnotationProperty;
33
33
  },
34
+ set: function (value) {
35
+ this.selectedAnnotationProperty = value;
36
+ },
34
37
  enumerable: false,
35
38
  configurable: true
36
39
  });
@@ -505,6 +505,9 @@ var AnnotationBase = /** @class */ (function () {
505
505
  AnnotationBase.prototype.onAttach = function (scs) {
506
506
  this.svgAdornerRootProperty = scs.domSvgAdornerLayer;
507
507
  // Override in derived classes to be notified of attached
508
+ if (this.isSelected) {
509
+ this.parentSurface.adornerLayer.selectedAnnotation = this;
510
+ }
508
511
  };
509
512
  /** @inheritDoc */
510
513
  AnnotationBase.prototype.onDetach = function () {
@@ -514,6 +517,7 @@ var AnnotationBase = /** @class */ (function () {
514
517
  }
515
518
  this.selectedChanged.unsubscribeAll();
516
519
  this.deleteAdorner();
520
+ this.svgAdornerRootProperty = undefined;
517
521
  };
518
522
  Object.defineProperty(AnnotationBase.prototype, "dragPoints", {
519
523
  /** Get the dragging points that should be enabled for this annotation */
@@ -437,7 +437,7 @@ export declare abstract class AxisBase2D extends AxisCore implements IThemeable
437
437
  /**
438
438
  * @inheritDoc
439
439
  */
440
- animateVisibleRange(visibleRange: NumberRange, durationMs: number, easingFunction?: TEasingFn, onCompleted?: () => void): import("../../../Core/Animations/GenericAnimation").IGenericAnimation;
440
+ animateVisibleRange(visibleRange: NumberRange, durationMs: number, easingFunction?: TEasingFn, onCompleted?: () => void): import("../../..").IGenericAnimation;
441
441
  /**
442
442
  * @inheritDoc
443
443
  */