scichart 2.1.2273 → 2.1.2301

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 (40) hide show
  1. package/Builder/buildSeries.d.ts +5 -0
  2. package/Builder/buildSeries.js +4 -0
  3. package/Charting/Model/BaseHeatmapDataSeries.d.ts +2 -2
  4. package/Charting/Model/BaseHeatmapDataSeries.js +13 -4
  5. package/Charting/Themes/IThemeProvider.d.ts +6 -0
  6. package/Charting/Themes/SciChartJSDarkTheme.d.ts +2 -0
  7. package/Charting/Themes/SciChartJSDarkTheme.js +2 -0
  8. package/Charting/Themes/SciChartJSLightTheme.d.ts +2 -0
  9. package/Charting/Themes/SciChartJSLightTheme.js +2 -0
  10. package/Charting/Visuals/Axis/CategoryAxisBase.d.ts +5 -0
  11. package/Charting/Visuals/Axis/CategoryAxisBase.js +19 -9
  12. package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.d.ts +1 -1
  13. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformContoursDrawingProvider.js +30 -8
  14. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +7 -3
  15. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +1 -1
  16. package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.d.ts +84 -0
  17. package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.js +179 -0
  18. package/Charting/Visuals/RenderableSeries/HitTest/ImpulseSeriesHitTestProvider.d.ts +20 -0
  19. package/Charting/Visuals/RenderableSeries/HitTest/ImpulseSeriesHitTestProvider.js +100 -0
  20. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +2 -0
  21. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +14 -1
  22. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.d.ts +13 -0
  23. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +23 -3
  24. package/Charting/Visuals/RenderableSeries/constants.d.ts +1 -0
  25. package/Charting/Visuals/RenderableSeries/constants.js +1 -0
  26. package/Charting/Visuals/SciChartSurface.d.ts +6 -1
  27. package/Charting/Visuals/SciChartSurface.js +10 -1
  28. package/Core/BuildStamp.d.ts +1 -1
  29. package/Core/BuildStamp.js +2 -2
  30. package/_wasm/scichart.browser.js +1 -1
  31. package/_wasm/scichart2d.js +1 -1
  32. package/_wasm/scichart2d.wasm +0 -0
  33. package/_wasm/scichart3d.js +1 -1
  34. package/_wasm/scichart3d.wasm +0 -0
  35. package/constants/performanceWarnings.js +2 -2
  36. package/package.json +1 -1
  37. package/types/SeriesType.d.ts +2 -0
  38. package/types/SeriesType.js +2 -0
  39. package/utils/pointUtil.d.ts +1 -1
  40. package/utils/pointUtil.js +3 -2
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ImpulseSeriesHitTestProvider = void 0;
19
+ var pointUtil_1 = require("../../../../utils/pointUtil");
20
+ var DpiHelper_1 = require("../../TextureManager/DpiHelper");
21
+ var BaseHitTestProvider_1 = require("./BaseHitTestProvider");
22
+ var hitTestHelpers_1 = require("./hitTestHelpers");
23
+ var HitTestInfo_1 = require("./HitTestInfo");
24
+ /**
25
+ * Hit-test provider for {@link FastColumnRenderableSeries}. See base class {@link BaseHitTestProvider} for further info
26
+ */
27
+ var ImpulseSeriesHitTestProvider = /** @class */ (function (_super) {
28
+ __extends(ImpulseSeriesHitTestProvider, _super);
29
+ function ImpulseSeriesHitTestProvider() {
30
+ return _super !== null && _super.apply(this, arguments) || this;
31
+ }
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ ImpulseSeriesHitTestProvider.prototype.hitTest = function (x, y, hitTestRadius) {
36
+ if (hitTestRadius === void 0) { hitTestRadius = BaseHitTestProvider_1.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS; }
37
+ var hitTestPoint = this.getTranslatedHitTestPoint(x, y);
38
+ if (!hitTestPoint) {
39
+ return HitTestInfo_1.HitTestInfo.empty();
40
+ }
41
+ var _a = this.currentRenderPassData, xCoordinateCalculator = _a.xCoordinateCalculator, yCoordinateCalculator = _a.yCoordinateCalculator, isVerticalChart = _a.isVerticalChart;
42
+ var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
43
+ var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
44
+ var dataSeries = this.parentSeries.dataSeries;
45
+ var nearestXyPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXyPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries, xHitCoord, yHitCoord);
46
+ var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
47
+ var xNativeValues = dataSeries.getNativeXValues();
48
+ var yNativeValues = dataSeries.getNativeYValues();
49
+ var hitTestInfo = hitTestHelpers_1.hitTestHelpers.createHitTestInfo(this.parentSeries, xCoordinateCalculator, yCoordinateCalculator, isVerticalChart, dataSeries, xNativeValues, yNativeValues, xHitCoord, yHitCoord, nearestPointIndex, 0);
50
+ if (nearestPointIndex >= 0 || nearestXyPointIndex >= 0) {
51
+ hitTestInfo.isHit =
52
+ hitTestHelpers_1.hitTestHelpers.testIsHitForImpulse(xCoordinateCalculator, yCoordinateCalculator, this.parentSeries, xNativeValues, yNativeValues, nearestPointIndex, xHitCoord, yHitCoord, hitTestRadius) ||
53
+ hitTestHelpers_1.hitTestHelpers.testIsHitForPoint(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearestXyPointIndex, xHitCoord, yHitCoord, this.parentSeries.size);
54
+ }
55
+ else {
56
+ hitTestInfo.isHit = false;
57
+ }
58
+ return hitTestInfo;
59
+ };
60
+ /**
61
+ * @inheritDoc
62
+ */
63
+ ImpulseSeriesHitTestProvider.prototype.hitTestForDataPointSelectionModifier = function (x, y, hitTestRadius) {
64
+ if (hitTestRadius === void 0) { hitTestRadius = BaseHitTestProvider_1.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS; }
65
+ return this.hitTest(x, y, hitTestRadius);
66
+ };
67
+ /**
68
+ * @inheritDoc
69
+ */
70
+ ImpulseSeriesHitTestProvider.prototype.hitTestXSlice = function (x, y) {
71
+ var _a;
72
+ var hitTestPoint = this.getTranslatedHitTestPoint(x, y);
73
+ if (!hitTestPoint) {
74
+ return HitTestInfo_1.HitTestInfo.empty();
75
+ }
76
+ var _b = this.currentRenderPassData, xCoordinateCalculator = _b.xCoordinateCalculator, yCoordinateCalculator = _b.yCoordinateCalculator, isVerticalChart = _b.isVerticalChart;
77
+ var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
78
+ var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
79
+ var dataSeries = this.parentSeries.dataSeries;
80
+ var xNativeValues = dataSeries.getNativeXValues();
81
+ var yNativeValues = dataSeries.getNativeYValues();
82
+ var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
83
+ var hitTestInfo = hitTestHelpers_1.hitTestHelpers.createHitTestInfo(this.parentSeries, xCoordinateCalculator, yCoordinateCalculator, isVerticalChart, dataSeries, xNativeValues, yNativeValues, xHitCoord, yHitCoord, nearestPointIndex, 0);
84
+ var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
85
+ var markerWidth = ((_a = this.parentSeries.size) !== null && _a !== void 0 ? _a : 0) * DpiHelper_1.DpiHelper.PIXEL_RATIO;
86
+ var markerDataWidth = Math.abs(xCoordinateCalculator.getDataValue(markerWidth) - xCoordinateCalculator.getDataValue(0));
87
+ if (nearestPointIndex >= 0) {
88
+ var xFirstValue = isCategoryAxis ? 0 : xNativeValues.get(0);
89
+ var xLastValue = isCategoryAxis ? xNativeValues.size() - 1 : xNativeValues.get(xNativeValues.size() - 1);
90
+ hitTestInfo.isWithinDataBounds = (0, pointUtil_1.testIsInInterval)(hitTestInfo.hitTestPointValues.x, xFirstValue, xLastValue, markerDataWidth / 2);
91
+ hitTestInfo.isHit = hitTestInfo.isWithinDataBounds;
92
+ }
93
+ else {
94
+ hitTestInfo.isHit = false;
95
+ }
96
+ return hitTestInfo;
97
+ };
98
+ return ImpulseSeriesHitTestProvider;
99
+ }(BaseHitTestProvider_1.BaseHitTestProvider));
100
+ exports.ImpulseSeriesHitTestProvider = ImpulseSeriesHitTestProvider;
@@ -8,6 +8,7 @@ import { XyyDataSeries } from "../../../Model/XyyDataSeries";
8
8
  import { CoordinateCalculatorBase } from "../../../Numerics/CoordinateCalculators/CoordinateCalculatorBase";
