scichart 3.2.0-beta → 3.2.442

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 (123) 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/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +15 -1
  41. package/Charting/Visuals/Legend/ManualLegend.d.ts +57 -0
  42. package/Charting/Visuals/Legend/ManualLegend.js +150 -0
  43. package/Charting/Visuals/Legend/SciChartLegend.js +4 -3
  44. package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +62 -3
  45. package/Charting/Visuals/Legend/SciChartLegendBase.js +70 -11
  46. package/Charting/Visuals/PointMarkers/BasePointMarker.js +13 -8
  47. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +1 -1
  48. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +3 -3
  49. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +8 -3
  50. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +6 -10
  51. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +14 -3
  52. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +34 -10
  53. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +3 -8
  54. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +5 -10
  55. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +5 -10
  56. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +5 -9
  57. package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.js +3 -8
  58. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +5 -9
  59. package/Charting/Visuals/RenderableSeries/HoveredChangedArgs.d.ts +6 -1
  60. package/Charting/Visuals/RenderableSeries/HoveredChangedArgs.js +2 -1
  61. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +1 -1
  62. package/Charting/Visuals/RenderableSeries/SelectionChangedArgs.d.ts +6 -1
  63. package/Charting/Visuals/RenderableSeries/SelectionChangedArgs.js +2 -1
  64. package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +43 -1
  65. package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +6 -1
  66. package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +6 -1
  67. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.d.ts +4 -0
  68. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.js +8 -2
  69. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +6 -0
  70. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +7 -0
  71. package/Charting/Visuals/SciChartSurface.d.ts +0 -5
  72. package/Charting/Visuals/SciChartSurface.js +11 -12
  73. package/Charting/Visuals/SciChartSurfaceBase.d.ts +19 -1
  74. package/Charting/Visuals/SciChartSurfaceBase.js +45 -23
  75. package/Charting/Visuals/createMaster.d.ts +3 -0
  76. package/Charting/Visuals/createMaster.js +54 -23
  77. package/Charting/Visuals/createSingle.js +2 -2
  78. package/Charting/Visuals/licenseManager2D.js +9 -4
  79. package/Charting3D/ChartModifiers/ResetCamera3DModifier.d.ts +1 -1
  80. package/Charting3D/ChartModifiers/ResetCamera3DModifier.js +1 -2
  81. package/Charting3D/ChartModifiers/TooltipModifier3D.d.ts +35 -0
  82. package/Charting3D/ChartModifiers/TooltipModifier3D.js +41 -5
  83. package/Charting3D/Model/DataSeries/BaseGridDataSeries3D.d.ts +1 -1
  84. package/Charting3D/Model/DataSeries/BaseGridDataSeries3D.js +2 -2
  85. package/Charting3D/Model/DataSeries/IPointMetadata3D.d.ts +7 -2
  86. package/Charting3D/Visuals/Axis/AxisBase3D.d.ts +8 -1
  87. package/Charting3D/Visuals/Axis/AxisBase3D.js +0 -2
  88. package/Charting3D/Visuals/Axis/NumericAxis3D.d.ts +3 -2
  89. package/Charting3D/Visuals/Axis/NumericAxis3D.js +7 -3
  90. package/Charting3D/Visuals/Primitives/PointLine3DSceneEntity.js +4 -2
  91. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +5 -2
  92. package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.js +2 -1
  93. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.d.ts +5 -0
  94. package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +19 -5
  95. package/Charting3D/Visuals/SciChart3DRenderer.d.ts +0 -1
  96. package/Charting3D/Visuals/SciChart3DRenderer.js +3 -26
  97. package/Charting3D/Visuals/SciChart3DSurface.d.ts +12 -5
  98. package/Charting3D/Visuals/SciChart3DSurface.js +35 -6
  99. package/Charting3D/Visuals/createMaster3d.js +9 -4
  100. package/Core/BuildStamp.d.ts +1 -1
  101. package/Core/BuildStamp.js +2 -2
  102. package/Core/DeletableEntity.d.ts +11 -5
  103. package/Core/DeletableEntity.js +42 -45
  104. package/Core/Mouse/MouseManager.js +6 -0
  105. package/Core/OneTimePerformanceWarning.d.ts +1 -1
  106. package/Core/OneTimePerformanceWarning.js +2 -1
  107. package/_wasm/scichart.browser.js +1 -1
  108. package/_wasm/scichart2d.js +1 -1
  109. package/_wasm/scichart2d.wasm +0 -0
  110. package/_wasm/scichart3d.js +1 -1
  111. package/_wasm/scichart3d.wasm +0 -0
  112. package/constants/performanceWarnings.d.ts +1 -0
  113. package/constants/performanceWarnings.js +2 -1
  114. package/index.d.ts +5 -6
  115. package/index.dev.js +68886 -0
  116. package/index.js +13 -21
  117. package/index.min.js +1 -1
  118. package/package.json +1 -1
  119. package/utils/MemoryUsageHelper.d.ts +55 -8
  120. package/utils/MemoryUsageHelper.js +64 -14
  121. package/utils/colorUtil.d.ts +7 -0
  122. package/utils/colorUtil.js +13 -1
  123. package/utils/parseColor.js +19 -4
