scichart 2.1.2290 → 2.2.2351

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 (98) hide show
  1. package/Builder/buildModifiers.d.ts +2 -1
  2. package/Charting/ChartModifiers/CursorModifier.d.ts +5 -0
  3. package/Charting/ChartModifiers/CursorModifier.js +15 -10
  4. package/Charting/ChartModifiers/LegendModifier.d.ts +31 -0
  5. package/Charting/ChartModifiers/LegendModifier.js +22 -0
  6. package/Charting/ChartModifiers/RolloverModifier.d.ts +10 -0
  7. package/Charting/ChartModifiers/RolloverModifier.js +76 -19
  8. package/Charting/LayoutManager/LayoutManager.js +6 -1
  9. package/Charting/Model/BaseHeatmapDataSeries.d.ts +3 -2
  10. package/Charting/Model/BaseHeatmapDataSeries.js +17 -5
  11. package/Charting/Model/PointSeries/BasePointSeriesWrapped.d.ts +1 -1
  12. package/Charting/Model/PointSeries/BasePointSeriesWrapped.js +2 -2
  13. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.d.ts +1 -1
  14. package/Charting/Model/PointSeries/XyyPointSeriesWrapped.js +3 -3
  15. package/Charting/Visuals/Annotations/AnnotationBase.d.ts +6 -1
  16. package/Charting/Visuals/Annotations/AnnotationBase.js +23 -2
  17. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +6 -0
  18. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +46 -5
  19. package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +3 -1
  20. package/Charting/Visuals/Annotations/CustomAnnotation.js +14 -3
  21. package/Charting/Visuals/Annotations/HorizontalLineAnnotation.d.ts +4 -0
  22. package/Charting/Visuals/Annotations/HorizontalLineAnnotation.js +3 -2
  23. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.d.ts +1 -1
  24. package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.js +13 -3
  25. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +13 -0
  26. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +63 -14
  27. package/Charting/Visuals/Annotations/VerticalLineAnnotation.d.ts +2 -0
  28. package/Charting/Visuals/Annotations/VerticalLineAnnotation.js +3 -2
  29. package/Charting/Visuals/Annotations/constants.d.ts +2 -1
  30. package/Charting/Visuals/Annotations/constants.js +1 -0
  31. package/Charting/Visuals/Axis/AxisBase2D.d.ts +10 -0
  32. package/Charting/Visuals/Axis/AxisBase2D.js +72 -1
  33. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.d.ts +29 -0
  34. package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +77 -0
  35. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.d.ts +2 -2
  36. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +21 -4
  37. package/Charting/Visuals/Helpers/drawLabel.d.ts +3 -3
  38. package/Charting/Visuals/Helpers/drawLabel.js +38 -18
  39. package/Charting/Visuals/I2DSurfaceOptions.d.ts +6 -0
  40. package/Charting/Visuals/Legend/SciChartLegend.d.ts +4 -0
  41. package/Charting/Visuals/Legend/SciChartLegend.js +7 -1
  42. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +16 -7
  43. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +56 -9
  44. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +3 -0
  45. package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +8 -0
  46. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +17 -166
  47. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +35 -328
  48. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +5 -2
  49. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +5 -3
  50. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +1 -1
  51. package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +8 -0
  52. package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +6 -0
  53. package/Charting/Visuals/RenderableSeries/SeriesVisibleChangedArgs.d.ts +6 -0
  54. package/Charting/Visuals/RenderableSeries/SeriesVisibleChangedArgs.js +11 -0
  55. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.d.ts +22 -0
  56. package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.js +38 -1
  57. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +2 -2
  58. package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +26 -45
  59. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +77 -18
  60. package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +139 -42
  61. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.d.ts +13 -0
  62. package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +23 -3
  63. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -0
  64. package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +21 -1
  65. package/Charting/Visuals/RenderableSeries/constants.d.ts +3 -0
  66. package/Charting/Visuals/RenderableSeries/constants.js +3 -0
  67. package/Charting/Visuals/SciChartPieSurface/IPieSurfaceOptions.d.ts +24 -2
  68. package/Charting/Visuals/SciChartPieSurface/PieSegment/IPieSegment.d.ts +4 -1
  69. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.d.ts +13 -2
  70. package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +66 -20
  71. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.d.ts +3 -1
  72. package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.js +2 -0
  73. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +66 -2
  74. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +304 -52
  75. package/Charting/Visuals/SciChartPieSurface/constants.d.ts +6 -1
  76. package/Charting/Visuals/SciChartPieSurface/constants.js +5 -0
  77. package/Charting/Visuals/SciChartSurface.d.ts +19 -3
  78. package/Charting/Visuals/SciChartSurface.js +49 -4
  79. package/Charting/Visuals/createMaster.js +2 -2
  80. package/Charting/Visuals/createSingle.js +2 -2
  81. package/Charting/Visuals/sciChartInitCommon.d.ts +2 -2
  82. package/Charting/Visuals/sciChartInitCommon.js +13 -9
  83. package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +6 -2
  84. package/Core/BuildStamp.d.ts +1 -1
  85. package/Core/BuildStamp.js +2 -2
  86. package/_wasm/scichart.browser.js +1 -1
  87. package/_wasm/scichart2d.js +95 -95
  88. package/_wasm/scichart2d.wasm +0 -0
  89. package/_wasm/scichart3d.js +1 -1
  90. package/_wasm/scichart3d.wasm +0 -0
  91. package/package.json +1 -1
  92. package/types/Color.d.ts +1 -0
  93. package/types/Color.js +1 -0
  94. package/types/LabelPlacement.d.ts +8 -0
  95. package/types/LabelPlacement.js +11 -1
  96. package/types/LabelProviderType.d.ts +5 -1
  97. package/types/LabelProviderType.js +4 -0
  98. package/types/TSciChartSurfaceCanvases.d.ts +1 -0