9
9
  import { BaseOhlcRenderableSeries } from "../BaseOhlcRenderableSeries";
10
10
  import { FastColumnRenderableSeries } from "../FastColumnRenderableSeries";
11
+ import { FastImpulseRenderableSeries } from "../FastImpulseRenderableSeries";
11
12
  import { IRenderableSeries } from "../IRenderableSeries";
12
13
  import { HitTestInfo } from "./HitTestInfo";
13
14
  export declare const hitTestHelpers: {
@@ -41,4 +42,5 @@ export declare const hitTestHelpers: {
41
42
  isHit: boolean;
42
43
  secondPointIndex: number;
43
44
  };
45
+ testIsHitForImpulse: (xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, renderableSeries: FastImpulseRenderableSeries, xValues: SCRTDoubleVector, yValues: SCRTDoubleVector, pointIndex: number, xHitCoord: number, yHitCoord: number, hitTestRadius: number) => boolean;
44
46
  };
@@ -268,6 +268,18 @@ var testIsHitForColumn = function (xCoordinateCalculator, yCoordinateCalculator,
268
268
  var bottomColumnSide = zeroLineYCoord > yCoord ? yCoord : zeroLineYCoord;
269
269
  return (0, pointUtil_1.testIsInBounds)(xHitCoord, yHitCoord, xCoord - halfWidth, topColumnSide, xCoord + halfWidth, bottomColumnSide);
270
270
  };
