scichart 2.2.2378 → 2.2.2396

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 (34) hide show
  1. package/Charting/ChartModifiers/ModifierMouseArgs.d.ts +2 -2
  2. package/Charting/ChartModifiers/ModifierMouseArgs.js +4 -2
  3. package/Charting/Model/BaseHeatmapDataSeries.js +1 -1
  4. package/Charting/Services/SciChartRenderer.js +1 -1
  5. package/Charting/Visuals/Annotations/BoxAnnotation.d.ts +2 -0
  6. package/Charting/Visuals/Annotations/BoxAnnotation.js +49 -1
  7. package/Charting/Visuals/Legend/SciChartLegend.js +1 -1
  8. package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +1 -0
  9. package/Charting/Visuals/Legend/SciChartLegendBase.js +4 -2
  10. package/Charting/Visuals/Legend/SciChartPieLegend.js +1 -1
  11. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +21 -0
  12. package/Charting/Visuals/SciChartSurface.d.ts +1 -1
  13. package/Charting/Visuals/SciChartSurface.js +4 -3
  14. package/Charting/Visuals/SciChartSurfaceBase.d.ts +1 -1
  15. package/Charting/Visuals/SciChartSurfaceBase.js +2 -1
  16. package/Charting/Visuals/createMaster.js +1 -1
  17. package/Charting/Visuals/licenseManager2D.js +21 -5
  18. package/Charting3D/Visuals/SciChart3DSurface.d.ts +8 -3
  19. package/Charting3D/Visuals/SciChart3DSurface.js +12 -3
  20. package/Charting3D/Visuals/createMaster3d.js +2 -2
  21. package/Charting3D/Visuals/createSingle3d.js +2 -2
  22. package/Core/BuildStamp.d.ts +1 -1
  23. package/Core/BuildStamp.js +2 -2
  24. package/Core/Telemetry.js +3 -0
  25. package/README.md +49 -13
  26. package/_wasm/scichart.browser.js +1 -1
  27. package/_wasm/scichart2d.js +95 -95
  28. package/_wasm/scichart2d.wasm +0 -0
  29. package/_wasm/scichart3d.js +10 -10
  30. package/_wasm/scichart3d.wasm +0 -0
  31. package/package.json +1 -1
  32. package/types/NumericFormat.d.ts +4 -0
  33. package/types/NumericFormat.js +4 -0
  34. package/utils/number.js +15 -2
@@ -1,5 +1,5 @@
1
1
  import { Point } from "../../Core/Point";
2
- import { Size } from "../../types/Size";
2
+ import { Rect } from "../../Core/Rect";
3
3
  import { ModifierArgsBase } from "./ModifierArgsBase";
