scichart 2.2.2378 → 2.2.2389

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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) {
@@ -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
  }
@@ -415,6 +415,9 @@ 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") || window.location.hostname.includes(".codesandbox.io")) {
419
+ runtimeLicenseKey = "csb";
420
+ }
418
421
  // Get from global store
419
422
  var runtimelicense = getRuntimeLicenseKey();
420
423
  if ((checkStatus === licensingClasses_1.LicenseCheckStatus.NoLicense ||
@@ -441,11 +444,18 @@ var applyLicense = function (licenseContext) {
441
444
  licenseKey = runtimelicense;
442
445
  }
443
446
  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.");
447
+ var errorMsg = licenseContext.SCRTCredentials.GetLicenseErrors();
448
+ if ((window && ((_a = window.location) === null || _a === void 0 ? void 0 : _a.hostname) && !window.location.hostname.includes("localhost")) ||
449
+ !errorMsg.startsWith("License is not valid for this domain")) {
450
+ if (isDebug) {
451
+ debug("Runtime license is invalid: " + errorMsg);
452
+ }
453
+ else {
454
+ console.warn("Runtime license is invalid. Call setIsDebugLicensing(true) for details.");
455
+ }
446
456
  }
447
457
  else {
448
- debug("Runtime license is invalid: " + licenseContext.SCRTCredentials.GetLicenseErrors());
458
+ debug("Runtime license is invalid: " + errorMsg);
449
459
  }
450
460
  licenseKey = "";
451
461
  }
@@ -462,7 +472,7 @@ var applyLicense = function (licenseContext) {
462
472
  if (!(lt === licenseContext.SCRTLicenseType.LICENSE_TYPE_FULL ||
463
473
  lt === licenseContext.SCRTLicenseType.LICENSE_TYPE_TRIAL ||
464
474
  lt === licenseContext.SCRTLicenseType.LICENSE_TYPE_REQUIRES_VALIDATION)) {
465
- debug("License cookie is invalid. Removing");
475
+ debug("License cookie is invalid. " + licenseContext.SCRTCredentials.GetLicenseErrors());
466
476
  (0, cookie_1.deleteCookie)("scLicense");
467
477
  licenseKey = "";
468
478
  lt = licenseContext.SCRTLicenseType.LICENSE_TYPE_NO_LICENSE;
@@ -741,7 +751,9 @@ var getLicenseInfo = function (licenseContext) {
741
751
  licenseManager2dState_1.licenseManager2dState.setLicenseType(licenseType);
742
752
  licenseManager2dState_1.licenseManager2dState.setDevCount(licenseContext.SCRTCredentials.GetDeveloperCount());
743
753
  // Telemetry is enabled based on a license feature
744
- licenseManager2dState_1.licenseManager2dState.setTelemetry(licenseContext.SCRTCredentials.HasFeature("TE") === licenseContext.SCRTLicenseType.LICENSE_TYPE_FULL);
754
+ var teFeature = licenseContext.SCRTCredentials.HasFeature("TE");
755
+ licenseManager2dState_1.licenseManager2dState.setTelemetry(teFeature === licenseContext.SCRTLicenseType.LICENSE_TYPE_FULL ||
756
+ teFeature === licenseContext.SCRTLicenseType.LICENSE_TYPE_TRIAL);
745
757
  }
746
758
  if (isDebug) {
747
759
  debug(licenseContext.SCRTCredentials.Dump());
@@ -789,6 +801,8 @@ var updateLicenseDisplayInternal = function (licenseInfo, sciChartSurface, is2D,
789
801
  else if (licenseType === licensingClasses_1.LicenseType.Invalid) {
790
802
  if (error.startsWith("License is not valid for this domain"))
791
803
  premsg = "Sorry! Your license key is invalid for this domain</br>Please ".concat(contactSupportLink, " with your OrderID if you believe this to be incorrect.");
804
+ else if (error.startsWith("This version of SciChart can no longer be trialed"))
805
+ premsg = "Sorry! This version of SciChart is too old to be trialed. Please update to the latest version";
792
806
  else
793
807
  premsg = "Sorry! Your license key appears to be invalid</br>Please ".concat(contactSupportLink, " with your OrderID if you believe this to be incorrect.");
794
808
  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
@@ -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.2389";
4
4
  export declare const checkBuildStamp: (wasmContext: TSciChart | TSciChart3D) => boolean;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkBuildStamp = exports.libraryVersion = void 0;
4
- var buildStamp = "2022-05-20T00:00:00";
4
+ var buildStamp = "2022-06-08T00:00:00";
5
5
  var result;
6
6
  // tslint:disable-next-line:no-var-requires
7
- exports.libraryVersion = "2.2.2378";
7
+ exports.libraryVersion = "2.2.2389";
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