271
+ var testIsHitForImpulse = function (xCoordinateCalculator, yCoordinateCalculator, renderableSeries, xValues, yValues, pointIndex, xHitCoord, yHitCoord, hitTestRadius) {
272
+ var zeroLineY = renderableSeries.zeroLineY;
273
+ var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
274
+ var xValue = isCategoryAxis ? pointIndex : xValues.get(pointIndex);
275
+ var yValue = yValues.get(pointIndex);
276
+ var xCoord = xCoordinateCalculator.getCoordinate(xValue);
277
+ var yCoord = yCoordinateCalculator.getCoordinate(yValue);
278
+ var zeroLineYCoord = yCoordinateCalculator.getCoordinate(zeroLineY);
279
+ var topColumnSide = zeroLineYCoord > yCoord ? zeroLineYCoord : yCoord;
280
+ var bottomColumnSide = zeroLineYCoord > yCoord ? yCoord : zeroLineYCoord;
281
+ return (0, pointUtil_1.testIsInBounds)(xHitCoord, yHitCoord, xCoord, topColumnSide, xCoord, bottomColumnSide, hitTestRadius);
282
+ };
271
283
  var testIsHitForOHLC = function (xCoordinateCalculator, yCoordinateCalculator, renderableSeries, dataSeries, pointIndex, xHitCoord, yHitCoord, hitTestRadius) {
272
284
  var getDataPointWidth = renderableSeries.getDataPointWidth, dataPointWidth = renderableSeries.dataPointWidth;
273
285
  var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
@@ -344,5 +356,6 @@ exports.hitTestHelpers = {
344
356
  testIsHitForBand: testIsHitForBand,
345
357
  testIsHitForColumn: testIsHitForColumn,
346
358
  testIsHitForOHLC: testIsHitForOHLC,
347
- testIsHitForMountain: testIsHitForMountain
359
+ testIsHitForMountain: testIsHitForMountain,
360
+ testIsHitForImpulse: testIsHitForImpulse
348
361
  };
@@ -26,6 +26,10 @@ export interface IHeatmapRenderableSeriesOptions extends IBaseRenderableSeriesOp
26
26
  * The flag whether to make the heatmap linearly interpolated or smoothed between cells
27
27
  */
28
28
  useLinearTextureFiltering?: boolean;
29
+ /**
30
+ * The flag whether to fill cells with edge color if its value is outside of {@link colorMap.minimum} to {@link colorMap.maximum} range
31
+ */
32
+ fillValuesOutOfRange?: boolean;
29
33
  }