@@ -148,11 +148,6 @@ var SciChartSurface = /** @class */ (function (_super) {
148
148
  * Used internally - the {@link RenderContext2D} for drawing
149
149
  */
150
150
  //public renderContext2D: RenderContext2D;
151
- /**
152
- * An event handler which notifies its subscribers when a render operation has finished. Use this
153
- * to time render performance, or to update elements of the chart or your UI on redraw.
154
- */
155
- _this.rendered = new EventHandler_1.EventHandler();
156
151
  /**
157
152
  * An event handler which notifies its subscribers when a render operation starts. Use this
158
153
  * to update elements of the chart for the current render. Any updates made here will not trigger a subsequent render.
@@ -639,7 +634,7 @@ var SciChartSurface = /** @class */ (function (_super) {
639
634
  * @inheritDoc
640
635
  */
641
636
  SciChartSurface.prototype.changeViewportSize = function (pixelWidth, pixelHeight) {
642
- if (!pixelWidth || !pixelHeight) {
637
+ if (!pixelWidth || !pixelHeight || this.isDeleted) {
643
638
  return;
644
639
  }
645
640
  // Changing the viewportSize
@@ -683,6 +678,8 @@ var SciChartSurface = /** @class */ (function (_super) {
683
678
  };
684
679
  // Step_5: Get context and pass drawing to SciChartRenderer
685
680
  SciChartSurface.prototype.doDrawingLoop = function (context) {
681
+ if (this.isDeleted)
682
+ return;
686
683
  context = context !== null && context !== void 0 ? context : this.renderSurface.getRenderContext();
687
684
  this.currentWebGlRenderContextProperty = context;
688
685
  try {
@@ -717,10 +714,7 @@ var SciChartSurface = /** @class */ (function (_super) {
717
714
  (0, NativeObject_1.freeCache)(this.webAssemblyContext2D).delete();
718
715
  }
719
716
  else if (this.domChartRoot) {
720
- console.error("Error from chart in div ".concat(this.domChartRoot.id), err);
721
- if (typeof err !== "string" && (err === null || err === void 0 ? void 0 : err.message)) {
722
- console.error(err === null || err === void 0 ? void 0 : err.message);
723
- }
717
+ console.error("Error from chart in div ".concat(this.domChartRoot.id, ":"), err);
724
718
  }
725
719
  else {
726
720
  // Surface the error for tests
@@ -734,8 +728,13 @@ var SciChartSurface = /** @class */ (function (_super) {
734
728
  SciChartSurface.prototype.delete = function (clearHtml) {
735
729
  if (clearHtml === void 0) { clearHtml = true; }
736
730
  if (this.isDeleted) {
737
- if (process.env.NODE_ENV !== "production") {
738
- console.warn("Trying to delete the surface with ID = \"".concat(this.id, ")\", which has already been deleted!"));
731
+ try {
732
+ if (process.env.NODE_ENV !== "production") {
733
+ console.warn("Trying to delete the surface with ID = \"".concat(this.id, ")\", which has already been deleted!"));
734
+ }
735
+ }
736
+ catch (err) {
737
+ console.warn(err);
739
738
  }
740
739
  return;
741
740
  }
@@ -5,6 +5,7 @@ import { MouseManager } from "../../Core/Mouse/MouseManager";
5
5
  import { ObservableArray } from "../../Core/ObservableArray";
6
6
  import { PropertyChangedEventArgs } from "../../Core/PropertyChangedEventArgs";
7
7
  import { Rect } from "../../Core/Rect";
8
+ import { Thickness } from "../../Core/Thickness";
8
9
  import { EThemeProviderType } from "../../types/ThemeProviderType";
9
10
  import { TSciChart } from "../../types/TSciChart";
10
11
  import { TSciChart3D } from "../../types/TSciChart3D";
@@ -105,6 +106,11 @@ export interface ISciChartSurfaceBase extends IDeletable, IThemeable {
105
106
  addDeletable(deletable: IDeletable): void;
106
107
  invalidateElement(): void;
107
108
  delete(clearHtml?: boolean): void;
109
+ /**
110
+ * An event handler which notifies its subscribers when a render operation has finished. Use this
111
+ * to time render performance, or to update elements of the chart or your UI on redraw.
112
+ */
113
+ rendered: EventHandler<void>;
108
114
  }
109
115
  /**
110
116
  * Enum constants to specify SciChartSurface type
@@ -143,10 +149,16 @@ export declare abstract class SciChartSurfaceBase extends DeletableEntity implem
143
149
  * chart parts are automatically anti-aliased
144
150
  */
145
151
  static AntiAliasWebGlBackbuffer: boolean;
152
+ /**
153
+ * Defines a delay of the shared wasmContext auto-dispose if {@link autoDisposeWasmContext} is enabled.
154
+ */
146
155
  static wasmContextDisposeTimeout: number;
156
+ /**
157
+ * Defines if the shared wasmContext ({@link TSciChart | WebAssembly Context}) should be deleted after all of the surfaces that use it are deleted.
158
+ */
147
159
  static autoDisposeWasmContext: boolean;
148
160
  /**
149
- * Deletes a {@link TSciChart | WebAssembly Context} used by the charts instantiated with wasmContext {@link SciChartSurface.create}.
161
+ * Deletes the shared wasmContext ({@link TSciChart | WebAssembly Context}) used by the charts instantiated with {@link SciChartSurface.create} or {@link SciChart3DSurface.create}.
150
162
  */
151
163
  static disposeSharedWasmContext(): void;
152
164
  /**
@@ -245,6 +257,11 @@ export declare abstract class SciChartSurfaceBase extends DeletableEntity implem
245
257
  */
246
258
  readonly modifierAnnotations: ObservableArray<IAnnotation>;
247
259
  adornerLayer: AdornerLayer;
260
+ /**
261
+ * An event handler which notifies its subscribers when a render operation has finished. Use this
262
+ * to time render performance, or to update elements of the chart or your UI on redraw.
263
+ */
264
+ rendered: EventHandler<void>;
248
265
  protected destinations: TSciChartDestination[];
249
266
  protected themeProviderProperty: IThemeProvider;
250
267
  protected previousThemeProviderProperty: IThemeProvider;
@@ -352,6 +369,7 @@ export declare abstract class SciChartSurfaceBase extends DeletableEntity implem
352
369
  * engine will schedule a redraw a the next time the renderer is free.
353
370
  */
354
371
  abstract invalidateElement(): void;
372
+ abstract getSeriesViewRectPadding(scaled: boolean): Thickness;
355
373
  getMainCanvas(): HTMLCanvasElement;
356
374
  /**
357
375
  * Sets the Series View {@link Rect}, a rectangle relative to the entire size of the {@link SciChartSurfaceBase}
@@ -68,6 +68,11 @@ var SciChartSurfaceBase = /** @class */ (function (_super) {
68
68
  function SciChartSurfaceBase(webAssemblyContext, canvases) {
69
69
  if (canvases === void 0) { canvases = {}; }
70
70
  var _this = _super.call(this) || this;
71
+ /**
72
+ * An event handler which notifies its subscribers when a render operation has finished. Use this
73
+ * to time render performance, or to update elements of the chart or your UI on redraw.
74
+ */
75
+ _this.rendered = new EventHandler_1.EventHandler();
71
76
  _this.themeProviderProperty = SciChartSurfaceBase.DEFAULT_THEME;
72
77
  _this.previousThemeProviderProperty = SciChartSurfaceBase.DEFAULT_THEME;
73
78
  _this.isInitializedProperty = false;
@@ -123,39 +128,50 @@ var SciChartSurfaceBase = /** @class */ (function (_super) {
123
128
  // Setup Dpi change listeners
124
129
  _this.onDpiChanged = _this.onDpiChanged.bind(_this);
125
130
  DpiHelper_1.DpiHelper.dpiChanged.subscribe(_this.onDpiChanged);
126
- if (process.env.NODE_ENV !== "production") {
127
- if (MemoryUsageHelper_1.MemoryUsageHelper.isMemoryUsageDebugEnabled) {
128
- var rootContainer = document.body;
129
- var observer_1 = new MutationObserver(function () {
130
- var isInDom = _this.domChartRoot.isConnected;
131
- if (!isInDom && !_this.isDeleted) {
132
- console.warn("The chart root element \"".concat(_this.domChartRoot.id, "\" was detached before the surface ").concat(_this.id, " was properly disposed! Make sure to call \"delete\" method on the surface when it is not longer needed."));
133
- }
134
- });
135
- observer_1.observe(rootContainer, { childList: true, subtree: true });
136
- _this.addDeletable({
137
- delete: function () { return observer_1.disconnect(); }
138
- });
131
+ try {
132
+ if (process.env.NODE_ENV !== "production") {
133
+ if (MemoryUsageHelper_1.MemoryUsageHelper.isMemoryUsageDebugEnabled) {
134
+ var rootContainer = document.body;
135
+ var observer_1 = new MutationObserver(function () {
136
+ var isInDom = _this.domChartRoot.isConnected;
137
+ if (!isInDom && !_this.isDeleted) {
138
+ console.warn("The chart root element \"".concat(_this.domChartRoot.id, "\" was detached before the surface ").concat(_this.id, " was properly disposed! Make sure to call \"delete\" method on the surface when it is not longer needed."));
139
+ }
140
+ });
141
+ observer_1.observe(rootContainer, { childList: true, subtree: true });
142
+ _this.addDeletable({
143
+ delete: function () { return observer_1.disconnect(); }
144
+ });
145
+ }
139
146
  }
140
147
  }
148
+ catch (err) {
149
+ console.warn(err);
150
+ }
141
151
  return _this;
142
152
  }
143
153
  /**
144
- * Deletes a {@link TSciChart | WebAssembly Context} used by the charts instantiated with wasmContext {@link SciChartSurface.create}.
154
+ * Deletes the shared wasmContext ({@link TSciChart | WebAssembly Context}) used by the charts instantiated with {@link SciChartSurface.create} or {@link SciChart3DSurface.create}.
145
155
  */
146
156
  SciChartSurfaceBase.disposeSharedWasmContext = function () {
147
157
  if (Globals_1.sciChart3DDestinations.length === 0 && Globals_1.sciChartDestinations.length === 0) {
148
- document.body.removeChild(SciChartSurfaceBase.domMasterCanvas);
149
- SciChartSurfaceBase.domMasterCanvas = undefined;
150
- }
151
- if (process.env.NODE_ENV !== "production") {
152
- if (MemoryUsageHelper_1.MemoryUsageHelper.isMemoryUsageDebugEnabled) {
153
- // @ts-ignore
154
- window.gc && window.gc();
155
- // TODO add warning if there are undeleted or uncollected entities instead
156
- // MemoryUsageHelper.objectRegistry.log();
158
+ if (SciChartSurfaceBase.domMasterCanvas) {
159
+ document.body.removeChild(SciChartSurfaceBase.domMasterCanvas);
160
+ SciChartSurfaceBase.domMasterCanvas = undefined;
157
161
  }
158
162
  }
163
+ // try {
164
+ // if (process.env.NODE_ENV !== "production") {
165
+ // if (MemoryUsageHelper.isMemoryUsageDebugEnabled) {
166
+ // // @ts-ignore
167
+ // window.gc && window.gc();
168
+ // // TODO add warning if there are undeleted or uncollected entities instead
169
+ // // MemoryUsageHelper.objectRegistry.log();
170
+ // }
171
+ // }
172
+ // } catch (err) {
173
+ // console.warn(err);
174
+ // }
159
175
  };
160
176
  /**
161
177
  * Sets the runtime license key. Use for full licenses or trials only, not developer licenses.
@@ -570,7 +586,13 @@ var SciChartSurfaceBase = /** @class */ (function (_super) {
570
586
  * chart parts are automatically anti-aliased
571
587
  */
572
588
  SciChartSurfaceBase.AntiAliasWebGlBackbuffer = false;
589
+ /**
590
+ * Defines a delay of the shared wasmContext auto-dispose if {@link autoDisposeWasmContext} is enabled.
591
+ */
573
592
  SciChartSurfaceBase.wasmContextDisposeTimeout = 0;
593
+ /**
594
+ * Defines if the shared wasmContext ({@link TSciChart | WebAssembly Context}) should be deleted after all of the surfaces that use it are deleted.
595
+ */
574
596
  SciChartSurfaceBase.autoDisposeWasmContext = false;
575
597
  return SciChartSurfaceBase;
576
598
  }(DeletableEntity_1.DeletableEntity));
@@ -4,6 +4,9 @@ import { TWebAssemblyChart } from "./SciChartSurface";
4
4
  /** @ignore */
5
5
  export declare const createMultichart: (divElement: string | HTMLDivElement, options?: I2DSurfaceOptions) => Promise<TWebAssemblyChart>;
6
6
  /** @ignore */
7
+ declare const initializeChartEngine: () => Promise<void>;
8
+ /** @ignore */
7
9
  export declare const disposeMultiChart: () => void;
8
10
  /** @ignore */
9
11
  export declare const monitorWebGL: (wasmContext: TSciChart) => void;
12
+ export { initializeChartEngine as initializeChartEngine2D };
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.monitorWebGL = exports.disposeMultiChart = exports.createMultichart = void 0;
39
+ exports.initializeChartEngine2D = exports.monitorWebGL = exports.disposeMultiChart = exports.createMultichart = void 0;
40
40
  // @ts-ignore
41
41
  var WasmModule2D = require("../../_wasm/scichart2d");
42
42
  var BuildStamp_1 = require("../../Core/BuildStamp");
@@ -53,6 +53,7 @@ var DeletableEntity_1 = require("../../Core/DeletableEntity");
53
53
  var NativeObject_1 = require("./Helpers/NativeObject");
54
54
  var LabelCache_1 = require("./Axis/LabelProvider/LabelCache");
55
55
  var MemoryUsageHelper_1 = require("../../utils/MemoryUsageHelper");
56
+ var WebGlHelper_1 = require("../../Core/WebGlHelper");
56
57
  // Global variables
57
58
  /** @ignore */
58
59
  var sciChartMaster = {
@@ -64,7 +65,7 @@ var sciChartMaster = {
64
65
  var sciChartMasterPromise;
65
66
  /** @ignore */
66
67
  var createMultichart = function (divElement, options) { return __awaiter(void 0, void 0, void 0, function () {
67
- var canvases, loader, loaderDiv, master, createChildSurface, wasmContext_1, divElementId, sciChartSurface_1, err_1;
68
+ var canvases, loader, loaderDiv, createChildSurface, wasmContext_1, divElementId, sciChartSurface_1, err_1;
68
69
  var _a, _b, _c;
69
70
  return __generator(this, function (_d) {
70
71
  switch (_d.label) {
@@ -75,21 +76,10 @@ var createMultichart = function (divElement, options) { return __awaiter(void 0,
75
76
  loaderDiv = loader.addChartLoader(canvases.domDivContainer, options === null || options === void 0 ? void 0 : options.theme);
76
77
  _d.label = 1;
77
78
  case 1:
78
- _d.trys.push([1, 4, , 5]);
79
- if (!(!sciChartMaster.wasmContext || !sciChartMaster.createChildSurface || !sciChartMaster.getChildSurfaces)) return [3 /*break*/, 3];
80
- if (!sciChartMasterPromise) {
81
- sciChartMasterPromise = createMaster();
82
- }
83
- return [4 /*yield*/, sciChartMasterPromise];
79
+ _d.trys.push([1, 3, , 4]);
80
+ return [4 /*yield*/, initializeChartEngine()];
84
81
  case 2:
85
- master = _d.sent();
86
- sciChartMaster.wasmContext = master.wasmContext;
87
- (0, BuildStamp_1.checkBuildStamp)(master.wasmContext);
88
- sciChartMaster.createChildSurface = master.createChildSurface;
89
- sciChartMaster.getChildSurfaces = master.getChildSurfaces;
90
- (0, exports.monitorWebGL)(master.wasmContext);
91
- _d.label = 3;
92
- case 3:
82
+ _d.sent();
93
83
  createChildSurface = sciChartMaster.createChildSurface, wasmContext_1 = sciChartMaster.wasmContext;
94
84
  divElementId = canvases.domChartRoot.id;
95
85
  sciChartSurface_1 = createChildSurface(divElementId, canvases, options === null || options === void 0 ? void 0 : options.theme);
@@ -100,18 +90,43 @@ var createMultichart = function (divElement, options) { return __awaiter(void 0,
100
90
  resolve({ wasmContext: wasmContext_1, sciChartSurface: sciChartSurface_1 });
101
91
  }, 0);
102
92
  })];
103
- case 4:
93
+ case 3:
104
94
  err_1 = _d.sent();
105
95
  console.error(err_1);
106
96
  // replace with div with error message
107
97
  loader.removeChartLoader(canvases.domDivContainer, loaderDiv);
108
98
  loaderDiv = undefined;
109
99
  return [2 /*return*/, Promise.reject(err_1)];
110
- case 5: return [2 /*return*/];
100
+ case 4: return [2 /*return*/];
111
101
  }
112
102
  });
113
103
  }); };
114
104
  exports.createMultichart = createMultichart;
105
+ /** @ignore */
106
+ var initializeChartEngine = function () { return __awaiter(void 0, void 0, void 0, function () {
107
+ var master;
108
+ return __generator(this, function (_a) {
109
+ switch (_a.label) {
110
+ case 0:
111
+ WebGlHelper_1.WebGlHelper.initialize();
112
+ if (!(!sciChartMaster.wasmContext || !sciChartMaster.createChildSurface || !sciChartMaster.getChildSurfaces)) return [3 /*break*/, 2];
113
+ if (!sciChartMasterPromise) {
114
+ sciChartMasterPromise = createMaster();
115
+ }
116
+ return [4 /*yield*/, sciChartMasterPromise];
117
+ case 1:
118
+ master = _a.sent();
119
+ sciChartMaster.wasmContext = master.wasmContext;
120
+ (0, BuildStamp_1.checkBuildStamp)(master.wasmContext);
121
+ sciChartMaster.createChildSurface = master.createChildSurface;
122
+ sciChartMaster.getChildSurfaces = master.getChildSurfaces;
123
+ (0, exports.monitorWebGL)(master.wasmContext);
124
+ _a.label = 2;
125
+ case 2: return [2 /*return*/];
126
+ }
127
+ });
128
+ }); };
129
+ exports.initializeChartEngine2D = initializeChartEngine;
115
130
  var cleanupWasmContext;
116
131
  /** @ignore */
117
132
  var disposeMultiChart = function () {
@@ -212,8 +227,18 @@ var createMaster = function () {
212
227
  var createChildSurface = function (divElementId, canvases, theme) {
213
228
  Guard_1.Guard.notNull(theme, "theme");
214
229
  var canvas2dId = sciChartInitCommon_1.default.getCanvas2dId(divElementId);
230
+ // TODO check other destinations
215
231
  var sameIdDestinations = Globals_1.sciChartDestinations.filter(function (el) { return el.canvasElementId === canvas2dId; });
216
- sameIdDestinations.forEach(function (el) { return el.sciChartSurface.delete(false); });
232
+ try {
233
+ if (process.env.NODE_ENV !== "production") {
234
+ if (MemoryUsageHelper_1.MemoryUsageHelper.isMemoryUsageDebugEnabled && sameIdDestinations.length > 0) {
235
+ console.warn("Trying to create a SciChartSurface on a root element (".concat(divElementId, ") of another surface before it was deleted ! This will automatically delete the previous surface."));
236
+ }
237
+ }
238
+ }
239
+ catch (err) {
240
+ console.warn(err);
241
+ }
217
242
  var otherDestinations = Globals_1.sciChartDestinations.filter(function (el) { return el.canvasElementId !== canvas2dId; });
218
243
  chartInitObj.ClearDestinations();
219
244
  while (Globals_1.sciChartDestinations.length > 0) {
@@ -238,16 +263,22 @@ var createMaster = function () {
238
263
  }
239
264
  }
240
265
  else {
241
- if (process.env.NODE_ENV !== "production") {
242
- if (MemoryUsageHelper_1.MemoryUsageHelper.isMemoryUsageDebugEnabled &&
243
- sciChartSurface.otherSurfaces.length === 0) {
244
- console.warn("SciChartSurface.autoDisposeWasmContext is disabled, thus wasmContext should be disposed explicitly using \"SciChartSurface.disposeSharedWasmContext()\".");
266
+ try {
267
+ if (process.env.NODE_ENV !== "production") {
268
+ if (MemoryUsageHelper_1.MemoryUsageHelper.isMemoryUsageDebugEnabled &&
269
+ sciChartSurface.otherSurfaces.length === 0) {
270
+ console.warn("SciChartSurface.autoDisposeWasmContext is disabled, thus wasmContext should be disposed explicitly using \"SciChartSurface.disposeSharedWasmContext()\".");
271
+ }
245
272
  }
246
273
  }
274
+ catch (err) {
275
+ console.warn(err);
276
+ }
247
277
  }
248
278
  }
249
279
  });
250
280
  addDestination(wasmContext, canvas2dId, sciChartSurface, canvases.domCanvas2D.width, canvases.domCanvas2D.height, chartInitObj);
281
+ sameIdDestinations.forEach(function (el) { return el.sciChartSurface.delete(false); });
251
282
  licenseManager2D_1.licenseManager.applyLicense2D(wasmContext, sciChartSurface, false);
252
283
  return sciChartSurface;
253
284
  };
@@ -114,10 +114,10 @@ var initDrawEngineSingleChart = function (wasmContext, canvases, resolve, theme)
114
114
  scs.renderSurface.onRenderTimeElapsed();
115
115
  },
116
116
  Update: function (deltaTime) {
117
- logger_1.Logger.log("sciChartInitCommon.ts Update");
117
+ // Logger.debug("sciChartInitCommon.ts Update");
118
118
  },
119
119
  ShutDownChart: function () {
120
- logger_1.Logger.log("sciChartInitCommon.ts ShutDownChart");
120
+ // Logger.debug("sciChartInitCommon.ts ShutDownChart");
121
121
  }
122
122
  };
123
123
  var chartInitObj = wasmContext.SCRTSampleChartInterface.implement(chartInitializer);
@@ -559,11 +559,11 @@ var applyLicense = function (licenseContext, sciChartSurface) {
559
559
  debug("checkstatus: " + licensingClasses_1.LicenseCheckStatus[checkStatus]);
560
560
  if (checkStatus === licensingClasses_1.LicenseCheckStatus.NoLicense) {
561
561
  if (lt === licenseContext.SCRTLicenseType.LICENSE_TYPE_COMMUNITY && !communityNotice) {
562
- console.log("Defaulting to SciChart Community Edition. Usage constitutes acceptance of EULA at https://scichart.com/JSCommunityEULA. See https://store.scichart.com for commercial licensing options.");
562
+ console.log("Defaulting to SciChart Community Edition. Usage constitutes acceptance of our EULA and terms at https://www.scichart.com/community-licensing. See https://store.scichart.com for commercial licensing options.");
563
563
  var daysRemaining = licenseContext.SCRTCredentials.GetLicenseDaysRemaining();
564
564
  console.log("The community license is valid for 6 months from the date the version in use was released. This version ".concat(BuildStamp_1.libraryVersion, " has ").concat(daysRemaining, " day").concat(daysRemaining === 1 ? "" : "s", " remaining"));
565
565
  if (!app_1.IS_TEST_ENV && ((_b = document === null || document === void 0 ? void 0 : document.location) === null || _b === void 0 ? void 0 : _b.hostname.startsWith("localhost")) && useLicenseWizard) {
566
- console.log("Looking for paid developer activation from licensing wizard... To disable this call SciChartSurface.UseCommunityLicense()");
566
+ console.log("SciChart is looking for a paid developer activation from the scichart licensing wizard... To disable this call SciChartSurface.UseCommunityLicense()");
567
567
  }
568
568
  communityNotice = true;
569
569
  }
@@ -786,7 +786,8 @@ var getLicenseInfo = function (licenseContext) {
786
786
  var sclt = licenseContext.SCRTCredentials.GetLicenseType();
787
787
  var licenseType = convertLicenseType(sclt, licenseContext);
788
788
  var daysRemaining = licenseContext.SCRTCredentials.GetLicenseDaysRemaining();
789
- if (checkStatus === licensingClasses_1.LicenseCheckStatus.LicenseOK && licenseManager2dState_1.licenseManager2dState.getLicenseType() !== licenseType) {
789
+ if ((checkStatus === licensingClasses_1.LicenseCheckStatus.LicenseOK || licenseType === licensingClasses_1.LicenseType.Community) &&
790
+ licenseManager2dState_1.licenseManager2dState.getLicenseType() !== licenseType) {
790
791
  if (licenseType === licensingClasses_1.LicenseType.Community) {
791
792
  licenseManager2dState_1.licenseManager2dState.setOrderId("Community");
792
793
  }
@@ -897,8 +898,12 @@ var updateLicenseDisplayInternal = function (licenseInfo, sciChartSurface, is2D,
897
898
  if (checkStatus !== licensingClasses_1.LicenseCheckStatus.LicenseOK) {
898
899
  if (checkStatus === licensingClasses_1.LicenseCheckStatus.FetchingFromServer)
899
900
  chartmsg = "<br>Fetching license from server...";
900
- if (checkStatus === licensingClasses_1.LicenseCheckStatus.LookingForLicenseWizard)
901
+ if (checkStatus === licensingClasses_1.LicenseCheckStatus.LookingForLicenseWizard) {
902
+ if (licenseType === licensingClasses_1.LicenseType.Community) {
903
+ (0, Telemetry_1.sendTelemetry)();
904
+ }
901
905
  chartmsg = "<br>Looking for Licensing Wizard... <u>Please run it or click for download and installation instructions</u>.";
906
+ }
902
907
  else if (checkStatus === licensingClasses_1.LicenseCheckStatus.FailedToFindLicenseWizard)
903
908
  if (licenseManager2dState_1.licenseManager2dState.getIsDev()) {
904
909
  chartmsg = "<br><u>Could not connect to the Licensing Wizard. Please run it or click for download and installation instructions, then reload this page.</u>";
@@ -40,7 +40,7 @@ export declare type TCameraState = {
40
40
  *
41
41
  * ```ts
42
42
  * const sciChartS3Durface: SciChart3DSurface;
43
- * sciChart3DSurface.chartModifiers.add(new ZoomExtentsModifier3D());
43
+ * sciChart3DSurface.chartModifiers.add(new ResetCamera3DModifier());
44
44
  * ```
45
45
  *
46
46
  */
@@ -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
  }