scichart 3.2.543 → 3.2.555
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.
- package/Charting/ChartModifiers/DataPointSelectionModifier.js +1 -0
- package/Charting/ChartModifiers/ModifierMouseArgs.d.ts +7 -0
- package/Charting/ChartModifiers/ModifierMouseArgs.js +6 -0
- package/Charting/Model/BaseDataSeries.d.ts +11 -0
- package/Charting/Model/BaseDataSeries.js +35 -3
- package/Charting/Model/BaseHeatmapDataSeries.d.ts +2 -0
- package/Charting/Model/BaseHeatmapDataSeries.js +4 -0
- package/Charting/Model/IDataSeries.d.ts +4 -0
- package/Charting/Model/IPaletteProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.js +2 -14
- package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.js +3 -2
- package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +4 -4
- package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +2 -2
- package/Charting/Visuals/RenderableSeries/HitTest/ImpulseSeriesHitTestProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/LineSeriesHitTestProvider.js +2 -2
- package/Charting/Visuals/RenderableSeries/HitTest/StackedMountainSeriesHitTestProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +3 -3
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +47 -40
- package/Charting/Visuals/SciChartSurfaceBase.d.ts +1 -1
- package/Charting/Visuals/SciChartSurfaceBase.js +1 -1
- package/Charting3D/Visuals/SciChart3DSurface.d.ts +10 -0
- package/Charting3D/Visuals/SciChart3DSurface.js +14 -0
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/Core/Mouse/MouseManager.js +14 -1
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.wasm +0 -0
- package/index.d.ts +1 -0
- package/index.dev.js +147 -73
- package/index.js +5 -3
- package/index.min.js +1 -1
- package/package.json +1 -1
- package/types/SearchMode.d.ts +7 -0
- package/types/SearchMode.js +19 -1
- package/types/TSciChart.d.ts +2 -1
|
@@ -365,6 +365,7 @@ var DataPointSelectionModifier = /** @class */ (function (_super) {
|
|
|
365
365
|
return json;
|
|
366
366
|
};
|
|
367
367
|
DataPointSelectionModifier.prototype.delete = function () {
|
|
368
|
+
this.selectionChanged.unsubscribeAll();
|
|
368
369
|
this.selectionRect = (0, Deleter_1.deleteSafe)(this.selectionRect);
|
|
369
370
|
_super.prototype.delete.call(this);
|
|
370
371
|
};
|
|
@@ -14,6 +14,7 @@ declare type TModifierMouseArgsParams = {
|
|
|
14
14
|
ctrlKey?: boolean;
|
|
15
15
|
altKey?: boolean;
|
|
16
16
|
nativeEvent?: MouseEvent;
|
|
17
|
+
isActiveSubChartEvent?: boolean;
|
|
17
18
|
};
|
|
18
19
|
/**
|
|
19
20
|
* Mouse arguments passed to {@link ChartModifierBase} methods
|
|
@@ -98,6 +99,12 @@ export declare class ModifierMouseArgs extends ModifierArgsBase {
|
|
|
98
99
|
* The native pointer event
|
|
99
100
|
*/
|
|
100
101
|
nativeEvent: MouseEvent;
|
|
102
|
+
/**
|
|
103
|
+
* Identifies if the event comes from an active sub chart
|
|
104
|
+
* Useful for SubChartSurfaces with modifierGroups
|
|
105
|
+
* for SciChartSurface returns always True
|
|
106
|
+
*/
|
|
107
|
+
readonly isActiveSubChartEvent: boolean;
|
|
101
108
|
/**
|
|
102
109
|
* Creates an instance of {@link ModifierMouseArgs}
|
|
103
110
|
* @param mousePoint the mouse point as an X,Y location
|
|
@@ -45,6 +45,12 @@ var ModifierMouseArgs = /** @class */ (function (_super) {
|
|
|
45
45
|
var _this = this;
|
|
46
46
|
var _a;
|
|
47
47
|
_this = _super.call(this) || this;
|
|
48
|
+
/**
|
|
49
|
+
* Identifies if the event comes from an active sub chart
|
|
50
|
+
* Useful for SubChartSurfaces with modifierGroups
|
|
51
|
+
* for SciChartSurface returns always True
|
|
52
|
+
*/
|
|
53
|
+
_this.isActiveSubChartEvent = true;
|
|
48
54
|
_this.mousePoint = mousePoint;
|
|
49
55
|
_this.button = options === null || options === void 0 ? void 0 : options.button;
|
|
50
56
|
_this.mouseWheelDelta = (_a = options === null || options === void 0 ? void 0 : options.mouseWheelDelta) !== null && _a !== void 0 ? _a : 0;
|
|
@@ -207,6 +207,8 @@ export declare abstract class BaseDataSeries extends DeletableEntity implements
|
|
|
207
207
|
/** @inheritDoc */
|
|
208
208
|
getNativeXValues(): SCRTDoubleVector;
|
|
209
209
|
/** @inheritDoc */
|
|
210
|
+
getNativeValue(values: SCRTDoubleVector, index: number): number;
|
|
211
|
+
/** @inheritDoc */
|
|
210
212
|
getNativeYValues(): SCRTDoubleVector;
|
|
211
213
|
/** @inheritDoc */
|
|
212
214
|
delete(): void;
|
|
@@ -272,6 +274,15 @@ export declare abstract class BaseDataSeries extends DeletableEntity implements
|
|
|
272
274
|
/** @inheritDoc */
|
|
273
275
|
get changeCount(): number;
|
|
274
276
|
protected getOptions(excludeData?: boolean): IBaseDataSeriesOptions;
|
|
277
|
+
/**
|
|
278
|
+
* Finds the nearest index of the xValue passed in by performing binary or linear search on the X-Values array.
|
|
279
|
+
* Returns -1 for index not found. Other negative numbers indicate an error condition
|
|
280
|
+
* @param xValue the X-value to find
|
|
281
|
+
* @param findMode the {@link ESearchMode} to use when searching. Defaults to {@link ESearchMode.Nearest}.
|
|
282
|
+
* Mode {@link ESearchMode.Exact} will result in a slower search, other modes will result in fast binary search.
|
|
283
|
+
* @return The index, or -1 if not found
|
|
284
|
+
*/
|
|
285
|
+
findIndex(xValue: number, searchMode?: ESearchMode): number;
|
|
275
286
|
protected validateIndex(index: number, message?: string): void;
|
|
276
287
|
protected setMetadataAt(index: number, metadata: IPointMetadata): void;
|
|
277
288
|
protected appendMetadata(metadata: IPointMetadata): void;
|
|
@@ -270,6 +270,16 @@ var BaseDataSeries = /** @class */ (function (_super) {
|
|
|
270
270
|
return this.xValues;
|
|
271
271
|
};
|
|
272
272
|
/** @inheritDoc */
|
|
273
|
+
BaseDataSeries.prototype.getNativeValue = function (values, index) {
|
|
274
|
+
// @ts-ignore
|
|
275
|
+
if (!this.fifoSweeping || !values.getRaw) {
|
|
276
|
+
return values.get(index);
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
return values.getRaw(index);
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
/** @inheritDoc */
|
|
273
283
|
BaseDataSeries.prototype.getNativeYValues = function () {
|
|
274
284
|
return this.yValues;
|
|
275
285
|
};
|
|
@@ -506,6 +516,28 @@ var BaseDataSeries = /** @class */ (function (_super) {
|
|
|
506
516
|
: this.metadataProperty;
|
|
507
517
|
return options;
|
|
508
518
|
};
|
|
519
|
+
/**
|
|
520
|
+
* Finds the nearest index of the xValue passed in by performing binary or linear search on the X-Values array.
|
|
521
|
+
* Returns -1 for index not found. Other negative numbers indicate an error condition
|
|
522
|
+
* @param xValue the X-value to find
|
|
523
|
+
* @param findMode the {@link ESearchMode} to use when searching. Defaults to {@link ESearchMode.Nearest}.
|
|
524
|
+
* Mode {@link ESearchMode.Exact} will result in a slower search, other modes will result in fast binary search.
|
|
525
|
+
* @return The index, or -1 if not found
|
|
526
|
+
*/
|
|
527
|
+
BaseDataSeries.prototype.findIndex = function (xValue, searchMode) {
|
|
528
|
+
var _a, _b;
|
|
529
|
+
if (searchMode === void 0) { searchMode = SearchMode_1.ESearchMode.Nearest; }
|
|
530
|
+
if (this.count() === 0) {
|
|
531
|
+
return -1;
|
|
532
|
+
}
|
|
533
|
+
// Get whether data is sorted ascending or not (affects which algorithms can be used)
|
|
534
|
+
var dataIsSorted = (_b = (_a = this.dataDistributionCalculator) === null || _a === void 0 ? void 0 : _a.isSortedAscending) !== null && _b !== void 0 ? _b : false;
|
|
535
|
+
// Search mode Exact must be used when data is not sorted, else, use user-defined search mode
|
|
536
|
+
var findMode = dataIsSorted
|
|
537
|
+
? (0, SearchMode_1.convertSearchMode)(this.webAssemblyContext, searchMode)
|
|
538
|
+
: this.webAssemblyContext.SCRTFindIndexSearchMode.Exact;
|
|
539
|
+
return this.webAssemblyContext.NumberUtil.FindIndex(this.xValues, xValue, findMode, dataIsSorted);
|
|
540
|
+
};
|
|
509
541
|
BaseDataSeries.prototype.validateIndex = function (index, message) {
|
|
510
542
|
if (Math.round(index) !== index) {
|
|
511
543
|
throw Error("Index must be an integer");
|
|
@@ -684,7 +716,7 @@ var getIndicesRange = function (webAssemblyContext, xValues, xRange, isSorted, d
|
|
|
684
716
|
if (!isSorted) {
|
|
685
717
|
return new NumberRange_1.NumberRange(0, count - 1);
|
|
686
718
|
}
|
|
687
|
-
var
|
|
719
|
+
var convertSearchMode_1 = function (mode) {
|
|
688
720
|
switch (mode) {
|
|
689
721
|
case SearchMode_1.ESearchMode.Exact:
|
|
690
722
|
return webAssemblyContext.SCRTFindIndexSearchMode.Exact;
|
|
@@ -697,8 +729,8 @@ var getIndicesRange = function (webAssemblyContext, xValues, xRange, isSorted, d
|
|
|
697
729
|
}
|
|
698
730
|
};
|
|
699
731
|
// For sorted data, we search the points in the viewport
|
|
700
|
-
var iMin = webAssemblyContext.NumberUtil.FindIndex(xValues, xRange.min,
|
|
701
|
-
var iMax = webAssemblyContext.NumberUtil.FindIndex(xValues, xRange.max,
|
|
732
|
+
var iMin = webAssemblyContext.NumberUtil.FindIndex(xValues, xRange.min, convertSearchMode_1(downSearchMode), true);
|
|
733
|
+
var iMax = webAssemblyContext.NumberUtil.FindIndex(xValues, xRange.max, convertSearchMode_1(upSearchMode), true);
|
|
702
734
|
result = new NumberRange_1.NumberRange(iMin, iMax);
|
|
703
735
|
}
|
|
704
736
|
return result;
|
|
@@ -119,6 +119,8 @@ export declare abstract class BaseHeatmapDataSeries implements IHeatmapSeries {
|
|
|
119
119
|
set containsNaN(value: boolean);
|
|
120
120
|
/** @inheritDoc */
|
|
121
121
|
get dataDistributionCalculator(): IDataDistributionCalculator;
|
|
122
|
+
/** @inheritDoc */
|
|
123
|
+
getNativeValue(values: SCRTDoubleVector, index: number): number;
|
|
122
124
|
/**
|
|
123
125
|
* Returns true if the Heatmap DataSeries has data changes.
|
|
124
126
|
* This flag is set to true when notifyDataChanged is called, and reset to false after
|
|
@@ -115,6 +115,10 @@ var BaseHeatmapDataSeries = /** @class */ (function () {
|
|
|
115
115
|
enumerable: false,
|
|
116
116
|
configurable: true
|
|
117
117
|
});
|
|
118
|
+
/** @inheritDoc */
|
|
119
|
+
BaseHeatmapDataSeries.prototype.getNativeValue = function (values, index) {
|
|
120
|
+
throw new Error("getNativeValue not supported for HeatmapDataSeries");
|
|
121
|
+
};
|
|
118
122
|
Object.defineProperty(BaseHeatmapDataSeries.prototype, "hasDataChanges", {
|
|
119
123
|
/**
|
|
120
124
|
* Returns true if the Heatmap DataSeries has data changes.
|
|
@@ -194,6 +194,10 @@ export interface IDataSeries extends IDeletable {
|
|
|
194
194
|
* Gets a native / WebAssembly vector of Y-values in the DataSeries
|
|
195
195
|
*/
|
|
196
196
|
getNativeYValues(): SCRTDoubleVector;
|
|
197
|
+
/**
|
|
198
|
+
* Get the value from a native vector , potentially accounting for fifo sweeping.
|
|
199
|
+
*/
|
|
200
|
+
getNativeValue(values: SCRTDoubleVector, index: number): number;
|
|
197
201
|
/**
|
|
198
202
|
* Clear all values from the DataSeries
|
|
199
203
|
*/
|
|
@@ -74,26 +74,14 @@ var DataLabelState = /** @class */ (function () {
|
|
|
74
74
|
if (!this.isXFlipped) {
|
|
75
75
|
i = this.indexEnd - (i - this.indexStart);
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
if (!this.fifoSweeping || !this.xValues.getRaw) {
|
|
79
|
-
return this.xValues.get(i);
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
return this.xValues.getRaw(i);
|
|
83
|
-
}
|
|
77
|
+
return this.parentSeries.dataSeries.getNativeValue(this.xValues, i);
|
|
84
78
|
};
|
|
85
79
|
DataLabelState.prototype.yVal = function (index) {
|
|
86
80
|
var i = index !== null && index !== void 0 ? index : this.indexProperty;
|
|
87
81
|
if (!this.isXFlipped) {
|
|
88
82
|
i = this.indexEnd - (i - this.indexStart);
|
|
89
83
|
}
|
|
90
|
-
|
|
91
|
-
if (!this.fifoSweeping || !this.yValues.getRaw) {
|
|
92
|
-
return this.yValues.get(i);
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
return this.yValues.getRaw(i);
|
|
96
|
-
}
|
|
84
|
+
return this.parentSeries.dataSeries.getNativeValue(this.yValues, i);
|
|
97
85
|
};
|
|
98
86
|
DataLabelState.prototype.yValAfterAnimation = function (index) {
|
|
99
87
|
if (!this.yFinalValues)
|
|
@@ -148,12 +148,13 @@ var OhlcSeriesDrawingProvider = /** @class */ (function (_super) {
|
|
|
148
148
|
// console.log(sx);
|
|
149
149
|
// console.log(sy);
|
|
150
150
|
var xDrawValues = isCategoryAxis ? pointSeries.indexes : xValues;
|
|
151
|
-
this.
|
|
151
|
+
this.args.SetValues(xDrawValues, openValues, highValues, lowValues, closeValues);
|
|
152
|
+
this.nativeDrawingProvider.DrawPointsVec(nativeContext, renderPassData.xCoordinateCalculator.nativeCalculator, renderPassData.yCoordinateCalculator.nativeCalculator, this.args);
|
|
152
153
|
if (fifoSweeping && fifoCapacity === this.parentSeries.dataSeries.count()) {
|
|
153
154
|
this.args.startIndex = Math.min(closeValues.size(), fifoStartIndex + fifoSweepingGap);
|
|
154
155
|
this.args.count = Math.max(0, closeValues.size() - fifoStartIndex - fifoSweepingGap);
|
|
155
156
|
if (this.args.count > 0) {
|
|
156
|
-
this.nativeDrawingProvider.DrawPointsVec(nativeContext,
|
|
157
|
+
this.nativeDrawingProvider.DrawPointsVec(nativeContext, renderPassData.xCoordinateCalculator.nativeCalculator, renderPassData.yCoordinateCalculator.nativeCalculator, this.args);
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
160
|
};
|
|
@@ -50,7 +50,7 @@ var BandSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
50
50
|
if (dataSeries.dataDistributionCalculator.isSortedAscending && nearestPointIndex >= 0) {
|
|
51
51
|
hitTestInfo.y1Value = y1NativeValues.get(nearestPointIndex);
|
|
52
52
|
hitTestInfo.y1Coord = yCoordinateCalculator.getCoordinate(hitTestInfo.y1Value);
|
|
53
|
-
var hitRes = hitTestHelpers_1.hitTestHelpers.testIsHitForBand(this.parentSeries.isDigitalLine, xCoordinateCalculator, yCoordinateCalculator, dataSeries.getNativeXValues(), function (index) { return yNativeValues.get(index); }, function (index) { return y1NativeValues.get(index); }, nearestPointIndex, xHitCoord, yHitCoord);
|
|
53
|
+
var hitRes = hitTestHelpers_1.hitTestHelpers.testIsHitForBand(this.parentSeries.isDigitalLine, xCoordinateCalculator, yCoordinateCalculator, dataSeries.getNativeXValues(), function (index) { return yNativeValues.get(index); }, function (index) { return y1NativeValues.get(index); }, nearestPointIndex, xHitCoord, yHitCoord, dataSeries);
|
|
54
54
|
hitTestInfo.isHit = hitRes.isHit;
|
|
55
55
|
hitTestInfo.point2dataSeriesIndex = hitRes.secondPointIndex;
|
|
56
56
|
if (hitRes.secondPointIndex !== undefined) {
|
|
@@ -90,8 +90,8 @@ var BandSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
90
90
|
hitTestInfo.y1Value = dataSeries.getNativeY1Values().get(nearestPointIndex);
|
|
91
91
|
hitTestInfo.y1Coord = yCoordinateCalculator.getCoordinate(hitTestInfo.y1Value);
|
|
92
92
|
hitTestInfo.isHit =
|
|
93
|
-
hitTestHelpers_1.hitTestHelpers.testIsHitForPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries.getNativeXValues(), dataSeries.getNativeYValues(), nearestPointIndex, xHitCoord, yHitCoord, hitTestRadius) ||
|
|
94
|
-
hitTestHelpers_1.hitTestHelpers.testIsHitForPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries.getNativeXValues(), dataSeries.getNativeY1Values(), nearestPointIndex, xHitCoord, yHitCoord, hitTestRadius);
|
|
93
|
+
hitTestHelpers_1.hitTestHelpers.testIsHitForPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries.getNativeXValues(), dataSeries.getNativeYValues(), nearestPointIndex, xHitCoord, yHitCoord, hitTestRadius, dataSeries) ||
|
|
94
|
+
hitTestHelpers_1.hitTestHelpers.testIsHitForPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries.getNativeXValues(), dataSeries.getNativeY1Values(), nearestPointIndex, xHitCoord, yHitCoord, hitTestRadius, dataSeries);
|
|
95
95
|
}
|
|
96
96
|
else {
|
|
97
97
|
hitTestInfo.isHit = false;
|
|
@@ -139,7 +139,7 @@ var BandSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
139
139
|
(xCoordinateCalculator.hasFlippedCoordinates
|
|
140
140
|
? xHitCoord <= nearestXCoord
|
|
141
141
|
: xHitCoord >= nearestXCoord))) {
|
|
142
|
-
var hitRes = hitTestHelpers_1.hitTestHelpers.testIsHitForLine(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearestPointIndex, xHitCoord, yHitCoord, 0);
|
|
142
|
+
var hitRes = hitTestHelpers_1.hitTestHelpers.testIsHitForLine(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearestPointIndex, xHitCoord, yHitCoord, 0, dataSeries);
|
|
143
143
|
hitTestInfo.point2dataSeriesIndex = hitRes.secondPointIndex;
|
|
144
144
|
if (hitRes.secondPointIndex !== undefined) {
|
|
145
145
|
hitTestInfo.point2xValue = xNativeValues.get(hitRes.secondPointIndex);
|
|
@@ -48,7 +48,7 @@ var BaseHitTestProvider = /** @class */ (function () {
|
|
|
48
48
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
49
49
|
var hitTestInfo = hitTestHelpers_1.hitTestHelpers.createHitTestInfo(this.parentSeries, xCoordinateCalculator, yCoordinateCalculator, isVerticalChart, dataSeries, xNativeValues, yNativeValues, xHitCoord, yHitCoord, nearest.nearestPointIndex, hitTestRadius, nearest.distance);
|
|
50
50
|
if (nearest.nearestPointIndex >= 0) {
|
|
51
|
-
hitTestInfo.isHit = hitTestHelpers_1.hitTestHelpers.testIsHitForPoint(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearest.nearestPointIndex, xHitCoord, yHitCoord, hitTestRadius);
|
|
51
|
+
hitTestInfo.isHit = hitTestHelpers_1.hitTestHelpers.testIsHitForPoint(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearest.nearestPointIndex, xHitCoord, yHitCoord, hitTestRadius, dataSeries);
|
|
52
52
|
}
|
|
53
53
|
else {
|
|
54
54
|
hitTestInfo.isHit = false;
|
|
@@ -95,7 +95,7 @@ var BaseHitTestProvider = /** @class */ (function () {
|
|
|
95
95
|
(xCoordinateCalculator.hasFlippedCoordinates
|
|
96
96
|
? xHitCoord <= nearestXCoord
|
|
97
97
|
: xHitCoord >= nearestXCoord))) {
|
|
98
|
-
var hitRes = hitTestHelpers_1.hitTestHelpers.testIsHitForLine(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearestPointIndex, xHitCoord, yHitCoord, 0);
|
|
98
|
+
var hitRes = hitTestHelpers_1.hitTestHelpers.testIsHitForLine(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearestPointIndex, xHitCoord, yHitCoord, 0, dataSeries);
|
|
99
99
|
hitTestInfo.point2dataSeriesIndex = hitRes.secondPointIndex;
|
|
100
100
|
hitTestInfo.point2xValue = xNativeValues.get(hitRes.secondPointIndex);
|
|
101
101
|
hitTestInfo.point2xCoord = xCoordinateCalculator.getCoordinate(hitTestInfo.point2xValue);
|
|
@@ -53,7 +53,7 @@ var ImpulseSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
53
53
|
if (nearestPointIndex >= 0 || nearestXy.nearestPointIndex >= 0) {
|
|
54
54
|
hitTestInfo.isHit =
|
|
55
55
|
hitTestHelpers_1.hitTestHelpers.testIsHitForImpulse(xCoordinateCalculator, yCoordinateCalculator, this.parentSeries, xNativeValues, yNativeValues, nearestPointIndex, xHitCoord, yHitCoord, hitTestRadius) ||
|
|
56
|
-
hitTestHelpers_1.hitTestHelpers.testIsHitForPoint(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearestXy.nearestPointIndex, xHitCoord, yHitCoord, this.parentSeries.size);
|
|
56
|
+
hitTestHelpers_1.hitTestHelpers.testIsHitForPoint(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearestXy.nearestPointIndex, xHitCoord, yHitCoord, this.parentSeries.size, dataSeries);
|
|
57
57
|
}
|
|
58
58
|
else {
|
|
59
59
|
hitTestInfo.isHit = false;
|
|
@@ -71,10 +71,10 @@ var LineSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
71
71
|
(xCoordinateCalculator.hasFlippedCoordinates
|
|
72
72
|
? xHitCoord <= nearestXCoord
|
|
73
73
|
: xHitCoord >= nearestXCoord))) {
|
|
74
|
-
hitTestInfo.isHit = hitTestHelpers_1.hitTestHelpers.testIsHitForPoint(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearestPointIndex, xHitCoord, yHitCoord, hitTestRadius);
|
|
74
|
+
hitTestInfo.isHit = hitTestHelpers_1.hitTestHelpers.testIsHitForPoint(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearestPointIndex, xHitCoord, yHitCoord, hitTestRadius, dataSeries);
|
|
75
75
|
}
|
|
76
76
|
else {
|
|
77
|
-
var hitRes = hitTestHelpers_1.hitTestHelpers.testIsHitForLine(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearestPointIndex, xHitCoord, yHitCoord, hitTestRadius);
|
|
77
|
+
var hitRes = hitTestHelpers_1.hitTestHelpers.testIsHitForLine(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearestPointIndex, xHitCoord, yHitCoord, hitTestRadius, dataSeries);
|
|
78
78
|
hitTestInfo.isHit = hitRes.isHit;
|
|
79
79
|
hitTestInfo.point2dataSeriesIndex = hitRes.secondPointIndex;
|
|
80
80
|
hitTestInfo.point2xValue = xNativeValues.get(hitRes.secondPointIndex);
|
|
@@ -51,7 +51,7 @@ var StackedMountainSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
51
51
|
var getBottomLine = function (index) {
|
|
52
52
|
return accumulatedValues.get(index) - dataSeries.getNativeYValues().get(index);
|
|
53
53
|
};
|
|
54
|
-
var hitRes = hitTestHelpers_1.hitTestHelpers.testIsHitForBand(this.parentSeries.isDigitalLine, xCoordinateCalculator, yCoordinateCalculator, xNativeValues, getTopLine, getBottomLine, nearestPointIndex, xHitCoord, yHitCoord);
|
|
54
|
+
var hitRes = hitTestHelpers_1.hitTestHelpers.testIsHitForBand(this.parentSeries.isDigitalLine, xCoordinateCalculator, yCoordinateCalculator, xNativeValues, getTopLine, getBottomLine, nearestPointIndex, xHitCoord, yHitCoord, dataSeries);
|
|
55
55
|
hitTestInfo.isHit = hitRes.isHit;
|
|
56
56
|
hitTestInfo.point2dataSeriesIndex = hitRes.secondPointIndex;
|
|
57
57
|
}
|
|
@@ -38,12 +38,12 @@ export declare const hitTestHelpers: {
|
|
|
38
38
|
yIndex: number;
|
|
39
39
|
zValue: number;
|
|
40
40
|
};
|
|
41
|
-
testIsHitForPoint: (xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, xValues: SCRTDoubleVector, yValues: SCRTDoubleVector, pointIndex: number, xHitCoord: number, yHitCoord: number, hitTestRadius: number) => boolean;
|
|
42
|
-
testIsHitForLine: (xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, xValues: SCRTDoubleVector, yValues: SCRTDoubleVector, pointIndex: number, xHitCoord: number, yHitCoord: number, hitTestRadius: number) => {
|
|
41
|
+
testIsHitForPoint: (xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, xValues: SCRTDoubleVector, yValues: SCRTDoubleVector, pointIndex: number, xHitCoord: number, yHitCoord: number, hitTestRadius: number, dataSeries: BaseDataSeries) => boolean;
|
|
42
|
+
testIsHitForLine: (xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, xValues: SCRTDoubleVector, yValues: SCRTDoubleVector, pointIndex: number, xHitCoord: number, yHitCoord: number, hitTestRadius: number, dataSeries: BaseDataSeries) => {
|
|
43
43
|
isHit: boolean;
|
|
44
44
|
secondPointIndex: number;
|
|
45
45
|
};
|
|
46
|
-
testIsHitForBand: (isDigitalLine: boolean, xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, xValues: SCRTDoubleVector, getYValue: (index: number) => number, getY1Value: (index: number) => number, pointIndex: number, xHitCoord: number, yHitCoord: number) => {
|
|
46
|
+
testIsHitForBand: (isDigitalLine: boolean, xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, xValues: SCRTDoubleVector, getYValue: (index: number) => number, getY1Value: (index: number) => number, pointIndex: number, xHitCoord: number, yHitCoord: number, dataSeries: BaseDataSeries) => {
|
|
47
47
|
isHit: boolean;
|
|
48
48
|
secondPointIndex: number;
|
|
49
49
|
};
|
|
@@ -39,8 +39,8 @@ var createHitTestInfo = function (renderableSeries, xCoordinateCalculator, yCoor
|
|
|
39
39
|
hitTestInfo.distance = distance;
|
|
40
40
|
// If there is no data, don't attempt to access it.
|
|
41
41
|
if (nearestPointIndex >= 0) {
|
|
42
|
-
var xValue = isCategoryAxis ? nearestPointIndex :
|
|
43
|
-
var yValue =
|
|
42
|
+
var xValue = isCategoryAxis ? nearestPointIndex : dataSeries.getNativeValue(xNativeValues, nearestPointIndex);
|
|
43
|
+
var yValue = dataSeries.getNativeValue(yNativeValues, nearestPointIndex);
|
|
44
44
|
hitTestInfo.xCoord = xCoordinateCalculator.getCoordinate(xValue);
|
|
45
45
|
hitTestInfo.yCoord = yCoordinateCalculator.getCoordinate(yValue);
|
|
46
46
|
// TODO: It might be worth to flip them to make the API better
|
|
@@ -54,16 +54,19 @@ var createHitTestInfo = function (renderableSeries, xCoordinateCalculator, yCoor
|
|
|
54
54
|
hitTestInfo.xCategoryValue = xNativeValues.get(nearestPointIndex);
|
|
55
55
|
}
|
|
56
56
|
hitTestInfo.yValue = yValue;
|
|
57
|
-
var xFirstValue = isCategoryAxis ? 0 :
|
|
58
|
-
var xLastValue = isCategoryAxis
|
|
57
|
+
var xFirstValue = isCategoryAxis ? 0 : dataSeries.getNativeValue(xNativeValues, 0);
|
|
58
|
+
var xLastValue = isCategoryAxis
|
|
59
|
+
? xNativeValues.size() - 1
|
|
60
|
+
: dataSeries.getNativeValue(xNativeValues, xNativeValues.size() - 1);
|
|
59
61
|
// TODO - do this once when data changes
|
|
60
62
|
if (!dataSeries.dataDistributionCalculator.isSortedAscending) {
|
|
61
63
|
for (var i = 0; i < dataSeries.count(); i++) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
var x = dataSeries.getNativeValue(xNativeValues, i);
|
|
65
|
+
if (x < xFirstValue) {
|
|
66
|
+
xFirstValue = x;
|
|
64
67
|
}
|
|
65
|
-
if (
|
|
66
|
-
xLastValue =
|
|
68
|
+
if (x > xLastValue) {
|
|
69
|
+
xLastValue = x;
|
|
67
70
|
}
|
|
68
71
|
}
|
|
69
72
|
}
|
|
@@ -168,10 +171,10 @@ var getNearestNonUniformHeatmapPoint = function (xCoordinateCalculator, yCoordin
|
|
|
168
171
|
var zValue = heatmapDataSeries.getZValue(yIndex, xIndex);
|
|
169
172
|
return { xIndex: xIndex, yIndex: yIndex, zValue: zValue };
|
|
170
173
|
};
|
|
171
|
-
var testIsHitForPoint = function (xCoordinateCalculator, yCoordinateCalculator, xValues, yValues, pointIndex, xHitCoord, yHitCoord, hitTestRadius) {
|
|
174
|
+
var testIsHitForPoint = function (xCoordinateCalculator, yCoordinateCalculator, xValues, yValues, pointIndex, xHitCoord, yHitCoord, hitTestRadius, dataSeries) {
|
|
172
175
|
var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
|
|
173
|
-
var xValue = isCategoryAxis ? pointIndex :
|
|
174
|
-
var yValue =
|
|
176
|
+
var xValue = isCategoryAxis ? pointIndex : dataSeries.getNativeValue(xValues, pointIndex);
|
|
177
|
+
var yValue = dataSeries.getNativeValue(yValues, pointIndex);
|
|
175
178
|
var dataXCoord = xCoordinateCalculator.getCoordinate(xValue);
|
|
176
179
|
var dataYCoord = yCoordinateCalculator.getCoordinate(yValue);
|
|
177
180
|
var distance = (0, pointUtil_1.calcDistance)(xHitCoord, yHitCoord, dataXCoord, dataYCoord);
|
|
@@ -188,24 +191,24 @@ var testIsHitForPoint = function (xCoordinateCalculator, yCoordinateCalculator,
|
|
|
188
191
|
* @param yHitCoord The Y coordinate, isVertical property is already taken into account
|
|
189
192
|
* @param hitTestRadius
|
|
190
193
|
*/
|
|
191
|
-
var testIsHitForLine = function (xCoordinateCalculator, yCoordinateCalculator, xValues, yValues, pointIndex, xHitCoord, yHitCoord, hitTestRadius) {
|
|
194
|
+
var testIsHitForLine = function (xCoordinateCalculator, yCoordinateCalculator, xValues, yValues, pointIndex, xHitCoord, yHitCoord, hitTestRadius, dataSeries) {
|
|
192
195
|
var isHit;
|
|
193
196
|
var secondPointIndex;
|
|
194
197
|
var xLeft, xRight, yLeft, yRight;
|
|
195
198
|
var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
|
|
196
|
-
var xValue = isCategoryAxis ? pointIndex :
|
|
197
|
-
var yValue =
|
|
199
|
+
var xValue = isCategoryAxis ? pointIndex : dataSeries.getNativeValue(xValues, pointIndex);
|
|
200
|
+
var yValue = dataSeries.getNativeValue(yValues, pointIndex);
|
|
198
201
|
var xHitValue = xCoordinateCalculator.getDataValue(xHitCoord);
|
|
199
202
|
if (xValue <= xHitValue) {
|
|
200
203
|
xLeft = xValue;
|
|
201
204
|
yLeft = yValue;
|
|
202
|
-
xRight = isCategoryAxis ? pointIndex + 1 :
|
|
203
|
-
yRight =
|
|
205
|
+
xRight = isCategoryAxis ? pointIndex + 1 : dataSeries.getNativeValue(xValues, pointIndex + 1);
|
|
206
|
+
yRight = dataSeries.getNativeValue(yValues, pointIndex + 1);
|
|
204
207
|
secondPointIndex = pointIndex + 1;
|
|
205
208
|
}
|
|
206
209
|
else {
|
|
207
|
-
xLeft = isCategoryAxis ? pointIndex - 1 :
|
|
208
|
-
yLeft =
|
|
210
|
+
xLeft = isCategoryAxis ? pointIndex - 1 : dataSeries.getNativeValue(xValues, pointIndex - 1);
|
|
211
|
+
yLeft = dataSeries.getNativeValue(yValues, pointIndex - 1);
|
|
209
212
|
secondPointIndex = pointIndex - 1;
|
|
210
213
|
xRight = xValue;
|
|
211
214
|
yRight = yValue;
|
|
@@ -231,17 +234,17 @@ var testIsHitForLine = function (xCoordinateCalculator, yCoordinateCalculator, x
|
|
|
231
234
|
}
|
|
232
235
|
return { isHit: isHit, secondPointIndex: secondPointIndex };
|
|
233
236
|
};
|
|
234
|
-
var testIsHitForBand = function (isDigitalLine, xCoordinateCalculator, yCoordinateCalculator, xValues, getYValue, getY1Value, pointIndex, xHitCoord, yHitCoord) {
|
|
237
|
+
var testIsHitForBand = function (isDigitalLine, xCoordinateCalculator, yCoordinateCalculator, xValues, getYValue, getY1Value, pointIndex, xHitCoord, yHitCoord, dataSeries) {
|
|
235
238
|
var isHit;
|
|
236
239
|
var xHitValue = xCoordinateCalculator.getDataValue(xHitCoord);
|
|
237
240
|
var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
|
|
238
|
-
var xValue = isCategoryAxis ? pointIndex :
|
|
241
|
+
var xValue = isCategoryAxis ? pointIndex : dataSeries.getNativeValue(xValues, pointIndex);
|
|
239
242
|
var isLeftHit = xValue <= xHitValue;
|
|
240
243
|
var secondPointIndex = isLeftHit ? pointIndex + 1 : pointIndex - 1;
|
|
241
244
|
if (secondPointIndex < 0 || secondPointIndex >= xValues.size()) {
|
|
242
245
|
return { isHit: false, secondPointIndex: undefined };
|
|
243
246
|
}
|
|
244
|
-
var secondPointXValue = isCategoryAxis ? secondPointIndex :
|
|
247
|
+
var secondPointXValue = isCategoryAxis ? secondPointIndex : dataSeries.getNativeValue(xValues, secondPointIndex);
|
|
245
248
|
var xLeft = isLeftHit ? xValue : secondPointXValue;
|
|
246
249
|
var yLeft = isLeftHit ? getYValue(pointIndex) : getYValue(secondPointIndex);
|
|
247
250
|
var y1Left = isLeftHit ? getY1Value(pointIndex) : getY1Value(secondPointIndex);
|
|
@@ -275,10 +278,10 @@ var testIsHitForBand = function (isDigitalLine, xCoordinateCalculator, yCoordina
|
|
|
275
278
|
return { isHit: isHit, secondPointIndex: secondPointIndex };
|
|
276
279
|
};
|
|
277
280
|
var testIsHitForColumn = function (xCoordinateCalculator, yCoordinateCalculator, renderableSeries, xValues, yValues, pointIndex, xHitCoord, yHitCoord) {
|
|
278
|
-
var getDataPointWidth = renderableSeries.getDataPointWidth, dataPointWidth = renderableSeries.dataPointWidth, zeroLineY = renderableSeries.zeroLineY;
|
|
281
|
+
var getDataPointWidth = renderableSeries.getDataPointWidth, dataPointWidth = renderableSeries.dataPointWidth, zeroLineY = renderableSeries.zeroLineY, dataSeries = renderableSeries.dataSeries;
|
|
279
282
|
var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
|
|
280
|
-
var xValue = isCategoryAxis ? pointIndex :
|
|
281
|
-
var yValue =
|
|
283
|
+
var xValue = isCategoryAxis ? pointIndex : dataSeries.getNativeValue(xValues, pointIndex);
|
|
284
|
+
var yValue = dataSeries.getNativeValue(yValues, pointIndex);
|
|
282
285
|
var xCoord = xCoordinateCalculator.getCoordinate(xValue);
|
|
283
286
|
var yCoord = yCoordinateCalculator.getCoordinate(yValue);
|
|
284
287
|
var columnWidth = getDataPointWidth(xCoordinateCalculator, dataPointWidth);
|
|
@@ -289,13 +292,13 @@ var testIsHitForColumn = function (xCoordinateCalculator, yCoordinateCalculator,
|
|
|
289
292
|
return (0, pointUtil_1.testIsInBounds)(xHitCoord, yHitCoord, xCoord - halfWidth, topColumnSide, xCoord + halfWidth, bottomColumnSide);
|
|
290
293
|
};
|
|
291
294
|
var testIsHitForErrorBars = function (xCoordinateCalculator, yCoordinateCalculator, renderableSeries, xValues, yValues, pointIndex, xHitCoord, yHitCoord) {
|
|
292
|
-
var getDataPointWidth = renderableSeries.getDataPointWidth, dataPointWidth = renderableSeries.dataPointWidth, errorDirection = renderableSeries.errorDirection;
|
|
295
|
+
var getDataPointWidth = renderableSeries.getDataPointWidth, dataPointWidth = renderableSeries.dataPointWidth, errorDirection = renderableSeries.errorDirection, dataSeries = renderableSeries.dataSeries;
|
|
293
296
|
var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
|
|
294
297
|
var isVerticalDirection = errorDirection === ErrorDirection_1.EErrorDirection.Vertical;
|
|
295
|
-
var xValue = isCategoryAxis ? pointIndex :
|
|
296
|
-
var yValue =
|
|
297
|
-
var highValue =
|
|
298
|
-
var lowValue =
|
|
298
|
+
var xValue = isCategoryAxis ? pointIndex : dataSeries.getNativeValue(xValues, pointIndex);
|
|
299
|
+
var yValue = dataSeries.getNativeValue(yValues, pointIndex);
|
|
300
|
+
var highValue = dataSeries.getNativeValue(dataSeries.getNativeHighValues(), pointIndex);
|
|
301
|
+
var lowValue = dataSeries.getNativeValue(dataSeries.getNativeLowValues(), pointIndex);
|
|
299
302
|
if (isNaN(highValue))
|
|
300
303
|
highValue = yValue;
|
|
301
304
|
if (isNaN(lowValue))
|
|
@@ -322,10 +325,10 @@ var testIsHitForErrorBars = function (xCoordinateCalculator, yCoordinateCalculat
|
|
|
322
325
|
return { isHit: isHit, highValue: highValue, lowValue: lowValue };
|
|
323
326
|
};
|
|
324
327
|
var testIsHitForImpulse = function (xCoordinateCalculator, yCoordinateCalculator, renderableSeries, xValues, yValues, pointIndex, xHitCoord, yHitCoord, hitTestRadius) {
|
|
325
|
-
var zeroLineY = renderableSeries.zeroLineY;
|
|
328
|
+
var zeroLineY = renderableSeries.zeroLineY, dataSeries = renderableSeries.dataSeries;
|
|
326
329
|
var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
|
|
327
|
-
var xValue = isCategoryAxis ? pointIndex :
|
|
328
|
-
var yValue =
|
|
330
|
+
var xValue = isCategoryAxis ? pointIndex : dataSeries.getNativeValue(xValues, pointIndex);
|
|
331
|
+
var yValue = dataSeries.getNativeValue(yValues, pointIndex);
|
|
329
332
|
var xCoord = xCoordinateCalculator.getCoordinate(xValue);
|
|
330
333
|
var yCoord = yCoordinateCalculator.getCoordinate(yValue);
|
|
331
334
|
var zeroLineYCoord = yCoordinateCalculator.getCoordinate(zeroLineY);
|
|
@@ -336,15 +339,15 @@ var testIsHitForImpulse = function (xCoordinateCalculator, yCoordinateCalculator
|
|
|
336
339
|
var testIsHitForOHLC = function (xCoordinateCalculator, yCoordinateCalculator, renderableSeries, dataSeries, pointIndex, xHitCoord, yHitCoord, hitTestRadius) {
|
|
337
340
|
var getDataPointWidth = renderableSeries.getDataPointWidth, dataPointWidth = renderableSeries.dataPointWidth;
|
|
338
341
|
var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
|
|
339
|
-
var xValue = isCategoryAxis ? pointIndex : dataSeries.getNativeXValues()
|
|
342
|
+
var xValue = isCategoryAxis ? pointIndex : dataSeries.getNativeValue(dataSeries.getNativeXValues(), pointIndex);
|
|
340
343
|
var xCoord = xCoordinateCalculator.getCoordinate(xValue);
|
|
341
|
-
var openValue = dataSeries.getNativeOpenValues()
|
|
344
|
+
var openValue = dataSeries.getNativeValue(dataSeries.getNativeOpenValues(), pointIndex);
|
|
342
345
|
var openCoord = yCoordinateCalculator.getCoordinate(openValue);
|
|
343
|
-
var highValue = dataSeries.getNativeHighValues()
|
|
346
|
+
var highValue = dataSeries.getNativeValue(dataSeries.getNativeHighValues(), pointIndex);
|
|
344
347
|
var highCoord = yCoordinateCalculator.getCoordinate(highValue);
|
|
345
|
-
var lowValue = dataSeries.getNativeLowValues()
|
|
348
|
+
var lowValue = dataSeries.getNativeValue(dataSeries.getNativeLowValues(), pointIndex);
|
|
346
349
|
var lowCoord = yCoordinateCalculator.getCoordinate(lowValue);
|
|
347
|
-
var closeValue = dataSeries.getNativeCloseValues()
|
|
350
|
+
var closeValue = dataSeries.getNativeValue(dataSeries.getNativeCloseValues(), pointIndex);
|
|
348
351
|
var closeCoord = yCoordinateCalculator.getCoordinate(closeValue);
|
|
349
352
|
var columnWidth = getDataPointWidth(xCoordinateCalculator, dataPointWidth);
|
|
350
353
|
var halfWidth = columnWidth / 2;
|
|
@@ -361,7 +364,7 @@ var testIsHitForMountain = function (isDigitalLine, xCoordinateCalculator, yCoor
|
|
|
361
364
|
var isHit;
|
|
362
365
|
var xValues = dataSeries.getNativeXValues();
|
|
363
366
|
var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
|
|
364
|
-
var xValue = isCategoryAxis ? pointIndex :
|
|
367
|
+
var xValue = isCategoryAxis ? pointIndex : dataSeries.getNativeValue(xValues, pointIndex);
|
|
365
368
|
var yValues = dataSeries.getNativeYValues();
|
|
366
369
|
var xHitValue = xCoordinateCalculator.getDataValue(xHitCoord);
|
|
367
370
|
var isLeftHit = xValue <= xHitValue;
|
|
@@ -371,9 +374,13 @@ var testIsHitForMountain = function (isDigitalLine, xCoordinateCalculator, yCoor
|
|
|
371
374
|
}
|
|
372
375
|
var secondPointXValue = isCategoryAxis ? secondPointIndex : xValues.get(secondPointIndex);
|
|
373
376
|
var xLeft = isLeftHit ? xValue : secondPointXValue;
|
|
374
|
-
var yLeft = isLeftHit
|
|
377
|
+
var yLeft = isLeftHit
|
|
378
|
+
? dataSeries.getNativeValue(yValues, pointIndex)
|
|
379
|
+
: dataSeries.getNativeValue(yValues, secondPointIndex);
|
|
375
380
|
var xRight = isLeftHit ? secondPointXValue : xValue;
|
|
376
|
-
var yRight = isLeftHit
|
|
381
|
+
var yRight = isLeftHit
|
|
382
|
+
? dataSeries.getNativeValue(yValues, secondPointIndex)
|
|
383
|
+
: dataSeries.getNativeValue(yValues, pointIndex);
|
|
377
384
|
var xLeftCoord = xCoordinateCalculator.getCoordinate(xLeft);
|
|
378
385
|
var xRightCoord = xCoordinateCalculator.getCoordinate(xRight);
|
|
379
386
|
var yLeftCoord = yCoordinateCalculator.getCoordinate(yLeft);
|
|
@@ -168,7 +168,7 @@ export declare abstract class SciChartSurfaceBase extends DeletableEntity implem
|
|
|
168
168
|
static setRuntimeLicenseKey(keyCode: string): void;
|
|
169
169
|
/**
|
|
170
170
|
* Causes SciChart to always use its built in community non-commercial license. This stops it attempting to look for the license wizard
|
|
171
|
-
* Usage of the community license constitutes
|
|
171
|
+
* Usage of the community license constitutes acceptance of the terms at https://www.scichart.com/community-licensing/
|
|
172
172
|
*/
|
|
173
173
|
static UseCommunityLicense(): void;
|
|
174
174
|
/**
|
|
@@ -189,7 +189,7 @@ var SciChartSurfaceBase = /** @class */ (function (_super) {
|
|
|
189
189
|
};
|
|
190
190
|
/**
|
|
191
191
|
* Causes SciChart to always use its built in community non-commercial license. This stops it attempting to look for the license wizard
|
|
192
|
-
* Usage of the community license constitutes
|
|
192
|
+
* Usage of the community license constitutes acceptance of the terms at https://www.scichart.com/community-licensing/
|
|
193
193
|
*/
|
|
194
194
|
SciChartSurfaceBase.UseCommunityLicense = function () {
|
|
195
195
|
licenseManager2D_1.licenseManager.setRuntimeLicenseKey("community");
|
|
@@ -82,8 +82,18 @@ export declare class SciChart3DSurface extends SciChartSurfaceBase {
|
|
|
82
82
|
static configure(config: TSciChartConfig): void;
|
|
83
83
|
/**
|
|
84
84
|
* Tell SciChart to load the Wasm and Data files from CDN, rather than expecting them to be served by the host server.
|
|
85
|
+
* @deprecated the method name breaks [eslint react-hooks/rules-of-hooks](https://legacy.reactjs.org/docs/hooks-rules.html).
|
|
86
|
+
* To avoid this error in React, use {@link loadWasmFromCDN} instead.
|
|
85
87
|
*/
|
|
86
88
|
static useWasmFromCDN(): void;
|
|
89
|
+
/**
|
|
90
|
+
* Tell SciChart to load the Wasm and Data files from CDN, rather than expecting them to be served by the host server.
|
|
91
|
+
*/
|
|
92
|
+
static loadWasmFromCDN(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Tell SciChart to load the Wasm and Data files from the local server, rather than from CDN.
|
|
95
|
+
*/
|
|
96
|
+
static loadWasmLocal(): void;
|
|
87
97
|
/**
|
|
88
98
|
* Creates a {@link SciChart3DSurface} and {@link TSciChart3D | WebAssembly Context} to occupy the div by element ID in your DOM.
|
|
89
99
|
* @remarks This method is async and must be awaited
|
|
@@ -158,11 +158,25 @@ var SciChart3DSurface = /** @class */ (function (_super) {
|
|
|
158
158
|
};
|
|
159
159
|
/**
|
|
160
160
|
* Tell SciChart to load the Wasm and Data files from CDN, rather than expecting them to be served by the host server.
|
|
161
|
+
* @deprecated the method name breaks [eslint react-hooks/rules-of-hooks](https://legacy.reactjs.org/docs/hooks-rules.html).
|
|
162
|
+
* To avoid this error in React, use {@link loadWasmFromCDN} instead.
|
|
161
163
|
*/
|
|
162
164
|
SciChart3DSurface.useWasmFromCDN = function () {
|
|
163
165
|
exports.sciChartConfig3D.dataUrl = "https://cdn.jsdelivr.net/npm/scichart@".concat(BuildStamp_1.libraryVersion, "/_wasm/scichart3d.data");
|
|
164
166
|
exports.sciChartConfig3D.wasmUrl = "https://cdn.jsdelivr.net/npm/scichart@".concat(BuildStamp_1.libraryVersion, "/_wasm/scichart3d.wasm");
|
|
165
167
|
};
|
|
168
|
+
/**
|
|
169
|
+
* Tell SciChart to load the Wasm and Data files from CDN, rather than expecting them to be served by the host server.
|
|
170
|
+
*/
|
|
171
|
+
SciChart3DSurface.loadWasmFromCDN = function () {
|
|
172
|
+
return SciChart3DSurface.useWasmFromCDN();
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Tell SciChart to load the Wasm and Data files from the local server, rather than from CDN.
|
|
176
|
+
*/
|
|
177
|
+
SciChart3DSurface.loadWasmLocal = function () {
|
|
178
|
+
return SciChart3DSurface.configure(undefined);
|
|
179
|
+
};
|
|
166
180
|
/**
|
|
167
181
|
* Creates a {@link SciChart3DSurface} and {@link TSciChart3D | WebAssembly Context} to occupy the div by element ID in your DOM.
|
|
168
182
|
* @remarks This method is async and must be awaited
|
package/Core/BuildStamp.d.ts
CHANGED
|
@@ -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.
|
|
3
|
+
export declare const libraryVersion = "3.2.555";
|
|
4
4
|
export declare const checkBuildStamp: (wasmContext: TSciChart | TSciChart3D) => boolean;
|
package/Core/BuildStamp.js
CHANGED
|
@@ -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 = "
|
|
4
|
+
var buildStamp = "2024-01-18T00:00:00";
|
|
5
5
|
var result;
|
|
6
6
|
// tslint:disable-next-line:no-var-requires
|
|
7
|
-
exports.libraryVersion = "3.2.
|
|
7
|
+
exports.libraryVersion = "3.2.555";
|
|
8
8
|
var checkBuildStamp = function (wasmContext) {
|
|
9
9
|
if (result !== undefined)
|
|
10
10
|
return result;
|