scichart 2.1.2301 → 2.2.2351

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 (95) hide show
  1. package/Builder/buildModifiers.d.ts +2 -1
  2. package/Charting/ChartModifiers/CursorModifier.d.ts +5 -0
  3. package/Charting/ChartModifiers/CursorModifier.js +15 -10
  4. package/Charting/ChartModifiers/LegendModifier.d.ts +31 -0
  5. package/Charting/ChartModifiers/LegendModifier.js +22 -0
  6. package/Charting/ChartModifiers/RolloverModifier.d.ts +10 -0
  7. package/Charting/ChartModifiers/RolloverModifier.js +76 -19
  8. package/Charting/LayoutManager/LayoutManager.js +6 -1
  9. package/Charting/Model/BaseHeatmapDataSeries.d.ts +1 -0
  10. package/Charting/Model/BaseHeatmapDataSeries.js +4 -1
  11. package/Charting/Model/PointSeries/BasePointSeriesWrapped.d.ts +1 -1
  12. package/Charting/Model/PointSeries/BasePointSeriesWrapped.js +2 -2
  13. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.d.ts +1 -1
  14. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.js +3 -3
  15. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +6 -1
  16. package/Charting/Visuals/Annotations/AnnotationBase.js +23 -2
  17. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +6 -0
  18. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +46 -5
  19. package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +3 -1
  20. package/Charting/Visuals/Annotations/CustomAnnotation.js +14 -3
  21. package/Charting/Visuals/Annotations/HorizontalLineAnnotation.d.ts +4 -0
  22. package/Charting/Visuals/Annotations/HorizontalLineAnnotation.js +3 -2
  23. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.d.ts +1 -1
  24. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.js +13 -3
  25. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +13 -0
  26. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +63 -14
  27. package/Charting/Visuals/Annotations/VerticalLineAnnotation.d.ts +2 -0
  28. package/Charting/Visuals/Annotations/VerticalLineAnnotation.js +3 -2
  29. package/Charting/Visuals/Annotations/constants.d.ts +2 -1
  30. package/Charting/Visuals/Annotations/constants.js +1 -0
  31. package/Charting/Visuals/Axis/AxisBase2D.d.ts +10 -0
  32. package/Charting/Visuals/Axis/AxisBase2D.js +72 -1
  33. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.d.ts +29 -0
  34. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +77 -0
  35. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.d.ts +2 -2
  36. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +21 -4
  37. package/Charting/Visuals/Helpers/drawLabel.d.ts +3 -3
  38. package/Charting/Visuals/Helpers/drawLabel.js +38 -18
  39. package/Charting/Visuals/I2DSurfaceOptions.d.ts +6 -0
  40. package/Charting/Visuals/Legend/SciChartLegend.d.ts +4 -0
  41. package/Charting/Visuals/Legend/SciChartLegend.js +7 -1
  42. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +16 -7
  43. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +56 -9
  44. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +3 -0
  45. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +8 -0
  46. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +17 -166
  47. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +35 -328
  48. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +5 -2
  49. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +5 -3
  50. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +8 -0
  51. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +6 -0
  52. package/Charting/Visuals/RenderableSeries/SeriesVisibleChangedArgs.d.ts +6 -0
  53. package/Charting/Visuals/RenderableSeries/SeriesVisibleChangedArgs.js +11 -0
  54. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.d.ts +22 -0
  55. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.js +38 -1
  56. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +2 -2
  57. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +26 -45
  58. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +77 -18
  59. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +139 -42
  60. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -0
  61. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +21 -1
  62. package/Charting/Visuals/RenderableSeries/constants.d.ts +2 -0
  63. package/Charting/Visuals/RenderableSeries/constants.js +2 -0
  64. package/Charting/Visuals/SciChartPieSurface/IPieSurfaceOptions.d.ts +24 -2
  65. package/Charting/Visuals/SciChartPieSurface/PieSegment/IPieSegment.d.ts +4 -1
  66. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.d.ts +13 -2
  67. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +66 -20
  68. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.d.ts +3 -1
  69. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.js +2 -0
  70. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +66 -2
  71. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +304 -52
  72. package/Charting/Visuals/SciChartPieSurface/constants.d.ts +6 -1
  73. package/Charting/Visuals/SciChartPieSurface/constants.js +5 -0
  74. package/Charting/Visuals/SciChartSurface.d.ts +13 -2
  75. package/Charting/Visuals/SciChartSurface.js +39 -3
  76. package/Charting/Visuals/createMaster.js +2 -2
  77. package/Charting/Visuals/createSingle.js +2 -2
  78. package/Charting/Visuals/sciChartInitCommon.d.ts +2 -2
  79. package/Charting/Visuals/sciChartInitCommon.js +13 -9
  80. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +6 -2
  81. package/Core/BuildStamp.d.ts +1 -1
  82. package/Core/BuildStamp.js +2 -2
  83. package/_wasm/scichart.browser.js +1 -1
  84. package/_wasm/scichart2d.js +1 -1
  85. package/_wasm/scichart2d.wasm +0 -0
  86. package/_wasm/scichart3d.js +95 -95
  87. package/_wasm/scichart3d.wasm +0 -0
  88. package/package.json +1 -1
  89. package/types/Color.d.ts +1 -0
  90. package/types/Color.js +1 -0
  91. package/types/LabelPlacement.d.ts +8 -0
  92. package/types/LabelPlacement.js +11 -1
  93. package/types/LabelProviderType.d.ts +5 -1
  94. package/types/LabelProviderType.js +4 -0
  95. package/types/TSciChartSurfaceCanvases.d.ts +1 -0