@@ -100,7 +100,7 @@ var AxisBase2D = /** @class */ (function (_super) {
100
100
  * @param options Optional parameters of type {@link IAxisBase2dOptions} used to configure the axis at instantiation time
101
101
  */
102
102
  function AxisBase2D(webAssemblyContext, options) {
103
- var _a, _b, _c, _d, _e, _f, _g, _h;
103
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
104
104
  var _this = _super.call(this, options) || this;
105
105
  /**
106
106
  * Gets the {@link AxisLayoutState} class which manages layout
@@ -157,6 +157,7 @@ var AxisBase2D = /** @class */ (function (_super) {
157
157
  }
158
158
  }
159
159
  _this.autoRangeAnimationProperty = options === null || options === void 0 ? void 0 : options.autoRangeAnimation;
160
+ _this.backgroundColor = (_j = options === null || options === void 0 ? void 0 : options.backgroundColor) !== null && _j !== void 0 ? _j : _this.backgroundColor;
160
161
  return _this;
161
162
  }
162
163
  Object.defineProperty(AxisBase2D.prototype, "labelProvider", {
@@ -348,6 +349,25 @@ var AxisBase2D = /** @class */ (function (_super) {
348
349
  enumerable: false,
349
350
  configurable: true
350
351
  });
352
+ Object.defineProperty(AxisBase2D.prototype, "backgroundColor", {
353
+ /**
354
+ * Gets the background color of separate Axis
355
+ */
356
+ get: function () {
357
+ return this.backgroundColorProperty;
358
+ },
359
+ /**
360
+ * Sets the background color of separate Axis
361
+ */
362
+ set: function (value) {
363
+ this.backgroundColorProperty = value;
364
+ if (this.invalidateParentCallback) {
365
+ this.invalidateParentCallback();
366
+ }
367
+ },
368
+ enumerable: false,
369
+ configurable: true
370
+ });
351
371
  Object.defineProperty(AxisBase2D.prototype, "stackedAxisLength", {
352
372
  /** Gets or sets the length of a stacked axis as an absolute number or percentage, e.g. 100, or "30%".
353
373
  * A plain number will be interpreted as a number of pixels.
@@ -590,6 +610,57 @@ var AxisBase2D = /** @class */ (function (_super) {
590
610
  }
591
611
  // make sure axes is drawn at the last stage
592
612
  renderContext.enqueueLayeredDraw(function () {
613
+ // Draw background
614
+ if (_this.backgroundColorProperty) {
615
+ var viewAxisRect = _this.axisRenderer.viewRect;
616
+ var viewTitleRect = _this.axisTitleRenderer.viewRect;
617
+ var brush = new _this.webAssemblyContext2D.SCRTSolidBrush((0, parseColor_1.parseColorToUIntArgb)(_this.backgroundColorProperty), false);
618
+ var nativeAxisRect = void 0;
619
+ var nativeTitleRect = void 0;
620
+ // Empty space covering for axis coloring
621
+ // let shift: number = 0;
622
+ // let additionalSize: number = 0;
623
+ // if (this.isHorizontalAxis) {
624
+ // this.parentSurface.yAxes.asArray().forEach((yAxis: AxisBase2D, index: number) => {
625
+ // const size: number = yAxis.axisRenderer.viewAxisRect.width + yAxis.axisTitleRenderer.viewAxisRect.width;
626
+ // if (index === 0) {
627
+ // shift += size;
628
+ // } else {
629
+ // additionalSize += size;
630
+ // }
631
+ // });
632
+ // nativeAxisRect = createNativeRect(this.webAssemblyContext2D, 0 - shift, 0, viewAxisRect.width + additionalSize, viewAxisRect.height);
633
+ // nativeTitleRect = createNativeRect(this.webAssemblyContext2D, 0 - shift, 0, viewTitleRect.width + additionalSize, viewTitleRect.height);
634
+ // } else {
635
+ // this.parentSurface.xAxes.asArray().forEach((xAxis: AxisBase2D, index: number) => {
636
+ // const size: number = xAxis.axisRenderer.viewAxisRect.height + xAxis.axisTitleRenderer.viewAxisRect.height;
637
+ // if (index === 0) {
638
+ // shift += size;
639
+ // } else {
640
+ // additionalSize += size;
641
+ // }
642
+ // });
643
+ // nativeAxisRect = createNativeRect(this.webAssemblyContext2D, 0, 0 - shift, viewAxisRect.width, viewAxisRect.height + additionalSize);
644
+ // nativeTitleRect = createNativeRect(this.webAssemblyContext2D, 0, 0 - shift, viewTitleRect.width, viewTitleRect.height + additionalSize);
645
+ // }
646
+ nativeAxisRect = (0, createNativeRect_1.createNativeRect)(_this.webAssemblyContext2D, 0, 0, viewAxisRect.width, viewAxisRect.height);
647
+ nativeTitleRect = (0, createNativeRect_1.createNativeRect)(_this.webAssemblyContext2D, 0, 0, viewTitleRect.width, viewTitleRect.height);
648
+ if (nativeAxisRect) {
649
+ var vecRects = new _this.webAssemblyContext2D.VectorRectVertex();
650
+ vecRects.push_back(nativeAxisRect);
651
+ renderContext.drawRects(vecRects, brush, viewAxisRect.left, viewAxisRect.top);
652
+ nativeAxisRect.delete();
653
+ vecRects.delete();
654
+ }
655
+ if (nativeTitleRect) {
656
+ var vecRects = new _this.webAssemblyContext2D.VectorRectVertex();
657
+ vecRects.push_back(nativeTitleRect);
658
+ renderContext.drawRects(vecRects, brush, viewTitleRect.left, viewTitleRect.top);
659
+ nativeTitleRect === null || nativeTitleRect === void 0 ? void 0 : nativeTitleRect.delete();
660
+ vecRects.delete();
661
+ }
662
+ brush.delete();
663
+ }
593
664
  // Draw axis labels
594
665
  if (_this.drawLabels) {
595
666
  if (SciChartSurfaceBase_1.DebugForDpi) {
@@ -0,0 +1,29 @@
1
+ import { ELabelProviderType } from "../../../../types/LabelProviderType";
2
+ import { IPieSegment } from "../../SciChartPieSurface/PieSegment/IPieSegment";
3
+ import { SciChartPieSurface } from "../../SciChartPieSurface/SciChartPieSurface";
4
+ import { ILabelOptions, LabelProvider } from "./LabelProvider";
5
+ /**
6
+ * @summary A Label Provider for use with Pie Charts to allow customizing of segment labels
7
+ */
8
+ export declare class PieLabelProvider extends LabelProvider {
9
+ readonly type = ELabelProviderType.Pie;
10
+ /**
11
+ * The parent {@link SciChartPieSurface}. This will be set once {@link attachedToSurface} is called
12
+ */
13
+ protected parentSurface: SciChartPieSurface;
14
+ /**
15
+ *
16
+ */
17
+ constructor(options?: ILabelOptions);
18
+ getSegmentText(segment: IPieSegment, total: number): string;
19
+ /**
20
+ * Called when the {@link LabelProvider} is attached to an {@link SciChartPieSurface }
21
+ * @param pieSurface The SciPieSurface we are attached to.
22
+ */
23
+ attachedToSurface(pieSurface: SciChartPieSurface): void;
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ onBeginAxisDraw(): void;
28
+ protected invalidateParent(): void;
29
+ }
@@ -0,0 +1,77 @@
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
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.PieLabelProvider = void 0;
30
+ var LabelProviderType_1 = require("../../../../types/LabelProviderType");
31
+ var NumericFormat_1 = require("../../../../types/NumericFormat");
32
+ var number_1 = require("../../../../utils/number");
33
+ var SciChartPieSurface_1 = require("../../SciChartPieSurface/SciChartPieSurface");
34
+ var LabelProvider_1 = require("./LabelProvider");
35
+ /**
36
+ * @summary A Label Provider for use with Pie Charts to allow customizing of segment labels
37
+ */
38
+ var PieLabelProvider = /** @class */ (function (_super) {
39
+ __extends(PieLabelProvider, _super);
40
+ /**
41
+ *
42
+ */
43
+ function PieLabelProvider(options) {
44
+ var _a, _b;
45
+ var _this = _super.call(this, __assign({ labelFormat: (_a = options === null || options === void 0 ? void 0 : options.labelFormat) !== null && _a !== void 0 ? _a : NumericFormat_1.ENumericFormat.Decimal, labelPrecision: (_b = options === null || options === void 0 ? void 0 : options.labelPrecision) !== null && _b !== void 0 ? _b : 2 }, options)) || this;
46
+ _this.type = LabelProviderType_1.ELabelProviderType.Pie;
47
+ _this.formatLabelProperty = function (dataValue) {
48
+ return _this.applyFormat((0, number_1.formatNumber)(dataValue, _this.numericFormat, _this.precision)) +
49
+ (_this.parentSurface.valueMode === SciChartPieSurface_1.EPieValueMode.Percentage ? "%" : "");
50
+ };
51
+ return _this;
52
+ }
53
+ PieLabelProvider.prototype.getSegmentText = function (segment, total) {
54
+ var labelValue = this.parentSurface.valueMode === SciChartPieSurface_1.EPieValueMode.Percentage ? segment.getPercentage(total) : segment.value;
55
+ return this.formatLabel(labelValue);
56
+ };
57
+ /**
58
+ * Called when the {@link LabelProvider} is attached to an {@link SciChartPieSurface }
59
+ * @param pieSurface The SciPieSurface we are attached to.
60
+ */
61
+ PieLabelProvider.prototype.attachedToSurface = function (pieSurface) {
62
+ this.parentSurface = pieSurface;
63
+ };
64
+ /**
65
+ * @inheritDoc
66
+ */
67
+ PieLabelProvider.prototype.onBeginAxisDraw = function () {
68
+ // TODO: user can override here if they want
69
+ };
70
+ PieLabelProvider.prototype.invalidateParent = function () {
71
+ if (this.parentSurface && this.parentSurface.invalidateElement) {
72
+ this.parentSurface.invalidateElement();
73
+ }
74
+ };
75
+ return PieLabelProvider;
76
+ }(LabelProvider_1.LabelProvider));
77
+ exports.PieLabelProvider = PieLabelProvider;
@@ -1,6 +1,6 @@
1
1
  import { ELabelProviderType } from "../../../../types/LabelProviderType";
2
2
  import { ENumericFormat } from "../../../../types/NumericFormat";
3
- import { LabelProviderBase2D } from "./LabelProviderBase2D";
3
+ import { LabelProviderBase2D, ILabel2DOptions } from "./LabelProviderBase2D";
4
4
  /**
5
5
  * The {@link SmartDateLabelProvider} formats Axis Labels and Cursor / Tooltips for {@link NumericAxis} types
6
6
  */
@@ -9,7 +9,7 @@ export declare class SmartDateLabelProvider extends LabelProviderBase2D {
9
9
  /**
10
10
  * Creates an instance of {@link SmartDateLabelProvider}
11
11
  */
12
- constructor();
12
+ constructor(options?: ILabel2DOptions);
13
13
  /**
14
14
  * @inheritDoc
15
15
  */
@@ -14,6 +14,17 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
17
28
  Object.defineProperty(exports, "__esModule", { value: true });
18
29
  exports.SmartDateLabelProvider = void 0;
19
30
  var LabelProviderType_1 = require("../../../../types/LabelProviderType");
@@ -41,11 +52,17 @@ var SmartDateLabelProvider = /** @class */ (function (_super) {
41
52
  /**
42
53
  * Creates an instance of {@link SmartDateLabelProvider}
43
54
  */
44
- function SmartDateLabelProvider() {
45
- var _this = _super.call(this) || this;
55
+ function SmartDateLabelProvider(options) {
56
+ var _a, _b;
57
+ var _this = _super.call(this, __assign({ labelFormat: (_a = options === null || options === void 0 ? void 0 : options.labelFormat) !== null && _a !== void 0 ? _a : NumericFormat_1.ENumericFormat.Date_DDMMYYYY, cursorLabelFormat: (_b = options === null || options === void 0 ? void 0 : options.cursorLabelFormat) !== null && _b !== void 0 ? _b : NumericFormat_1.ENumericFormat.Date_DDMMYYYY }, options)) || this;
46
58
  _this.type = LabelProviderType_1.ELabelProviderType.SmartDate;
47
- _this.formatLabelProperty = function (dataValue) { return (0, number_1.formatNumber)(dataValue, NumericFormat_1.ENumericFormat.Date_DDMMYYYY, 0); };
48
- _this.formatCursorLabelProperty = _this.formatLabelProperty;
59
+ _this.formatLabelProperty = function (dataValue) {
60
+ return _this.applyFormat((0, number_1.formatNumber)(dataValue, _this.numericFormat, _this.precision));
61
+ };
62
+ _this.formatCursorLabelProperty = function (dataValue) {
63
+ var _a, _b;
64
+ return _this.applyFormat((0, number_1.formatNumber)(dataValue, (_a = _this.cursorNumericFormat) !== null && _a !== void 0 ? _a : _this.numericFormat, (_b = _this.cursorPrecision) !== null && _b !== void 0 ? _b : _this.precision));
65
+ };
49
66
  return _this;
50
67
  }
51
68
  /**
@@ -1,5 +1,5 @@
1
1
  import { Rect } from "../../../Core/Rect";
2
- import { ELabelPlacement } from "../../../types/LabelPlacement";
2
+ import { EHorizontalAlignment, ELabelPlacement, EVerticalAlignment } from "../../../types/LabelPlacement";
3
3
  import { IPen2D } from "../../Drawing/IPen2D";
4
4
  import { WebGlRenderContext2D } from "../../Drawing/WebGlRenderContext2D";
5
5
  import { AxisBase2D } from "../Axis/AxisBase2D";
@@ -8,7 +8,7 @@ export declare const drawModifiersAxisLabel: (currentAxis: AxisBase2D, renderCon
8
8
  /**
9
9
  * Function to draw Vertical or Horizontal Line annotations with labels
10
10
  */
11
- export declare const drawLineAnnotation: (currentAxis: AxisBase2D, renderContext: WebGlRenderContext2D, labelPlacement: ELabelPlacement, displayValue: string, x1Coord: number, x2Coord: number, y1Coord: number, y2Coord: number, textStyle: TTextStyle, fill: string, strokePen: IPen2D, viewRect: Rect, showLabel: boolean, opacity: number) => Rect;
11
+ export declare const drawLineAnnotation: (currentAxis: AxisBase2D, renderContext: WebGlRenderContext2D, labelPlacement: ELabelPlacement, displayValue: string, x1Coord: number, x2Coord: number, y1Coord: number, y2Coord: number, textStyle: TTextStyle, fill: string, strokePen: IPen2D, viewRect: Rect, showLabel: boolean, opacity: number, horizontalAlignment?: EHorizontalAlignment, verticalAlignment?: EVerticalAlignment) => Rect;
12
12
  export declare const drawAxisMarkerAnnotation: (currentAxis: AxisBase2D, renderContext: WebGlRenderContext2D, displayValue: string, markerCoordinate: number, x1Coord: number, y1Coord: number, textStyle: TTextStyle, fill: string, opacity: number, image: HTMLImageElement, imageWidth: number, imageHeight: number) => {
13
13
  xPosition: number;
14
14
  yPosition: number;
@@ -19,7 +19,7 @@ export declare const drawAxisMarkerAnnotation: (currentAxis: AxisBase2D, renderC
19
19
  * Calculates coordinates of the annotation label.
20
20
  * The coordinates are defined as an absolute position on the whole SciChartSurface.
21
21
  */
22
- export declare const getLabelCoordinates: (currentAxis: AxisBase2D, labelPlacement: ELabelPlacement, x1Coord: number, x2Coord: number, y1Coord: number, y2Coord: number, textureHeight: number, textureWidth: number) => {
22
+ export declare const getLabelCoordinates: (currentAxis: AxisBase2D, labelPlacement: ELabelPlacement, x1Coord: number, x2Coord: number, y1Coord: number, y2Coord: number, textureHeight: number, textureWidth: number, horizontalAlignment?: EHorizontalAlignment, verticalAlignment?: EVerticalAlignment) => {
23
23
  xPosition: number;
24
24
  yPosition: number;
25
25
  };
@@ -27,7 +27,7 @@ exports.drawModifiersAxisLabel = drawModifiersAxisLabel;
27
27
  /**
28
28
  * Function to draw Vertical or Horizontal Line annotations with labels
29
29
  */
30
- var drawLineAnnotation = function (currentAxis, renderContext, labelPlacement, displayValue, x1Coord, x2Coord, y1Coord, y2Coord, textStyle, fill, strokePen, viewRect, showLabel, opacity) {
30
+ var drawLineAnnotation = function (currentAxis, renderContext, labelPlacement, displayValue, x1Coord, x2Coord, y1Coord, y2Coord, textStyle, fill, strokePen, viewRect, showLabel, opacity, horizontalAlignment, verticalAlignment) {
31
31
  var nativeContext = renderContext.getNativeContext();
32
32
  var axisAlignment = currentAxis.axisAlignment;
33
33
  var displayVertically = (axisAlignment === AxisAlignment_1.EAxisAlignment.Top || axisAlignment === AxisAlignment_1.EAxisAlignment.Bottom) &&
@@ -41,17 +41,17 @@ var drawLineAnnotation = function (currentAxis, renderContext, labelPlacement, d
41
41
  var labelHeight = 0;
42
42
  var labelWidth = 0;
43
43
  var labelRect;
44
+ var _a = getLineCoordinates(x1Coord, y1Coord, x2Coord, y2Coord, labelHeight, labelWidth, labelPlacement, currentAxis), x1LineCoord = _a.x1LineCoord, y1LineCoord = _a.y1LineCoord, x2LineCoord = _a.x2LineCoord, y2LineCoord = _a.y2LineCoord;
45
+ renderContext.drawLine(x1LineCoord, y1LineCoord, x2LineCoord, y2LineCoord, strokePen, viewRect);
44
46
  if (showLabel) {
45
- var _a = currentAxis.axisRenderer.createAnnotationLabelTexture(text, labelTextStyle, labelBackgroundColor, displayVertically, displayMirrored, opacity), bitmapTexture = _a.bitmapTexture, textureHeight = _a.textureHeight, textureWidth = _a.textureWidth;
46
- var _b = (0, exports.getLabelCoordinates)(currentAxis, labelPlacement, x1Coord, x2Coord, y1Coord, y2Coord, textureHeight, textureWidth), xPosition = _b.xPosition, yPosition = _b.yPosition;
47
+ var _b = currentAxis.axisRenderer.createAnnotationLabelTexture(text, labelTextStyle, labelBackgroundColor, displayVertically, displayMirrored, opacity), bitmapTexture = _b.bitmapTexture, textureHeight = _b.textureHeight, textureWidth = _b.textureWidth;
48
+ var _c = (0, exports.getLabelCoordinates)(currentAxis, labelPlacement, x1Coord, x2Coord, y1Coord, y2Coord, textureHeight, textureWidth, horizontalAlignment, verticalAlignment), xPosition = _c.xPosition, yPosition = _c.yPosition;
47
49
  labelHeight = textureHeight;
48
50
  labelWidth = textureWidth;
49
51
  labelRect = new Rect_1.Rect(xPosition, yPosition, textureWidth, textureHeight);
50
52
  nativeContext.DrawTexture(bitmapTexture, Math.round(xPosition), Math.round(yPosition), textureWidth, textureHeight);
51
53
  bitmapTexture.delete();
52
54
  }
53
- var _c = getLineCoordinates(x1Coord, y1Coord, x2Coord, y2Coord, labelHeight, labelWidth, labelPlacement, currentAxis), x1LineCoord = _c.x1LineCoord, y1LineCoord = _c.y1LineCoord, x2LineCoord = _c.x2LineCoord, y2LineCoord = _c.y2LineCoord;
54
- renderContext.drawLine(x1LineCoord, y1LineCoord, x2LineCoord, y2LineCoord, strokePen, viewRect);
55
55
  return labelRect;
56
56
  };
57
57
  exports.drawLineAnnotation = drawLineAnnotation;
@@ -74,7 +74,7 @@ exports.drawAxisMarkerAnnotation = drawAxisMarkerAnnotation;
74
74
  * Calculates coordinates of the annotation label.
75
75
  * The coordinates are defined as an absolute position on the whole SciChartSurface.
76
76
  */
77
- var getLabelCoordinates = function (currentAxis, labelPlacement, x1Coord, x2Coord, y1Coord, y2Coord, textureHeight, textureWidth) {
77
+ var getLabelCoordinates = function (currentAxis, labelPlacement, x1Coord, x2Coord, y1Coord, y2Coord, textureHeight, textureWidth, horizontalAlignment, verticalAlignment) {
78
78
  var axisAlignment = currentAxis.axisAlignment, seriesViewRect = currentAxis.parentSurface.seriesViewRect, axisViewRect = currentAxis.viewRect;
79
79
  var xPosition = 0;
80
80
  var yPosition = 0;
@@ -166,26 +166,46 @@ var getLabelCoordinates = function (currentAxis, labelPlacement, x1Coord, x2Coor
166
166
  switch (axisAlignment) {
167
167
  case AxisAlignment_1.EAxisAlignment.Right:
168
168
  centerVertically();
169
- xPosition =
170
- axisViewRect.width < textureWidth
171
- ? (xPosition = axisViewRect.right - textureWidth)
172
- : axisViewRect.left;
169
+ if (horizontalAlignment === LabelPlacement_1.EHorizontalAlignment.Left) {
170
+ xPosition = seriesViewRect.left;
171
+ }
172
+ else {
173
+ xPosition =
174
+ axisViewRect.width < textureWidth
175
+ ? (xPosition = axisViewRect.right - textureWidth)
176
+ : axisViewRect.left;
177
+ }
173
178
  break;
174
179
  case AxisAlignment_1.EAxisAlignment.Left:
175
180
  centerVertically();
176
- xPosition =
177
- axisViewRect.width < textureWidth
178
- ? (xPosition = axisViewRect.left)
179
- : axisViewRect.right - textureWidth;
181
+ if (horizontalAlignment === LabelPlacement_1.EHorizontalAlignment.Right) {
182
+ xPosition = seriesViewRect.left + seriesViewRect.width - textureWidth;
183
+ }
184
+ else {
185
+ xPosition =
186
+ axisViewRect.width < textureWidth
187
+ ? (xPosition = axisViewRect.left)
188
+ : axisViewRect.right - textureWidth;
189
+ }
180
190
  break;
181
191
  case AxisAlignment_1.EAxisAlignment.Top:
182
- yPosition =
183
- axisViewRect.height < textureHeight ? axisViewRect.top : axisViewRect.bottom - textureHeight;
192
+ if (verticalAlignment === LabelPlacement_1.EVerticalAlignment.Bottom) {
193
+ yPosition = seriesViewRect.top + seriesViewRect.height - textureHeight;
194
+ }
195
+ else {
196
+ yPosition =
197
+ axisViewRect.height < textureHeight ? axisViewRect.top : axisViewRect.bottom - textureHeight;
198
+ }
184
199
  centerHorizontally();
185
200
  break;
186
201
  case AxisAlignment_1.EAxisAlignment.Bottom:
187
- yPosition =
188
- axisViewRect.height < textureHeight ? axisViewRect.bottom - textureHeight : axisViewRect.top;
202
+ if (verticalAlignment === LabelPlacement_1.EVerticalAlignment.Top) {
203
+ yPosition = seriesViewRect.top;
204
+ }
205
+ else {
206
+ yPosition =
207
+ axisViewRect.height < textureHeight ? axisViewRect.bottom - textureHeight : axisViewRect.top;
208
+ }
189
209
  centerHorizontally();
190
210
  break;
191
211
  }
@@ -16,6 +16,11 @@ export interface I2DSurfaceOptions extends ISurfaceOptionsBase {
16
16
  * However if height of the div is not provided it will use width/height aspect ratio to calculate the height. The default ratio is 3/2.
17
17
  */
18
18
  heightAspect?: number;
19
+ /**
20
+ * Optional - the option of disabling / enabling scaling of the {@link SciChartSurface}.
21
+ * If false - the {@link SciChartSurface} will take the height and width of parent div without scaling.
22
+ */
23
+ disableAspect?: boolean;
19
24
  /**
20
25
  * Optional - Prove a layoutManager to customise the axis layout. Use CentralAxesLayoutManager for an easy way to configure central axes.
21
26
  */
@@ -32,4 +37,5 @@ export interface I2DSurfaceOptions extends ISurfaceOptionsBase {
32
37
  * Optional - Properties of the canvas border
33
38
  */
34
39
  canvasBorder?: TBorder;
40
+ drawSeriesBehindAxis?: boolean;
35
41
  }
@@ -5,6 +5,10 @@ import { ELegendType, SciChartLegendBase } from "./SciChartLegendBase";
5
5
  */
6
6
  export declare class SciChartLegend extends SciChartLegendBase {
7
7
  readonly type = ELegendType.SciChartLegend;
8
+ /**
9
+ * Checked changed callback - when a legend item row checkbox is checked or unchecked. Set by parent {@link LegendModifier}
10
+ */
11
+ legendItemCheckedChangedCallback: (series: IRenderableSeries, isChecked: boolean) => void;
8
12
  private renderableSeriesArray;
9
13
  private showCheckboxesProperty;
10
14
  private showSeriesMarkersProperty;
@@ -91,9 +91,15 @@ var SciChartLegend = /** @class */ (function (_super) {
91
91
  * adds event listeners to a specific {@link IRenderableSeries} series
92
92
  */
93
93
  SciChartLegend.prototype.addEventListenerToSeries = function (rs) {
94
+ var _this = this;
94
95
  var el = this.getParentDiv().querySelector("[id='".concat(rs.id, "']"));
95
96
  if (el) {
96
- var onChangeEventListener_1 = function (e) { return (rs.isVisible = e.target.checked); };
97
+ var onChangeEventListener_1 = function (e) {
98
+ rs.isVisible = e.target.checked;
99
+ if (_this.legendItemCheckedChangedCallback) {
100
+ _this.legendItemCheckedChangedCallback(rs, rs.isVisible);
101
+ }
102
+ };
97
103
  el.addEventListener("change", onChangeEventListener_1);
98
104
  var eventSubscriptionItem = {
99
105
  element: el,
@@ -31,6 +31,7 @@ import { RolloverModifierRenderableSeriesProps } from "./RolloverModifier/Rollov
31
31
  import { SeriesHoveredArgs } from "./SeriesHoveredArgs";
32
32
  import { SeriesSelectedArgs } from "./SeriesSelectedArgs";
33
33
  import { ShaderEffect } from "./ShaderEffect";
34
+ import { SeriesVisibleChangedArgs } from "./SeriesVisibleChangedArgs";
34
35
  /**
35
36
  * @summary Defines the base class to a Render Series (or Chart Type) in SciChart's High Performance Real-time
36
37
  * {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}
@@ -47,23 +48,21 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
47
48
  /** @inheritDoc */
48
49
  readonly id: string;
49
50
  /** @inheritDoc */
50
- readonly isStacked = false;
51
+ readonly isStacked: boolean;
51
52
  /** @inheritDoc */
52
53
  readonly rolloverModifierProps: RolloverModifierRenderableSeriesProps;
53
54
  /** @inheritDoc */
54
55
  readonly rolloverModifierProps1: RolloverModifierRenderableSeriesProps;
55
56
  /** @inheritDoc */
56
- parentSurface: SciChartSurface;
57
- /** @inheritDoc */
58
57
  invalidateParentCallback: () => void;
59
58
  /** @inheritDoc */
60
- drawingProviders: ISeriesDrawingProvider[];
61
- /** @inheritDoc */
62
59
  hitTestProvider: IHitTestProvider;
63
60
  /** @inheritDoc */
64
61
  selected: EventHandler<SeriesSelectedArgs>;
65
62
  /** @inheritDoc */
66
63
  hovered: EventHandler<SeriesHoveredArgs>;
64
+ /** @inheritDoc */
65
+ isVisibleChanged: EventHandler<SeriesVisibleChangedArgs>;
67
66
  protected webAssemblyContext: TSciChart;
68
67
  protected dataSeriesProperty: IDataSeries;
69
68
  protected animationFSM: SeriesAnimationFiniteStateMachine;
@@ -72,11 +71,14 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
72
71
  protected typeMap: Map<string, string>;
73
72
  protected resamplerHelper: ExtremeResamplerHelper;
74
73
  protected pointSeries: XyPointSeriesResampled;
74
+ protected currentRenderPassData: RenderPassData;
75
+ protected opacityProperty: number;
76
+ private parentSurfaceProperty;
77
+ private drawingProvidersProperty;
75
78
  private xAxisIdProperty;
76
79
  private yAxisIdProperty;
77
80
  private strokeThicknessProperty;
78
81
  private strokeProperty;
79
- private opacityProperty;
80
82
  private pointMarkerProperty;
81
83
  private drawNaNAsProperty;
82
84
  private isVisibleProperty;
@@ -84,7 +86,6 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
84
86
  private isDigitalLineProperty;
85
87
  private isSelectedProperty;
86
88
  private isHoveredProperty;
87
- private currentRenderPassData;
88
89
  private resamplingModeProperty;
89
90
  private resamplingPrecisionProperty;
90
91
  /**
@@ -97,6 +98,14 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
97
98
  /** @inheritDoc */
98
99
  applyTheme(themeProvider: IThemeProvider): void;
99
100
  /** @inheritDoc */
101
+ get parentSurface(): SciChartSurface;
102
+ /** @inheritDoc */
103
+ set parentSurface(value: SciChartSurface);
104
+ /** @inheritDoc */
105
+ get drawingProviders(): ISeriesDrawingProvider[];
106
+ /** @inheritDoc */
107
+ set drawingProviders(value: ISeriesDrawingProvider[]);
108
+ /** @inheritDoc */
100
109
  get isSelected(): boolean;
101
110
  /** @inheritDoc */
102
111
  set isSelected(isSelected: boolean);
@@ -30,6 +30,7 @@ var constants_1 = require("./constants");
30
30
  var RolloverModifierRenderableSeriesProps_1 = require("./RolloverModifier/RolloverModifierRenderableSeriesProps");
31
31
  var SeriesHoveredArgs_1 = require("./SeriesHoveredArgs");
32
32
  var SeriesSelectedArgs_1 = require("./SeriesSelectedArgs");
33
+ var SeriesVisibleChangedArgs_1 = require("./SeriesVisibleChangedArgs");
33
34
  /**
34
35
  * @summary Defines the base class to a Render Series (or Chart Type) in SciChart's High Performance Real-time
35
36
  * {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}
@@ -50,31 +51,31 @@ var BaseRenderableSeries = /** @class */ (function () {
50
51
  function BaseRenderableSeries(webAssemblyContext, options) {
51
52
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
52
53
  /** @inheritDoc */
53
- this.isStacked = false;
54
- /** @inheritDoc */
55
54
  this.rolloverModifierProps = new RolloverModifierRenderableSeriesProps_1.RolloverModifierRenderableSeriesProps(this);
56
55
  /** @inheritDoc */
57
56
  this.rolloverModifierProps1 = new RolloverModifierRenderableSeriesProps_1.RolloverModifierRenderableSeriesProps(this, true);
58
57
  /** @inheritDoc */
59
- this.drawingProviders = [];
60
- /** @inheritDoc */
61
58
  this.selected = new EventHandler_1.EventHandler();
62
59
  /** @inheritDoc */
63
60
  this.hovered = new EventHandler_1.EventHandler();
61
+ /** @inheritDoc */
62
+ this.isVisibleChanged = new EventHandler_1.EventHandler();
64
63
  this.animationQueue = [];
65
64
  this.paletteProviderProperty = IPaletteProvider_1.DefaultPaletteProvider.createEmpty();
66
- // used to track if registered types were used for function propertes, so they can be serialized
65
+ // used to track if registered types were used for function properties, so they can be serialized
67
66
  this.typeMap = new Map();
67
+ this.opacityProperty = 1;
68
+ this.drawingProvidersProperty = [];
68
69
  this.xAxisIdProperty = AxisCore_1.AxisCore.DEFAULT_AXIS_ID;
69
70
  this.yAxisIdProperty = AxisCore_1.AxisCore.DEFAULT_AXIS_ID;
70
71
  this.strokeThicknessProperty = 2;
71
72
  this.strokeProperty = SciChartSurfaceBase_1.SciChartSurfaceBase.DEFAULT_THEME.lineSeriesColor;
72
- this.opacityProperty = 1;
73
73
  this.drawNaNAsProperty = WebGlRenderContext2D_1.ELineDrawMode.DiscontinuousLine;
74
74
  this.isVisibleProperty = true;
75
75
  this.isDigitalLineProperty = false;
76
76
  this.resamplingModeProperty = ResamplingMode_1.EResamplingMode.Auto;
77
77
  this.resamplingPrecisionProperty = 0;
78
+ this.isStacked = false;
78
79
  this.webAssemblyContext = webAssemblyContext;
79
80
  this.id = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : (0, guid_1.generateGuid)();
80
81
  // It is very important to add bind(this) first line in constructor,
@@ -113,7 +114,7 @@ var BaseRenderableSeries = /** @class */ (function () {
113
114
  options.effect = (0, classFactory_1.createType)(BaseType_1.EBaseType.ShaderEffect, options.effect.type, webAssemblyContext, options.effect.options);
114
115
  }
115
116
  }
116
- this.effect = options === null || options === void 0 ? void 0 : options.effect;
117
+ this.effectProperty = options === null || options === void 0 ? void 0 : options.effect;
117
118
  if (options === null || options === void 0 ? void 0 : options.paletteProvider) {
118
119
  if (!("onAttached" in options.paletteProvider)) {
119
120
  if (options.paletteProvider.type === PaletteProviderType_1.EPaletteProviderType.Custom) {
@@ -130,6 +131,21 @@ var BaseRenderableSeries = /** @class */ (function () {
130
131
  this.hitTestProvider = this.newHitTestProvider();
131
132
  this.isSelected = (_q = options === null || options === void 0 ? void 0 : options.isSelected) !== null && _q !== void 0 ? _q : false;
132
133
  this.isHovered = (_r = options === null || options === void 0 ? void 0 : options.isHovered) !== null && _r !== void 0 ? _r : false;
134
+ if (options === null || options === void 0 ? void 0 : options.onIsVisibleChanged) {
135
+ if (typeof options.onIsVisibleChanged === "string") {
136
+ this.typeMap.set("onIsVisibleChanged", options.onIsVisibleChanged);
137
+ var visibleChanged_1 = (0, classFactory_1.getFunction)(BaseType_1.EBaseType.OptionFunction, options.onIsVisibleChanged);
138
+ this.isVisibleChanged.subscribe(function (args) {
139
+ return visibleChanged_1(args.sourceSeries, args.isVisible);
140
+ });
141
+ }
142
+ else {
143
+ var onIsVisibleChangedCallback_1 = options === null || options === void 0 ? void 0 : options.onIsVisibleChanged;
144
+ this.isVisibleChanged.subscribe(function (args) {
145
+ return onIsVisibleChangedCallback_1(args.sourceSeries, args.isVisible);
146
+ });
147
+ }
148
+ }
133
149
  if (options === null || options === void 0 ? void 0 : options.onSelectedChanged) {
134
150
  if (typeof options.onSelectedChanged === "string") {
135
151
  this.typeMap.set("onSelectedChanged", options.onSelectedChanged);
@@ -182,6 +198,32 @@ var BaseRenderableSeries = /** @class */ (function () {
182
198
  this.rolloverModifierProps.markerColor = themeProvider.textAnnotationBackground;
183
199
  }
184
200
  };
201
+ Object.defineProperty(BaseRenderableSeries.prototype, "parentSurface", {
202
+ /** @inheritDoc */
203
+ get: function () {
204
+ return this.parentSurfaceProperty;
205
+ },
206
+ /** @inheritDoc */
207
+ set: function (value) {
208
+ this.parentSurfaceProperty = value;
209
+ this.notifyPropertyChanged(constants_1.PROPERTY.PARENT_SURFACE);
210
+ },
211
+ enumerable: false,
212
+ configurable: true
213
+ });
214
+ Object.defineProperty(BaseRenderableSeries.prototype, "drawingProviders", {
215
+ /** @inheritDoc */
216
+ get: function () {
217
+ return this.drawingProvidersProperty;
218
+ },
219
+ /** @inheritDoc */
220
+ set: function (value) {
221
+ this.drawingProvidersProperty = value;
222
+ this.notifyPropertyChanged(constants_1.PROPERTY.DRAWING_PROVIDERS);
223
+ },
224
+ enumerable: false,
225
+ configurable: true
226
+ });
185
227
  Object.defineProperty(BaseRenderableSeries.prototype, "isSelected", {
186
228
  /** @inheritDoc */
187
229
  get: function () {
@@ -248,8 +290,12 @@ var BaseRenderableSeries = /** @class */ (function () {
248
290
  },
249
291
  /** @inheritDoc */
250
292
  set: function (isVisible) {
251
- this.isVisibleProperty = isVisible;
252
- this.notifyPropertyChanged(constants_1.PROPERTY.IS_VISIBLE);
293
+ var _a;
294
+ if (this.valueChanged(this.isVisibleProperty, isVisible)) {
295
+ this.isVisibleProperty = isVisible;
296
+ (_a = this.isVisibleChanged) === null || _a === void 0 ? void 0 : _a.raiseEvent(new SeriesVisibleChangedArgs_1.SeriesVisibleChangedArgs(this, isVisible));
297
+ this.notifyPropertyChanged(constants_1.PROPERTY.IS_VISIBLE);
298
+ }
253
299
  },
254
300
  enumerable: false,
255
301
  configurable: true
@@ -761,6 +807,7 @@ var BaseRenderableSeries = /** @class */ (function () {
761
807
  return (seriesTypeSupportsResampling &&
762
808
  SciChartDefaults_1.SciChartDefaults.enableResampling &&
763
809
  this.enableDrawingOptimisations &&
810
+ !this.isStacked &&
764
811
  this.dataSeries &&
765
812
  this.dataSeries.count() > 0 &&
766
813
  this.dataSeries.dataDistributionCalculator.isSortedAscending);