scichart 3.2.509 → 3.2.516

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.
@@ -400,8 +400,7 @@ var AxisMarkerAnnotation = /** @class */ (function (_super) {
400
400
  if (this.isSelected) {
401
401
  var _a = this.getAdornerAnnotationBorders(true, true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
402
402
  var svgString = this.svgStringAdornerTemplate(x1, y1, x2, y2);
403
- var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
404
- this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
403
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgAdornerRoot);
405
404
  }
406
405
  };
407
406
  AxisMarkerAnnotation.prototype.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
@@ -299,12 +299,11 @@ var BoxAnnotation = /** @class */ (function (_super) {
299
299
  }
300
300
  };
301
301
  BoxAnnotation.prototype.updateAdornerInner = function () {
302
- var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
303
302
  this.deleteAdorner();
304
303
  if (this.isSelected) {
305
304
  var _a = this.getAdornerAnnotationBorders(true, true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
306
305
  var svgString = this.svgStringAdornerTemplate(x1, y1, x2, y2);
307
- this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
306
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgAdornerRoot);
308
307
  }
309
308
  };
310
309
  BoxAnnotation.prototype.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
@@ -443,12 +443,11 @@ var LineAnnotation = /** @class */ (function (_super) {
443
443
  }
444
444
  };
445
445
  LineAnnotation.prototype.updateAdornerInner = function () {
446
- var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
447
446
  this.deleteAdorner();
448
447
  if (this.isSelected) {
449
448
  var _a = this.getAdornerAnnotationBorders(), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
450
449
  var svgString = this.svgStringAdornerTemplate(x1, y1, x2, y2);
451
- this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
450
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgAdornerRoot);
452
451
  }
453
452
  };
454
453
  LineAnnotation.prototype.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
@@ -543,12 +543,11 @@ var NativeTextAnnotation = /** @class */ (function (_super) {
543
543
  return (0, pointUtil_1.testIsInBounds)(x, y, x1, y2, x2, y1);
544
544
  };
545
545
  NativeTextAnnotation.prototype.updateAdornerInner = function () {
546
- var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
547
546
  this.deleteAdorner();
548
547
  if (this.isSelected) {
549
548
  var _a = this.getAdornerAnnotationBorders(), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
550
549
  var svgString = this.svgStringAdornerTemplate(x1, y1, x2, y2);
551
- this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
550
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgAdornerRoot);
552
551
  }
553
552
  };
554
553
  NativeTextAnnotation.prototype.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