4
4
  declare type TModifierMouseArgsParams = {
5
5
  mousePoint?: Point;
@@ -40,7 +40,7 @@ export declare class ModifierMouseArgs extends ModifierArgsBase {
40
40
  * @param masterViewport the master viewport or parent chart issuing mouse events
41
41
  * @param slaveViewport the slave viewport or child chart receiving mouse events
42
42
  */
43
- static copy(args: ModifierMouseArgs, modifierGroup: string, masterViewport: Size, slaveViewport: Size): ModifierMouseArgs;
43
+ static copy(args: ModifierMouseArgs, modifierGroup: string, masterViewport: Rect, slaveViewport: Rect): ModifierMouseArgs;
44
44
  /**
45
45
  * The MousePoint as an X,Y coordinate where the event occurred
46
46
  */
@@ -29,8 +29,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ModifierMouseArgs = void 0;
30
30
  var Guard_1 = require("../../Core/Guard");
31
31
  var Point_1 = require("../../Core/Point");
32
- var ModifierArgsBase_1 = require("./ModifierArgsBase");
33
32
  var DpiHelper_1 = require("../Visuals/TextureManager/DpiHelper");
33
+ var ModifierArgsBase_1 = require("./ModifierArgsBase");
34
34
  /**
35
35
  * Mouse arguments passed to {@link ChartModifierBase} methods
36
36
  */
@@ -119,9 +119,11 @@ var ModifierMouseArgs = /** @class */ (function (_super) {
119
119
  ModifierMouseArgs.copy = function (args, modifierGroup, masterViewport, slaveViewport) {
120
120
  var mousePoint = args.mousePoint;
121
121
  if (masterViewport && slaveViewport) {
122
+ var sourceX = args.mousePoint.x - masterViewport.x;
123
+ var sourceY = args.mousePoint.y - masterViewport.y;
122
124
  var scaleX = slaveViewport.width / masterViewport.width;
123
125
  var scaleY = slaveViewport.height / masterViewport.height;
124
- mousePoint = new Point_1.Point(args.mousePoint.x * scaleX, args.mousePoint.y * scaleY);
126
+ mousePoint = new Point_1.Point(slaveViewport.x + sourceX * scaleX, slaveViewport.y + sourceY * scaleY);
125
127
  }
126
128
  return __assign(__assign({}, args), { isMaster: false, handled: false, modifierGroup: modifierGroup, mousePoint: mousePoint });
127
129
  };
@@ -444,7 +444,7 @@ var BaseHeatmapDataSeries = /** @class */ (function () {
444
444
  if (isNaN(this.zValuesProperty[y][x])) {
445
445
  zValue = 0;
446
446
  }
447
- else if (zValue < newZMin) {
447
+ else if (zValue < zMin - newZMin) {
448
448
  zValue = fillValuesOutOfRange ? zMin - newZMin : 0;
449
449
  }
450
450
  else if (zValue > zMax - newZMin) {
@@ -102,6 +102,7 @@ var SciChartRenderer = /** @class */ (function () {
102
102
  if (this.sciChartSurface.isDeleted) {
103
103
  return;
104
104
  }
105
+ // console.log("render");
105
106
  var nativeContext = renderContext.getNativeContext();
106
107
  var wasmContext = this.sciChartSurface.webAssemblyContext2D;
107
108
  var oldBlendMode = nativeContext.GetBlendMode();
@@ -110,7 +111,6 @@ var SciChartRenderer = /** @class */ (function () {
110
111
  this.validate();
111
112
  // Animation Step
112
113
  var timeElapsed = this.previousTime ? Date.now() - this.previousTime : undefined;
113
- // console.log("draw ", timeElapsed);
114
114
  this.previousTime = Date.now();
115
115
  this.sciChartSurface.onAnimate(timeElapsed);
116
116
  this.sciChartSurface.updateBackground();
@@ -44,6 +44,7 @@ export declare class BoxAnnotation extends RenderContextAnnotationBase {
44
44
  private strokeThicknessProperty;
45
45
  private strokeProperty;
46
46
  private fillProperty;
47
+ private nativeDrawingProvider;
47
48
  private strokePenCache;
48
49
  private fillBrushCache;
49
50
  /**
@@ -83,6 +84,7 @@ export declare class BoxAnnotation extends RenderContextAnnotationBase {
83
84
  delete(): void;
84
85
  /** @inheritDoc */
85
86
  drawWithContext(renderContext: IRenderContext2D, xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, viewRect: Rect): void;
87
+ private drawWithProvider;
86
88
  /** @inheritDoc */
87
89
  onAttach(scs: SciChartSurface): void;
88
90
  onDragStarted(args: ModifierMouseArgs): boolean;
@@ -16,6 +16,7 @@ var __extends = (this && this.__extends) || (function () {
16
16
  })();
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.BoxAnnotation = void 0;
19
+ var app_1 = require("../../../constants/app");
19
20
  var Deleter_1 = require("../../../Core/Deleter");
20
21
  var Guard_1 = require("../../../Core/Guard");
21
22
  var Point_1 = require("../../../Core/Point");
@@ -119,6 +120,7 @@ var BoxAnnotation = /** @class */ (function (_super) {
119
120
  BoxAnnotation.prototype.delete = function () {
120
121
  this.strokePenCache = (0, Deleter_1.deleteSafe)(this.strokePenCache);
121
122
  this.fillBrushCache = (0, Deleter_1.deleteSafe)(this.fillBrushCache);
123
+ this.nativeDrawingProvider = (0, Deleter_1.deleteSafe)(this.nativeDrawingProvider);
122
124
  };
123
125
  /** @inheritDoc */
124
126
  BoxAnnotation.prototype.drawWithContext = function (renderContext, xCalc, yCalc, viewRect) {
@@ -135,12 +137,58 @@ var BoxAnnotation = /** @class */ (function (_super) {
135
137
  var y2 = this.getY2Coordinate(xCalc, yCalc);
136
138
  this.setAnnotationBorders(x1, x2, y1, y2);
137
139
  var rect = Rect_1.Rect.createWithPoints(new Point_1.Point(x1, y1), new Point_1.Point(x2, y2));
138
- renderContext.drawRect(rect, viewRect, strokePen, fillBrush);
140
+ // Temporary HAX! drawRect is rubbish with large strokeThickness, whereas the columnDrawingProvider does a nice
141
+ // outlined rectangle, but the code is ugly. In 2.3 we will improve the native drawRect to do the outline properly.
142
+ if (!app_1.IS_TEST_ENV) {
143
+ this.drawWithProvider(renderContext, strokePen.scrtPen, fillBrush.scrtBrush, xCalc, yCalc, rect, viewRect);
144
+ }
145
+ //renderContext.drawRect(rect, viewRect, strokePen, fillBrush);
139
146
  this.updateAdornerInner();
140
147
  };
148
+ BoxAnnotation.prototype.drawWithProvider = function (renderContext, linesPen, fillBrush, xCalc, yCalc, rect, viewRect) {
149
+ var webAssemblyContext = this.parentSurface.webAssemblyContext2D;
150
+ var args = new webAssemblyContext.SCRTColumnDrawingParams();
151
+ args.forceShaderMethod = true;
152
+ args.verticalChart = this.isVerticalChart;
153
+ args.zeroLineY = this.isVerticalChart ? yCalc.getDataValue(rect.left) : yCalc.getDataValue(rect.bottom);
154
+ args.columnWidth = this.isVerticalChart ? rect.height : rect.width;
155
+ // ISSUE: If the strokeThickness property is not provided,
156
+ // the fill will be disappeared with large zoom (when the column width will be small or zero)
157
+ // if (args.columnWidth === 0 && this.strokeThickness === 0) {
158
+ // strokePenCache = this.strokePenFillColoredCache;
159
+ // }
160
+ if (linesPen) {
161
+ args.SetLinesPen(linesPen);
162
+ }
163
+ if (fillBrush) {
164
+ args.SetFillBrush(fillBrush);
165
+ }
166
+ args.viewportWidth = viewRect.width;
167
+ args.viewportHeight = viewRect.height;
168
+ var xMid = this.isVerticalChart ? (rect.top + rect.bottom) / 2 : (rect.left + rect.right) / 2;
169
+ var xVal = xCalc.getDataValue(xMid);
170
+ var xValues = new webAssemblyContext.SCRTDoubleVector();
171
+ xValues.push_back(xVal);
172
+ var yVal = this.isVerticalChart ? yCalc.getDataValue(rect.right) : yCalc.getDataValue(rect.top);
173
+ var yValues = new webAssemblyContext.SCRTDoubleVector();
174
+ yValues.push_back(yVal);
175
+ args.count = yValues.size();
176
+ var nativeContext = renderContext.getNativeContext();
177
+ nativeContext.PushMatrix();
178
+ nativeContext.PushState();
179
+ nativeContext.Translate(viewRect.x, viewRect.y);
180
+ nativeContext.SetClipRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);
181
+ this.nativeDrawingProvider.DrawPointsVec(nativeContext, xValues, yValues, xCalc.nativeCalculator, yCalc.nativeCalculator, args);
182
+ nativeContext.PopMatrix();
183
+ nativeContext.PopState();
184
+ xValues.delete();
185
+ yValues.delete();
186
+ args.delete();
187
+ };
141
188
  /** @inheritDoc */
142
189
  BoxAnnotation.prototype.onAttach = function (scs) {
143
190
  _super.prototype.onAttach.call(this, scs);
191
+ this.nativeDrawingProvider = new scs.webAssemblyContext2D.SCRTColumnSeriesDrawingProvider();
144
192
  if (!this.strokePenCache) {
145
193
  this.strokePenCache = new Pen2DCache_1.Pen2DCache(scs.webAssemblyContext2D);
146
194
  }
@@ -92,7 +92,7 @@ var SciChartLegend = /** @class */ (function (_super) {
92
92
  */
93
93
  SciChartLegend.prototype.addEventListenerToSeries = function (rs) {
94
94
  var _this = this;
95
- var el = this.getParentDiv().querySelector("[id='".concat(rs.id, "']"));
95
+ var el = this.parentDiv.querySelector("[id='".concat(rs.id, "']"));
96
96
  if (el) {
97
97
  var onChangeEventListener_1 = function (e) {
98
98
  rs.isVisible = e.target.checked;
@@ -44,6 +44,7 @@ export declare enum ELegendType {
44
44
  export declare abstract class SciChartLegendBase implements IDeletable {
45
45
  abstract readonly type: ELegendType;
46
46
  protected rootDiv: HTMLDivElement;
47
+ protected parentDiv: HTMLDivElement;
47
48
  protected div: HTMLDivElement;
48
49
  protected seriesViewRect: Rect;
49
50
  protected invalidateParentSurface: () => void;
@@ -190,8 +190,9 @@ var SciChartLegendBase = /** @class */ (function () {
190
190
  var _a;
191
191
  if (this.div) {
192
192
  this.removeEventListeners();
193
- (_a = this.getParentDiv()) === null || _a === void 0 ? void 0 : _a.removeChild(this.div);
193
+ (_a = this.parentDiv) === null || _a === void 0 ? void 0 : _a.removeChild(this.div);
194
194
  this.div = undefined;
195
+ this.parentDiv = undefined;
195
196
  }
196
197
  };
197
198
  /**
@@ -244,7 +245,8 @@ var SciChartLegendBase = /** @class */ (function () {
244
245
  var innerHtml = this.getInnerHTML();
245
246
  if (innerHtml) {
246
247
  var div = (0, html_1.htmlToElement)(innerHtml);
247
- this.getParentDiv().appendChild(div);
248
+ this.parentDiv = this.getParentDiv();
249
+ this.parentDiv.appendChild(div);
248
250
  this.div = div;
249
251
  if (!app_1.IS_TEST_ENV) {
250
252
  this.addEventListeners();
@@ -95,7 +95,7 @@ var SciChartPieLegend = /** @class */ (function (_super) {
95
95
  SciChartPieLegend.prototype.addEventListeners = function () {
96
96
  var _this = this;
97
97
  this.pieSegmentArray.forEach(function (ps) {
98
- var el = _this.getParentDiv().querySelector("#".concat(getCheckboxId(ps.id)));
98
+ var el = _this.parentDiv.querySelector("#".concat(getCheckboxId(ps.id)));
99
99
  if (!el) {
100
100
  return;
101
101
  }
@@ -295,6 +295,27 @@ var BaseRenderableSeries = /** @class */ (function () {
295
295
  var _a;
296
296
  if (this.valueChanged(this.isVisibleProperty, isVisible)) {
297
297
  this.isVisibleProperty = isVisible;
298
+ if (!isVisible) {
299
+ if (this.rolloverModifierProps.marker && this.rolloverModifierProps.tooltip) {
300
+ this.rolloverModifierProps.marker.suspendInvalidate();
301
+ this.rolloverModifierProps.tooltip.suspendInvalidate();
302
+ this.rolloverModifierProps.marker.isHidden = true;
303
+ this.rolloverModifierProps.tooltip.isHidden = true;
304
+ this.rolloverModifierProps.tooltip.x1 = undefined;
305
+ this.rolloverModifierProps.tooltip.y1 = undefined;
306
+ }
307
+ // TODO should be more general than looking at series type
308
+ if (this.type === SeriesType_1.ESeriesType.BandSeries &&
309
+ this.rolloverModifierProps1.marker &&
310
+ this.rolloverModifierProps1.tooltip) {
311
+ this.rolloverModifierProps1.marker.suspendInvalidate();
312
+ this.rolloverModifierProps1.tooltip.suspendInvalidate();
313
+ this.rolloverModifierProps1.marker.isHidden = true;
314
+ this.rolloverModifierProps1.tooltip.isHidden = true;
315
+ this.rolloverModifierProps1.tooltip.x1 = undefined;
316
+ this.rolloverModifierProps1.tooltip.y1 = undefined;
317
+ }
318
+ }
298
319
  (_a = this.isVisibleChanged) === null || _a === void 0 ? void 0 : _a.raiseEvent(new SeriesVisibleChangedArgs_1.SeriesVisibleChangedArgs(this, isVisible));
299
320
  this.notifyPropertyChanged(constants_1.PROPERTY.IS_VISIBLE);
300
321
  }
@@ -259,7 +259,7 @@ export declare class SciChartSurface extends SciChartSurfaceBase {
259
259
  /**
260
260
  * @inheritDoc
261
261
  */
262
- delete(): void;
262
+ delete(clearHtml?: boolean): void;
263
263
  /**
264
264
  * @inheritDoc
265
265
  */
@@ -397,7 +397,7 @@ var SciChartSurface = /** @class */ (function (_super) {
397
397
  // Logger.log("SciChartSurface.isSuspended = true. Ignoring invalidateElement() call");
398
398
  return;
399
399
  }
400
- // console.log("Invalidating ", this.domChartRoot.id);
400
+ // console.trace("Invalidating ", this.domChartRoot.id);
401
401
  var canvasId = this.domCanvas2D ? this.domCanvas2D.id : "undefinedCanvasId";
402
402
  this.renderSurface.invalidateElement(canvasId);
403
403
  };
@@ -415,7 +415,8 @@ var SciChartSurface = /** @class */ (function (_super) {
415
415
  /**
416
416
  * @inheritDoc
417
417
  */
418
- SciChartSurface.prototype.delete = function () {
418
+ SciChartSurface.prototype.delete = function (clearHtml) {
419
+ if (clearHtml === void 0) { clearHtml = true; }
419
420
  _super.prototype.delete.call(this);
420
421
  this.renderableSeries.asArray().forEach(function (rs) { return rs.delete(); });
421
422
  this.renderableSeries.clear();
@@ -428,7 +429,7 @@ var SciChartSurface = /** @class */ (function (_super) {
428
429
  this.watermarkProperties = (0, Deleter_1.deleteSafe)(this.watermarkProperties);
429
430
  this.watermarkPropertyPosition = (0, Deleter_1.deleteSafe)(this.watermarkPropertyPosition);
430
431
  this.chartModifiers.asArray().forEach(function (chm) { return chm.delete(); });
431
- if (this.domChartRoot) {
432
+ if (clearHtml && this.domChartRoot) {
432
433
  var style = this.domChartRoot.style;
433
434
  if (style) {
434
435
  style.background = "";
@@ -259,7 +259,7 @@ export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBas
259
259
  /**
260
260
  * @inheritDoc
261
261
  */
262
- delete(): void;
262
+ delete(clearHtml?: boolean): void;
263
263
  addDeletable(deletable: IDeletable): void;
264
264
  /**
265
265
  * Call invalidateElement() to trigger a redraw of the {@link SciChartSurfaceBase}. SciChart's WebGL WebAssembly rendering
@@ -286,9 +286,10 @@ var SciChartSurfaceBase = /** @class */ (function () {
286
286
  /**
287
287
  * @inheritDoc
288
288
  */
289
- SciChartSurfaceBase.prototype.delete = function () {
289
+ SciChartSurfaceBase.prototype.delete = function (clearHtml) {
290
290
  var _this = this;
291
291
  var _a;
292
+ if (clearHtml === void 0) { clearHtml = true; }
292
293
  this.isDeletedProperty = true;
293
294
  var currentSurfaceIndex = (_a = this.destinations) === null || _a === void 0 ? void 0 : _a.findIndex(function (dest) { return dest.sciChartSurface === _this; });
294
295
  if (currentSurfaceIndex >= 0) {
@@ -171,7 +171,7 @@ var createMaster = function () {
171
171
  Guard_1.Guard.notNull(theme, "theme");
172
172
  var canvas2dId = sciChartInitCommon_1.default.getCanvas2dId(divElementId);
173
173
  var sameIdDestinations = exports.sciChartDestinations.filter(function (el) { return el.canvasElementId === canvas2dId; });
174
- sameIdDestinations.forEach(function (el) { return el.sciChartSurface.delete(); });
174
+ sameIdDestinations.forEach(function (el) { return el.sciChartSurface.delete(false); });
175
175
  var otherDestinations = exports.sciChartDestinations.filter(function (el) { return el.canvasElementId !== canvas2dId; });
176
176
  chartInitObj.ClearDestinations();
177
177
  while (exports.sciChartDestinations.length > 0) {
@@ -415,6 +415,11 @@ var applyLicense = function (licenseContext) {
415
415
  var licenseKey = "";
416
416
  var lt = licenseContext.SCRTCredentials.GetLicenseType();
417
417
  debug("Initial license status is " + licensingClasses_1.LicenseType[convertLicenseType(lt, licenseContext)]);
418
+ if (window.location.hostname.includes(".csb.app") ||
419
+ window.location.hostname === "codesandbox.io" ||
420
+ window.location.hostname.includes(".codesandbox.io")) {
421
+ runtimeLicenseKey = "csb";
422
+ }
418
423
  // Get from global store
419
424
  var runtimelicense = getRuntimeLicenseKey();
420
425
  if ((checkStatus === licensingClasses_1.LicenseCheckStatus.NoLicense ||
@@ -441,11 +446,18 @@ var applyLicense = function (licenseContext) {
441
446
  licenseKey = runtimelicense;
442
447
  }
443
448
  else {
444
- if (window && ((_a = window.location) === null || _a === void 0 ? void 0 : _a.hostname) && !window.location.hostname.includes("localhost")) {
445
- console.warn("Runtime license is invalid. Call setIsDebugLicensing(true) for details.");
449
+ var errorMsg = licenseContext.SCRTCredentials.GetLicenseErrors();
450
+ if ((window && ((_a = window.location) === null || _a === void 0 ? void 0 : _a.hostname) && !window.location.hostname.includes("localhost")) ||
451
+ !errorMsg.startsWith("License is not valid for this domain")) {
452
+ if (isDebug) {
453
+ debug("Runtime license is invalid: " + errorMsg);
454
+ }
455
+ else {
456
+ console.warn("Runtime license is invalid. Call setIsDebugLicensing(true) for details.");
457
+ }
446
458
  }
447
459
  else {
448
- debug("Runtime license is invalid: " + licenseContext.SCRTCredentials.GetLicenseErrors());
460
+ debug("Runtime license is invalid: " + errorMsg);
449
461
  }
450
462
  licenseKey = "";
451
463
  }
@@ -462,7 +474,7 @@ var applyLicense = function (licenseContext) {
462
474
  if (!(lt === licenseContext.SCRTLicenseType.LICENSE_TYPE_FULL ||
463
475
  lt === licenseContext.SCRTLicenseType.LICENSE_TYPE_TRIAL ||
464
476
  lt === licenseContext.SCRTLicenseType.LICENSE_TYPE_REQUIRES_VALIDATION)) {
465
- debug("License cookie is invalid. Removing");
477
+ debug("License cookie is invalid. " + licenseContext.SCRTCredentials.GetLicenseErrors());
466
478
  (0, cookie_1.deleteCookie)("scLicense");
467
479
  licenseKey = "";
468
480
  lt = licenseContext.SCRTLicenseType.LICENSE_TYPE_NO_LICENSE;
@@ -741,7 +753,9 @@ var getLicenseInfo = function (licenseContext) {
741
753
  licenseManager2dState_1.licenseManager2dState.setLicenseType(licenseType);
742
754
  licenseManager2dState_1.licenseManager2dState.setDevCount(licenseContext.SCRTCredentials.GetDeveloperCount());
743
755
  // Telemetry is enabled based on a license feature
744
- licenseManager2dState_1.licenseManager2dState.setTelemetry(licenseContext.SCRTCredentials.HasFeature("TE") === licenseContext.SCRTLicenseType.LICENSE_TYPE_FULL);
756
+ var teFeature = licenseContext.SCRTCredentials.HasFeature("TE");
757
+ licenseManager2dState_1.licenseManager2dState.setTelemetry(teFeature === licenseContext.SCRTLicenseType.LICENSE_TYPE_FULL ||
758
+ teFeature === licenseContext.SCRTLicenseType.LICENSE_TYPE_TRIAL);
745
759
  }
746
760
  if (isDebug) {
747
761
  debug(licenseContext.SCRTCredentials.Dump());
@@ -789,6 +803,8 @@ var updateLicenseDisplayInternal = function (licenseInfo, sciChartSurface, is2D,
789
803
  else if (licenseType === licensingClasses_1.LicenseType.Invalid) {
790
804
  if (error.startsWith("License is not valid for this domain"))
791
805
  premsg = "Sorry! Your license key is invalid for this domain</br>Please ".concat(contactSupportLink, " with your OrderID if you believe this to be incorrect.");
806
+ else if (error.startsWith("This version of SciChart can no longer be trialed"))
807
+ premsg = "Sorry! This version of SciChart is too old to be trialed. Please update to the latest version";
792
808
  else
793
809
  premsg = "Sorry! Your license key appears to be invalid</br>Please ".concat(contactSupportLink, " with your OrderID if you believe this to be incorrect.");
794
810
  postMsg = "Instructions can be seen at ".concat(licensingLink);
@@ -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
@@ -128,9 +128,9 @@ var createMaster = function () {
128
128
  exports.sciChartDestinations.push({ canvasElementId: canvasElementId, sciChartSurface: sciChartSurface, width: width, height: height });
129
129
  };
130
130
  return new Promise(function (resolve, reject) {
131
- var locateFile3d = (0, SciChartSurfaceBase_1.getLocateFile)(SciChart3DSurface_1.sciChartConfig3D);
131
+ var locateFile = (0, SciChartSurfaceBase_1.getLocateFile)(SciChart3DSurface_1.sciChartConfig3D);
132
132
  // @ts-ignore
133
- new WasmModule3D({ locateFile3d: locateFile3d, noInitialRun: true })
133
+ new WasmModule3D({ locateFile: locateFile, noInitialRun: true })
134
134
  .then(function (wasmContext) {
135
135
  var getChildSurfaces = function () { return exports.sciChartDestinations.map(function (el) { return el.sciChartSurface; }); };
136
136
  // Create of replace child surface
@@ -21,9 +21,9 @@ var createSingle3dInternal = function (divElement, options) {
21
21
  var webGLSupport = WebGlHelper_1.WebGlHelper.getWebGlSupport();
22
22
  // console.log("webGLSupport", webGLSupport);
23
23
  if (webGLSupport === WebGlHelper_1.EWebGLSupport.WebGL2 || webGLSupport === WebGlHelper_1.EWebGLSupport.WebGL1) {
24
- var locateFile3d = (0, SciChartSurfaceBase_1.getLocateFile)(SciChart3DSurface_1.sciChartConfig3D);
24
+ var locateFile = (0, SciChartSurfaceBase_1.getLocateFile)(SciChart3DSurface_1.sciChartConfig3D);
25
25
  // @ts-ignore
26
- new WasmModule3D({ locateFile3d: locateFile3d, noInitialRun: true })
26
+ new WasmModule3D({ locateFile: locateFile, noInitialRun: true })
27
27
  .then(function (wasmContext) {
28
28
  var _a;
29
29
  loader.removeChartLoader(canvases.domDivContainer, loaderDiv);
@@ -1,4 +1,4 @@
1
1
  import { TSciChart } from "../types/TSciChart";
2
2
  import { TSciChart3D } from "../types/TSciChart3D";
3
- export declare const libraryVersion = "2.2.2378";
3
+ export declare const libraryVersion = "2.2.2396";
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-05-20T00:00:00";
4
+ var buildStamp = "2022-06-29T00:00:00";
5
5
  var result;
6
6
  // tslint:disable-next-line:no-var-requires
7
- exports.libraryVersion = "2.2.2378";
7
+ exports.libraryVersion = "2.2.2396";
8
8
  var checkBuildStamp = function (wasmContext) {
9
9
  if (result !== undefined)
10
10
  return result;
package/Core/Telemetry.js CHANGED
@@ -92,6 +92,9 @@ var sendTelemetry = function () {
92
92
  }
93
93
  }
94
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
+ }
95
98
  var endPointUrl = "https://dc.services.visualstudio.com/v2/track";
96
99
  var body = JSON.stringify([eventData]);
97
100
  fetch(endPointUrl, {
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