@@ -114,6 +114,7 @@ var SciChartSurface = /** @class */ (function (_super) {
114
114
  color: "#00000000",
115
115
  border: undefined
116
116
  };
117
+ _this.drawSeriesBehindAxisProperty = false;
117
118
  var canvasWidth = (_b = (_a = _this.domCanvas2D) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : app_1.DEFAULT_WIDTH;
118
119
  var canvasHeight = (_d = (_c = _this.domCanvas2D) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : app_1.DEFAULT_HEIGHT;
119
120
  _this.webAssemblyContext2D = webAssemblyContext;
@@ -236,9 +237,11 @@ var SciChartSurface = /** @class */ (function (_super) {
236
237
  * To use the default CDN, just call SciChart.SciChartSurface.useWasmFromCDN();
237
238
  * @example
238
239
  * ```ts
240
+ * import { libraryVersion } from "scichart/Core/BuildStamp";
241
+ *
239
242
  * SciChart.SciChartSurface.configure({
240
- * dataUrl: "https://cdn.jsdelivr.net/npm/scichart@1.3.1500/_wasm/scichart2d.data",
241
- * wasmUrl: "https://cdn.jsdelivr.net/npm/scichart@1.3.1500/_wasm/scichart2d.wasm"
243
+ * dataUrl: `https://cdn.jsdelivr.net/npm/scichart@${libraryVersion}/_wasm/scichart2d.data`,
244
+ * wasmUrl: `https://cdn.jsdelivr.net/npm/scichart@${libraryVersion}/_wasm/scichart2d.wasm`
242
245
  * });
243
246
  * ```
244
247
  * @param config
@@ -425,6 +428,20 @@ var SciChartSurface = /** @class */ (function (_super) {
425
428
  this.watermarkProperties = (0, Deleter_1.deleteSafe)(this.watermarkProperties);
426
429
  this.watermarkPropertyPosition = (0, Deleter_1.deleteSafe)(this.watermarkPropertyPosition);
427
430
  this.chartModifiers.asArray().forEach(function (chm) { return chm.delete(); });
431
+ if (this.domChartRoot) {
432
+ var style = this.domChartRoot.style;
433
+ if (style) {
434
+ style.background = "";
435
+ style.position = "";
436
+ }
437
+ if (this.domChartRoot.hasOwnProperty("replaceChildren")) {
438
+ // @ts-ignore
439
+ this.domChartRoot.replaceChildren();
440
+ }
441
+ else {
442
+ this.domChartRoot.innerHTML = "";
443
+ }
444
+ }
428
445
  };
429
446
  /**
430
447
  * @inheritDoc
@@ -790,6 +807,9 @@ var SciChartSurface = /** @class */ (function (_super) {
790
807
  // @ts-ignore
791
808
  this.loaderJson = options.loader.toJSON();
792
809
  }
810
+ if (options === null || options === void 0 ? void 0 : options.drawSeriesBehindAxis) {
811
+ this.drawSeriesBehindAxisProperty = options.drawSeriesBehindAxis;
812
+ }
793
813
  };
794
814
  /**
795
815
  * @inheritDoc
@@ -894,7 +914,6 @@ var SciChartSurface = /** @class */ (function (_super) {
894
914
  }
895
915
  col.add(renderableSeries);
896
916
  this.renderableSeries.remove(renderableSeries);
897
- return;
898
917
  }
899
918
  renderableSeries.onAttach(this);
900
919
  if (this.themeProviderProperty) {
@@ -943,6 +962,23 @@ var SciChartSurface = /** @class */ (function (_super) {
943
962
  annotation.onAttach(this);
944
963
  this.invalidateElement();
945
964
  };
965
+ Object.defineProperty(SciChartSurface.prototype, "drawSeriesBehindAxis", {
966
+ /**
967
+ * Gets or sets the boolean flag for switching behaviour of Axises rendering
968
+ */
969
+ get: function () {
970
+ return this.drawSeriesBehindAxisProperty;
971
+ },
972
+ /**
973
+ * Gets or sets the boolean flag for switching behaviour of Axises rendering
974
+ */
975
+ set: function (value) {
976
+ this.drawSeriesBehindAxisProperty = value;
977
+ this.invalidateElement();
978
+ },
979
+ enumerable: false,
980
+ configurable: true
981
+ });
946
982
  return SciChartSurface;
947
983
  }(SciChartSurfaceBase_1.SciChartSurfaceBase));
948
984
  exports.SciChartSurface = SciChartSurface;
@@ -64,7 +64,7 @@ var createMultichart = function (divElement, options) { return __awaiter(void 0,
64
64
  switch (_d.label) {
65
65
  case 0:
66
66
  sciChartInitCommon_1.default.checkChartDivExists(divElement);
67
- canvases = sciChartInitCommon_1.default.initCanvas(divElement, (_a = options === null || options === void 0 ? void 0 : options.widthAspect) !== null && _a !== void 0 ? _a : 0, (_b = options === null || options === void 0 ? void 0 : options.heightAspect) !== null && _b !== void 0 ? _b : 0, sciChartInitCommon_1.default.ECanvasType.canvas2D);
67
+ canvases = sciChartInitCommon_1.default.initCanvas(divElement, (_a = options === null || options === void 0 ? void 0 : options.widthAspect) !== null && _a !== void 0 ? _a : 0, (_b = options === null || options === void 0 ? void 0 : options.heightAspect) !== null && _b !== void 0 ? _b : 0, sciChartInitCommon_1.default.ECanvasType.canvas2D, options === null || options === void 0 ? void 0 : options.disableAspect);
68
68
  loader = (_c = options === null || options === void 0 ? void 0 : options.loader) !== null && _c !== void 0 ? _c : new loader_1.DefaultSciChartLoader();
69
69
  loaderDiv = loader.addChartLoader(canvases.domDivContainer, options === null || options === void 0 ? void 0 : options.theme);
70
70
  _d.label = 1;
@@ -142,7 +142,7 @@ var createMaster = function () {
142
142
  Guard_1.Guard.notNull(theme, "theme");
143
143
  var sciChartSurface = new SciChartSurface_1.SciChartSurface(wasmContext, { canvases: canvases });
144
144
  sciChartSurface.applyTheme(theme);
145
- var unsub = sciChartInitCommon_1.default.subscribeToResize(canvases.domChartRoot, canvases.aspect, sciChartSurface);
145
+ var unsub = sciChartInitCommon_1.default.subscribeToResize(canvases.domChartRoot, canvases.aspect, sciChartSurface, canvases.disableAspect);
146
146
  sciChartSurface.addDeletable(unsub);
147
147
  sciChartSurface.setDestinations(exports.sciChartDestinations);
148
148
  return sciChartSurface;
@@ -18,7 +18,7 @@ exports.sciChartSingleDestinations = [];
18
18
  var createSingleInternal = function (divElement, options) {
19
19
  return new Promise(function (resolve, reject) {
20
20
  var _a;
21
- var canvases = sciChartInitCommon_1.default.initCanvas(divElement, options === null || options === void 0 ? void 0 : options.widthAspect, options === null || options === void 0 ? void 0 : options.heightAspect);
21
+ var canvases = sciChartInitCommon_1.default.initCanvas(divElement, options === null || options === void 0 ? void 0 : options.widthAspect, options === null || options === void 0 ? void 0 : options.heightAspect, undefined, options === null || options === void 0 ? void 0 : options.disableAspect);
22
22
  var loader = (_a = options === null || options === void 0 ? void 0 : options.loader) !== null && _a !== void 0 ? _a : new loader_1.DefaultSciChartLoader();
23
23
  var loaderDiv = loader.addChartLoader(canvases.domDivContainer, options === null || options === void 0 ? void 0 : options.theme);
24
24
  var webGLSupport = WebGlHelper_1.WebGlHelper.getWebGlSupport();
@@ -68,7 +68,7 @@ var initDrawEngineSingleChart = function (wasmContext, canvases, resolve, theme)
68
68
  setTimeout(function () {
69
69
  scs.invalidateElement();
70
70
  licenseManager2D_1.licenseManager.applyLicense2D(wasmContext, scs, true);
71
- var unsub = sciChartInitCommon_1.default.subscribeToResize(canvases.domChartRoot, canvases.aspect, scs);
71
+ var unsub = sciChartInitCommon_1.default.subscribeToResize(canvases.domChartRoot, canvases.aspect, scs, canvases.disableAspect);
72
72
  scs.addDeletable(unsub);
73
73
  resolve({ wasmContext: wasmContext, sciChartSurface: scs });
74
74
  }, 0);
@@ -10,7 +10,7 @@ declare const sciChartInitCommon: {
10
10
  checkChartDivExists: (divElement: string | HTMLDivElement) => void;
11
11
  ECanvasType: typeof ECanvasType;
12
12
  getCanvas2dId: (divElementId: string) => string;
13
- initCanvas: (divElement: string | HTMLDivElement, aspectWidth: number, aspectHeight: number, activeCanvas?: ECanvasType) => TSciChartSurfaceCanvases;
14
- subscribeToResize: (chartRoot: HTMLDivElement, aspect: number, sciChartSurface: ISciChartSurfaceBase) => IDeletable;
13
+ initCanvas: (divElement: string | HTMLDivElement, aspectWidth: number, aspectHeight: number, activeCanvas?: ECanvasType, disableAspect?: boolean) => TSciChartSurfaceCanvases;
14
+ subscribeToResize: (chartRoot: HTMLDivElement, aspect: number, sciChartSurface: ISciChartSurfaceBase, disableAspect?: boolean) => IDeletable;
15
15
  };
16
16
  export default sciChartInitCommon;
@@ -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 };
@@ -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.2351";
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-05-04T00: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.2351";
8
8
  var checkBuildStamp = function (wasmContext) {
9
9
  if (result !== undefined)
10
10
  return result;