@@ -444,9 +444,8 @@ var OverviewCustomResizableAnnotation = /** @class */ (function (_super) {
444
444
  this.deleteAdorner();
445
445
  if (this.adornerSvgStringTemplate) {
446
446
  var _a = this.getAdornerAnnotationBorders(true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
447
- var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
448
447
  var svgString = this.adornerSvgStringTemplate(x1, y1, x2, y2);
449
- this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
448
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgAdornerRoot);
450
449
  }
451
450
  };
452
451
  OverviewCustomResizableAnnotation.prototype.checkIsClickedOnAnnotationInternal = function (x, y) {
@@ -289,12 +289,11 @@ var SvgAnnotationBase = /** @class */ (function (_super) {
289
289
  return (0, pointUtil_1.testIsInBounds)(notScaledX, notScaledY, x1, y2, x2, y1);
290
290
  };
291
291
  SvgAnnotationBase.prototype.updateAdornerInner = function () {
292
- var _a = this.getAdornerAnnotationBorders(true, true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
293
- var adornerSvgRoot = this.parentSurface.domSvgAdornerLayer;
294
292
  this.deleteAdorner();
295
293
  if (this.isSelected) {
294
+ var _a = this.getAdornerAnnotationBorders(true, true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
296
295
  var svgString = this.svgStringAdornerTemplate(x1, y1, x2, y2);
297
- this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
296
+ this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgAdornerRoot);
298
297
  }
299
298
  };
300
299
  Object.defineProperty(SvgAnnotationBase.prototype, "svgRoot", {
@@ -1,6 +1,6 @@
1
1
  import { NumberRange } from "../../../Core/NumberRange";
2
2
  import { EAutoRange } from "../../../types/AutoRange";
3
- import { TGridLineStyle, TTextStyle, TTickLineStyle } from "./AxisCore";
3
+ import { TAxisTitleStyle, TGridLineStyle, TTickLineStyle } from "./AxisCore";
4
4
  /**
5
5
  * Optional parameters passed to {@link AxisCore} constructor to set defaults at construction time
6
6
  */
@@ -70,7 +70,7 @@ export interface IAxisCoreOptions {
70
70
  * @summary Sets the Axis Title style
71
71
  * @remarks See {@link TTextStyle} for the type which contains style options
72
72
  */
73
- axisTitleStyle?: TTextStyle;
73
+ axisTitleStyle?: TAxisTitleStyle;
74
74
  /**
75
75
  * The maximum number of ticks on the axis when SciChart's Axis is in {@link AxisCore.autoTicks} mode
76
76
  * @remarks
@@ -235,4 +235,4 @@ export declare abstract class SciChartLegendBase extends DeletableEntity impleme
235
235
  protected getParentDiv(): HTMLDivElement;
236
236
  }
237
237
  export declare const getLegendItemHtml: (orientation: ELegendOrientation, showCheckboxes: boolean, showSeriesMarkers: boolean, item: TLegendItem) => string;
238
- export declare const getLegendContainerHtml: (placement: ELegendPlacement, textColor: string, backgroundColor: string, margin: Thickness, body: string) => string;
238
+ export declare const getLegendContainerHtml: (placement: ELegendPlacement, textColor: string, backgroundColor: string, margin: Thickness, body: string, isExternal?: boolean) => string;
@@ -297,7 +297,7 @@ var SciChartLegendBase = /** @class */ (function (_super) {
297
297
  var _a;
298
298
  return (prev + _this.getLegendItemHTML(orientation, showCheckboxes, (_a = curr.showMarker) !== null && _a !== void 0 ? _a : showSeriesMarkers, curr));
299
299
  }, "");
300
- return (0, exports.getLegendContainerHtml)(placement, textColor, backgroundColor, margin, body);
300
+ return (0, exports.getLegendContainerHtml)(placement, textColor, backgroundColor, margin, body, this.isExternal());
301
301
  };
302
302
  /**
303
303
  * Gets HTML string for legend items
@@ -368,11 +368,16 @@ var getLegendItemHtml = function (orientation, showCheckboxes, showSeriesMarkers
368
368
  return str;
369
369
  };
370
370
  exports.getLegendItemHtml = getLegendItemHtml;
371
- var getLegendContainerHtml = function (placement, textColor, backgroundColor, margin, body) {
371
+ var getLegendContainerHtml = function (placement, textColor, backgroundColor, margin, body, isExternal) {
372
+ if (isExternal === void 0) { isExternal = false; }
372
373
  if (!body)
373
374
  return "";
374
375
  //const float = [ELegendPlacement.TopLeft, ELegendPlacement.BottomLeft].includes(placement) ? "left" : "right";
376
+ var position = "";
375
377
  var positionStyle = "";
378
+ if (!isExternal) {
379
+ position = "position: absolute;";
380
+ }
376
381
  if (placement === ELegendPlacement.TopLeft) {
377
382
  positionStyle = "left: 0; top: 0;";
378
383
  }
@@ -385,7 +390,7 @@ var getLegendContainerHtml = function (placement, textColor, backgroundColor, ma
385
390
  else if (placement === ELegendPlacement.BottomRight) {
386
391
  positionStyle = "right: 0; bottom: 0;";
387
392
  }
388
- var htmlStr = "<div class=\"scichart__legend\" style=\"height: 100%; position: absolute; display: flex; ".concat(positionStyle, " text-align: center;\">");
393
+ var htmlStr = "<div class=\"scichart__legend\" style=\"height: 100%; ".concat(position, " display: flex; ").concat(positionStyle, " text-align: center;\">");
389
394
  var alignSelf = [ELegendPlacement.TopLeft, ELegendPlacement.TopRight].includes(placement)
390
395
  ? "flex-start"
391
396
  : "flex-end";
@@ -30,7 +30,7 @@ var DataLabelState = /** @class */ (function () {
30
30
  var indicesRange = this.parentSeries.getIndicesRange(new NumberRange_1.NumberRange(renderPassData.xCoordinateCalculator.visibleMin, renderPassData.xCoordinateCalculator.visibleMax), isCategoryAxis);
31
31
  this.indexStart = indicesRange.min;
32
32
  this.indexEnd = indicesRange.max;
33
- this.pointCount = indicesRange.diff + 1;
33
+ this.pointCount = renderPassData.indexRange.diff + 1;
34
34
  if (this.pointCount > 1) {
35
35
  this.pointGap = renderPassData.isVerticalChart
36
36
  ? Math.abs(this.yCoord(this.indexStart) - this.yCoord(this.indexEnd)) / this.pointCount
@@ -40,9 +40,9 @@ var DataLabelState = /** @class */ (function () {
40
40
  this.pointGap = Infinity; // Single point
41
41
  }
42
42
  else {
43
- this.indexStart = renderPassData.indexRange.min;
44
- this.pointCount = renderPassData.indexRange.diff + 1;
45
- this.indexEnd = renderPassData.indexRange.max;
43
+ this.indexStart = pointSeries.resampled ? 0 : renderPassData.indexRange.min;
44
+ this.pointCount = pointSeries.resampled ? pointSeries.count : renderPassData.indexRange.diff + 1;
45
+ this.indexEnd = pointSeries.resampled ? pointSeries.count - 1 : renderPassData.indexRange.max;
46
46
  if (this.pointCount > 1) {
47
47
  this.pointGap = renderPassData.isVerticalChart
48
48
  ? Math.abs(this.yCoord(this.indexStart) - this.yCoord(this.indexEnd)) / this.pointCount
@@ -1,4 +1,4 @@
1
1
  import { TSciChart } from "../types/TSciChart";
2
2
  import { TSciChart3D } from "../types/TSciChart3D";
3
- export declare const libraryVersion = "3.2.509";
3
+ export declare const libraryVersion = "3.2.516";
4
4
  export declare const checkBuildStamp: (wasmContext: TSciChart | TSciChart3D) => boolean;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkBuildStamp = exports.libraryVersion = void 0;
4
- var buildStamp = "2023-11-07T00:00:00";
4
+ var buildStamp = "2023-11-13T00:00:00";
5
5
  var result;
6
6
  // tslint:disable-next-line:no-var-requires
7
- exports.libraryVersion = "3.2.509";
7
+ exports.libraryVersion = "3.2.516";
8
8
  var checkBuildStamp = function (wasmContext) {
9
9
  if (result !== undefined)
10
10
  return result;
package/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # SciChart.js: High Performance JavaScript Chart Library
2
2
 
3
+ > **NEW!** ChangeLog
4
+ >
5
+ > Find out what's new in every Major and Minor release at the [Change Log here](https://www.scichart.com/changelog/scichart-js/)
6
+
3
7
  [SciChart.js](https://www.scichart.com) is a High Performance JavaScript & TypeScript Charting library
4
8
  which WebGL and WebAssembly to achieve incredible real-time and big-data performance. Fast and able to draw millions of datapoints in realtime, our charts will never cause your app to slow down again!
5
9
 
@@ -11,7 +15,7 @@ which WebGL and WebAssembly to achieve incredible real-time and big-data perform
11
15
 
12
16
  SciChart.JS v3.2 is released! Check out
13
17
 
14
- - [Latest Changes](https://www.scichart.com/cbxchangelog/scichart-js-changelog/)
18
+ - [Latest Changes](https://www.scichart.com/changelog/scichart-js/)
15
19
  - [v3.2 Release notes](https://www.scichart.com/scichart-js-v3-2-released/)
16
20
  - [v3.1 Release notes](https://www.scichart.com/scichart-js-v3-1-released/)
17
21
  - [v3.0 Release notes](https://www.scichart.com/scichart-js-v3-0-released) There should not be any breaking changes from v2.