scichart 3.2.516 → 3.2.528

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 (52) hide show
  1. package/Charting/ChartModifiers/CursorModifier.d.ts +11 -0
  2. package/Charting/ChartModifiers/CursorModifier.js +66 -23
  3. package/Charting/ChartModifiers/RolloverModifier.js +18 -10
  4. package/Charting/ChartModifiers/constants.d.ts +2 -1
  5. package/Charting/ChartModifiers/constants.js +1 -0
  6. package/Charting/Model/ChartData/SeriesInfo.d.ts +1 -0
  7. package/Charting/Model/ChartData/SeriesInfo.js +1 -0
  8. package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +35 -6
  9. package/Charting/Visuals/Annotations/CustomAnnotation.js +54 -14
  10. package/Charting/Visuals/Annotations/NativeTextAnnotation.js +48 -1
  11. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.d.ts +1 -0
  12. package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +9 -5
  13. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +8 -2
  14. package/Charting/Visuals/Annotations/TextAnnotation.d.ts +42 -0
  15. package/Charting/Visuals/Annotations/TextAnnotation.js +91 -12
  16. package/Charting/Visuals/Annotations/constants.d.ts +1 -0
  17. package/Charting/Visuals/Annotations/constants.js +1 -0
  18. package/Charting/Visuals/Legend/SciChartLegend.js +8 -1
  19. package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +2 -2
  20. package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +5 -5
  21. package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +4 -4
  22. package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.d.ts +4 -0
  23. package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.js +13 -0
  24. package/Charting/Visuals/RenderableSeries/HitTest/ImpulseSeriesHitTestProvider.js +3 -3
  25. package/Charting/Visuals/RenderableSeries/HitTest/LineSeriesHitTestProvider.js +4 -4
  26. package/Charting/Visuals/RenderableSeries/HitTest/ScatterSeriesHitTestProvider.js +3 -3
  27. package/Charting/Visuals/RenderableSeries/HitTest/TextSeriesHitTestProvider.js +2 -2
  28. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +9 -3
  29. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +39 -56
  30. package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.d.ts +3 -0
  31. package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.js +12 -0
  32. package/Charting/Visuals/RenderableSeries/RolloverModifier/constants.d.ts +2 -1
  33. package/Charting/Visuals/RenderableSeries/RolloverModifier/constants.js +1 -0
  34. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.d.ts +1 -1
  35. package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.js +16 -4
  36. package/Charting/Visuals/SciChartSurface.d.ts +14 -0
  37. package/Charting/Visuals/SciChartSurface.js +18 -0
  38. package/Charting/Visuals/createMaster.d.ts +1 -3
  39. package/Charting/Visuals/createMaster.js +4 -5
  40. package/Core/BuildStamp.d.ts +1 -1
  41. package/Core/BuildStamp.js +2 -2
  42. package/Core/Mouse/MouseManager.js +2 -2
  43. package/_wasm/scichart.browser.js +1 -1
  44. package/_wasm/scichart2d.js +1 -1
  45. package/_wasm/scichart2d.wasm +0 -0
  46. package/_wasm/scichart3d.wasm +0 -0
  47. package/index.d.ts +1 -0
  48. package/index.dev.js +430 -165
  49. package/index.js +13 -11
  50. package/index.min.js +1 -1
  51. package/package.json +1 -1
  52. package/types/TSciChart.d.ts +9 -0
@@ -4,5 +4,6 @@ export declare enum PROPERTY {
4
4
  TOOLTIP_COLOR = "TOOLTIP_COLOR",
5
5
  TOOLTIP_DATA_TEMPLATE = "TOOLTIP_DATA_TEMPLATE",
6
6
  TOOLTIP_TEXT_COLOR = "TOOLTIP_TEXT_COLOR",
7
- TOOLTIP_TITLE = "TOOLTIP_TITLE"
7
+ TOOLTIP_TITLE = "TOOLTIP_TITLE",
8
+ TOOLTIP_SHADOW_COLOR = "TOOLTIP_SHADOW_COLOR"
8
9
  }
