scichart 3.0.269 → 3.0.280

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 (60) hide show
  1. package/Charting/ChartModifiers/ChartModifierBase2D.js +2 -3
  2. package/Charting/ChartModifiers/CursorModifier.d.ts +27 -12
  3. package/Charting/ChartModifiers/CursorModifier.js +87 -12
  4. package/Charting/ChartModifiers/XAxisDragModifier.d.ts +15 -12
  5. package/Charting/ChartModifiers/YAxisDragModifier.d.ts +15 -12
  6. package/Charting/ChartModifiers/constants.d.ts +4 -1
  7. package/Charting/ChartModifiers/constants.js +3 -0
  8. package/Charting/LayoutManager/BaseAxisLayoutStrategy.d.ts +1 -0
  9. package/Charting/LayoutManager/BaseAxisLayoutStrategy.js +1 -0
  10. package/Charting/LayoutManager/BottomAlignedInnerAxisLayoutStrategy.js +4 -1
  11. package/Charting/LayoutManager/BottomAlignedOuterAxisLayoutStrategy.js +4 -1
  12. package/Charting/LayoutManager/BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy.d.ts +1 -0
  13. package/Charting/LayoutManager/BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +1 -1
  14. package/Charting/LayoutManager/LayoutManager.d.ts +14 -4
  15. package/Charting/LayoutManager/LayoutManager.js +133 -35
  16. package/Charting/LayoutManager/LeftAlignedInnerAxisLayoutStrategy.js +4 -1
  17. package/Charting/LayoutManager/LeftAlignedOuterAxisLayoutStrategy.js +4 -1
  18. package/Charting/LayoutManager/LeftAlignedOuterVerticallyStackedAxisLayoutStrategy.d.ts +1 -0
  19. package/Charting/LayoutManager/LeftAlignedOuterVerticallyStackedAxisLayoutStrategy.js +3 -3
  20. package/Charting/LayoutManager/RightAlignedInnerAxisLayoutStrategy.js +4 -1
  21. package/Charting/LayoutManager/RightAlignedOuterAxisLayoutStrategy.js +4 -1
  22. package/Charting/LayoutManager/RightAlignedOuterVerticallyStackedAxisLayoutStrategy.d.ts +1 -0
  23. package/Charting/LayoutManager/RightAlignedOuterVerticallyStackedAxisLayoutStrategy.js +1 -1
  24. package/Charting/LayoutManager/TopAlignedInnerAxisLayoutStrategy.js +4 -1
  25. package/Charting/LayoutManager/TopAlignedOuterAxisLayoutStrategy.js +4 -1
  26. package/Charting/LayoutManager/TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.d.ts +1 -0
  27. package/Charting/LayoutManager/TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +1 -1
  28. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +6 -6
  29. package/Charting/Visuals/Annotations/AnnotationBase.js +13 -9
  30. package/Charting/Visuals/Annotations/AxisMarkerAnnotation.d.ts +1 -1
  31. package/Charting/Visuals/Annotations/AxisMarkerAnnotation.js +7 -7
  32. package/Charting/Visuals/Annotations/BoxAnnotation.d.ts +1 -1
  33. package/Charting/Visuals/Annotations/BoxAnnotation.js +21 -21
  34. package/Charting/Visuals/Annotations/LineAnnotation.d.ts +1 -1
  35. package/Charting/Visuals/Annotations/LineAnnotation.js +4 -4
  36. package/Charting/Visuals/Annotations/NativeTextAnnotation.d.ts +1 -1
  37. package/Charting/Visuals/Annotations/NativeTextAnnotation.js +21 -21
  38. package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +1 -1
  39. package/Charting/Visuals/Axis/AxisBase2D.d.ts +0 -5
  40. package/Charting/Visuals/Axis/AxisBase2D.js +13 -19
  41. package/Charting/Visuals/Axis/AxisCore.js +4 -1
  42. package/Charting/Visuals/I2DSurfaceOptions.d.ts +1 -1
  43. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +14 -0
  44. package/Charting/Visuals/SciChartSurface.d.ts +6 -2
  45. package/Charting/Visuals/SciChartSurface.js +10 -4
  46. package/Charting/Visuals/licenseManager2D.js +4 -2
  47. package/Core/BuildStamp.d.ts +1 -1
  48. package/Core/BuildStamp.js +2 -2
  49. package/Core/Telemetry.js +4 -1
  50. package/README.md +55 -13
  51. package/_wasm/scichart.browser.js +1 -1
  52. package/_wasm/scichart2d.js +10 -10
  53. package/_wasm/scichart2d.wasm +0 -0
  54. package/_wasm/scichart3d.js +16 -16
  55. package/_wasm/scichart3d.wasm +0 -0
  56. package/package.json +1 -1
  57. package/types/AxisAlignment.d.ts +1 -0
  58. package/types/AxisAlignment.js +5 -1
  59. package/utils/array.d.ts +9 -0
  60. package/utils/array.js +19 -1
