scichart 2.1.2301 → 2.2.2389

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 (189) hide show
  1. package/Builder/buildAxis.d.ts +7 -0
  2. package/Builder/buildAxis.js +6 -0
  3. package/Builder/buildDataSeries.d.ts +19 -1
  4. package/Builder/buildDataSeries.js +22 -1
  5. package/Builder/buildModifiers.d.ts +2 -1
  6. package/Builder/buildSeries.d.ts +7 -2
  7. package/Builder/buildSeries.js +5 -1
  8. package/Charting/ChartModifiers/CursorModifier.d.ts +5 -0
  9. package/Charting/ChartModifiers/CursorModifier.js +15 -10
  10. package/Charting/ChartModifiers/LegendModifier.d.ts +31 -0
  11. package/Charting/ChartModifiers/LegendModifier.js +22 -0
  12. package/Charting/ChartModifiers/ModifierMouseArgs.d.ts +2 -2
  13. package/Charting/ChartModifiers/ModifierMouseArgs.js +4 -2
  14. package/Charting/ChartModifiers/RolloverModifier.d.ts +10 -0
  15. package/Charting/ChartModifiers/RolloverModifier.js +76 -19
  16. package/Charting/Drawing/WebGlRenderContext2D.js +26 -42
  17. package/Charting/LayoutManager/LayoutManager.js +6 -1
  18. package/Charting/Model/BaseHeatmapDataSeries.d.ts +1 -0
  19. package/Charting/Model/BaseHeatmapDataSeries.js +5 -2
  20. package/Charting/Model/ChartData/HlcSeriesInfo.d.ts +12 -0
  21. package/Charting/Model/ChartData/HlcSeriesInfo.js +52 -0
  22. package/Charting/Model/Filters/HlcCustomFilter.d.ts +41 -0
  23. package/Charting/Model/Filters/HlcCustomFilter.js +119 -0
  24. package/Charting/Model/Filters/HlcFilterBase.d.ts +30 -0
  25. package/Charting/Model/Filters/HlcFilterBase.js +141 -0
  26. package/Charting/Model/Filters/HlcScaleOffsetFilter.d.ts +18 -0
  27. package/Charting/Model/Filters/HlcScaleOffsetFilter.js +86 -0
  28. package/Charting/Model/Filters/XyFilterBase.d.ts +2 -0
  29. package/Charting/Model/Filters/XyFilterBase.js +6 -0
  30. package/Charting/Model/Filters/XyyFilterBase.js +9 -0
  31. package/Charting/Model/Filters/XyzFilterBase.js +12 -3
  32. package/Charting/Model/HlcDataSeries.d.ts +189 -0
  33. package/Charting/Model/HlcDataSeries.js +557 -0
  34. package/Charting/Model/IDataSeries.d.ts +5 -1
  35. package/Charting/Model/IDataSeries.js +4 -0
  36. package/Charting/Model/PointSeries/BasePointSeriesWrapped.d.ts +1 -1
  37. package/Charting/Model/PointSeries/BasePointSeriesWrapped.js +2 -2
  38. package/Charting/Model/PointSeries/HlcPointSeriesWrapped.d.ts +10 -0
  39. package/Charting/Model/PointSeries/HlcPointSeriesWrapped.js +31 -0
  40. package/Charting/Model/PointSeries/IPointSeries.d.ts +5 -0
  41. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.d.ts +1 -1
  42. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.js +3 -3
  43. package/Charting/Numerics/CoordinateCalculators/LogarithmicCoordinateCalculator.d.ts +2 -2
  44. package/Charting/Numerics/CoordinateCalculators/LogarithmicCoordinateCalculator.js +15 -6
  45. package/Charting/Services/SciChartRenderer.d.ts +1 -0
  46. package/Charting/Services/SciChartRenderer.js +6 -0
  47. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +6 -1
  48. package/Charting/Visuals/Annotations/AnnotationBase.js +23 -2
  49. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +6 -0
  50. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +46 -5
  51. package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +3 -1
  52. package/Charting/Visuals/Annotations/CustomAnnotation.js +14 -3
  53. package/Charting/Visuals/Annotations/HorizontalLineAnnotation.d.ts +4 -0
  54. package/Charting/Visuals/Annotations/HorizontalLineAnnotation.js +3 -2
  55. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.d.ts +1 -1
  56. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.js +13 -3
  57. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +13 -0
  58. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +71 -14
  59. package/Charting/Visuals/Annotations/VerticalLineAnnotation.d.ts +2 -0
  60. package/Charting/Visuals/Annotations/VerticalLineAnnotation.js +3 -2
  61. package/Charting/Visuals/Annotations/constants.d.ts +2 -1
  62. package/Charting/Visuals/Annotations/constants.js +1 -0
  63. package/Charting/Visuals/Axis/AxisBase2D.d.ts +11 -1
  64. package/Charting/Visuals/Axis/AxisBase2D.js +75 -17
  65. package/Charting/Visuals/Axis/AxisCore.d.ts +4 -0
  66. package/Charting/Visuals/Axis/AxisCore.js +6 -0
  67. package/Charting/Visuals/Axis/AxisRenderer.js +6 -10
  68. package/Charting/Visuals/Axis/DateTimeNumericAxis.d.ts +11 -0
  69. package/Charting/Visuals/Axis/DateTimeNumericAxis.js +36 -0
  70. package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.d.ts +28 -0
  71. package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +125 -0
  72. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.d.ts +34 -0
  73. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +82 -0
  74. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.d.ts +2 -2
  75. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +39 -6
  76. package/Charting/Visuals/Axis/LogarithmicAxis.d.ts +1 -0
  77. package/Charting/Visuals/Axis/LogarithmicAxis.js +5 -3
  78. package/Charting/Visuals/Helpers/NativeObject.d.ts +13 -0
  79. package/Charting/Visuals/Helpers/NativeObject.js +101 -0
  80. package/Charting/Visuals/Helpers/createNativeRect.d.ts +2 -2
  81. package/Charting/Visuals/Helpers/createNativeRect.js +3 -1
  82. package/Charting/Visuals/Helpers/drawBorder.js +2 -2
  83. package/Charting/Visuals/Helpers/drawLabel.d.ts +3 -3
  84. package/Charting/Visuals/Helpers/drawLabel.js +38 -18
  85. package/Charting/Visuals/I2DSurfaceOptions.d.ts +6 -0
  86. package/Charting/Visuals/Legend/SciChartLegend.d.ts +4 -0
  87. package/Charting/Visuals/Legend/SciChartLegend.js +8 -2
  88. package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +1 -0
  89. package/Charting/Visuals/Legend/SciChartLegendBase.js +4 -2
  90. package/Charting/Visuals/Legend/SciChartPieLegend.js +1 -1
  91. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +24 -8
  92. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +109 -31
  93. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +3 -0
  94. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +8 -0
  95. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +17 -166
  96. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +35 -328
  97. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +5 -2
  98. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +5 -3
  99. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +14 -11
  100. package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.d.ts +46 -0
  101. package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.js +252 -0
  102. package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.d.ts +188 -0
  103. package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.js +357 -0
  104. package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.js +3 -10
  105. package/Charting/Visuals/RenderableSeries/HitTest/ErrorSeriesHitTestProvider.d.ts +20 -0
  106. package/Charting/Visuals/RenderableSeries/HitTest/ErrorSeriesHitTestProvider.js +120 -0
  107. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +6 -0
  108. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +36 -0
  109. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +8 -0
  110. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +6 -0
  111. package/Charting/Visuals/RenderableSeries/SeriesVisibleChangedArgs.d.ts +6 -0
  112. package/Charting/Visuals/RenderableSeries/SeriesVisibleChangedArgs.js +11 -0
  113. package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +1 -2
  114. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.d.ts +22 -0
  115. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.js +38 -1
  116. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +2 -2
  117. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +26 -45
  118. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +77 -18
  119. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +139 -42
  120. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -0
  121. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +21 -1
  122. package/Charting/Visuals/RenderableSeries/constants.d.ts +7 -0
  123. package/Charting/Visuals/RenderableSeries/constants.js +7 -0
  124. package/Charting/Visuals/SciChartPieSurface/IPieSurfaceOptions.d.ts +25 -2
  125. package/Charting/Visuals/SciChartPieSurface/PieSegment/IPieSegment.d.ts +9 -1
  126. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.d.ts +128 -2
  127. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +202 -21
  128. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.d.ts +6 -1
  129. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.js +5 -0
  130. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +77 -3
  131. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +373 -81
  132. package/Charting/Visuals/SciChartPieSurface/constants.d.ts +7 -1
  133. package/Charting/Visuals/SciChartPieSurface/constants.js +6 -0
  134. package/Charting/Visuals/SciChartSurface.d.ts +13 -2
  135. package/Charting/Visuals/SciChartSurface.js +39 -3
  136. package/Charting/Visuals/createMaster.js +17 -13
  137. package/Charting/Visuals/createSingle.js +5 -3
  138. package/Charting/Visuals/licenseManager2D.d.ts +6 -0
  139. package/Charting/Visuals/licenseManager2D.js +98 -9
  140. package/Charting/Visuals/licenseManager2dState.d.ts +11 -0
  141. package/Charting/Visuals/licenseManager2dState.js +37 -1
  142. package/Charting/Visuals/loader.js +4 -1
  143. package/Charting/Visuals/sciChartInitCommon.d.ts +2 -2
  144. package/Charting/Visuals/sciChartInitCommon.js +13 -9
  145. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +6 -2
  146. package/Charting3D/Visuals/SciChart3DRenderer.js +1 -1
  147. package/Charting3D/Visuals/SciChart3DSurface.d.ts +8 -3
  148. package/Charting3D/Visuals/SciChart3DSurface.js +12 -3
  149. package/Charting3D/Visuals/createMaster3d.js +20 -14
  150. package/Charting3D/Visuals/createSingle3d.js +3 -4
  151. package/Charting3D/Visuals/licenseManager3D.js +3 -1
  152. package/Core/BuildStamp.d.ts +1 -1
  153. package/Core/BuildStamp.js +2 -2
  154. package/Core/Telemetry.d.ts +7 -0
  155. package/Core/Telemetry.js +109 -0
  156. package/Core/storage/localStorageApi.d.ts +4 -0
  157. package/Core/storage/localStorageApi.js +12 -0
  158. package/README.md +49 -13
  159. package/_wasm/scichart.browser.js +1 -1
  160. package/_wasm/scichart2d.js +95 -95
  161. package/_wasm/scichart2d.wasm +0 -0
  162. package/_wasm/scichart3d.js +97 -97
  163. package/_wasm/scichart3d.wasm +0 -0
  164. package/package.json +1 -1
  165. package/types/AxisType.d.ts +5 -1
  166. package/types/AxisType.js +4 -0
  167. package/types/Color.d.ts +1 -0
  168. package/types/Color.js +1 -0
  169. package/types/DataFilterType.d.ts +1 -0
  170. package/types/DataFilterType.js +1 -0
  171. package/types/DataPointWidthMode.d.ts +13 -0
  172. package/types/DataPointWidthMode.js +17 -0
  173. package/types/ErrorDirection.d.ts +13 -0
  174. package/types/ErrorDirection.js +17 -0
  175. package/types/ErrorMode.d.ts +17 -0
  176. package/types/ErrorMode.js +21 -0
  177. package/types/LabelPlacement.d.ts +8 -0
  178. package/types/LabelPlacement.js +11 -1
  179. package/types/LabelProviderType.d.ts +5 -1
  180. package/types/LabelProviderType.js +4 -0
  181. package/types/SeriesType.d.ts +3 -1
  182. package/types/SeriesType.js +2 -0
  183. package/types/TSciChart.d.ts +8 -2
  184. package/types/TSciChart3D.d.ts +5 -2
  185. package/types/TSciChartSurfaceCanvases.d.ts +1 -0
  186. package/utils/date.d.ts +1 -0
  187. package/utils/date.js +15 -1
  188. package/utils/guid.d.ts +6 -0
  189. package/utils/guid.js +17 -1