30
34
  /** @ignore */
31
35
  export declare const COLOR_MAP_PREFIX = "colorMap.";
@@ -72,6 +76,7 @@ export declare class UniformHeatmapRenderableSeries extends BaseRenderableSeries
72
76
  readonly type: ESeriesType;
73
77
  private colorMapProperty;
74
78
  private useLinearTextureFilteringProperty;
79
+ private fillValuesOutOfRangeProperty;
75
80
  private zLabelProviderProperty;
76
81
  /**
77
82
  * Creates an instance of the {@link UniformHeatmapRenderableSeries}
@@ -100,6 +105,14 @@ export declare class UniformHeatmapRenderableSeries extends BaseRenderableSeries
100
105
  checkIsOutOfDataRange(xValue: number, yValue: number): boolean;
101
106
  get zLabelProvider(): LabelProvider;
102
107
  set zLabelProvider(labelProvider: LabelProvider);
108
+ /**
109
+ * Gets or sets whether to fill cells with edge color if its value is outside of {@link colorMap.minimum} to {@link colorMap.maximum} range
110
+ */
111
+ get fillValuesOutOfRange(): boolean;
112
+ /**
113
+ * Gets or sets whether to fill cells with edge color if its value is outside of {@link colorMap.minimum} to {@link colorMap.maximum} range
114
+ */
115
+ set fillValuesOutOfRange(value: boolean);
103
116
  /** @inheritDoc */
104
117
  toPointSeries(resamplingParams?: ResamplingParams): IPointSeries;
105
118
  /** @inheritDoc */
