scichart 3.2.0-beta → 3.2.434

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 (111) hide show
  1. package/Builder/buildSurface.d.ts +2 -2
  2. package/Builder/chartBuilder.d.ts +4 -4
  3. package/Charting/ChartModifiers/ChartModifierBase.d.ts +5 -5
  4. package/Charting/ChartModifiers/ChartModifierBase.js +2 -3
  5. package/Charting/ChartModifiers/CursorModifier.d.ts +9 -9
  6. package/Charting/ChartModifiers/CursorModifier.js +1 -1
  7. package/Charting/ChartModifiers/DataPointSelectionModifier.d.ts +1 -0
  8. package/Charting/ChartModifiers/DataPointSelectionModifier.js +6 -1
  9. package/Charting/ChartModifiers/LegendModifier.d.ts +9 -24
  10. package/Charting/ChartModifiers/LegendModifier.js +9 -21
  11. package/Charting/ChartModifiers/MouseWheelZoomModifier.js +20 -11
  12. package/Charting/ChartModifiers/OverviewRangeSelectionModifier.d.ts +5 -5
  13. package/Charting/ChartModifiers/PinchZoomModifier.js +9 -9
  14. package/Charting/ChartModifiers/RubberBandXyZoomModifier.d.ts +4 -7
  15. package/Charting/ChartModifiers/RubberBandXyZoomModifier.js +6 -8
  16. package/Charting/ChartModifiers/SeriesSelectionModifier.js +10 -8
  17. package/Charting/ChartModifiers/XAxisDragModifier.d.ts +1 -1
  18. package/Charting/ChartModifiers/XAxisDragModifier.js +3 -3
  19. package/Charting/ChartModifiers/YAxisDragModifier.d.ts +2 -4
  20. package/Charting/ChartModifiers/YAxisDragModifier.js +7 -8
  21. package/Charting/Drawing/BaseCache.js +13 -8
  22. package/Charting/Model/BaseDataSeries.d.ts +2 -2
  23. package/Charting/Model/Filters/HlcFilterBase.d.ts +6 -2
  24. package/Charting/Model/Filters/HlcFilterBase.js +17 -1
  25. package/Charting/Model/Filters/IFilterBase.d.ts +24 -0
  26. package/Charting/Model/Filters/IFilterBase.js +2 -0
  27. package/Charting/Model/Filters/OhlcFilterBase.d.ts +6 -2
  28. package/Charting/Model/Filters/OhlcFilterBase.js +17 -1
  29. package/Charting/Model/Filters/XyFilterBase.d.ts +6 -5
  30. package/Charting/Model/Filters/XyFilterBase.js +17 -1
  31. package/Charting/Model/Filters/XyyFilterBase.d.ts +6 -2
  32. package/Charting/Model/Filters/XyyFilterBase.js +17 -1
  33. package/Charting/Model/Filters/XyzFilterBase.d.ts +6 -2
  34. package/Charting/Model/Filters/XyzFilterBase.js +17 -1
  35. package/Charting/Model/XyyDataSeries.js +15 -16
  36. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +0 -4
  37. package/Charting/Visuals/Annotations/NativeTextAnnotation.js +4 -0
  38. package/Charting/Visuals/Axis/AxisBase2D.d.ts +3 -3
  39. package/Charting/Visuals/Axis/AxisCore.d.ts +2 -2
  40. package/Charting/Visuals/Legend/ManualLegend.d.ts +56 -0
  41. package/Charting/Visuals/Legend/ManualLegend.js +138 -0
  42. package/Charting/Visuals/Legend/SciChartLegend.js +4 -3
  43. package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +62 -3
  44. package/Charting/Visuals/Legend/SciChartLegendBase.js +78 -11
  45. package/Charting/Visuals/PointMarkers/BasePointMarker.js +13 -8
  46. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +1 -1
  47. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +3 -3
  48. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +8 -3
  49. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +3 -3
  50. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +8 -0
  51. package/Charting/Visuals/RenderableSeries/HoveredChangedArgs.d.ts +6 -1
  52. package/Charting/Visuals/RenderableSeries/HoveredChangedArgs.js +2 -1
  53. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +1 -1
  54. package/Charting/Visuals/RenderableSeries/SelectionChangedArgs.d.ts +6 -1
  55. package/Charting/Visuals/RenderableSeries/SelectionChangedArgs.js +2 -1
  56. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +43 -1
  57. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +6 -1
  58. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +6 -1
  59. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.d.ts +4 -0
  60. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.js +8 -2
  61. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +6 -0
  62. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +7 -0
  63. package/Charting/Visuals/SciChartSurface.d.ts +0 -5
  64. package/Charting/Visuals/SciChartSurface.js +11 -12
  65. package/Charting/Visuals/SciChartSurfaceBase.d.ts +19 -1
  66. package/Charting/Visuals/SciChartSurfaceBase.js +45 -23
  67. package/Charting/Visuals/createMaster.d.ts +3 -0
  68. package/Charting/Visuals/createMaster.js +54 -23
  69. package/Charting/Visuals/createSingle.js +2 -2
  70. package/Charting/Visuals/licenseManager2D.js +2 -2
  71. package/Charting3D/ChartModifiers/ResetCamera3DModifier.d.ts +1 -1
  72. package/Charting3D/ChartModifiers/ResetCamera3DModifier.js +1 -2
  73. package/Charting3D/ChartModifiers/TooltipModifier3D.d.ts +35 -0
  74. package/Charting3D/ChartModifiers/TooltipModifier3D.js +41 -5
  75. package/Charting3D/Model/DataSeries/BaseGridDataSeries3D.d.ts +1 -1
  76. package/Charting3D/Model/DataSeries/BaseGridDataSeries3D.js +2 -2
  77. package/Charting3D/Model/DataSeries/IPointMetadata3D.d.ts +7 -2
  78. package/Charting3D/Visuals/Axis/AxisBase3D.d.ts +8 -1
  79. package/Charting3D/Visuals/Axis/AxisBase3D.js +0 -2
  80. package/Charting3D/Visuals/Axis/NumericAxis3D.d.ts +3 -2
  81. package/Charting3D/Visuals/Axis/NumericAxis3D.js +7 -3
  82. package/Charting3D/Visuals/Primitives/PointLine3DSceneEntity.js +4 -2
  83. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +5 -2
  84. package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.js +2 -1
  85. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.d.ts +5 -0
  86. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +19 -5
  87. package/Charting3D/Visuals/SciChart3DRenderer.d.ts +0 -1
  88. package/Charting3D/Visuals/SciChart3DRenderer.js +3 -26
  89. package/Charting3D/Visuals/SciChart3DSurface.d.ts +12 -5
  90. package/Charting3D/Visuals/SciChart3DSurface.js +35 -6
  91. package/Charting3D/Visuals/createMaster3d.js +9 -4
  92. package/Core/BuildStamp.d.ts +1 -1
  93. package/Core/BuildStamp.js +2 -2
  94. package/Core/DeletableEntity.d.ts +11 -5
  95. package/Core/DeletableEntity.js +42 -45
  96. package/Core/Mouse/MouseManager.js +6 -0
  97. package/_wasm/scichart.browser.js +1 -1
  98. package/_wasm/scichart2d.js +1 -1
  99. package/_wasm/scichart2d.wasm +0 -0
  100. package/_wasm/scichart3d.js +1 -1
  101. package/_wasm/scichart3d.wasm +0 -0
  102. package/index.d.ts +5 -6
  103. package/index.dev.js +68876 -0
  104. package/index.js +13 -21
  105. package/index.min.js +1 -1
  106. package/package.json +1 -1
  107. package/utils/MemoryUsageHelper.d.ts +55 -8
  108. package/utils/MemoryUsageHelper.js +64 -14
  109. package/utils/colorUtil.d.ts +7 -0
  110. package/utils/colorUtil.js +13 -1
  111. package/utils/parseColor.js +19 -4