@@ -9,4 +9,5 @@ var PROPERTY;
9
9
  PROPERTY["TOOLTIP_DATA_TEMPLATE"] = "TOOLTIP_DATA_TEMPLATE";
10
10
  PROPERTY["TOOLTIP_TEXT_COLOR"] = "TOOLTIP_TEXT_COLOR";
11
11
  PROPERTY["TOOLTIP_TITLE"] = "TOOLTIP_TITLE";
12
+ PROPERTY["TOOLTIP_SHADOW_COLOR"] = "TOOLTIP_SHADOW_COLOR";
12
13
  })(PROPERTY = exports.PROPERTY || (exports.PROPERTY = {}));
@@ -4,7 +4,7 @@ import { IDeletable } from "../../../Core/IDeletable";
4
4
  * Used by the {@link RubberBandXyZoomModifier} to draw an {@link SVGSVGElement | SVGElement} rectangle over the chart.
5
5
  */
6
6
  export declare class RubberBandSvgRect extends DeletableEntity implements IDeletable {
7
- svgTemplate: (fill: string, stroke: string, strokeThickness: number, width: number, height: number) => string;
7
+ svgTemplate: (fill: string, stroke: string, strokeThickness: number, width: number, height: number) => SVGElement;
8
8
  private svgRoot;
9
9
  private svg;
10
10
  private x1Property;
@@ -17,7 +17,6 @@ var __extends = (this && this.__extends) || (function () {
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.RubberBandSvgRect = void 0;
19
19
  var DeletableEntity_1 = require("../../../Core/DeletableEntity");
20
- var annotationHelpers_1 = require("../Annotations/annotationHelpers");
21
20
  var constants_1 = require("./constants");
22
21
  /**
23
22
  * Used by the {@link RubberBandXyZoomModifier} to draw an {@link SVGSVGElement | SVGElement} rectangle over the chart.
@@ -139,8 +138,8 @@ var RubberBandSvgRect = /** @class */ (function (_super) {
139
138
  this.clear();
140
139
  }
141
140
  if (this.svgRoot) {
142
- var svgString = this.svgTemplate(fill, stroke, strokeThickness, 0, 0);
143
- var svgNode = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgRoot);
141
+ var svgNode = this.svgTemplate(fill, stroke, strokeThickness, 0, 0);
142
+ this.svgRoot.appendChild(svgNode);
144
143
  this.svg = svgNode;
145
144
  this.svg.setAttribute("x", "100px");
146
145
  this.svg.setAttribute("y", "100px");
@@ -171,9 +170,22 @@ var RubberBandSvgRect = /** @class */ (function (_super) {
171
170
  exports.RubberBandSvgRect = RubberBandSvgRect;
172
171
  /**
173
172
  * @ignore
173
+ * This is a CSP style-src safe method to create SVGs
174
174
  */
175
175
  var svgTemplate = function (fill, stroke, strokeThickness, width, height) {
176
176
  if (width === void 0) { width = 0; }
177
177
  if (height === void 0) { height = 0; }
178
- return "<svg width=\"".concat(width, "\" height=\"").concat(height, "\" style=\"display: none\">\n <rect width=\"100%\" height=\"100%\" fill=\"").concat(fill, "\" stroke=\"").concat(stroke, "\" stroke-width=\"").concat(strokeThickness, "\"/>\n </svg>");
178
+ var xmlns = "http://www.w3.org/2000/svg";
179
+ var svgElem = document.createElementNS(xmlns, "svg");
180
+ svgElem.setAttributeNS(null, "width", width.toString());
181
+ svgElem.setAttributeNS(null, "height", height.toString());
182
+ svgElem.style.display = "none";
183
+ var rectElem = document.createElementNS(xmlns, "rect");
184
+ svgElem.appendChild(rectElem);
185
+ rectElem.setAttributeNS(null, "width", "100%");
186
+ rectElem.setAttributeNS(null, "height", "100%");
187
+ rectElem.setAttributeNS(null, "fill", fill);
188
+ rectElem.setAttributeNS(null, "stroke", stroke);
189
+ rectElem.setAttributeNS(null, "stroke-width", strokeThickness.toString());
190
+ return svgElem;
179
191
  };
@@ -91,12 +91,26 @@ export declare class SciChartSurface extends SciChartSurfaceBase {
91
91
  static configure(config: TSciChartConfig): void;
92
92
  /**
93
93
  * Tell SciChart to load the Wasm and Data files from CDN, rather than expecting them to be served by the host server.
94
+ * @deprecated the method name breaks [eslint react-hooks/rules-of-hooks](https://legacy.reactjs.org/docs/hooks-rules.html).
95
+ * To avoid this error in React, use {@link loadWasmFromCDN} instead.
96
+ *
94
97
  */
95
98
  static useWasmFromCDN(): void;
96
99
  /**
97
100
  * Tell SciChart to load the Wasm and Data files from the local server, rather than from CDN.
101
+ * @deprecated the method name breaks [eslint react-hooks/rules-of-hooks](https://legacy.reactjs.org/docs/hooks-rules.html).
102
+ * To avoid this error in React, use {@link loadWasmLocal} instead.
103
+ *
98
104
  */
99
105
  static useWasmLocal(): void;
106
+ /**
107
+ * Tell SciChart to load the Wasm and Data files from CDN, rather than expecting them to be served by the host server.
108
+ */
109
+ static loadWasmFromCDN(): void;
110
+ /**
111
+ * Tell SciChart to load the Wasm and Data files from the local server, rather than from CDN.
112
+ */
113
+ static loadWasmLocal(): void;
100
114
  static isSubSurface(surface: SciChartSurface): surface is SciChartSubSurface;
101
115
  private static createTest;
102
116
  renderSurface: RenderSurface;
@@ -344,6 +344,9 @@ var SciChartSurface = /** @class */ (function (_super) {
344
344
  };
345
345
  /**
346
346
  * Tell SciChart to load the Wasm and Data files from CDN, rather than expecting them to be served by the host server.
347
+ * @deprecated the method name breaks [eslint react-hooks/rules-of-hooks](https://legacy.reactjs.org/docs/hooks-rules.html).
348
+ * To avoid this error in React, use {@link loadWasmFromCDN} instead.
349
+ *
347
350
  */
348
351
  SciChartSurface.useWasmFromCDN = function () {
349
352
  exports.sciChartConfig.dataUrl = "https://cdn.jsdelivr.net/npm/scichart@".concat(BuildStamp_1.libraryVersion, "/_wasm/scichart2d.data");
@@ -351,10 +354,25 @@ var SciChartSurface = /** @class */ (function (_super) {
351
354
  };
352
355
  /**
353
356
  * Tell SciChart to load the Wasm and Data files from the local server, rather than from CDN.
357
+ * @deprecated the method name breaks [eslint react-hooks/rules-of-hooks](https://legacy.reactjs.org/docs/hooks-rules.html).
358
+ * To avoid this error in React, use {@link loadWasmLocal} instead.
359
+ *
354
360
  */
355
361
  SciChartSurface.useWasmLocal = function () {
356
362
  SciChartSurface.configure(undefined);
357
363
  };
364
+ /**
365
+ * Tell SciChart to load the Wasm and Data files from CDN, rather than expecting them to be served by the host server.
366
+ */
367
+ SciChartSurface.loadWasmFromCDN = function () {
368
+ return SciChartSurface.useWasmFromCDN();
369
+ };
370
+ /**
371
+ * Tell SciChart to load the Wasm and Data files from the local server, rather than from CDN.
372
+ */
373
+ SciChartSurface.loadWasmLocal = function () {
374
+ return SciChartSurface.useWasmLocal();
375
+ };
358
376
  SciChartSurface.isSubSurface = function (surface) {
359
377
  return surface.isSubSurface;
360
378
  };
@@ -3,10 +3,8 @@ import { I2DSurfaceOptions } from "./I2DSurfaceOptions";
3
3
  import { TWebAssemblyChart } from "./SciChartSurface";
4
4
  /** @ignore */
5
5
  export declare const createMultichart: (divElement: string | HTMLDivElement, options?: I2DSurfaceOptions) => Promise<TWebAssemblyChart>;
6
- /** @ignore */
7
- declare const initializeChartEngine: () => Promise<void>;
6
+ export declare const initializeChartEngine2D: () => Promise<void>;
8
7
  /** @ignore */
9
8
  export declare const disposeMultiChart: () => void;
10
9
  /** @ignore */
11
10
  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.initializeChartEngine2D = exports.monitorWebGL = exports.disposeMultiChart = exports.createMultichart = void 0;
39
+ exports.monitorWebGL = exports.disposeMultiChart = exports.initializeChartEngine2D = exports.createMultichart = void 0;
40
40
  // @ts-ignore
41
41
  var WasmModule2D = require("../../_wasm/scichart2d");
42
42
  var BuildStamp_1 = require("../../Core/BuildStamp");
@@ -77,7 +77,7 @@ var createMultichart = function (divElement, options) { return __awaiter(void 0,
77
77
  _d.label = 1;
78
78
  case 1:
79
79
  _d.trys.push([1, 3, , 4]);
80
- return [4 /*yield*/, initializeChartEngine()];
80
+ return [4 /*yield*/, (0, exports.initializeChartEngine2D)()];
81
81
  case 2:
82
82
  _d.sent();
83
83
  createChildSurface = sciChartMaster.createChildSurface, wasmContext_1 = sciChartMaster.wasmContext;
@@ -102,8 +102,7 @@ var createMultichart = function (divElement, options) { return __awaiter(void 0,
102
102
  });
103
103
  }); };
104
104
  exports.createMultichart = createMultichart;
105
- /** @ignore */
106
- var initializeChartEngine = function () { return __awaiter(void 0, void 0, void 0, function () {
105
+ var initializeChartEngine2D = function () { return __awaiter(void 0, void 0, void 0, function () {
107
106
  var master;
108
107
  return __generator(this, function (_a) {
109
108
  switch (_a.label) {
@@ -127,7 +126,7 @@ var initializeChartEngine = function () { return __awaiter(void 0, void 0, void
127
126
  }
128
127
  });
129
128
  }); };
130
- exports.initializeChartEngine2D = initializeChartEngine;
129
+ exports.initializeChartEngine2D = initializeChartEngine2D;
131
130
  var cleanupWasmContext;
132
131
  /** @ignore */
133
132
  var disposeMultiChart = function () {
@@ -1,4 +1,4 @@
1
1
  import { TSciChart } from "../types/TSciChart";
2
2
  import { TSciChart3D } from "../types/TSciChart3D";
3
- export declare const libraryVersion = "3.2.516";
3
+ export declare const libraryVersion = "3.2.528";
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 = "2023-11-13T00:00:00";
4
+ var buildStamp = "2023-11-24T00:00:00";
5
5
  var result;
6
6
  // tslint:disable-next-line:no-var-requires
7
- exports.libraryVersion = "3.2.516";
7
+ exports.libraryVersion = "3.2.528";
8
8
  var checkBuildStamp = function (wasmContext) {
9
9
  if (result !== undefined)
10
10
  return result;
@@ -566,8 +566,8 @@ var MouseManager = /** @class */ (function () {
566
566
  }
567
567
  }
568
568
  else {
569
- // If not over the subchart, don't process anything except cancellation events
570
- if (subEventType !== EMouseEventType.Cancel && subEventType !== EMouseEventType.Up) {
569
+ // If not over the subchart, don't process events other than these
570
+ if (![EMouseEventType.Cancel, EMouseEventType.Up, EMouseEventType.Move].includes(subEventType)) {
571
571
  subEventType = undefined;
572
572
  }
573
573
  }