@@ -334,6 +334,12 @@ var SciChartSurface = /** @class */ (function (_super) {
334
334
  exports.sciChartConfig.dataUrl = "https://cdn.jsdelivr.net/npm/scichart@".concat(BuildStamp_1.libraryVersion, "/_wasm/scichart2d.data");
335
335
  exports.sciChartConfig.wasmUrl = "https://cdn.jsdelivr.net/npm/scichart@".concat(BuildStamp_1.libraryVersion, "/_wasm/scichart2d.wasm");
336
336
  };
337
+ /**
338
+ * Tell SciChart to load the Wasm and Data files from the local server, rather than from CDN.
339
+ */
340
+ SciChartSurface.useWasmLocal = function () {
341
+ SciChartSurface.configure(undefined);
342
+ };
337
343
  SciChartSurface.createTest = function (divElement, options) {
338
344
  var _a, _b;
339
345
  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);
@@ -516,13 +522,13 @@ var SciChartSurface = /** @class */ (function (_super) {
516
522
  });
517
523
  Object.defineProperty(SciChartSurface.prototype, "autoColorMode", {
518
524
  /**
519
- * Gets or sets the EAutoColorMode which determines when resolution of AUTO_COLOR should occur
525
+ * Gets or sets the {@link EAutoColorMode} which determines when resolution of AUTO_COLOR should occur
520
526
  */
521
527
  get: function () {
522
528
  return this.autoColorModeProperty;
523
529
  },
524
530
  /**
525
- * Gets or sets the EAutoColorMode which determines when resolution of AUTO_COLOR should occur
531
+ * Gets or sets the {@link EAutoColorMode} which determines when resolution of AUTO_COLOR should occur
526
532
  */
527
533
  set: function (autoColorMode) {
528
534
  this.autoColorModeProperty = autoColorMode;
@@ -597,8 +603,8 @@ var SciChartSurface = /** @class */ (function (_super) {
597
603
  var sus = new UpdateSuspender_1.UpdateSuspender(this, false); // Don't want to invalidate on resume
598
604
  try {
599
605
  if (this.autoColorRequired &&
600
- this.themeProvider.strokePalette &&
601
- this.themeProvider.strokePalette.length > 0) {
606
+ ((this.themeProvider.strokePalette && this.themeProvider.strokePalette.length > 0) ||
607
+ (this.themeProvider.fillPalette && this.themeProvider.fillPalette.length > 0))) {
602
608
  this.resolveAutoColors();
603
609
  if (this.autoColorMode !== AutoColorMode_1.EAutoColorMode.Always) {
604
610
  this.autoColorRequired = false;
@@ -420,8 +420,10 @@ var applyLicense = function (licenseContext, sciChartSurface) {
420
420
  debug("Initial license status is " + licensingClasses_1.LicenseType[convertLicenseType(lt, licenseContext)]);
421
421
  if (window.location.hostname.includes(".csb.app") ||
422
422
  window.location.hostname === "codesandbox.io" ||
423
- window.location.hostname.includes(".codesandbox.io")) {
424
- runtimeLicenseKey = "csb";
423
+ window.location.hostname.includes(".codesandbox.io") ||
424
+ window.location.hostname.includes("fiddle.jshell.net") ||
425
+ window.location.hostname.includes("cdpn.io")) {
426
+ runtimeLicenseKey = "builtin";
425
427
  }
426
428
  // Get from global store
427
429
  var runtimelicense = getRuntimeLicenseKey();
@@ -1,4 +1,4 @@
1
1
  import { TSciChart } from "../types/TSciChart";
2
2
  import { TSciChart3D } from "../types/TSciChart3D";
3
- export declare const libraryVersion = "3.0.269";
3
+ export declare const libraryVersion = "3.0.280";
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-01-18T00:00:00";
4
+ var buildStamp = "2023-01-30T00:00:00";
5
5
  var result;
6
6
  // tslint:disable-next-line:no-var-requires
7
- exports.libraryVersion = "3.0.269";
7
+ exports.libraryVersion = "3.0.280";
8
8
  var checkBuildStamp = function (wasmContext) {
9
9
  if (result !== undefined)
10
10
  return result;
package/Core/Telemetry.js CHANGED
@@ -92,7 +92,10 @@ var sendTelemetry = function () {
92
92
  }
93
93
  }
94
94
  };
95
- if (window.location.hostname.includes(".csb.app") || window.location.hostname.includes(".codesandbox.io")) {
95
+ if (window.location.hostname.includes(".csb.app") ||
96
+ window.location.hostname.includes(".codesandbox.io") ||
97
+ window.location.hostname.includes("fiddle.jshell.net") ||
98
+ window.location.hostname.includes("cdpn.io")) {
96
99
  eventData.data.baseData.properties.url = window.location.href;
97
100
  }
98
101
  var endPointUrl = "https://dc.services.visualstudio.com/v2/track";
package/README.md CHANGED
@@ -133,26 +133,40 @@ initSciChart();
133
133
  >
134
134
  > - See the [Getting Started Page](https://scichart.com/getting-started/scichart-javascript/) as well as our [Tutorials](https://www.scichart.com/documentation/js/current/webframe.html#Tutorial%2001%20-%20Setting%20up%20a%20Project%20with%20SciChart.js.html) for more information on creating your first chart
135
135
 
136
- ## Quick Start with vanilla JS
136
+ ## Quick Start with Browser Bundle (Iife bundle)
137
137
 
138
- If your environment does not include a bundler like Parcel or Webpack, you can still load SciChart.js using the browser bundle module.
138
+ [![](https://data.jsdelivr.com/v1/package/npm/scichart/badge)](https://www.jsdelivr.com/package/npm/scichart)
139
139
 
140
- 1.**Create scichart-example.js file with a simple chart**
140
+ If your environment does not include a bundler like Parcel or Webpack, you can still load SciChart.js using the browser bundle module from [JSDlvr](https://www.jsdelivr.com/package/npm/scichart)
141
141
 
142
- ```javascript
143
- async function initSciChart() {
144
- // See deployment options for WebAssembly at https://www.scichart.com/documentation/js/current/Deploying%20Wasm%20or%20WebAssembly%20and%20Data%20Files%20with%20your%20app.html
145
- // call useWasmFromCDN once before SciChart.js is initialised to load Wasm files from our CDN
146
- SciChart.SciChartSurface.useWasmFromCDN();
142
+ 1. **Include SciChart.browser.js in your webpage**
143
+
144
+ ```html
145
+ <!-- Substitute version number here. Check https://www.npmjs.com/package/scichart for versions -->
146
+ <script src="https://cdn.jsdelivr.net/npm/scichart@3.0.269/_wasm/scichart.browser.js" crossorigin="anonymous"></script>
147
+ ```
147
148
 
148
- // Apply your licese key once before startup
149
- SciChart, SciChartSurface.setRuntimeLicenseKey("--YOUR_KEY_HERE--");
149
+ 2.**Create scichart-example.js file with a simple chart**
150
150
 
151
+ ```javascript
152
+ // Imports when using Browser Bundle
153
+ const {
154
+ SciChartSurface,
155
+ SciChartDefaults,
156
+ chartBuilder,
157
+ SciChartJsNavyTheme,
158
+ XyDataSeries,
159
+ FastLineRenderableSeries,
160
+ NumericAxis
161
+ } = SciChart;
162
+
163
+ // Option 1: Create chart with Builder API
164
+ async function initSciChartBuilderApi() {
151
165
  // Create a chart using the json builder api
152
- await SciChart.chartBuilder.buildChart("scichart-root", {
166
+ await chartBuilder.buildChart("chart0", {
153
167
  series: {
154
168
  type: "LineSeries",
155
- options: { stroke: "steelblue" },
169
+ options: { stroke: "steelblue", strokeThickness: 5 },
156
170
  xyData: {
157
171
  xValues: [1, 2, 5, 8, 10],
158
172
  yValues: [3, 1, 7, 5, 8]
@@ -161,9 +175,37 @@ async function initSciChart() {
161
175
  });
162
176
  }
163
177
 
164
- initSciChart();
178
+ // Option 2: Create chart with the programmatic API
179
+ async function initSciChartProgrammaticApi() {
180
+ const { sciChartSurface, wasmContext } = await SciChartSurface.create("chart1", {
181
+ theme: new SciChartJsNavyTheme()
182
+ });
183
+
184
+ sciChartSurface.xAxes.add(new NumericAxis(wasmContext));
185
+ sciChartSurface.yAxes.add(new NumericAxis(wasmContext));
186
+
187
+ sciChartSurface.renderableSeries.add(
188
+ new FastLineRenderableSeries(wasmContext, {
189
+ stroke: "#FF6600",
190
+ strokeThickness: 3,
191
+ dataSeries: new XyDataSeries(wasmContext, {
192
+ xValues: [1, 2, 5, 8, 10],
193
+ yValues: [3, 1, 7, 5, 8]
194
+ })
195
+ })
196
+ );
197
+ }
198
+
199
+ // See deployment options for WebAssembly at https://www.scichart.com/documentation/js/current/Deploying%20Wasm%20or%20WebAssembly%20and%20Data%20Files%20with%20your%20app.html
200
+ // call useWasmFromCDN once before SciChart.js is initialised to load Wasm files from our CDN
201
+ SciChartSurface.useWasmFromCDN();
202
+
203
+ initSciChartBuilderApi();
204
+ initSciChartProgrammaticApi();
165
205
  ```
166
206
 
207
+ > [View above in CodePen](https://codepen.io/scichart/pen/ZEjjELy)
208
+
167
209
  > See the full [browser bundle tutorial here](https://www.scichart.com/documentation/js/current/webframe.html#Tutorial%2001%20-%20Including%20SciChart.js%20in%20an%20HTML%20Page.html)
168
210
 
169
211
  # Release notes. What's New!