scichart 3.2.434 → 3.2.446

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 (31) hide show
  1. package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +1 -1
  2. package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +1 -1
  3. package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +15 -1
  4. package/Charting/Visuals/Legend/ManualLegend.d.ts +1 -0
  5. package/Charting/Visuals/Legend/ManualLegend.js +12 -0
  6. package/Charting/Visuals/Legend/SciChartLegendBase.js +1 -9
  7. package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +8 -1
  8. package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +6 -10
  9. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +11 -0
  10. package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +26 -10
  11. package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +3 -8
  12. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +5 -10
  13. package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +5 -10
  14. package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +5 -9
  15. package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.js +3 -8
  16. package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +5 -9
  17. package/Charting/Visuals/SciChartSurface.js +5 -2
  18. package/Charting/Visuals/licenseManager2D.js +8 -3
  19. package/Charting3D/Visuals/Annotations/TooltipSvgAnnotation3D.js +1 -1
  20. package/Core/BuildStamp.d.ts +1 -1
  21. package/Core/BuildStamp.js +7 -3
  22. package/Core/OneTimePerformanceWarning.d.ts +1 -1
  23. package/Core/OneTimePerformanceWarning.js +2 -1
  24. package/_wasm/scichart.browser.js +1 -1
  25. package/_wasm/scichart2d.wasm +0 -0
  26. package/_wasm/scichart3d.wasm +0 -0
  27. package/constants/performanceWarnings.d.ts +1 -0
  28. package/constants/performanceWarnings.js +2 -1
  29. package/index.dev.js +118 -94
  30. package/index.min.js +1 -1
  31. package/package.json +1 -1
@@ -49,7 +49,7 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
49
49
  _this.cursorModifier = options.cursorModifier;
50
50
  _this.placementDivId = (_j = options === null || options === void 0 ? void 0 : options.placementDivId) !== null && _j !== void 0 ? _j : _this.placementDivId;
51
51
  if (_this.placementDivId) {
52
- var svgRoot = document.getElementById(_this.placementDivId);
52
+ var svgRoot = document.querySelector("[id='".concat(_this.placementDivId, "']"));
53
53
  _this.svgDivRoot = svgRoot;
54
54
  }
55
55
  return _this;