@@ -32,7 +32,7 @@ var ChartModifierBase3D_1 = require("./ChartModifierBase3D");
32
32
  *
33
33
  * ```ts
34
34
  * const sciChartS3Durface: SciChart3DSurface;
35
- * sciChart3DSurface.chartModifiers.add(new ZoomExtentsModifier3D());
35
+ * sciChart3DSurface.chartModifiers.add(new ResetCamera3DModifier());
36
36
  * ```
37
37
  *
38
38
  */
@@ -103,7 +103,6 @@ var ResetCamera3DModifier = /** @class */ (function (_super) {
103
103
  if (!camera) {
104
104
  return;
105
105
  }
106
- var radius = camera.radius;
107
106
  if (camera.projectionMode === CameraController_1.ECameraProjectionMode.Perspective) {
108
107
  var animation = new GenericAnimation_1.GenericAnimation({
109
108
  from: { radius: camera.radius, pitch: camera.orbitalPitch, yaw: camera.orbitalYaw },
@@ -7,8 +7,19 @@ import { ChartModifierBase3D, IChartModifierBase3DOptions } from "./ChartModifie
7
7
  * Optional parameters passed to the constructor of {@link TooltipModifier3D} to configure it
8
8
  */
9
9
  export interface ITooltipModifier3DOptions extends IChartModifierBase3DOptions {
10
+ /**
11
+ * Gets or sets the stroke color of the crosshair as an HTML Color code
12
+ * @param stroke
13
+ */
10
14
  crosshairStroke?: string;
15
+ /**
16
+ * Gets or sets the strokethickness of the crosshair line
17
+ */
11
18
  crosshairStrokeThickness?: number;
19
+ /**
20
+ * When true, a crosshair line will be displayed from the hovered point location to the far axis wall
21
+ * @param isVisible
22
+ */
12
23
  isCrosshairVisible?: boolean;
13
24
  showTooltip?: boolean;
14
25
  tooltipTitle?: string;
@@ -48,11 +59,33 @@ export declare class TooltipModifier3D extends ChartModifierBase3D {
48
59
  constructor(options?: ITooltipModifier3DOptions);
49
60
  includeSeries(series: IRenderableSeries3D, isIncluded: boolean): void;
50
61
  getIncludedSeries(): IRenderableSeries3D[];
62
+ /**
63
+ * When true, a crosshair line will be displayed from the hovered point location to the far axis wall
64
+ * @param isVisible
65
+ */
51
66
  get isCrosshairVisible(): boolean;
67
+ /**
68
+ * When true, a crosshair line will be displayed from the hovered point location to the far axis wall
69
+ * @param isVisible
70
+ */
52
71
  set isCrosshairVisible(isVisible: boolean);
72
+ /**
73
+ * Gets or sets the stroke color of the crosshair as an HTML Color code
74
+ * @param stroke
75
+ */
53
76
  get crosshairStroke(): string;
77
+ /**
78
+ * Gets or sets the stroke color of the crosshair as an HTML Color code
79
+ * @param stroke
80
+ */
54
81
  set crosshairStroke(stroke: string);
82
+ /**
83
+ * Gets or sets the strokethickness of the crosshair line
84
+ */
55
85
  get crosshairStrokeThickness(): number;
86
+ /**
87
+ * Gets or sets the strokethickness of the crosshair line
88
+ */
56
89
  set crosshairStrokeThickness(strokeThickness: number);
57
90
  get tooltipSvgTemplate(): TTooltip3DSvgTemplate;
58
91
  set tooltipSvgTemplate(value: TTooltip3DSvgTemplate);
@@ -82,6 +115,8 @@ export declare class TooltipModifier3D extends ChartModifierBase3D {
82
115
  onDetach(): void;
83
116
  /** @inheritDoc */
84
117
  modifierMouseMove(args: ModifierMouseArgs): void;
118
+ onParentSurfaceRendered(): void;
119
+ protected update(): void;
85
120
  }
86
121
  /** Relocate the tooltip so that it is always within the seriesViewRect */
87
122
  export declare const adjustTooltipPosition3D: (width: number, height: number, svgAnnotation: TooltipSvgAnnotation3D) => void;
@@ -94,9 +94,17 @@ var TooltipModifier3D = /** @class */ (function (_super) {
94
94
  .filter(function (rs) { return rs.isVisible && _this.includedSeriesMap.get(rs) !== false; });
95
95
  };
96
96
  Object.defineProperty(TooltipModifier3D.prototype, "isCrosshairVisible", {
97
+ /**
98
+ * When true, a crosshair line will be displayed from the hovered point location to the far axis wall
99
+ * @param isVisible
100
+ */
97
101
  get: function () {
98
102
  return this.isCrosshairVisibleProperty;
99
103
  },
104
+ /**
105
+ * When true, a crosshair line will be displayed from the hovered point location to the far axis wall
106
+ * @param isVisible
107
+ */
100
108
  set: function (isVisible) {
101
109
  var _a;
102
110
  this.isCrosshairVisibleProperty = isVisible;
@@ -106,9 +114,17 @@ var TooltipModifier3D = /** @class */ (function (_super) {
106
114
  configurable: true
107
115
  });
108
116
  Object.defineProperty(TooltipModifier3D.prototype, "crosshairStroke", {
117
+ /**
118
+ * Gets or sets the stroke color of the crosshair as an HTML Color code
119
+ * @param stroke
120
+ */
109
121
  get: function () {
110
122
  return this.crosshairStrokeProperty;
111
123
  },
124
+ /**
125
+ * Gets or sets the stroke color of the crosshair as an HTML Color code
126
+ * @param stroke
127
+ */
112
128
  set: function (stroke) {
113
129
  var _a;
114
130
  this.crosshairStrokeProperty = stroke;
@@ -118,9 +134,15 @@ var TooltipModifier3D = /** @class */ (function (_super) {
118
134
  configurable: true
119
135
  });
120
136
  Object.defineProperty(TooltipModifier3D.prototype, "crosshairStrokeThickness", {
137
+ /**
138
+ * Gets or sets the strokethickness of the crosshair line
139
+ */
121
140
  get: function () {
122
141
  return this.crosshairStrokeThicknessProperty;
123
142
  },
143
+ /**
144
+ * Gets or sets the strokethickness of the crosshair line
145
+ */
124
146
  set: function (strokeThickness) {
125
147
  var _a;
126
148
  this.crosshairStrokeThicknessProperty = strokeThickness;
@@ -284,11 +306,23 @@ var TooltipModifier3D = /** @class */ (function (_super) {
284
306
  };
285
307
  /** @inheritDoc */
286
308
  TooltipModifier3D.prototype.modifierMouseMove = function (args) {
287
- var _a, _b, _c, _d, _e;
309
+ this.activePointerEvents.set(args.pointerId, args);
288
310
  _super.prototype.modifierMouseMove.call(this, args);
289
- var _f = args.mousePoint, x = _f.x, y = _f.y;
311
+ if (this.getIsActionAllowed(args)) {
312
+ this.update();
313
+ }
314
+ };
315
+ TooltipModifier3D.prototype.onParentSurfaceRendered = function () {
316
+ this.update();
317
+ };
318
+ TooltipModifier3D.prototype.update = function () {
319
+ var _this = this;
320
+ var _a, _b, _c, _d, _e;
321
+ if (!this.mousePoint)
322
+ return;
323
+ var _f = this.mousePoint, x = _f.x, y = _f.y;
290
324
  var seriesInfo = this.getIncludedSeries()
291
- .map(function (rs) { return rs.hitTest(args.mousePoint); })
325
+ .map(function (rs) { return rs.hitTest(_this.mousePoint); })
292
326
  .find(function (result) { return result.isHit; });
293
327
  if (seriesInfo === null || seriesInfo === void 0 ? void 0 : seriesInfo.isHit) {
294
328
  // console.log(`TooltipModifier3D: HitTest at (${x}, ${y})`);
@@ -317,8 +351,10 @@ var TooltipModifier3D = /** @class */ (function (_super) {
317
351
  }
318
352
  this.tooltipAnnotation.isHidden = !this.showTooltip;
319
353
  if (this.showTooltip) {
320
- this.tooltipAnnotation.x1 = x;
321
- this.tooltipAnnotation.y1 = y;
354
+ var xt = (0, translate_1.translateToNotScaled)(x);
355
+ var yt = (0, translate_1.translateToNotScaled)(y);
356
+ this.tooltipAnnotation.x1 = xt;
357
+ this.tooltipAnnotation.y1 = yt;
322
358
  }
323
359
  if (this.showTooltip || this.tooltipLegendTemplate) {
324
360
  this.tooltipAnnotation.seriesInfo = seriesInfo;
@@ -116,7 +116,7 @@ export declare abstract class BaseGridDataSeries3D extends BaseDataSeries3D impl
116
116
  * @param xIndex the x-index from 0 to xSize
117
117
  * @param YValue the new Height-value
118
118
  */
119
- setYValue(yIndex: number, xIndex: number, zValue: number): void;
119
+ setYValue(zIndex: number, xIndex: number, yValue: number): void;
120
120
  /**
121
121
  * @inheritDoc
122
122
  */
@@ -144,8 +144,8 @@ var BaseGridDataSeries3D = /** @class */ (function (_super) {
144
144
  * @param xIndex the x-index from 0 to xSize
145
145
  * @param YValue the new Height-value
146
146
  */
147
- BaseGridDataSeries3D.prototype.setYValue = function (yIndex, xIndex, zValue) {
148
- this.yValuesProperty[yIndex][xIndex] = zValue;
147
+ BaseGridDataSeries3D.prototype.setYValue = function (zIndex, xIndex, yValue) {
148
+ this.yValuesProperty[zIndex][xIndex] = yValue;
149
149
  this.notifyDataChanged();
150
150
  };
151
151
  /**
@@ -5,11 +5,16 @@
5
5
  */
6
6
  export interface IPointMetadata3D {
7
7
  /**
8
- * Override the color for this particular point. Set=undefined for default
8
+ * @deprecated Property naming was wrong, we've updated it to vertexColor [SCJS-1566]
9
9
  */
10
10
  vertexColorAbgr?: number;
11
+ /**
12
+ * Override the color for this particular point. Set=undefined for default.
13
+ * Note: This is a 32-bit integer in ARGB format, e.g. 0xFFFF0000 is Red
14
+ */
15
+ vertexColor?: number;
11
16
  /**
12
17
  * Override the scale for this particular point. Set=1.0 for default
13
18
  */
14
- pointScale: number;
19
+ pointScale?: number;
15
20
  }
@@ -1,7 +1,10 @@
1
+ import { TLabelProviderDefinition } from "../../../Builder/buildAxis";
1
2
  import { IThemeable } from "../../../Charting/Themes/IThemeable";
2
3
  import { IThemeProvider } from "../../../Charting/Themes/IThemeProvider";
3
4
  import { AxisCore } from "../../../Charting/Visuals/Axis/AxisCore";
4
5
  import { IAxisCoreOptions } from "../../../Charting/Visuals/Axis/IAxisCoreOptions";
6
+ import { ILabelOptions } from "../../../Charting/Visuals/Axis/LabelProvider/LabelProvider";
7
+ import { LabelProviderBase2D } from "../../../Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D";
5
8
  import { NumberRange } from "../../../Core/NumberRange";
6
9
  import { ObservableArray } from "../../../Core/ObservableArray";
7
10
  import { TSciChart3D } from "../../../types/TSciChart3D";
@@ -14,7 +17,7 @@ import { IAxisDescriptor } from "./IAxisDescriptor";
14
17
  /**
15
18
  * Optional parameters passed to {@link AxisBase3D} constructor to set defaults at construction time
16
19
  */
17
- export interface IAxisBase3dOptions extends IAxisCoreOptions {
20
+ export interface IAxisBase3dOptions extends IAxisCoreOptions, ILabelOptions {
18
21
  /**
19
22
  * Gets or sets tick labels offset from the axis plane
20
23
  */
@@ -35,6 +38,10 @@ export interface IAxisBase3dOptions extends IAxisCoreOptions {
35
38
  * Sets the plane background color as an HTML Color string
36
39
  */
37
40
  planeBackgroundFill?: string;
41
+ /**
42
+ * Sets a {@link LabelProvider} - a class which is responsible for formatting axis labels and cursor labels from numeric values
43
+ */
44
+ labelProvider?: LabelProviderBase2D | TLabelProviderDefinition;
38
45
  }
39
46
  /**
40
47
  * Which axis - used for calculations
@@ -69,7 +69,6 @@ var AxisBase3D = /** @class */ (function (_super) {
69
69
  _this.planeBorderThicknessProperty = (_d = options === null || options === void 0 ? void 0 : options.planeBorderThickness) !== null && _d !== void 0 ? _d : 2;
70
70
  _this.axisPlaneBackgroundFillProperty = (_e = options === null || options === void 0 ? void 0 : options.planeBackgroundFill) !== null && _e !== void 0 ? _e : _this.axisPlaneBackgroundFillProperty;
71
71
  return _this;
72
- //console.log(`ctor planeBorderColorProperty: ${this.planeBorderColorProperty}`);
73
72
  }
74
73
  /**
75
74
  * @inheritDoc
@@ -104,7 +103,6 @@ var AxisBase3D = /** @class */ (function (_super) {
104
103
  if (this.axisPlaneBackgroundFill === previousThemeProvider.axisPlaneBackgroundFill) {
105
104
  this.axisPlaneBackgroundFill = themeProvider.axisPlaneBackgroundFill;
106
105
  }
107
- //console.log(`applyTheme planeBorderColorProperty: ${this.planeBorderColorProperty}`);
108
106
  };
109
107
  Object.defineProperty(AxisBase3D.prototype, "isYAxis", {
110
108
  /**
@@ -2,11 +2,12 @@ import { CoordinateCalculatorBase } from "../../../Charting/Numerics/CoordinateC
2
2
  import { TEasingFn } from "../../../Core/Animations/EasingFunctions";
3
3
  import { NumberRange } from "../../../Core/NumberRange";
4
4
  import { EAxisType } from "../../../types/AxisType";
5
- import { ENumericFormat } from "../../../types/NumericFormat";
6
5
  import { TSciChart3D } from "../../../types/TSciChart3D";
7
6
  import { AxisBase3D, IAxisBase3dOptions } from "./AxisBase3D";
8
7
  interface INumericAxis3dOptions extends IAxisBase3dOptions {
9
- labelFormat?: ENumericFormat;
8
+ /**
9
+ * @deprecated use labelPrecision instead
10
+ */
10
11
  precision?: number;
11
12
  }
12
13
  /**
@@ -44,7 +44,7 @@ var NumericAxis3D = /** @class */ (function (_super) {
44
44
  */
45
45
  function NumericAxis3D(webAssemblyContext, options) {
46
46
  var _this = this;
47
- var _a, _b;
47
+ var _a;
48
48
  _this = _super.call(this, webAssemblyContext, options) || this;
49
49
  /**
50
50
  * @inheritDoc
@@ -53,8 +53,12 @@ var NumericAxis3D = /** @class */ (function (_super) {
53
53
  _this.tickProvider = new NumericTickProvider_1.NumericTickProvider(_this.webAssemblyContext3D);
54
54
  _this.labelProvider = new NumericLabelProvider_1.NumericLabelProvider();
55
55
  _this.deltaCalculator = new NumericDeltaCalculator_1.NumericDeltaCalculator(_this.webAssemblyContext3D);
56
- _this.labelProvider.numericFormat = (_a = options === null || options === void 0 ? void 0 : options.labelFormat) !== null && _a !== void 0 ? _a : _this.labelProvider.numericFormat;
57
- _this.labelProvider.precision = (_b = options === null || options === void 0 ? void 0 : options.precision) !== null && _b !== void 0 ? _b : _this.labelProvider.precision;
56
+ // Workaround for deprecated property
57
+ if (options === null || options === void 0 ? void 0 : options.precision) {
58
+ options.labelPrecision = options.precision;
59
+ }
60
+ _this.labelProvider =
61
+ (_a = options === null || options === void 0 ? void 0 : options.labelProvider) !== null && _a !== void 0 ? _a : new NumericLabelProvider_1.NumericLabelProvider(options);
58
62
  return _this;
59
63
  }
60
64
  /**
@@ -164,10 +164,12 @@ var PointLine3DSceneEntity = /** @class */ (function (_super) {
164
164
  // metadata will always be non-null but individual metadata items may be undefined
165
165
  // as its implemented as a non-sparse array
166
166
  metadata.forEach(function (meta, index) {
167
+ var _a;
167
168
  if (meta) {
168
- if (meta.vertexColorAbgr) {
169
+ var vertexColor = (_a = meta.vertexColorAbgr) !== null && _a !== void 0 ? _a : meta.vertexColor;
170
+ if (vertexColor) {
169
171
  hasDefaultColors = false;
170
- _this.pointColors.set(index, meta.vertexColorAbgr);
172
+ _this.pointColors.set(index, vertexColor);
171
173
  }
172
174
  if (meta.pointScale) {
173
175
  hasDefaultScales = false;
@@ -157,9 +157,12 @@ var ScatterPointsSceneEntity = /** @class */ (function (_super) {
157
157
  // metadata will always be non-null but individual metadata items may be undefined
158
158
  // as its implemented as a non-sparse array
159
159
  metadata.forEach(function (meta, index) {
160
+ var _a;
160
161
  if (meta) {
161
- if (meta.vertexColorAbgr) {
162
- _this.pointColors.set(index, meta.vertexColorAbgr);
162
+ // [SCJS-1566] Renamed vertexColorAbgr to vertexColor. Preserved backward compatibility
163
+ var vertexColor = (_a = meta.vertexColorAbgr) !== null && _a !== void 0 ? _a : meta.vertexColor;
164
+ if (vertexColor) {
165
+ _this.pointColors.set(index, vertexColor);
163
166
  }
164
167
  if (meta.pointScale) {
165
168
  _this.pointScales.set(index, meta.pointScale);
@@ -300,7 +300,8 @@ var SurfaceMeshSceneEntity = /** @class */ (function (_super) {
300
300
  var gridWidth = gridDataSeries.xSize;
301
301
  var gridHeight = gridDataSeries.zSize;
302
302
  Guard_1.Guard.notNull(this.currentRenderPassData, "SurfaceMeshSceneEntity.currentRenderPassData");
303
- if (this.state.setColorMapTextureInvalid) {
303
+ // SCJS-1562 2 DAYS to find the source of the crash! Don't recreate every frame.
304
+ if (this.state.isColorMapTextureInvalid) {
304
305
  this.colorMapTexture = (0, Deleter_1.deleteSafe)(this.colorMapTexture);
305
306
  this.colorMapTexture = (_a = this.parentSeries.meshColorPalette) === null || _a === void 0 ? void 0 : _a.getTexture(this.parentSeries.colorMapTextureSize);
306
307
  }
@@ -215,6 +215,11 @@ export declare abstract class BaseRenderableSeries3D extends DeletableEntity imp
215
215
  onDpiChanged(args: TDpiChangedEventArgs): void;
216
216
  /** @inheritDoc */
217
217
  hitTest(screenPoint: Point): SeriesInfo3D;
218
+ /**
219
+ * Is being called when the data for the underlying DataSeries changes
220
+ * @protected
221
+ */
222
+ protected dataSeriesDataChanged(): void;
218
223
  protected enrichHitTest(hitTestInfo: HitTestInfo3D): SeriesInfo3D;
219
224
  /**
220
225
  * Used internally - sets the {@link IRenderableSeriesSceneEntity | 3D Scene Entity}
@@ -49,16 +49,17 @@ var BaseRenderableSeries3D = /** @class */ (function (_super) {
49
49
  _this = _super.call(this) || this;
50
50
  _this.id = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : (0, guid_1.generateGuid)();
51
51
  _this.webAssemblyContext = webAssemblyContext;
52
- _this.dataSeriesProperty = (options === null || options === void 0 ? void 0 : options.dataSeries) || undefined;
52
+ _this.dataSeriesDataChanged = _this.dataSeriesDataChanged.bind(_this);
53
+ _this.pointMarkerPropertyChanged = _this.pointMarkerPropertyChanged.bind(_this);
54
+ _this.onDpiChanged = _this.onDpiChanged.bind(_this);
55
+ _this.hitTest = _this.hitTest.bind(_this);
56
+ _this.enrichHitTest = _this.enrichHitTest.bind(_this);
57
+ _this.dataSeries = (options === null || options === void 0 ? void 0 : options.dataSeries) || undefined;
53
58
  _this.isVisibleProperty = (options === null || options === void 0 ? void 0 : options.isVisible) !== undefined ? options === null || options === void 0 ? void 0 : options.isVisible : true;
54
59
  _this.pointMarkerProperty = (options === null || options === void 0 ? void 0 : options.pointMarker) || undefined;
55
60
  _this.strokeProperty = (options === null || options === void 0 ? void 0 : options.stroke) || "#FFFFFF";
56
61
  _this.shininessProperty = (options === null || options === void 0 ? void 0 : options.shininess) === undefined ? 64 : options.shininess;
57
62
  _this.opacityProperty = (_b = options === null || options === void 0 ? void 0 : options.opacity) !== null && _b !== void 0 ? _b : 1;
58
- _this.pointMarkerPropertyChanged = _this.pointMarkerPropertyChanged.bind(_this);
59
- _this.onDpiChanged = _this.onDpiChanged.bind(_this);
60
- _this.hitTest = _this.hitTest.bind(_this);
61
- _this.enrichHitTest = _this.enrichHitTest.bind(_this);
62
63
  return _this;
63
64
  }
64
65
  /** @inheritDoc */
@@ -132,7 +133,11 @@ var BaseRenderableSeries3D = /** @class */ (function (_super) {
132
133
  },
133
134
  /** @inheritDoc */
134
135
  set: function (dataSeries) {
136
+ var _a, _b;
135
137
  this.dataSeriesProperty = dataSeries;
138
+ (_a = this.dataSeriesProperty) === null || _a === void 0 ? void 0 : _a.dataChanged.unsubscribe(this.dataSeriesDataChanged);
139
+ this.dataSeriesProperty = dataSeries;
140
+ (_b = this.dataSeriesProperty) === null || _b === void 0 ? void 0 : _b.dataChanged.subscribe(this.dataSeriesDataChanged);
136
141
  this.notifyPropertyChanged(Constants_1.PROPERTY.DATA_SERIES);
137
142
  },
138
143
  enumerable: false,
@@ -216,6 +221,15 @@ var BaseRenderableSeries3D = /** @class */ (function (_super) {
216
221
  }
217
222
  return SeriesInfo3D_1.SeriesInfo3D.empty();
218
223
  };
224
+ /**
225
+ * Is being called when the data for the underlying DataSeries changes
226
+ * @protected
227
+ */
228
+ BaseRenderableSeries3D.prototype.dataSeriesDataChanged = function () {
229
+ if (this.invalidateParentCallback) {
230
+ this.invalidateParentCallback();
231
+ }
232
+ };
219
233
  BaseRenderableSeries3D.prototype.enrichHitTest = function (hitTestInfo) {
220
234
  var _a;
221
235
  var hitDataSeries = (_a = hitTestInfo.associatedSeries) === null || _a === void 0 ? void 0 : _a.dataSeries;
@@ -32,7 +32,6 @@ export declare class SciChart3DRenderer {
32
32
  * The main render loop
33
33
  */
34
34
  render(): void;
35
- private updateSvgCanvasSize;
36
35
  private updateWatermark;
37
36
  private isSurfaceValid;
38
37
  private prepareAxes;
@@ -11,7 +11,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.SciChart3DRenderer = void 0;
13
13
  var IAnnotation_1 = require("../../Charting/Visuals/Annotations/IAnnotation");
14
- var DpiHelper_1 = require("../../Charting/Visuals/TextureManager/DpiHelper");
15
14
  var Deleter_1 = require("../../Core/Deleter");
16
15
  var Guard_1 = require("../../Core/Guard");
17
16
  var Rect_1 = require("../../Core/Rect");
@@ -84,12 +83,15 @@ var SciChart3DRenderer = /** @class */ (function () {
84
83
  if (!this.isSurfaceValid(this.scs)) {
85
84
  throw Error("SciChart3DSurface is not valid");
86
85
  }
86
+ // Enable/disable hit test as required.
87
+ this.scs.webAssemblyContext3D.SCRTSetIsSelectionBufferEnabled(this.scs.isHitTestEnabled);
87
88
  // Step 1: Update the current active SceneWorld and camera
88
89
  var sceneWorld = this.scs.getSceneWorld();
89
90
  if (!sceneWorld) {
90
91
  console.warn("SciChart3DRenderer: Undefined scene world!");
91
92
  return;
92
93
  }
94
+ this.scs.preRender.raiseEvent();
93
95
  this.wasmContext.SCRTSetActiveWorld(sceneWorld);
94
96
  this.updateWorldDimensions(sceneWorld, this.scs.worldDimensions);
95
97
  var tsrCamera = sceneWorld.GetMainCamera();
@@ -98,7 +100,6 @@ var SciChart3DRenderer = /** @class */ (function () {
98
100
  var _a = this.scs.viewportManager, width = _a.width, height = _a.height;
99
101
  var viewRect = new Rect_1.Rect(0, 0, width, height);
100
102
  this.scs.setSeriesViewRect(viewRect);
101
- this.updateSvgCanvasSize(viewRect);
102
103
  // Animation Step
103
104
  var timeElapsed = this.previousTime ? Date.now() - this.previousTime : undefined;
104
105
  this.previousTime = Date.now();
@@ -130,30 +131,6 @@ var SciChart3DRenderer = /** @class */ (function () {
130
131
  setTimeout(this.scs.invalidateElement, 0);
131
132
  }
132
133
  };
133
- SciChart3DRenderer.prototype.updateSvgCanvasSize = function (seriesViewRect) {
134
- // Convert seriesViewRect back to device pixels
135
- // e.g. at Retina display canvas size may be 400x300 but seriesViewRect size would be 800x600
136
- var viewRectInDevicePixels = new Rect_1.Rect(seriesViewRect.x / DpiHelper_1.DpiHelper.PIXEL_RATIO, seriesViewRect.y / DpiHelper_1.DpiHelper.PIXEL_RATIO, seriesViewRect.width / DpiHelper_1.DpiHelper.PIXEL_RATIO, seriesViewRect.height / DpiHelper_1.DpiHelper.PIXEL_RATIO);
137
- if (!this.prevRect) {
138
- this.prevRect = viewRectInDevicePixels;
139
- }
140
- else if (Rect_1.Rect.isEqual(this.prevRect, viewRectInDevicePixels)) {
141
- return;
142
- }
143
- var svgRootElement = this.scs.domSvgContainer;
144
- if (svgRootElement) {
145
- svgRootElement.style.marginLeft = "".concat(viewRectInDevicePixels.x, "px");
146
- svgRootElement.style.marginTop = "".concat(viewRectInDevicePixels.y, "px");
147
- // Set width, height
148
- svgRootElement.setAttribute("width", viewRectInDevicePixels.width.toString());
149
- svgRootElement.setAttribute("height", viewRectInDevicePixels.height.toString());
150
- // Set display width, height
151
- svgRootElement.style.width = viewRectInDevicePixels.width + "px";
152
- svgRootElement.style.height = viewRectInDevicePixels.height + "px";
153
- // Set scaling so annotations, tooltips etc are in right position after DPI Scaling
154
- svgRootElement.currentScale = 1;
155
- }
156
- };
157
134
  SciChart3DRenderer.prototype.updateWatermark = function () {
158
135
  var chartHeight = this.scs.getMainCanvas().clientHeight;
159
136
  var chartWidth = this.scs.getMainCanvas().clientWidth;
@@ -1,6 +1,5 @@
1
1
  import { IChartModifierBase } from "../../Charting/ChartModifiers/ChartModifierBase";
2
2
  import { IThemeProvider } from "../../Charting/Themes/IThemeProvider";
3
- import { I2DSurfaceOptions } from "../../Charting/Visuals/I2DSurfaceOptions";
4
3
  import { ESurfaceType, SciChartSurfaceBase, TSciChartConfig } from "../../Charting/Visuals/SciChartSurfaceBase";
5
4
  import { TDpiChangedEventArgs } from "../../Charting/Visuals/TextureManager/DpiHelper";
6
5
  import { IGenericAnimation } from "../../Core/Animations/GenericAnimation";
@@ -17,6 +16,8 @@ import { IRenderableSeries3D } from "./RenderableSeries/BaseRenderableSeries3D";
17
16
  import { RootSceneEntity } from "./RootSceneEntity";
18
17
  import { ViewportManager3DBase } from "./ViewportManager3DBase";
19
18
  import { EWatermarkPosition } from "../../types/WatermarkPosition";
19
+ import { EventHandler } from "../../Core/EventHandler";
20
+ import { Thickness } from "../../Core/Thickness";
20
21
  export declare type TSciChart3D = TWasmContext;
21
22
  export declare type TWebAssemblyChart3D = {
22
23
  wasmContext: TSciChart3D;
@@ -62,9 +63,9 @@ export declare class SciChart3DSurface extends SciChartSurfaceBase {
62
63
  /**
63
64
  * USED INTERNALLY - performs a similar operation to {@link SciChart3DSurface.create} but used internally for testing
64
65
  * @param divElement The Div Element ID or reference where the {@link SciChartSurface} will reside
65
- * @param options Optional parameters of type {@link I2DSurfaceOptions}
66
+ * @param options Optional parameters of type {@link I3DSurfaceOptions}
66
67
  */
67
- static createSingle(divElement: string | HTMLDivElement, options?: I2DSurfaceOptions): Promise<TWebAssemblyChart3D>;
68
+ static createSingle(divElement: string | HTMLDivElement, options?: I3DSurfaceOptions): Promise<TWebAssemblyChart3D>;
68
69
  /**
69
70
  * Allows setting of web URL for Wasm and Data files, in the case you are loading SciChart outside of npm/webpack environment.
70
71
  * Note if loading from CDN the version number of data/wasm Urls must match the version number of SciChart.js you are using.
@@ -87,9 +88,9 @@ export declare class SciChart3DSurface extends SciChartSurfaceBase {
87
88
  * Creates a {@link SciChart3DSurface} and {@link TSciChart3D | WebAssembly Context} to occupy the div by element ID in your DOM.
88
89
  * @remarks This method is async and must be awaited
89
90
  * @param divElementId The ID or reference of Div Element where the {@link SciChart3DSurface} will reside
90
- * @param options Optional parameters of type {@link IChartCreationOptions}
91
+ * @param options Optional parameters of type {@link I3DSurfaceOptions}
91
92
  */
92
- static create(divElementId: string | HTMLDivElement, options?: I2DSurfaceOptions): Promise<TWebAssemblyChart3D>;
93
+ static create(divElementId: string | HTMLDivElement, options?: I3DSurfaceOptions): Promise<TWebAssemblyChart3D>;
93
94
  static disposeSharedWasmContext(): void;
94
95
  /**
95
96
  * @summary Gets the collection of {@link IRenderableSeries3D} - the chart types or seres on this {@link SciChart3DSurface}
@@ -127,6 +128,11 @@ export declare class SciChart3DSurface extends SciChartSurfaceBase {
127
128
  readonly webAssemblyContext3D: TSciChart3D;
128
129
  /** The position of the watermark for trials and community licenses */
129
130
  watermarkPosition: EWatermarkPosition;
131
+ /**
132
+ * An event handler which notifies its subscribers when a render operation starts. Use this
133
+ * to update elements of the chart for the current render. Any updates made here will not trigger a subsequent render.
134
+ */
135
+ preRender: EventHandler<void>;
130
136
  protected animationList: IGenericAnimation[];
131
137
  private xAxisProperty;
132
138
  private yAxisProperty;
@@ -326,6 +332,7 @@ export declare class SciChart3DSurface extends SciChartSurfaceBase {
326
332
  * @inheritDoc
327
333
  */
328
334
  updateWatermark(left: number, bottom: number): void;
335
+ getSeriesViewRectPadding(scaled: boolean): Thickness;
329
336
  protected applyOptions(options: I3DSurfaceOptions): void;
330
337
  /**
331
338
  * @inheritDoc
@@ -37,6 +37,8 @@ var SciChartDefaults_1 = require("../../Charting/Visuals/SciChartDefaults");
37
37
  var WebGlHelper_1 = require("../../Core/WebGlHelper");
38
38
  var Globals_1 = require("../../Core/Globals");
39
39
  var createMaster_1 = require("../../Charting/Visuals/createMaster");
40
+ var EventHandler_1 = require("../../Core/EventHandler");
41
+ var Thickness_1 = require("../../Core/Thickness");
40
42
  exports.sciChartConfig3D = {};
41
43
  /**
42
44
  * @summary The {@link SciChart3DSurface} is the root 3D Chart control in SciChart's High Performance Real-time
@@ -68,6 +70,11 @@ var SciChart3DSurface = /** @class */ (function (_super) {
68
70
  _this = _super.call(this, webAssemblyContext, options === null || options === void 0 ? void 0 : options.canvases) || this;
69
71
  /** The position of the watermark for trials and community licenses */
70
72
  _this.watermarkPosition = SciChartDefaults_1.SciChartDefaults.watermarkPosition;
73
+ /**
74
+ * An event handler which notifies its subscribers when a render operation starts. Use this
75
+ * to update elements of the chart for the current render. Any updates made here will not trigger a subsequent render.
76
+ */
77
+ _this.preRender = new EventHandler_1.EventHandler();
71
78
  _this.animationList = [];
72
79
  _this.isAxisCubeRenderedProperty = false;
73
80
  _this.isHitTestEnabledProperty = false;
@@ -123,7 +130,7 @@ var SciChart3DSurface = /** @class */ (function (_super) {
123
130
  /**
124
131
  * USED INTERNALLY - performs a similar operation to {@link SciChart3DSurface.create} but used internally for testing
125
132
  * @param divElement The Div Element ID or reference where the {@link SciChartSurface} will reside
126
- * @param options Optional parameters of type {@link I2DSurfaceOptions}
133
+ * @param options Optional parameters of type {@link I3DSurfaceOptions}
127
134
  */
128
135
  SciChart3DSurface.createSingle = function (divElement, options) {
129
136
  return (0, createSingle3d_1.createSingle3dInternal)(divElement, options).then(function (result) {
@@ -160,7 +167,7 @@ var SciChart3DSurface = /** @class */ (function (_super) {
160
167
  * Creates a {@link SciChart3DSurface} and {@link TSciChart3D | WebAssembly Context} to occupy the div by element ID in your DOM.
161
168
  * @remarks This method is async and must be awaited
162
169
  * @param divElementId The ID or reference of Div Element where the {@link SciChart3DSurface} will reside
163
- * @param options Optional parameters of type {@link IChartCreationOptions}
170
+ * @param options Optional parameters of type {@link I3DSurfaceOptions}
164
171
  */
165
172
  SciChart3DSurface.create = function (divElementId, options) {
166
173
  return (0, createMaster3d_1.createMultichart3d)(divElementId, options).then(function (result) {
@@ -390,7 +397,6 @@ var SciChart3DSurface = /** @class */ (function (_super) {
390
397
  set: function (isEnabled) {
391
398
  if (isEnabled !== this.isHitTestEnabledProperty) {
392
399
  this.isHitTestEnabledProperty = isEnabled;
393
- this.webAssemblyContext3D.SCRTSetIsSelectionBufferEnabled(isEnabled);
394
400
  this.invalidateElement();
395
401
  }
396
402
  },
@@ -456,7 +462,10 @@ var SciChart3DSurface = /** @class */ (function (_super) {
456
462
  * Called after the {@link SciChart3DSurface} has rendered.
457
463
  */
458
464
  SciChart3DSurface.prototype.onSciChartRendered = function () {
459
- // TODO - event after rendered
465
+ this.chartModifiers.asArray().forEach(function (cm) {
466
+ cm.onParentSurfaceRendered();
467
+ });
468
+ this.rendered.raiseEvent();
460
469
  };
461
470
  /**
462
471
  * Called internally - the main drawing loop
@@ -480,10 +489,12 @@ var SciChart3DSurface = /** @class */ (function (_super) {
480
489
  * @inheritDoc
481
490
  */
482
491
  SciChart3DSurface.prototype.changeViewportSize = function (pixelWidth, pixelHeight) {
483
- if (!pixelWidth || !pixelHeight) {
492
+ if (!pixelWidth || !pixelHeight || this.isDeleted) {
484
493
  return;
485
494
  }
486
- this.viewportManager.setSize(pixelWidth, pixelHeight);
495
+ var backBufferWidth = pixelWidth * DpiHelper_1.DpiHelper.PIXEL_RATIO;
496
+ var backBufferHeight = pixelHeight * DpiHelper_1.DpiHelper.PIXEL_RATIO;
497
+ this.viewportManager.setSize(backBufferWidth, backBufferHeight);
487
498
  if (this.isCopyCanvasSurface) {
488
499
  this.changeMasterCanvasViewportSize(this.webAssemblyContext3D, pixelWidth, pixelHeight);
489
500
  if (this.domCanvas2D) {
@@ -493,6 +504,21 @@ var SciChart3DSurface = /** @class */ (function (_super) {
493
504
  else {
494
505
  this.changeWebGLCanvasViewportSize(this.webAssemblyContext3D, pixelWidth, pixelHeight);
495
506
  }
507
+ var svgRootElement = this.domSvgContainer;
508
+ if (svgRootElement) {
509
+ // Set width, height
510
+ svgRootElement.setAttribute("width", pixelWidth.toString());
511
+ svgRootElement.setAttribute("height", pixelHeight.toString());
512
+ // Set display width, height
513
+ svgRootElement.style.width = pixelWidth + "px";
514
+ svgRootElement.style.height = pixelHeight + "px";
515
+ // Set scaling so annotations, tooltips etc are in right position after DPI Scaling
516
+ svgRootElement.currentScale = 1;
517
+ }
518
+ if (this.domSvgAdornerLayer) {
519
+ this.domSvgAdornerLayer.setAttribute("width", pixelWidth.toString());
520
+ this.domSvgAdornerLayer.setAttribute("height", pixelHeight.toString());
521
+ }
496
522
  this.invalidateElement();
497
523
  };
498
524
  /**
@@ -577,6 +603,9 @@ var SciChart3DSurface = /** @class */ (function (_super) {
577
603
  this.webAssemblyContext3D.SCRT3DSetWaterMarkProperties(this.watermarkProperties);
578
604
  }
579
605
  };
606
+ SciChart3DSurface.prototype.getSeriesViewRectPadding = function (scaled) {
607
+ return Thickness_1.Thickness.fromNumber(0);
608
+ };
580
609
  SciChart3DSurface.prototype.applyOptions = function (options) {
581
610
  _super.prototype.applyOptions.call(this, options);
582
611
  this.camera = new CameraController_1.CameraController(this.webAssemblyContext3D, options === null || options === void 0 ? void 0 : options.cameraOptions);