@@ -68,7 +68,7 @@ var getMaxHeight = function (divElement) {
68
68
  * @param activeCanvas - ECanvasType.canvasWebGL for sciChartSurface.createSingle, ECanvasType.canvas2D for copy canvas,
69
69
  * ECanvasType.svg for SciChartPieSurface
70
70
  */
71
- var initCanvas = function (divElement, aspectWidth, aspectHeight, activeCanvas) {
71
+ var initCanvas = function (divElement, aspectWidth, aspectHeight, activeCanvas, disableAspect) {
72
72
  if (activeCanvas === void 0) { activeCanvas = ECanvasType.canvasWebGL; }
73
73
  WebGlHelper_1.WebGlHelper.initialize();
74
74
  DpiHelper_1.DpiHelper.initialize();
@@ -82,6 +82,7 @@ var initCanvas = function (divElement, aspectWidth, aspectHeight, activeCanvas)
82
82
  var divWidth = chartRoot.offsetWidth, divHeight = chartRoot.offsetHeight;
83
83
  var maxHeight = getMaxHeight(chartRoot);
84
84
  var _a = getCanvasSizes(divWidth, divHeight, maxHeight, aspectWidth, aspectHeight), width = _a.width, height = _a.height, aspectRatio = _a.aspectRatio;
85
+ // set canvasSize for parent div because of all children in absolute
85
86
  var canvasWebGL;
86
87
  if (activeCanvas === ECanvasType.canvasWebGL) {
87
88
  // WebGL Canvas
@@ -158,10 +159,11 @@ var initCanvas = function (divElement, aspectWidth, aspectHeight, activeCanvas)
158
159
  domSvgContainer: svgRootElement,
159
160
  domSvgAdornerLayer: svgAdornerLayer,
160
161
  domDivContainer: divRootElement,
161
- aspect: aspectRatio
162
+ aspect: aspectRatio,
163
+ disableAspect: disableAspect
162
164
  };
163
165
  };
164
- var subscribeToResize = function (chartRoot, aspect, sciChartSurface) {
166
+ var subscribeToResize = function (chartRoot, aspect, sciChartSurface, disableAspect) {
165
167
  // @ts-ignore
166
168
  var resizeObserver = new ResizeObserver(function (entries) {
167
169
  var _loop_1 = function (entry) {
@@ -185,12 +187,14 @@ var subscribeToResize = function (chartRoot, aspect, sciChartSurface) {
185
187
  newWidth = 900;
186
188
  }
187
189
  // if aspect ration is defined we use is to calc height
188
- if (aspect) {
189
- newHeight = Math.round(newWidth / aspect);
190
- }
191
- else if (!newHeight) {
192
- // hardcoded aspect ration if newHeight is not defined
193
- newHeight = (newWidth * 2) / 3;
190
+ if (!disableAspect) {
191
+ if (aspect) {
192
+ newHeight = Math.round(newWidth / aspect);
193
+ }
194
+ else if (!newHeight) {
195
+ // hardcoded aspect ration if newHeight is not defined
196
+ newHeight = (newWidth * 2) / 3;
197
+ }
194
198
  }
195
199
  // check max-height
196
200
  var maxHeight = getMaxHeight(chartRoot);
@@ -133,8 +133,12 @@ var ScatterPointsSceneEntity = /** @class */ (function (_super) {
133
133
  // as its implemented as a non-sparse array
134
134
  metadata.forEach(function (meta, index) {
135
135
  if (meta) {
136
- _this.pointColors.set(index, meta.vertexColorAbgr);
137
- _this.pointScales.set(index, meta.pointScale);
136
+ if (meta.vertexColorAbgr) {
137
+ _this.pointColors.set(index, meta.vertexColorAbgr);
138
+ }
139
+ if (meta.pointScale) {
140
+ _this.pointScales.set(index, meta.pointScale);
141
+ }
138
142
  }
139
143
  });
140
144
  return { colors: this.pointColors, scales: this.pointScales };
@@ -64,7 +64,7 @@ var SciChart3DRenderer = /** @class */ (function () {
64
64
  * The main render loop
65
65
  */
66
66
  SciChart3DRenderer.prototype.render = function () {
67
- if (this.scs.isDeleted) {
67
+ if (this.scs.isDeleted || !this.scs.isInitialized) {
68
68
  return;
69
69
  }
70
70
  // Step 1: Sanity checks
@@ -66,14 +66,19 @@ export declare class SciChart3DSurface extends SciChartSurfaceBase {
66
66
  * Note if loading from CDN the version number of data/wasm Urls must match the version number of SciChart.js you are using.
67
67
  * @example
68
68
  * ```ts
69
- * SciChart.SciChartSurface.configure({
70
- * dataUrl: "https://cdn.jsdelivr.net/npm/scichart@1.3.1500/_wasm/scichart2d.data",
71
- * wasmUrl: "https://cdn.jsdelivr.net/npm/scichart@1.3.1500/_wasm/scichart2d.wasm"
69
+ * // 3D Charts
70
+ * SciChart.SciChart3DSurface.configure({
71
+ * dataUrl: "https://cdn.jsdelivr.net/npm/scichart@2.2.2378/_wasm/scichart3d.data",
72
+ * wasmUrl: "https://cdn.jsdelivr.net/npm/scichart@2.2.2378/_wasm/scichart3d.wasm"
72
73
  * });
73
74
  * ```
74
75
  * @param config
75
76
  */
76
77
  static configure(config: TSciChartConfig): void;
78
+ /**
79
+ * Tell SciChart to load the Wasm and Data files from CDN, rather than expecting them to be served by the host server.
80
+ */
81
+ static useWasmFromCDN(): void;
77
82
  /**
78
83
  * Creates a {@link SciChart3DSurface} and {@link TSciChart3D | WebAssembly Context} to occupy the div by element ID in your DOM.
79
84
  * @remarks This method is async and must be awaited
@@ -31,6 +31,7 @@ var DefaultViewportManager3D_1 = require("./DefaultViewportManager3D");
31
31
  var GizmoEntity_1 = require("./GizmoEntity");
32
32
  var RootSceneEntity_1 = require("./RootSceneEntity");
33
33
  var SciChart3DRenderer_1 = require("./SciChart3DRenderer");
34
+ var BuildStamp_1 = require("../../Core/BuildStamp");
34
35
  exports.sciChartConfig3D = {};
35
36
  /**
36
37
  * @summary The {@link SciChart3DSurface} is the root 3D Chart control in SciChart's High Performance Real-time
@@ -124,9 +125,10 @@ var SciChart3DSurface = /** @class */ (function (_super) {
124
125
  * Note if loading from CDN the version number of data/wasm Urls must match the version number of SciChart.js you are using.
125
126
  * @example
126
127
  * ```ts
127
- * SciChart.SciChartSurface.configure({
128
- * dataUrl: "https://cdn.jsdelivr.net/npm/scichart@1.3.1500/_wasm/scichart2d.data",
129
- * wasmUrl: "https://cdn.jsdelivr.net/npm/scichart@1.3.1500/_wasm/scichart2d.wasm"
128
+ * // 3D Charts
129
+ * SciChart.SciChart3DSurface.configure({
130
+ * dataUrl: "https://cdn.jsdelivr.net/npm/scichart@2.2.2378/_wasm/scichart3d.data",
131
+ * wasmUrl: "https://cdn.jsdelivr.net/npm/scichart@2.2.2378/_wasm/scichart3d.wasm"
130
132
  * });
131
133
  * ```
132
134
  * @param config
@@ -136,6 +138,13 @@ var SciChart3DSurface = /** @class */ (function (_super) {
136
138
  exports.sciChartConfig3D.dataUrl = (_a = config === null || config === void 0 ? void 0 : config.dataUrl) !== null && _a !== void 0 ? _a : undefined;
137
139
  exports.sciChartConfig3D.wasmUrl = (_b = config === null || config === void 0 ? void 0 : config.wasmUrl) !== null && _b !== void 0 ? _b : undefined;
138
140
  };
141
+ /**
142
+ * Tell SciChart to load the Wasm and Data files from CDN, rather than expecting them to be served by the host server.
143
+ */
144
+ SciChart3DSurface.useWasmFromCDN = function () {
145
+ exports.sciChartConfig3D.dataUrl = "https://cdn.jsdelivr.net/npm/scichart@".concat(BuildStamp_1.libraryVersion, "/_wasm/scichart3d.data");
146
+ exports.sciChartConfig3D.wasmUrl = "https://cdn.jsdelivr.net/npm/scichart@".concat(BuildStamp_1.libraryVersion, "/_wasm/scichart3d.wasm");
147
+ };
139
148
  /**
140
149
  * Creates a {@link SciChart3DSurface} and {@link TSciChart3D | WebAssembly Context} to occupy the div by element ID in your DOM.
141
150
  * @remarks This method is async and must be awaited
@@ -156,20 +156,26 @@ var createMaster = function () {
156
156
  InitializeChart: function () {
157
157
  resolve({ getChildSurfaces: getChildSurfaces, createChildSurface: createChildSurface, wasmContext: wasmContext });
158
158
  },
159
- Draw: function () {
160
- exports.sciChartDestinations.forEach(function (dest) {
161
- var canvasElementId = dest.canvasElementId, sciChartSurface = dest.sciChartSurface;
162
- var chart = wasmContext.SCRTGetGlobalSampleChartInterface3D();
163
- // TODO
164
- if (chart.GetCurrentDestination()) {
165
- var currDestID = chart.GetCurrentDestination().GetID();
166
- if (currDestID === canvasElementId &&
167
- sciChartSurface.isInitialized &&
168
- !sciChartSurface.isDeleted) {
169
- sciChartSurface.doDrawingLoop();
170
- }
171
- }
172
- });
159
+ Draw: function (canvasId) {
160
+ var dest = exports.sciChartDestinations.find(function (d) { return d.canvasElementId === canvasId; });
161
+ if (dest) {
162
+ dest.sciChartSurface.doDrawingLoop();
163
+ }
164
+ // sciChartDestinations.forEach(dest => {
165
+ // const { canvasElementId, sciChartSurface } = dest;
166
+ // const chart = wasmContext.SCRTGetGlobalSampleChartInterface3D();
167
+ // // TODO
168
+ // if (chart.GetCurrentDestination()) {
169
+ // const currDestID = chart.GetCurrentDestination().GetID();
170
+ // if (
171
+ // currDestID === canvasElementId &&
172
+ // sciChartSurface.isInitialized &&
173
+ // !sciChartSurface.isDeleted
174
+ // ) {
175
+ // (sciChartSurface as SciChart3DSurface).doDrawingLoop();
176
+ // }
177
+ // }
178
+ // });
173
179
  },
174
180
  Update: function (deltaTime) {
175
181
  // console.log("Update");
@@ -9,7 +9,6 @@ var sciChartInitCommon_1 = require("../../Charting/Visuals/sciChartInitCommon");
9
9
  var SciChartSurfaceBase_1 = require("../../Charting/Visuals/SciChartSurfaceBase");
10
10
  var BuildStamp_1 = require("../../Core/BuildStamp");
11
11
  var WebGlHelper_1 = require("../../Core/WebGlHelper");
12
- var logger_1 = require("../../utils/logger");
13
12
  var licenseManager3D_1 = require("./licenseManager3D");
14
13
  var SciChart3DSurface_1 = require("./SciChart3DSurface");
15
14
  var createSingle3dInternal = function (divElement, options) {
@@ -67,16 +66,16 @@ var initDrawEngineSingleChart = function (wasmContext, canvases, resolve, theme)
67
66
  }, 0);
68
67
  resolve({ wasmContext: wasmContext, sciChart3DSurface: scs });
69
68
  },
70
- Draw: function () {
69
+ Draw: function (canvasId) {
71
70
  if (scs.isInitialized) {
72
71
  scs.doDrawingLoop();
73
72
  }
74
73
  },
75
74
  Update: function (deltaTime) {
76
- logger_1.Logger.log("SciChart3DSurface.ts Update()");
75
+ //Logger.log("SciChart3DSurface.ts Update()");
77
76
  },
78
77
  ShutDownChart: function () {
79
- logger_1.Logger.log("SciChart3DSurface.ts ShutDownChart");
78
+ //Logger.log("SciChart3DSurface.ts ShutDownChart");
80
79
  }
81
80
  };
82
81
  var chartInitObj = wasmContext.SCRTSampleChartInterface3D.implement(chartInitializer);
@@ -34,7 +34,9 @@ var applyLicense3D = function (licenseContext, sciChartSurface, isSingle) {
34
34
  (0, licenseManager2D_1.setCallbacks3D)(callbacks3D);
35
35
  (0, licenseManager2D_1.applyLicense)(licenseContext);
36
36
  }
37
- (0, licenseManager2D_1.updateLicenseDisplay)((0, licenseManager2D_1.getLicenseInfo)(licenseContext), sciChartSurface, false, false);
37
+ else {
38
+ (0, licenseManager2D_1.updateLicenseDisplay)((0, licenseManager2D_1.getLicenseInfo)(licenseContext), sciChartSurface, false, false);
39
+ }
38
40
  if (!isSingle)
39
41
  shouldApplyLicense3D = false;
40
42
  };
@@ -1,4 +1,4 @@
1
1
  import { TSciChart } from "../types/TSciChart";
2
2
  import { TSciChart3D } from "../types/TSciChart3D";
3
- export declare const libraryVersion = "2.1.2301";
3
+ export declare const libraryVersion = "2.2.2389";
4
4
  export declare const checkBuildStamp: (wasmContext: TSciChart | TSciChart3D) => boolean;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkBuildStamp = exports.libraryVersion = void 0;
4
- var buildStamp = "2022-03-30T00:00:00";
4
+ var buildStamp = "2022-06-08T00:00:00";
5
5
  var result;
6
6
  // tslint:disable-next-line:no-var-requires
7
- exports.libraryVersion = "2.1.2301";
7
+ exports.libraryVersion = "2.2.2389";
8
8
  var checkBuildStamp = function (wasmContext) {
9
9
  if (result !== undefined)
10
10
  return result;
@@ -0,0 +1,7 @@
1
+ export declare const getUserCookie: () => {
2
+ userId: string;
3
+ sessionId: string;
4
+ sessionStart: number;
5
+ };
6
+ export declare const shouldSendTelemetry: () => boolean;
7
+ export declare const sendTelemetry: () => void;
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendTelemetry = exports.shouldSendTelemetry = exports.getUserCookie = void 0;
4
+ var licenseManager2dState_1 = require("../Charting/Visuals/licenseManager2dState");
5
+ var cookie_1 = require("../utils/cookie");
6
+ var BuildStamp_1 = require("./BuildStamp");
7
+ var app_1 = require("../constants/app");
8
+ var guid_1 = require("../utils/guid");
9
+ var sessionTime = 60 * 60 * 1000;
10
+ var hasSent = false;
11
+ var setUserCookie = function (userId, sessionId, sessionStart) {
12
+ var cookieVal = "".concat(userId, ",").concat(sessionId, ",").concat(sessionStart);
13
+ return (0, cookie_1.setCookie)("scUser", cookieVal, 365);
14
+ };
15
+ var getUserCookie = function () {
16
+ var cookie = (0, cookie_1.getCookie)("scUser");
17
+ if (cookie) {
18
+ var parts = cookie.split(",");
19
+ if (parts.length === 3)
20
+ return {
21
+ userId: parts[0],
22
+ sessionId: parts[1],
23
+ sessionStart: Number.parseInt(parts[2], 10)
24
+ };
25
+ }
26
+ return {
27
+ userId: (0, guid_1.base64Id)(),
28
+ sessionId: (0, guid_1.base64Id)(),
29
+ sessionStart: 0
30
+ };
31
+ };
32
+ exports.getUserCookie = getUserCookie;
33
+ var shouldSendTelemetry = function () {
34
+ // Not in test
35
+ if (app_1.IS_TEST_ENV)
36
+ return false;
37
+ // Not if we've already done it
38
+ if (hasSent)
39
+ return false;
40
+ // not if the license is not dev
41
+ if (!licenseManager2dState_1.licenseManager2dState.getIsDev())
42
+ return false;
43
+ // not if telemetry not enabled
44
+ if (!licenseManager2dState_1.licenseManager2dState.getTelemetry())
45
+ return false;
46
+ // not if not online
47
+ if (window && !window.navigator.onLine)
48
+ return false;
49
+ return true;
50
+ };
51
+ exports.shouldSendTelemetry = shouldSendTelemetry;
52
+ var sendTelemetry = function () {
53
+ if (!(0, exports.shouldSendTelemetry)())
54
+ return;
55
+ var user = (0, exports.getUserCookie)();
56
+ var timeStamp = new Date().toISOString();
57
+ // New sessionId if previous has expired
58
+ if (Date.now() - user.sessionStart < sessionTime) {
59
+ // Don't send more than once per session.
60
+ return;
61
+ }
62
+ // Reset the session time. Sessions expire 30 minutes after the last use in the session.
63
+ // Session tracking is more relevant once we start collecting more detailed per-chart data
64
+ user.sessionId = (0, guid_1.base64Id)();
65
+ user.sessionStart = Date.now();
66
+ setUserCookie(user.userId, user.sessionId, user.sessionStart);
67
+ var eventData = {
68
+ time: timeStamp,
69
+ iKey: "210b4d64-8147-471e-b6cb-244a2c939455",
70
+ name: "Microsoft.ApplicationInsights.210b4d648147471eb6cb244a2c939455.Event",
71
+ tags: {
72
+ "ai.user.id": user.userId,
73
+ "ai.session.id": user.sessionId,
74
+ "ai.device.id": "browser",
75
+ "ai.device.type": "Browser"
76
+ },
77
+ data: {
78
+ baseType: "EventData",
79
+ baseData: {
80
+ ver: 2,
81
+ name: "LicenseSet",
82
+ properties: {
83
+ platform: "JS",
84
+ licenseType: licenseManager2dState_1.licenseManager2dState.getLicenseType(),
85
+ orderId: licenseManager2dState_1.licenseManager2dState.getOrderId(),
86
+ productCode: licenseManager2dState_1.licenseManager2dState.getProductCode(),
87
+ isDev: licenseManager2dState_1.licenseManager2dState.getIsDev(),
88
+ devCount: licenseManager2dState_1.licenseManager2dState.getDevCount(),
89
+ sciChartVersion: BuildStamp_1.libraryVersion
90
+ },
91
+ measurements: {}
92
+ }
93
+ }
94
+ };
95
+ if (window.location.hostname.includes(".csb.app") || window.location.hostname.includes(".codesandbox.io")) {
96
+ eventData.data.baseData.properties.url = window.location.href;
97
+ }
98
+ var endPointUrl = "https://dc.services.visualstudio.com/v2/track";
99
+ var body = JSON.stringify([eventData]);
100
+ fetch(endPointUrl, {
101
+ method: "POST",
102
+ headers: {
103
+ "Content-Type": "application/json"
104
+ },
105
+ body: body
106
+ }).catch();
107
+ hasSent = true;
108
+ };
109
+ exports.sendTelemetry = sendTelemetry;
@@ -1,8 +1,12 @@
1
1
  declare function getIsLicenseDebug(): boolean;
2
+ declare function setIsLicenseDebug(value: boolean): void;
3
+ declare function clearLicensingDebug(): void;
2
4
  declare function getLicenseWizardPort(): number;
3
5
  declare function getLicenseWizardMaxPort(): number;
4
6
  export declare const localStorageApi: {
5
7
  getIsLicenseDebug: typeof getIsLicenseDebug;
8
+ setIsLicenseDebug: typeof setIsLicenseDebug;
9
+ clearLicensingDebug: typeof clearLicensingDebug;
6
10
  getLicenseWizardMaxPort: typeof getLicenseWizardMaxPort;
7
11
  getLicenseWizardPort: typeof getLicenseWizardPort;
8
12
  };
@@ -7,6 +7,16 @@ function getIsLicenseDebug() {
7
7
  return undefined;
8
8
  return localStorage.getItem("LICENSE_DEBUG") === "1";
9
9
  }
10
+ function setIsLicenseDebug(value) {
11
+ if (checkLocalStorageIsUndefined())
12
+ return;
13
+ localStorage.setItem("LICENSE_DEBUG", value ? "1" : "0");
14
+ }
15
+ function clearLicensingDebug() {
16
+ if (checkLocalStorageIsUndefined())
17
+ return;
18
+ localStorage.removeItem("LICENSE_DEBUG");
19
+ }
10
20
  function getLicenseWizardPort() {
11
21
  if (checkLocalStorageIsUndefined())
12
22
  return undefined;
@@ -27,6 +37,8 @@ function getLicenseWizardMaxPort() {
27
37
  }
28
38
  exports.localStorageApi = {
29
39
  getIsLicenseDebug: getIsLicenseDebug,
40
+ setIsLicenseDebug: setIsLicenseDebug,
41
+ clearLicensingDebug: clearLicensingDebug,
30
42
  getLicenseWizardMaxPort: getLicenseWizardMaxPort,
31
43
  getLicenseWizardPort: getLicenseWizardPort
32
44
  };
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SciChart.js: Ultra High Performance Realtime JavaScript Chart Library
2
2
 
3
- [![SciChart.js Ultra High Performance Realtime JavaScript Chart library](Sandbox/scichart-js-javascript-chart-collage-1485.jpg)](https://www.scichart.com/javascript-chart-features)
3
+ [![SciChart.js Ultra High Performance Realtime JavaScript Chart library](https://www.scichart.com/wp-content/uploads/2022/05/scichart-js-oil-gas-demo-release-22-1.jpg)](https://www.scichart.com/javascript-chart-features)
4
4
 
5
5
  [SciChart](https://www.scichart.com) provides a High Performance JavaScript & TypeScript Chart library which uses WebGL and WebAssembly to achieve incredible real-time and big-data performance.
6
6
 
@@ -10,11 +10,23 @@ SciChart is the _**only viable solution for mission-critical data visualization
10
10
 
11
11
  Whether you are building Dashboards for business, stock-chart or trading apps, scientific or medical apps, or building a kiosk application on custom hardware with Electron, SciChart's ultra-fast 2D/3D WebGL rendering technology codenamed _Visual Xccelerator&reg;_ will let you build apps, services and dashboards with rich charts & graphs that will delight your users.
12
12
 
13
- # Getting Started
13
+ [![SciChart.js Ultra High Performance Realtime JavaScript Chart library](Sandbox/scichart-js-javascript-chart-collage-1485.jpg)](https://www.scichart.com/javascript-chart-features)
14
+
15
+ # What's New!
14
16
 
15
- We've prepared a short [Getting Started guide here](https://www.scichart.com/getting-started-scichart-js).
17
+ Check out what's new in SciChart.js at the below pages:
18
+
19
+ - [What's New in SciChart.js v2.0](https://www.scichart.com/documentation/js/current/What's%20New%20in%20SciChart.js%20SDK%20v2.x.html)
20
+ - [What's New in SciChart.js v2.1](https://www.scichart.com/documentation/js/current/WhatsNewInSciChart2_1.html)
21
+ - [What's New in SciChart.js v2.2](https://www.scichart.com/documentation/js/current/What's%20New%20in%20SciChart.js%20SDK%20v2.2.html)
22
+
23
+ See more at the Release Notes section at bottom of the page.
24
+
25
+ # Getting Started
16
26
 
17
- [![Getting Started with SciChart.js](Sandbox/scichart-js-getting-started-1485.jpg)](https://www.scichart.com/getting-started-scichart-js)
27
+ > We've prepared a short [Getting Started guide here](https://www.scichart.com/getting-started-scichart-js).
28
+ >
29
+ > This will walk you through the entire process of starting a trial and show you where tutorials and documentation are and examples.
18
30
 
19
31
  ## Quick Start with Browser Bundle
20
32
 
@@ -26,11 +38,10 @@ We've prepared a short [Getting Started guide here](https://www.scichart.com/get
26
38
 
27
39
  ```javascript
28
40
  async function initSciChart() {
29
- // In order to load data file from the CDN we need to set dataUrl
30
- SciChart.SciChartSurface.configure({
31
- dataUrl: "https://cdn.jsdelivr.net/npm/scichart@2.1.2261/_wasm/scichart2d.data",
32
- wasmUrl: "https://cdn.jsdelivr.net/npm/scichart@2.1.2261/_wasm/scichart2d.wasm"
33
- });
41
+ // See deployment options for WebAssembly at https://www.scichart.com/documentation/js/current/Deploying%20Wasm%20or%20WebAssembly%20and%20Data%20Files%20with%20your%20app.html
42
+ // call useWasmFromCDN once before SciChart.js is initialised to load Wasm files from our CDN
43
+ SciChart.SciChartSurface.useWasmFromCDN();
44
+
34
45
  // Create a chart using the json builder api
35
46
  await SciChart.chartBuilder.buildChart("scichart-root", {
36
47
  series: {
@@ -144,8 +155,11 @@ SciChart.js can be loaded as an ES6 module with Babel or TypeScript transpiler.
144
155
  import { XyDataSeries } from "scichart/Charting/Model/XyDataSeries";
145
156
  import { FastLineRenderableSeries } from "scichart/Charting/Visuals/RenderableSeries/FastLineRenderableSeries";
146
157
 
147
- // You may need this to configure from where wasm and data files are served
148
- // SciChartSurface.configure({ dataUrl: "/custom/scichart2d.data", wasmUrl: "/other/scichart2d.wasm" });
158
+ // Optional:
159
+ // call useWasmFromCDN once before SciChart.js is initialised to load Wasm files from our CDN
160
+ // Alternatively, you can package wasm with webpack or load from URL
161
+ SciChart.SciChartSurface.useWasmFromCDN();
162
+ // See deployment options for WebAssembly at https://www.scichart.com/documentation/js/current/Deploying%20Wasm%20or%20WebAssembly%20and%20Data%20Files%20with%20your%20app.html
149
163
 
150
164
  async function initSciChart() {
151
165
  // Create the SciChartSurface in the div 'scichart-root'
@@ -193,9 +207,9 @@ SciChart.js can be loaded as an ES6 module with Babel or TypeScript transpiler.
193
207
 
194
208
  Follow [the link](https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-simple-chart) to find source code for this example.
195
209
 
196
- ## Documentation
210
+ ## Documentation & Tutorials
197
211
 
198
- We've taken the time to create hundreds of documentation pages for our JavaScript Charts, which you can find over at https://www.scichart.com/javascript-chart-documentation. Take a look here for tutorials, getting-started guides, API Docs (TypeDoc) and more.
212
+ We've taken the time to create hundreds of documentation pages and video tutorials for our JavaScript Charts, which you can find over at https://www.scichart.com/javascript-chart-documentation. Take a look here for tutorials, getting-started guides, API Docs (TypeDoc) and more.
199
213
 
200
214
  [![JavaScript Chart Documentation](Sandbox/scichart-js-javascript-chart-documentation.PNG)](https://www.scichart.com/javascript-chart-documentation)
201
215
 
@@ -205,8 +219,28 @@ An online demo version of scichart.js.examples can be seen at https://demo.scich
205
219
 
206
220
  # Release Notes
207
221
 
222
+ ## Version 2.2 with new Chart Types
223
+
224
+ See [What's New in SciChart.js v2.2](https://www.scichart.com/documentation/js/current/What's%20New%20in%20SciChart.js%20SDK%20v2.2.html)
225
+
226
+ **New Features**
227
+
228
+ - Added an Oil & gas Showcase demo
229
+ - Added a Lollipop (Impulse / Stem) Chart Type
230
+ - Added Error Bars (horizontal & vertical error bars) chart types
231
+ - Added multiple new enhancements to Pie / Donut Chart, including
232
+ - Animated Updates on Pie chart segments
233
+ - Ability to format, hide or change the HTML content of pie chart labels
234
+ - Added multiple styling & configuration improvements to pie charts
235
+ - Added Axis configuration options
236
+ - Ability to draw series behind axis (axis inside chart)
237
+ - You can now set the Axis Background and Border
238
+ -
239
+
208
240
  ## Version 2.1 with Major Performance Improvements
209
241
 
242
+ See [What's New in SciChart.js v2.1](https://www.scichart.com/documentation/js/current/WhatsNewInSciChart2_1.html)
243
+
210
244
  We’ve used our expertise high performance computing in other platforms of SciChart to make massive improvements to chart rendering, updating and startup speed in SciChart.js v2.1.
211
245
 
212
246
  **Performance improvements**:
@@ -250,6 +284,8 @@ See all the details at [SciChart.js v2.1 release](https://www.scichart.com/scich
250
284
 
251
285
  ## Version 2.0
252
286
 
287
+ See [What's New in SciChart.js v2.0](https://www.scichart.com/documentation/js/current/What's%20New%20in%20SciChart.js%20SDK%20v2.x.html)
288
+
253
289
  SciChart.js v2 is a huge release with many new features, improvements and fixes including:
254
290
 
255
291
  - New pure-json builder api