@@ -150,7 +150,7 @@ var RolloverTooltipSvgAnnotation = /** @class */ (function (_super) {
150
150
  else {
151
151
  svgString = this.generateSvgString();
152
152
  }
153
- this.svgDivRoot = document.getElementById(this.placementDivId);
153
+ this.svgDivRoot = document.querySelector("[id='".concat(this.placementDivId, "']"));
154
154
  var svgNode = annotationHelpers_1.annotationHelpers.createSvg(svgString, this.svgDivRoot);
155
155
  this.setSvg(svgNode);
156
156
  };
@@ -16,6 +16,7 @@ var __extends = (this && this.__extends) || (function () {
16
16
  })();
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.DateTimeDeltaCalculator = void 0;
19
+ var performanceWarnings_1 = require("../../../../constants/performanceWarnings");
19
20
  var NumberRange_1 = require("../../../../Core/NumberRange");
20
21
  var NumericDeltaCalculator_1 = require("./NumericDeltaCalculator");
21
22
  /**
@@ -42,10 +43,12 @@ var DateTimeDeltaCalculator = /** @class */ (function (_super) {
42
43
  15 * 60,
43
44
  30 * 60,
44
45
  60 * 60,
46
+ 2 * 60 * 60,
45
47
  3 * 60 * 60,
46
48
  6 * 60 * 60,
47
49
  12 * 60 * 60,
48
50
  24 * 60 * 60,
51
+ 2 * 24 * 60 * 60,
49
52
  3 * 24 * 60 * 60,
50
53
  5 * 24 * 60 * 60,
51
54
  10 * 24 * 60 * 60,
@@ -59,9 +62,10 @@ var DateTimeDeltaCalculator = /** @class */ (function (_super) {
59
62
  365.25 * 24 * 60 * 60
60
63
  // Years also need special handling
61
64
  ];
62
- _this.currIndex = 12;
65
+ _this.currIndex = 1;
63
66
  _this.possibleDeltasProperty = (_a = options === null || options === void 0 ? void 0 : options.possibleDeltas) !== null && _a !== void 0 ? _a : _this.possibleDeltasProperty;
64
67
  _this.minTicks = options === null || options === void 0 ? void 0 : options.minTicks;
68
+ _this.currIndex = Math.floor(_this.possibleDeltas.length / 2);
65
69
  return _this;
66
70
  }
67
71
  Object.defineProperty(DateTimeDeltaCalculator.prototype, "possibleDeltas", {
@@ -74,6 +78,7 @@ var DateTimeDeltaCalculator = /** @class */ (function (_super) {
74
78
  set: function (value) {
75
79
  if (this.possibleDeltasProperty !== value) {
76
80
  this.possibleDeltasProperty = value;
81
+ this.currIndex = Math.floor(this.possibleDeltas.length / 2);
77
82
  }
78
83
  },
79
84
  enumerable: false,
@@ -98,9 +103,18 @@ var DateTimeDeltaCalculator = /** @class */ (function (_super) {
98
103
  var _this = this;
99
104
  var diff = max - min;
100
105
  this.prevIndex = undefined;
106
+ if (this.currIndex >= this.possibleDeltas.length) {
107
+ this.currIndex = Math.floor(this.possibleDeltas.length / 2);
108
+ }
109
+ var tries = 0;
101
110
  var calculateDelta = function (index) {
102
111
  var _a, _b;
103
112
  var delta = _this.possibleDeltasProperty[index];
113
+ tries++;
114
+ if (tries > _this.possibleDeltas.length + 1) {
115
+ performanceWarnings_1.performanceWarnings.dateTimeDeltaCalculatorBadDelta.warn();
116
+ return delta;
117
+ }
104
118
  var ticksCount = Math.floor(diff / delta);
105
119
  if (ticksCount < ((_a = _this.minTicks) !== null && _a !== void 0 ? _a : maxTicks / 3) && index === 0 && index !== _this.prevIndex) {
106
120
  if (!_this.prevIndex)
@@ -48,6 +48,7 @@ export declare class ManualLegend extends SciChartLegendBase {
48
48
  * Gets or sets the items to be displayed in the legend
49
49
  */
50
50
  set items(value: TLegendItem[]);
51
+ attachTo(sciChartSurface: ISciChartSurfaceBase): void;
51
52
  applyTheme(): void;
52
53
  protected getInnerHTML(): string;
53
54
  protected addEventListeners(): void;
@@ -88,6 +88,18 @@ var ManualLegend = /** @class */ (function (_super) {
88
88
  enumerable: false,
89
89
  configurable: true
90
90
  });
91
+ ManualLegend.prototype.attachTo = function (sciChartSurface) {
92
+ var _this = this;
93
+ _super.prototype.attachTo.call(this, sciChartSurface);
94
+ sciChartSurface.addDeletable({
95
+ delete: function () {
96
+ _this.delete();
97
+ _this.setRootDiv(undefined);
98
+ _this.setInvalidateParentSurface(undefined);
99
+ _this.setParentSurface(undefined);
100
+ }
101
+ });
102
+ };
91
103
  ManualLegend.prototype.applyTheme = function () { };
92
104
  ManualLegend.prototype.getInnerHTML = function () {
93
105
  var _a, _b;
@@ -115,14 +115,6 @@ var SciChartLegendBase = /** @class */ (function (_super) {
115
115
  sciChartSurface.rendered.subscribe(function () {
116
116
  _this.update();
117
117
  });
118
- sciChartSurface.addDeletable({
119
- delete: function () {
120
- _this.delete();
121
- _this.setRootDiv(undefined);
122
- _this.setInvalidateParentSurface(undefined);
123
- _this.setParentSurface(undefined);
124
- }
125
- });
126
118
  };
127
119
  SciChartLegendBase.prototype.detach = function () {
128
120
  this.setRootDiv(undefined);
@@ -344,7 +336,7 @@ var SciChartLegendBase = /** @class */ (function (_super) {
344
336
  SciChartLegendBase.prototype.getParentDiv = function () {
345
337
  if (this.placementDivId) {
346
338
  return typeof this.placementDivId === "string"
347
- ? document.getElementById(this.placementDivId)
339
+ ? document.querySelector("[id='".concat(this.placementDivId, "']"))
348
340
  : this.placementDivId;
349
341
  }
350
342
  return this.rootDiv;
@@ -193,6 +193,7 @@ var BaseBandRenderableSeries = /** @class */ (function (_super) {
193
193
  else {
194
194
  this.pointSeries.xRange = rp.xVisibleRange;
195
195
  }
196
+ console.log(rp.resamplingMode);
196
197
  var ps = this.pointSeries;
197
198
  var ds = this.dataSeries;
198
199
  var xValues = ds.getNativeXValues();
@@ -201,6 +202,7 @@ var BaseBandRenderableSeries = /** @class */ (function (_super) {
201
202
  var result = this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext, rp, xValues, yValues, this.xyyTempPointSeries.intIndexes, undefined, this.xyyTempPointSeries.xValues, this.xyyTempPointSeries.yValues, false);
202
203
  this.pointSeries.fifoStartIndex = result.OutputSplitIndex;
203
204
  var xySize = this.xyyTempPointSeries.intIndexes.size();
205
+ console.log(this.xyyTempPointSeries.xValues.size(), xySize);
204
206
  this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext, rp, xValues, y1Values, this.xyyTempPointSeries.intIndexes, undefined, this.xyyTempPointSeries.xValues, this.xyyTempPointSeries.y1Values);
205
207
  // Because intIndexes vector is not cleared indexes for rpLow are appended at the end of rpHigh indexes
206
208
  var xy1Size = this.xyyTempPointSeries.intIndexes.size() - xySize;
@@ -208,7 +210,12 @@ var BaseBandRenderableSeries = /** @class */ (function (_super) {
208
210
  var mergedSize = this.resamplerHelper.mergeIndexes(this.xyyTempPointSeries.intIndexes, xySize, xy1Size, ps.intIndexes);
209
211
  // Clear the intIndexes as long as we do not need them any more
210
212
  this.xyyTempPointSeries.intIndexes.clear();
211
- ps.indexes.resizeFast(mergedSize + 1);
213
+ if (rp.dataIsFifo) {
214
+ ps.indexes.resizeFast(mergedSize);
215
+ }
216
+ else {
217
+ ps.indexes.resizeFast(mergedSize + 1);
218
+ }
212
219
  // Get values by indexes for Y and Y1 values
213
220
  this.resamplerHelper.copyValuesByIndexes(ps.intIndexes, xValues, yValues, y1Values, mergedSize, rp.isCategoryAxis, this.dataSeries.fifoSweeping, ps.indexes, ps.xValues, ps.yValues, ps.y1Values);
214
221
  // This is now done in the copy step above
@@ -80,7 +80,7 @@ var BandSeriesDrawingProvider = /** @class */ (function (_super) {
80
80
  * @inheritDoc
81
81
  */
82
82
  BandSeriesDrawingProvider.prototype.draw = function (renderContext, renderPassData) {
83
- var _a, _b;
83
+ var _a;
84
84
  var pointSeries = renderPassData.pointSeries;
85
85
  var containsNaN = this.parentSeries.dataSeries.dataDistributionCalculator.containsNaN;
86
86
  this.args.Reset();
@@ -110,7 +110,7 @@ var BandSeriesDrawingProvider = /** @class */ (function (_super) {
110
110
  }
111
111
  var isCategoryAxis = renderPassData.xCoordinateCalculator.isCategoryCoordinateCalculator;
112
112
  var xValues = pointSeries.xValues;
113
- var _c = this.parentSeries.dataSeries, fifoCapacity = _c.fifoCapacity, fifoSweeping = _c.fifoSweeping, fifoSweepingGap = _c.fifoSweepingGap;
113
+ var _b = this.parentSeries.dataSeries, fifoCapacity = _b.fifoCapacity, fifoSweeping = _b.fifoSweeping, fifoSweepingGap = _b.fifoSweepingGap;
114
114
  var fifoStartIndex = pointSeries.fifoStartIndex;
115
115
  var xDrawValues = isCategoryAxis ? pointSeries.indexes : xValues;
116
116
  var yDrawValues = this.ySelector(pointSeries);
@@ -125,19 +125,15 @@ var BandSeriesDrawingProvider = /** @class */ (function (_super) {
125
125
  yDrawValues = splineBandSeries.ySplineValues;
126
126
  y1DrawValues = splineBandSeries.y1SplineValues;
127
127
  }
128
- if (!isSplineBandSeries && !pointSeries.resampled && ((_a = renderPassData.indexRange) === null || _a === void 0 ? void 0 : _a.diff) > 0) {
129
- this.args.count = Math.min(renderPassData.indexRange.diff + 1, yDrawValues.size());
130
- this.args.startIndex = renderPassData.indexRange.min;
131
- }
132
- else {
133
- this.args.count = yDrawValues.size();
134
- }
128
+ var _c = this.getStartAndCount(isSplineBandSeries ? undefined : renderPassData, xDrawValues), startIndex = _c.startIndex, count = _c.count;
129
+ this.args.count = count;
130
+ this.args.startIndex = startIndex;
135
131
  if (fifoCapacity > 0 && fifoSweeping && fifoCapacity === this.parentSeries.dataSeries.count()) {
136
132
  this.args.count = fifoStartIndex;
137
133
  }
138
134
  // Paletting per point
139
135
  _super.prototype.applyStrokeFillPaletting.call(this, undefined, undefined, undefined, undefined, this.parentSeries.opacity, true);
140
- var paletteTexture = (_b = this.palettingState.paletteTextureCache) === null || _b === void 0 ? void 0 : _b.value;
136
+ var paletteTexture = (_a = this.palettingState.paletteTextureCache) === null || _a === void 0 ? void 0 : _a.value;
141
137
  if (paletteTexture) {
142
138
  this.args.SetPalette(paletteTexture);
143
139
  }
@@ -60,6 +60,17 @@ export declare abstract class BaseSeriesDrawingProvider<T extends IRenderableSer
60
60
  * @param parentSeries the parent {@link IRenderableSeries | Renderable Series} which this drawing provider is attached to
61
61
  */
62
62
  protected constructor(webAssemblyContext: TSciChart, parentSeries: T, ySelector?: (ps: IPointSeries) => SCRTDoubleVector, xSelector?: (ps: IPointSeries) => SCRTDoubleVector);
63
+ /**
64
+ * Returns the startIndex and count to be passed to the native drawing provider.
65
+ * If renderPassData exists and contains an indexRange, this will be used, otherwise the full size of the xValues will be used
66
+ * @param renderPassData
67
+ * @param xValues
68
+ * @returns
69
+ */
70
+ getStartAndCount(renderPassData: RenderPassData, xValues: SCRTDoubleVector): {
71
+ startIndex: number;
72
+ count: number;
73
+ };
63
74
  /**
64
75
  * Helper function to apply color-paletting to a {@link UIntVector} - where each element in the vector
65
76
  * is an ARGB color that defines stroke of the series
@@ -59,6 +59,27 @@ var BaseSeriesDrawingProvider = /** @class */ (function (_super) {
59
59
  (_a = _this.parentDataSeries) === null || _a === void 0 ? void 0 : _a.dataChanged.subscribe(_this.seriesHasDataChanges);
60
60
  return _this;
61
61
  }
62
+ /**
63
+ * Returns the startIndex and count to be passed to the native drawing provider.
64
+ * If renderPassData exists and contains an indexRange, this will be used, otherwise the full size of the xValues will be used
65
+ * @param renderPassData
66
+ * @param xValues
67
+ * @returns
68
+ */
69
+ BaseSeriesDrawingProvider.prototype.getStartAndCount = function (renderPassData, xValues) {
70
+ var _a;
71
+ var pointSeries = renderPassData === null || renderPassData === void 0 ? void 0 : renderPassData.pointSeries;
72
+ var xCount = xValues.size();
73
+ var count = Math.min(pointSeries ? pointSeries.indexes.size() : xCount, xCount);
74
+ var startIndex = 0;
75
+ if (!(pointSeries === null || pointSeries === void 0 ? void 0 : pointSeries.resampled) && ((_a = renderPassData === null || renderPassData === void 0 ? void 0 : renderPassData.indexRange) === null || _a === void 0 ? void 0 : _a.diff) > 0) {
76
+ if (renderPassData.indexRange.diff + 1 < count) {
77
+ startIndex = renderPassData.indexRange.min;
78
+ }
79
+ count = Math.min(renderPassData.indexRange.diff + 1, count);
80
+ }
81
+ return { startIndex: startIndex, count: count };
82
+ };
62
83
  /**
63
84
  * Helper function to apply color-paletting to a {@link UIntVector} - where each element in the vector
64
85
  * is an ARGB color that defines stroke of the series
@@ -66,7 +87,7 @@ var BaseSeriesDrawingProvider = /** @class */ (function (_super) {
66
87
  * @returns the new {@link UIntVector} with ARGB colors
67
88
  */
68
89
  BaseSeriesDrawingProvider.prototype.applyStrokePaletting = function (strokePen) {
69
- var _a, _b, _c, _d;
90
+ var _a, _b, _c;
70
91
  if (this.parentSeries.hasStrokePaletteProvider()) {
71
92
  var strokeColorArgb = (0, colorUtil_1.uintArgbColorMultiplyOpacity)((0, parseColor_1.parseColorToUIntArgb)(this.parentSeries.stroke), this.parentSeries.opacity);
72
93
  if (isNaN(strokeColorArgb)) {
@@ -80,22 +101,17 @@ var BaseSeriesDrawingProvider = /** @class */ (function (_super) {
80
101
  var pointSeries = renderPassData === null || renderPassData === void 0 ? void 0 : renderPassData.pointSeries;
81
102
  var xValues = (_a = (pointSeries ? this.xSelector(pointSeries) : undefined)) !== null && _a !== void 0 ? _a : dataSeries.getNativeXValues();
82
103
  var yValues = (_b = (pointSeries ? this.ySelector(pointSeries) : undefined)) !== null && _b !== void 0 ? _b : dataSeries.getNativeYValues();
83
- var drawCount = pointSeries ? pointSeries.indexes.size() : xValues.size();
84
- var indexStart = 0;
85
- if (!(pointSeries === null || pointSeries === void 0 ? void 0 : pointSeries.resampled) && ((_c = renderPassData === null || renderPassData === void 0 ? void 0 : renderPassData.indexRange) === null || _c === void 0 ? void 0 : _c.diff) > 0) {
86
- drawCount = renderPassData.indexRange.diff + 1;
87
- indexStart = renderPassData.indexRange.min;
88
- }
104
+ var _d = this.getStartAndCount(renderPassData, xValues), startIndex = _d.startIndex, count = _d.count;
89
105
  if (!this.palettingState.palettedColors) {
90
106
  this.palettingState.palettedColors = new this.webAssemblyContext.UIntVector();
91
107
  }
92
108
  this.palettingState.palettedColors.clear();
93
- this.palettingState.palettedColors.reserve(drawCount);
109
+ this.palettingState.palettedColors.reserve(count);
94
110
  strokePen.m_bGradient = strokePaletteProvider.strokePaletteMode === IPaletteProvider_1.EStrokePaletteMode.GRADIENT;
95
111
  // For paletted series, we must pass 0xFFFFFFFF (white) to pen line
96
112
  this.palettingState.originalPenColor = strokePen.m_uiColor;
97
113
  strokePen.m_uiColor = 0xffffffff;
98
- for (var index = indexStart; index < indexStart + drawCount; index++) {
114
+ for (var index = startIndex; index < startIndex + count; index++) {
99
115
  var originalDataIndex = pointSeries ? pointSeries.indexes.get(index) : index;
100
116
  if (originalDataIndex < 0)
101
117
  originalDataIndex = 0;
@@ -110,7 +126,7 @@ var BaseSeriesDrawingProvider = /** @class */ (function (_super) {
110
126
  strokePen.m_uiColor = this.palettingState.originalPenColor;
111
127
  this.palettingState.originalPenColor = undefined;
112
128
  }
113
- (_d = this.palettingState.palettedColors) === null || _d === void 0 ? void 0 : _d.clear();
129
+ (_c = this.palettingState.palettedColors) === null || _c === void 0 ? void 0 : _c.clear();
114
130
  }
115
131
  // Due to pass-by-pointer limitations of WASM binding, we pass an empty vector rather than null
116
132
  if (!this.palettingState.palettedColors) {
@@ -47,7 +47,6 @@ var BubbleSeriesDrawingProvider = /** @class */ (function (_super) {
47
47
  * @inheritDoc
48
48
  */
49
49
  BubbleSeriesDrawingProvider.prototype.draw = function (renderContext, renderPassData) {
50
- var _a;
51
50
  var pointMarker = this.parentSeries.pointMarker;
52
51
  if (pointMarker === undefined) {
53
52
  return;
@@ -59,13 +58,9 @@ var BubbleSeriesDrawingProvider = /** @class */ (function (_super) {
59
58
  var xValues = pointSeries.xValues;
60
59
  var yValues = pointSeries.yValues;
61
60
  var zValues = pointSeries.zValues;
62
- if (!pointSeries.resampled && ((_a = renderPassData.indexRange) === null || _a === void 0 ? void 0 : _a.diff) > 0) {
63
- this.args.count = Math.min(renderPassData.indexRange.diff + 1, yValues.size());
64
- this.args.startIndex = renderPassData.indexRange.min;
65
- }
66
- else {
67
- this.args.count = yValues.size();
68
- }
61
+ var _a = this.getStartAndCount(renderPassData, xValues), startIndex = _a.startIndex, count = _a.count;
62
+ this.args.count = count;
63
+ this.args.startIndex = startIndex;
69
64
  var _b = this.parentSeries.dataSeries, fifoCapacity = _b.fifoCapacity, fifoSweeping = _b.fifoSweeping, fifoSweepingGap = _b.fifoSweepingGap;
70
65
  var fifoStartIndex = pointSeries.fifoStartIndex;
71
66
  if (fifoSweeping && fifoCapacity === this.parentSeries.dataSeries.count()) {
@@ -65,7 +65,6 @@ var ColumnSeriesDrawingProvider = /** @class */ (function (_super) {
65
65
  * @inheritDoc
66
66
  */
67
67
  ColumnSeriesDrawingProvider.prototype.draw = function (renderContext, renderPassData) {
68
- var _a;
69
68
  var pointSeries = renderPassData.pointSeries;
70
69
  var viewRect = this.parentSeries.parentSurface.seriesViewRect;
71
70
  var strokeThickness = this.parentSeries.strokeThickness;
@@ -96,16 +95,12 @@ var ColumnSeriesDrawingProvider = /** @class */ (function (_super) {
96
95
  _super.prototype.applyStrokeFillPaletting.call(this, this.parentSeries.stroke, linesPen, this.parentSeries.fill, fillBrush, this.parentSeries.opacity, false, this.parentSeries.fillLinearGradient !== undefined);
97
96
  this.args.SetPalettedColors(this.palettingState.palettedColors);
98
97
  var isCategoryAxis = renderPassData.xCoordinateCalculator.isCategoryCoordinateCalculator;
99
- var xValues = pointSeries.xValues;
100
- var yValues = pointSeries.yValues;
98
+ var xValues = this.xSelector(pointSeries);
99
+ var yValues = this.ySelector(pointSeries);
101
100
  var xDrawValues = isCategoryAxis ? pointSeries.indexes : xValues;
102
- if (!pointSeries.resampled && ((_a = renderPassData.indexRange) === null || _a === void 0 ? void 0 : _a.diff) > 0) {
103
- this.args.count = Math.min(renderPassData.indexRange.diff + 1, yValues.size());
104
- this.args.startIndex = renderPassData.indexRange.min;
105
- }
106
- else {
107
- this.args.count = yValues.size();
108
- }
101
+ var _a = this.getStartAndCount(renderPassData, xDrawValues), startIndex = _a.startIndex, count = _a.count;
102
+ this.args.count = count;
103
+ this.args.startIndex = startIndex;
109
104
  var _b = this.parentSeries.dataSeries, fifoCapacity = _b.fifoCapacity, fifoSweeping = _b.fifoSweeping, fifoSweepingGap = _b.fifoSweepingGap;
110
105
  var fifoStartIndex = pointSeries.fifoStartIndex;
111
106
  if (fifoSweeping && fifoCapacity === this.parentSeries.dataSeries.count()) {
@@ -103,8 +103,7 @@ var LineSeriesDrawingProvider = /** @class */ (function (_super) {
103
103
  * @inheritDoc
104
104
  */
105
105
  LineSeriesDrawingProvider.prototype.draw = function (renderContext, renderPassData) {
106
- var _a;
107
- var _b = this.getProperties(this.parentSeries), stroke = _b.stroke, isDigitalLine = _b.isDigitalLine, lineType = _b.lineType, drawNaNAs = _b.drawNaNAs, containsNaNOverride = _b.containsNaN;
106
+ var _a = this.getProperties(this.parentSeries), stroke = _a.stroke, isDigitalLine = _a.isDigitalLine, lineType = _a.lineType, drawNaNAs = _a.drawNaNAs, containsNaNOverride = _a.containsNaN;
108
107
  var linesPen = (0, Pen2DCache_1.getScrtPenFromCache)(this.linesPenCache);
109
108
  if (!linesPen || !stroke) {
110
109
  return;
@@ -127,7 +126,7 @@ var LineSeriesDrawingProvider = /** @class */ (function (_super) {
127
126
  : this.webAssemblyContext.SCRTLineGapMode.Default;
128
127
  this.args.verticalChart = renderPassData.isVerticalChart;
129
128
  var isCategoryAxis = renderPassData.xCoordinateCalculator.isCategoryCoordinateCalculator;
130
- var _c = this.parentSeries.dataSeries, fifoCapacity = _c.fifoCapacity, fifoSweeping = _c.fifoSweeping, fifoSweepingGap = _c.fifoSweepingGap;
129
+ var _b = this.parentSeries.dataSeries, fifoCapacity = _b.fifoCapacity, fifoSweeping = _b.fifoSweeping, fifoSweepingGap = _b.fifoSweepingGap;
131
130
  var fifoStartIndex = pointSeries.fifoStartIndex;
132
131
  var xValues = this.xSelector(pointSeries);
133
132
  var xDrawValues = isCategoryAxis ? pointSeries.indexes : xValues;
@@ -142,13 +141,9 @@ var LineSeriesDrawingProvider = /** @class */ (function (_super) {
142
141
  xDrawValues = spline.xSplineValues;
143
142
  yDrawValues = spline.ySplineValues;
144
143
  }
145
- if (!isSplineLineSeries && !pointSeries.resampled && ((_a = renderPassData.indexRange) === null || _a === void 0 ? void 0 : _a.diff) > 0) {
146
- this.args.count = Math.min(renderPassData.indexRange.diff + 1, yDrawValues.size());
147
- this.args.startIndex = renderPassData.indexRange.min;
148
- }
149
- else {
150
- this.args.count = yDrawValues.size();
151
- }
144
+ var _c = this.getStartAndCount(isSplineLineSeries ? undefined : renderPassData, xDrawValues), startIndex = _c.startIndex, count = _c.count;
145
+ this.args.count = count;
146
+ this.args.startIndex = startIndex;
152
147
  //console.log(renderPassData.indexRange, yDrawValues.size(), this.args.count);
153
148
  if (fifoSweeping && fifoCapacity === this.parentSeries.dataSeries.count()) {
154
149
  this.args.count = fifoStartIndex;
@@ -58,7 +58,7 @@ var MountainSeriesDrawingProvider = /** @class */ (function (_super) {
58
58
  * @inheritDoc
59
59
  */
60
60
  MountainSeriesDrawingProvider.prototype.draw = function (renderContext, renderPassData) {
61
- var _a, _b;
61
+ var _a;
62
62
  var pointSeries = renderPassData.pointSeries;
63
63
  var containsNaN = this.parentSeries.dataSeries.dataDistributionCalculator.containsNaN;
64
64
  this.args.Reset();
@@ -86,7 +86,7 @@ var MountainSeriesDrawingProvider = /** @class */ (function (_super) {
86
86
  this.args.SetPalette(paletteTexture);
87
87
  }
88
88
  this.args.isSmoothColors = this.palettingState.gradientPaletting;
89
- var _c = this.parentSeries.dataSeries, fifoCapacity = _c.fifoCapacity, fifoSweeping = _c.fifoSweeping, fifoSweepingGap = _c.fifoSweepingGap;
89
+ var _b = this.parentSeries.dataSeries, fifoCapacity = _b.fifoCapacity, fifoSweeping = _b.fifoSweeping, fifoSweepingGap = _b.fifoSweepingGap;
90
90
  var fifoStartIndex = pointSeries.fifoStartIndex;
91
91
  var isCategoryAxis = renderPassData.xCoordinateCalculator.isCategoryCoordinateCalculator;
92
92
  var xValues = pointSeries.xValues;
@@ -101,13 +101,9 @@ var MountainSeriesDrawingProvider = /** @class */ (function (_super) {
101
101
  xDrawValues = rs.xSplineValues;
102
102
  yDrawValues = rs.ySplineValues;
103
103
  }
104
- if (!isSplineMountainSeries && !pointSeries.resampled && ((_b = renderPassData.indexRange) === null || _b === void 0 ? void 0 : _b.diff) > 0) {
105
- this.args.count = Math.min(renderPassData.indexRange.diff + 1, yDrawValues.size());
106
- this.args.startIndex = renderPassData.indexRange.min;
107
- }
108
- else {
109
- this.args.count = yDrawValues.size();
110
- }
104
+ var _c = this.getStartAndCount(isSplineMountainSeries ? undefined : renderPassData, xDrawValues), startIndex = _c.startIndex, count = _c.count;
105
+ this.args.count = count;
106
+ this.args.startIndex = startIndex;
111
107
  if (fifoSweeping && fifoCapacity === this.parentSeries.dataSeries.count()) {
112
108
  this.args.count = fifoStartIndex;
113
109
  }
@@ -96,7 +96,6 @@ var OhlcSeriesDrawingProvider = /** @class */ (function (_super) {
96
96
  * @inheritDoc
97
97
  */
98
98
  OhlcSeriesDrawingProvider.prototype.draw = function (renderContext, renderPassData) {
99
- var _a;
100
99
  var pointSeries = renderPassData.pointSeries;
101
100
  this.args.Reset();
102
101
  // Candles only requires brush up, down
@@ -132,13 +131,9 @@ var OhlcSeriesDrawingProvider = /** @class */ (function (_super) {
132
131
  var highValues = pointSeries.highValues;
133
132
  var lowValues = pointSeries.lowValues;
134
133
  var closeValues = pointSeries.closeValues;
135
- if (!pointSeries.resampled && ((_a = renderPassData.indexRange) === null || _a === void 0 ? void 0 : _a.diff) > 0) {
136
- this.args.count = Math.min(renderPassData.indexRange.diff + 1, closeValues.size());
137
- this.args.startIndex = renderPassData.indexRange.min;
138
- }
139
- else {
140
- this.args.count = closeValues.size();
141
- }
134
+ var _a = this.getStartAndCount(renderPassData, xValues), startIndex = _a.startIndex, count = _a.count;
135
+ this.args.count = count;
136
+ this.args.startIndex = startIndex;
142
137
  var _b = this.parentSeries.dataSeries, fifoCapacity = _b.fifoCapacity, fifoSweeping = _b.fifoSweeping, fifoSweepingGap = _b.fifoSweepingGap;
143
138
  var fifoStartIndex = pointSeries.fifoStartIndex;
144
139
  if (fifoSweeping && fifoCapacity === this.parentSeries.dataSeries.count()) {
@@ -54,7 +54,7 @@ var PointMarkerDrawingProvider = /** @class */ (function (_super) {
54
54
  * @inheritDoc
55
55
  */
56
56
  PointMarkerDrawingProvider.prototype.draw = function (renderContext, renderPassData) {
57
- var _a, _b;
57
+ var _a;
58
58
  var pointMarker = (_a = this.getProperties(this.parentSeries)) === null || _a === void 0 ? void 0 : _a.pointMarker;
59
59
  if (pointMarker === undefined) {
60
60
  return;
@@ -90,7 +90,7 @@ var PointMarkerDrawingProvider = /** @class */ (function (_super) {
90
90
  if (strokeMaskTexture) {
91
91
  this.args.SetStrokeMask(strokeMaskTexture.getTexture());
92
92
  }
93
- var _c = this.parentSeries.dataSeries, fifoCapacity = _c.fifoCapacity, fifoSweeping = _c.fifoSweeping, fifoSweepingGap = _c.fifoSweepingGap;
93
+ var _b = this.parentSeries.dataSeries, fifoCapacity = _b.fifoCapacity, fifoSweeping = _b.fifoSweeping, fifoSweepingGap = _b.fifoSweepingGap;
94
94
  var fifoStartIndex = pointSeries.fifoStartIndex;
95
95
  if (pointMarker.lastPointOnly && yValues.size() > 0) {
96
96
  this.args.count = 1;
@@ -100,13 +100,9 @@ var PointMarkerDrawingProvider = /** @class */ (function (_super) {
100
100
  : yValues.size() - 1;
101
101
  }
102
102
  else {
103
- if (!pointSeries.resampled && ((_b = renderPassData.indexRange) === null || _b === void 0 ? void 0 : _b.diff) > 0) {
104
- this.args.count = Math.min(renderPassData.indexRange.diff + 1, yValues.size());
105
- this.args.startIndex = renderPassData.indexRange.min;
106
- }
107
- else {
108
- this.args.count = yValues.size();
109
- }
103
+ var _c = this.getStartAndCount(renderPassData, xValues), startIndex = _c.startIndex, count = _c.count;
104
+ this.args.count = count;
105
+ this.args.startIndex = startIndex;
110
106
  if (fifoSweeping && fifoCapacity === this.parentSeries.dataSeries.count()) {
111
107
  this.args.count = fifoStartIndex;
112
108
  }
@@ -1495,7 +1495,7 @@ var SciChartSubSurface = /** @class */ (function (_super) {
1495
1495
  if (_this.subChartContainerId) {
1496
1496
  _this.subChartContainer =
1497
1497
  typeof _this.subChartContainerId === "string"
1498
- ? document.getElementById(_this.subChartContainerId)
1498
+ ? document.querySelector("[id='".concat(_this.subChartContainerId, "']"))
1499
1499
  : _this.subChartContainerId;
1500
1500
  }
1501
1501
  _this.applyOptions(options.subSurfaceOptions);
@@ -1705,7 +1705,10 @@ var SciChartSubSurface = /** @class */ (function (_super) {
1705
1705
  SciChartSubSurface.prototype.getSubChartRect = function () {
1706
1706
  var _a = this.renderSurface.viewportSize, width = _a.width, height = _a.height;
1707
1707
  var _b = this.adjustedPadding, top = _b.top, left = _b.left, bottom = _b.bottom, right = _b.right;
1708
- return new Rect_1.Rect(left, top, width - left - right, height - top - bottom);
1708
+ // When resizing too fast it could happen that width < left + right or height < top + bottom and it breaks subcharts
1709
+ var newWidth = width - left - right > 0 ? width - left - right : 0;
1710
+ var newHeight = height - top - bottom > 0 ? height - top - bottom : 0;
1711
+ return new Rect_1.Rect(left, top, newWidth, newHeight);
1709
1712
  };
1710
1713
  /**
1711
1714
  * @inheritDoc
@@ -705,7 +705,7 @@ var createLicenseModal = function (message, postFormMessage) {
705
705
  licenseModal.style.display = "none";
706
706
  }
707
707
  };
708
- var oldModal = document.getElementById(licenseModal.id);
708
+ var oldModal = document.querySelector("[id='".concat(licenseModal.id, "']"));
709
709
  if (oldModal == null)
710
710
  document.body.appendChild(licenseModal);
711
711
  else
@@ -786,7 +786,8 @@ var getLicenseInfo = function (licenseContext) {
786
786
  var sclt = licenseContext.SCRTCredentials.GetLicenseType();
787
787
  var licenseType = convertLicenseType(sclt, licenseContext);
788
788
  var daysRemaining = licenseContext.SCRTCredentials.GetLicenseDaysRemaining();
789
- if (checkStatus === licensingClasses_1.LicenseCheckStatus.LicenseOK && licenseManager2dState_1.licenseManager2dState.getLicenseType() !== licenseType) {
789
+ if ((checkStatus === licensingClasses_1.LicenseCheckStatus.LicenseOK || licenseType === licensingClasses_1.LicenseType.Community) &&
790
+ licenseManager2dState_1.licenseManager2dState.getLicenseType() !== licenseType) {
790
791
  if (licenseType === licensingClasses_1.LicenseType.Community) {
791
792
  licenseManager2dState_1.licenseManager2dState.setOrderId("Community");
792
793
  }
@@ -897,8 +898,12 @@ var updateLicenseDisplayInternal = function (licenseInfo, sciChartSurface, is2D,
897
898
  if (checkStatus !== licensingClasses_1.LicenseCheckStatus.LicenseOK) {
898
899
  if (checkStatus === licensingClasses_1.LicenseCheckStatus.FetchingFromServer)
899
900
  chartmsg = "<br>Fetching license from server...";
900
- if (checkStatus === licensingClasses_1.LicenseCheckStatus.LookingForLicenseWizard)
901
+ if (checkStatus === licensingClasses_1.LicenseCheckStatus.LookingForLicenseWizard) {
902
+ if (licenseType === licensingClasses_1.LicenseType.Community) {
903
+ (0, Telemetry_1.sendTelemetry)();
904
+ }
901
905
  chartmsg = "<br>Looking for Licensing Wizard... <u>Please run it or click for download and installation instructions</u>.";
906
+ }
902
907
  else if (checkStatus === licensingClasses_1.LicenseCheckStatus.FailedToFindLicenseWizard)
903
908
  if (licenseManager2dState_1.licenseManager2dState.getIsDev()) {
904
909
  chartmsg = "<br><u>Could not connect to the Licensing Wizard. Please run it or click for download and installation instructions, then reload this page.</u>";
@@ -49,7 +49,7 @@ var TooltipSvgAnnotation3D = /** @class */ (function (_super) {
49
49
  _this.placementDivIdProperty = (_h = options === null || options === void 0 ? void 0 : options.placementDivId) !== null && _h !== void 0 ? _h : _this.placementDivId;
50
50
  _this.tooltipDataTemplateProperty = options === null || options === void 0 ? void 0 : options.tooltipDataTemplate;
51
51
  if (_this.placementDivId) {
52
- var svgRoot = document.getElementById(_this.placementDivId);
52
+ var svgRoot = document.querySelector("[id='".concat(_this.placementDivId, "']"));
53
53
  _this.svgDivRoot = svgRoot;
54
54
  }
55
55
  return _this;
@@ -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.434";
3
+ export declare const libraryVersion = "3.2.446";
4
4
  export declare const checkBuildStamp: (wasmContext: TSciChart | TSciChart3D) => boolean;
@@ -1,20 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkBuildStamp = exports.libraryVersion = void 0;
4
- var buildStamp = "2023-07-25T00:00:00";
4
+ var buildStamp = "2023-07-28T00:00:00";
5
5
  var result;
6
6
  // tslint:disable-next-line:no-var-requires
7
- exports.libraryVersion = "3.2.434";
7
+ exports.libraryVersion = "3.2.446";
8
8
  var checkBuildStamp = function (wasmContext) {
9
9
  if (result !== undefined)
10
10
  return result;
11
11
  if (!wasmContext)
12
12
  return false;
13
13
  if (wasmContext.SCRTCredentials.GetBuildStamp) {
14
- if (wasmContext.SCRTCredentials.GetBuildStamp() === buildStamp) {
14
+ var wasmBuildStamp = wasmContext.SCRTCredentials.GetBuildStamp();
15
+ if (wasmBuildStamp === buildStamp) {
15
16
  result = true;
16
17
  return result;
17
18
  }
19
+ else {
20
+ console.warn("Build stamp diff: JS - ".concat(buildStamp, "; WASM - ").concat(wasmBuildStamp));
21
+ }
18
22
  }
19
23
  console.warn("The SciChart webassembly module is from a different version than the javascript that is calling it.\n Ensure that your build process is copying the correct wasm and data files.");
20
24
  result = false;
@@ -2,5 +2,5 @@ export declare class OneTimePerformanceWarning {
2
2
  private warnedProperty;
3
3
  private messageProperty;
4
4
  constructor(message: string);
5
- warn(): void;
5
+ warn(): boolean;
6
6
  }
@@ -10,9 +10,10 @@ var OneTimePerformanceWarning = /** @class */ (function () {
10
10
  }
11
11
  OneTimePerformanceWarning.prototype.warn = function () {
12
12
  if (!SciChartDefaults_1.SciChartDefaults.performanceWarnings || this.warnedProperty || !licenseManager2dState_1.licenseManager2dState.getIsDev())
13
- return;
13
+ return false;
14
14
  console.warn(this.messageProperty);
15
15
  this.warnedProperty = true;
16
+ return true;
16
17
  };
17
18
  return OneTimePerformanceWarning;
18
19
  }());