@@ -75,10 +75,11 @@ var UniformHeatmapRenderableSeries = /** @class */ (function (_super) {
75
75
  * @param options optional parameters of type {@link IHeatmapRenderableSeriesOptions} applied when constructing the series type
76
76
  */
77
77
  function UniformHeatmapRenderableSeries(webAssemblyContext, options) {
78
- var _a, _b, _c, _d, _e;
78
+ var _a, _b, _c, _d, _e, _f;
79
79
  var _this = _super.call(this, webAssemblyContext, options) || this;
80
80
  _this.type = SeriesType_1.ESeriesType.UniformHeatmapSeries;
81
81
  _this.useLinearTextureFilteringProperty = false;
82
+ _this.fillValuesOutOfRangeProperty = true;
82
83
  _this.colorMapPropertyChanged = _this.colorMapPropertyChanged.bind(_this);
83
84
  if (options === null || options === void 0 ? void 0 : options.colorMap) {
84
85
  if (!("toJSON" in options.colorMap)) {
@@ -91,9 +92,10 @@ var UniformHeatmapRenderableSeries = /** @class */ (function (_super) {
91
92
  _this.xAxisId = (_b = options === null || options === void 0 ? void 0 : options.yAxisId) !== null && _b !== void 0 ? _b : AxisCore_1.AxisCore.DEFAULT_AXIS_ID;
92
93
  _this.useLinearTextureFilteringProperty =
93
94
  (_c = options === null || options === void 0 ? void 0 : options.useLinearTextureFiltering) !== null && _c !== void 0 ? _c : _this.useLinearTextureFilteringProperty;
95
+ _this.fillValuesOutOfRangeProperty = (_d = options === null || options === void 0 ? void 0 : options.fillValuesOutOfRange) !== null && _d !== void 0 ? _d : _this.fillValuesOutOfRangeProperty;
94
96
  // Must be called here for the series type to be available
95
- if ((_d = _this.paletteProvider) === null || _d === void 0 ? void 0 : _d.onAttached) {
96
- (_e = _this.paletteProvider) === null || _e === void 0 ? void 0 : _e.onAttached(_this);
97
+ if ((_e = _this.paletteProvider) === null || _e === void 0 ? void 0 : _e.onAttached) {
98
+ (_f = _this.paletteProvider) === null || _f === void 0 ? void 0 : _f.onAttached(_this);
97
99
  }
98
100
  _this.drawingProviders = [];
99
101
  if (!app_1.IS_TEST_ENV) {
@@ -159,6 +161,23 @@ var UniformHeatmapRenderableSeries = /** @class */ (function (_super) {
159
161
  enumerable: false,
160
162
  configurable: true
161
163
  });
164
+ Object.defineProperty(UniformHeatmapRenderableSeries.prototype, "fillValuesOutOfRange", {
165
+ /**
166
+ * Gets or sets whether to fill cells with edge color if its value is outside of {@link colorMap.minimum} to {@link colorMap.maximum} range
167
+ */
168
+ get: function () {
169
+ return this.fillValuesOutOfRangeProperty;
170
+ },
171
+ /**
172
+ * Gets or sets whether to fill cells with edge color if its value is outside of {@link colorMap.minimum} to {@link colorMap.maximum} range
173
+ */
174
+ set: function (value) {
175
+ this.fillValuesOutOfRangeProperty = value;
176
+ this.notifyPropertyChanged(constants_1.PROPERTY.FILL_VALUES_OUT_OF_RANGE);
177
+ },
178
+ enumerable: false,
179
+ configurable: true
180
+ });
162
181
  /** @inheritDoc */
163
182
  UniformHeatmapRenderableSeries.prototype.toPointSeries = function (resamplingParams) {
164
183
  // not used for Heatmap
@@ -171,6 +190,7 @@ var UniformHeatmapRenderableSeries = /** @class */ (function (_super) {
171
190
  var json = _super.prototype.toJSON.call(this, excludeData);
172
191
  var options = {
173
192
  colorMap: (_a = this.colorMap) === null || _a === void 0 ? void 0 : _a.toJSON(),
193
+ fillValuesOutOfRange: this.fillValuesOutOfRange,
174
194
  useLinearTextureFiltering: this.useLinearTextureFiltering
175
195
  };
176
196
  Object.assign(json.options, options);
@@ -16,6 +16,7 @@ export declare enum PROPERTY {
16
16
  FILL = "fill",
17
17
  FILL_Y1 = "FILL_Y1",
18
18
  FILL_LINEAR_GRADIENT = "FILL_LINEAR_GRADIENT",
19
+ FILL_VALUES_OUT_OF_RANGE = "FILL_VALUES_OUT_OF_RANGE",
19
20
  GRADIENT_STOPS = "GRADIENT_STOPS",
20
21
  HOVERED = "HOVERED",
21
22
  INTERPOLATION_POINTS = "INTERPOLATION_POINTS",
@@ -20,6 +20,7 @@ var PROPERTY;
20
20
  PROPERTY["FILL"] = "fill";
21
21
  PROPERTY["FILL_Y1"] = "FILL_Y1";
22
22
  PROPERTY["FILL_LINEAR_GRADIENT"] = "FILL_LINEAR_GRADIENT";
23
+ PROPERTY["FILL_VALUES_OUT_OF_RANGE"] = "FILL_VALUES_OUT_OF_RANGE";
23
24
  PROPERTY["GRADIENT_STOPS"] = "GRADIENT_STOPS";
24
25
  PROPERTY["HOVERED"] = "HOVERED";
25
26
  PROPERTY["INTERPOLATION_POINTS"] = "INTERPOLATION_POINTS";
@@ -65,7 +65,8 @@ export declare class SciChartSurface extends SciChartSurfaceBase {
65
65
  static createSingle(divElement: string | HTMLDivElement, options?: I2DSurfaceOptions): Promise<TWebAssemblyChart>;
66
66
  /**
67
67
  * Allows setting of web URL for Wasm and Data files, in the case you are loading SciChart outside of npm/webpack environment.
68
- * Note if loading from CDN the version number of data/wasm Urls must match the version number of SciChart.js you are using.
68
+ * Note the version number of data/wasm Urls must match the version number of SciChart.js you are using.
69
+ * To use the default CDN, just call SciChart.SciChartSurface.useWasmFromCDN();
69
70
  * @example
70
71
  * ```ts
71
72
  * SciChart.SciChartSurface.configure({
@@ -76,6 +77,10 @@ export declare class SciChartSurface extends SciChartSurfaceBase {
76
77
  * @param config
77
78
  */
78
79
  static configure(config: TSciChartConfig): void;
80
+ /**
81
+ * Tell SciChart to load the Wasm and Data files from CDN, rather than expecting them to be served by the host server.
82
+ */
83
+ static useWasmFromCDN(): void;
79
84
  private static createTest;
80
85
  readonly renderSurface: RenderSurface;
81
86
  /**
@@ -31,6 +31,7 @@ var chartBuilder_1 = require("../../Builder/chartBuilder");
31
31
  var classFactory_1 = require("../../Builder/classFactory");
32
32
  var app_1 = require("../../constants/app");
33
33
  var EasingFunctions_1 = require("../../Core/Animations/EasingFunctions");
34
+ var BuildStamp_1 = require("../../Core/BuildStamp");
34
35
  var Deleter_1 = require("../../Core/Deleter");
35
36
  var Dictionary_1 = require("../../Core/Dictionary");
36
37
  var EventHandler_1 = require("../../Core/EventHandler");
@@ -231,7 +232,8 @@ var SciChartSurface = /** @class */ (function (_super) {
231
232
  };
232
233
  /**
233
234
  * Allows setting of web URL for Wasm and Data files, in the case you are loading SciChart outside of npm/webpack environment.
234
- * Note if loading from CDN the version number of data/wasm Urls must match the version number of SciChart.js you are using.
235
+ * Note the version number of data/wasm Urls must match the version number of SciChart.js you are using.
236
+ * To use the default CDN, just call SciChart.SciChartSurface.useWasmFromCDN();
235
237
  * @example
236
238
  * ```ts
237
239
  * SciChart.SciChartSurface.configure({
@@ -246,6 +248,13 @@ var SciChartSurface = /** @class */ (function (_super) {
246
248
  exports.sciChartConfig.dataUrl = (_a = config === null || config === void 0 ? void 0 : config.dataUrl) !== null && _a !== void 0 ? _a : undefined;
247
249
  exports.sciChartConfig.wasmUrl = (_b = config === null || config === void 0 ? void 0 : config.wasmUrl) !== null && _b !== void 0 ? _b : undefined;
248
250
  };
251
+ /**
252
+ * Tell SciChart to load the Wasm and Data files from CDN, rather than expecting them to be served by the host server.
253
+ */
254
+ SciChartSurface.useWasmFromCDN = function () {
255
+ exports.sciChartConfig.dataUrl = "https://cdn.jsdelivr.net/npm/scichart@".concat(BuildStamp_1.libraryVersion, "/_wasm/scichart2d.data");
256
+ exports.sciChartConfig.wasmUrl = "https://cdn.jsdelivr.net/npm/scichart@".concat(BuildStamp_1.libraryVersion, "/_wasm/scichart2d.wasm");
257
+ };
249
258
  SciChartSurface.createTest = function (divElement, options) {
250
259
  var _a, _b;
251
260
  var 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);
@@ -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.2273";
3
+ export declare const libraryVersion = "2.1.2301";
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-02-14T00:00:00";
4
+ var buildStamp = "2022-03-30T00:00:00";
5
5
  var result;
6
6
  // tslint:disable-next-line:no-var-requires
7
- exports.libraryVersion = "2.1.2273";
7
+ exports.libraryVersion = "2.1.2301";
8
8
  var checkBuildStamp = function (wasmContext) {
9
9
  if (result !== undefined)
10
10
  return result;