scichart 3.2.528 → 3.2.532
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 +2 -5
- package/Charting/ChartModifiers/RolloverModifier.d.ts +5 -0
- package/Charting/ChartModifiers/RolloverModifier.js +18 -18
- package/Charting/ChartModifiers/VerticalSliceModifier.js +8 -5
- package/Charting/Visuals/Legend/SciChartLegend.js +4 -4
- package/Charting/Visuals/Legend/SciChartLegendBase.js +3 -4
- package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +3 -0
- package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.js +78 -0
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +4 -0
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +5 -1
- package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.js +2 -0
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.wasm +0 -0
- package/index.dev.js +125 -40
- package/index.min.js +1 -1
- package/package.json +1 -1
|
@@ -200,11 +200,8 @@ var DataPointSelectionModifier = /** @class */ (function (_super) {
|
|
|
200
200
|
if (!translatedPoint) {
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
this.startPoint = pointFromTrans;
|
|
206
|
-
this.isClicked = true;
|
|
207
|
-
}
|
|
203
|
+
this.startPoint = translatedPoint;
|
|
204
|
+
this.isClicked = true;
|
|
208
205
|
args.handled = true;
|
|
209
206
|
};
|
|
210
207
|
/**
|
|
@@ -91,6 +91,11 @@ export interface IRolloverModifierOptions extends IChartModifierBaseOptions {
|
|
|
91
91
|
* If this is set greater than the default of zero, the toolip will only show values for points in this radius, rather than all points on the vertical line
|
|
92
92
|
*/
|
|
93
93
|
hitTestRadius?: number;
|
|
94
|
+
/**
|
|
95
|
+
* Sets if the axis label for the rollover Line should be shown. default false.
|
|
96
|
+
* Customize this futher after the modifier has been created by setting properties on rolloverModifer.rolloverLineAnnotation
|
|
97
|
+
*/
|
|
98
|
+
showAxisLabel?: boolean;
|
|
94
99
|
}
|
|
95
100
|
/**
|
|
96
101
|
* The RolloverModifier provides tooltip and cursor behavior on a 2D {@link SciChartSurface}
|
|
@@ -118,7 +118,7 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
118
118
|
return _this;
|
|
119
119
|
}
|
|
120
120
|
RolloverModifier.prototype.createLine = function (options) {
|
|
121
|
-
var _a, _b;
|
|
121
|
+
var _a, _b, _c;
|
|
122
122
|
return new LineAnnotation_1.LineAnnotation({
|
|
123
123
|
xCoordinateMode: AnnotationBase_1.ECoordinateMode.Pixel,
|
|
124
124
|
yCoordinateMode: AnnotationBase_1.ECoordinateMode.Pixel,
|
|
@@ -126,7 +126,8 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
126
126
|
strokeThickness: (_a = options === null || options === void 0 ? void 0 : options.rolloverLineStrokeThickness) !== null && _a !== void 0 ? _a : 2,
|
|
127
127
|
stroke: (_b = options === null || options === void 0 ? void 0 : options.rolloverLineStroke) !== null && _b !== void 0 ? _b : SciChartSurfaceBase_1.SciChartSurfaceBase.DEFAULT_THEME.cursorLineBrush,
|
|
128
128
|
xAxisId: this.xAxisId,
|
|
129
|
-
yAxisId: this.yAxisId
|
|
129
|
+
yAxisId: this.yAxisId,
|
|
130
|
+
showLabel: (_c = options === null || options === void 0 ? void 0 : options.showAxisLabel) !== null && _c !== void 0 ? _c : false
|
|
130
131
|
});
|
|
131
132
|
};
|
|
132
133
|
/**
|
|
@@ -378,6 +379,7 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
378
379
|
};
|
|
379
380
|
/** @inheritDoc */
|
|
380
381
|
RolloverModifier.prototype.toJSON = function () {
|
|
382
|
+
var _a, _b;
|
|
381
383
|
var json = _super.prototype.toJSON.call(this);
|
|
382
384
|
var options = {
|
|
383
385
|
snapToDataPoint: this.snapToDataPoint,
|
|
@@ -389,6 +391,7 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
389
391
|
rolloverLineStrokeThickness: this.rolloverLineStrokeThickness,
|
|
390
392
|
showRolloverLine: this.showRolloverLine,
|
|
391
393
|
showTooltip: this.showTooltip,
|
|
394
|
+
showAxisLabel: (_b = (_a = this.rolloverLineAnnotation) === null || _a === void 0 ? void 0 : _a.showLabel) !== null && _b !== void 0 ? _b : false,
|
|
392
395
|
tooltipDataTemplate: this.typeMap.get("tooltipDataTemplate"),
|
|
393
396
|
tooltipLegendOffsetX: this.tooltipLegendOffsetX,
|
|
394
397
|
tooltipLegendOffsetY: this.tooltipLegendOffsetY,
|
|
@@ -465,12 +468,15 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
465
468
|
}
|
|
466
469
|
this.getRolloverProps(rs).rolloverModifier = this;
|
|
467
470
|
createAnnotations(rs, this.getRolloverProps(rs), this.getRolloverProps1(rs), this.placementDivIdProperty);
|
|
468
|
-
this.
|
|
469
|
-
this.parentSurface.modifierAnnotations.
|
|
470
|
-
|
|
471
|
-
this.
|
|
472
|
-
|
|
473
|
-
|
|
471
|
+
var marker = this.getRolloverProps(rs).marker;
|
|
472
|
+
if (!this.parentSurface.modifierAnnotations.contains(marker)) {
|
|
473
|
+
this.parentSurface.modifierAnnotations.add(this.getRolloverProps(rs).marker);
|
|
474
|
+
this.parentSurface.modifierAnnotations.add(this.getRolloverProps(rs).tooltip);
|
|
475
|
+
if (rs.type === SeriesType_1.ESeriesType.BandSeries) {
|
|
476
|
+
this.getRolloverProps1(rs).rolloverModifier = this;
|
|
477
|
+
this.parentSurface.modifierAnnotations.add(this.getRolloverProps1(rs).marker);
|
|
478
|
+
this.parentSurface.modifierAnnotations.add(this.getRolloverProps1(rs).tooltip);
|
|
479
|
+
}
|
|
474
480
|
}
|
|
475
481
|
};
|
|
476
482
|
RolloverModifier.prototype.getRolloverProps = function (rs) {
|
|
@@ -789,11 +795,8 @@ var createAnnotations = function (rs, rolloverModifierProps, rolloverModifierPro
|
|
|
789
795
|
var _a, _b, _c, _d;
|
|
790
796
|
if (!rolloverModifierProps.marker) {
|
|
791
797
|
rolloverModifierProps.marker = new RolloverMarkerSvgAnnotation_1.RolloverMarkerSvgAnnotation(rolloverModifierProps);
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
rolloverModifierProps.marker.xAxisId = rs.xAxisId;
|
|
795
|
-
rolloverModifierProps.marker.yAxisId = rs.yAxisId;
|
|
796
|
-
}
|
|
798
|
+
rolloverModifierProps.marker.xAxisId = rs.xAxisId;
|
|
799
|
+
rolloverModifierProps.marker.yAxisId = rs.yAxisId;
|
|
797
800
|
}
|
|
798
801
|
if (!rolloverModifierProps.tooltip) {
|
|
799
802
|
rolloverModifierProps.tooltipTitle = (_b = (_a = rolloverModifierProps.tooltipTitle) !== null && _a !== void 0 ? _a : rs.getDataSeriesName()) !== null && _b !== void 0 ? _b : "";
|
|
@@ -803,11 +806,8 @@ var createAnnotations = function (rs, rolloverModifierProps, rolloverModifierPro
|
|
|
803
806
|
seriesType: rs.type,
|
|
804
807
|
placementDivId: placementDivId
|
|
805
808
|
});
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
rolloverModifierProps.tooltip.xAxisId = rs.xAxisId;
|
|
809
|
-
rolloverModifierProps.tooltip.yAxisId = rs.yAxisId;
|
|
810
|
-
}
|
|
809
|
+
rolloverModifierProps.tooltip.xAxisId = rs.xAxisId;
|
|
810
|
+
rolloverModifierProps.tooltip.yAxisId = rs.yAxisId;
|
|
811
811
|
}
|
|
812
812
|
if (rs.type === SeriesType_1.ESeriesType.BandSeries) {
|
|
813
813
|
var bandRs = rs;
|
|
@@ -124,19 +124,22 @@ var VerticalSliceModifier = /** @class */ (function (_super) {
|
|
|
124
124
|
var xAxis = this.parentSurface.getXAxisById(this.xAxisId);
|
|
125
125
|
var coordCalc = xAxis.getCurrentCoordinateCalculator();
|
|
126
126
|
if (this.xCoordinateMode === AnnotationBase_1.ECoordinateMode.Pixel) {
|
|
127
|
-
this.x1 = (0, translate_1.translateToNotScaled)(x);
|
|
127
|
+
this.x1 = Math.min(Math.max(xAxis.viewRect.left, (0, translate_1.translateToNotScaled)(x)), xAxis.viewRect.right);
|
|
128
128
|
}
|
|
129
129
|
else if (this.xCoordinateMode === AnnotationBase_1.ECoordinateMode.Relative) {
|
|
130
|
-
this.
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
var newX = (x - (this.isVerticalChart() ? xAxis.viewRect.top : xAxis.viewRect.left)) /
|
|
131
|
+
coordCalc.viewportDimension;
|
|
132
|
+
this.x1 = Math.min(Math.max(0, newX), 1);
|
|
133
133
|
}
|
|
134
134
|
else {
|
|
135
135
|
// DataValue
|
|
136
136
|
var xt = this.isVerticalChart()
|
|
137
137
|
? (0, translate_1.translateFromCanvasToSeriesViewRectY)(x, this.parentSurface.seriesViewRect)
|
|
138
138
|
: (0, translate_1.translateFromCanvasToSeriesViewRectX)(x, this.parentSurface.seriesViewRect);
|
|
139
|
-
|
|
139
|
+
var newX = coordCalc.getDataValue(xt);
|
|
140
|
+
if (!isNaN(newX)) {
|
|
141
|
+
this.x1 = newX;
|
|
142
|
+
}
|
|
140
143
|
}
|
|
141
144
|
// Consider optional snap to dataPoint here
|
|
142
145
|
this.update();
|
|
@@ -125,9 +125,9 @@ var SciChartLegend = /** @class */ (function (_super) {
|
|
|
125
125
|
};
|
|
126
126
|
/** @inheritDoc */
|
|
127
127
|
SciChartLegend.prototype.getInnerHTML = function () {
|
|
128
|
-
var _a, _b;
|
|
129
|
-
var backgroundColor = (_a = this.backgroundColor) !== null && _a !== void 0 ? _a : this.parentSurfaceProperty.themeProvider.legendBackgroundBrush;
|
|
130
|
-
var color = (
|
|
128
|
+
var _a, _b, _c, _d, _e, _f;
|
|
129
|
+
var backgroundColor = (_a = this.backgroundColor) !== null && _a !== void 0 ? _a : (_c = (_b = this.parentSurfaceProperty) === null || _b === void 0 ? void 0 : _b.themeProvider) === null || _c === void 0 ? void 0 : _c.legendBackgroundBrush;
|
|
130
|
+
var color = (_d = this.textColor) !== null && _d !== void 0 ? _d : (_f = (_e = this.parentSurfaceProperty) === null || _e === void 0 ? void 0 : _e.themeProvider) === null || _f === void 0 ? void 0 : _f.labelForegroundBrush;
|
|
131
131
|
var legendItems = this.renderableSeriesArray.map(function (rs, index) {
|
|
132
132
|
var _a;
|
|
133
133
|
return ({
|
|
@@ -138,7 +138,7 @@ var SciChartLegend = /** @class */ (function (_super) {
|
|
|
138
138
|
gradient: undefined
|
|
139
139
|
});
|
|
140
140
|
});
|
|
141
|
-
var
|
|
141
|
+
var _g = this.parentSurfaceProperty.getSeriesViewRectPadding(false), left = _g.left, top = _g.top, right = _g.right, bottom = _g.bottom;
|
|
142
142
|
var margin = this.isExternal()
|
|
143
143
|
? new Thickness_1.Thickness(this.margin, this.margin, this.margin, this.margin)
|
|
144
144
|
: new Thickness_1.Thickness(top + this.margin, right + this.margin, bottom + this.margin, left + this.margin);
|
|
@@ -81,6 +81,7 @@ var SciChartLegendBase = /** @class */ (function (_super) {
|
|
|
81
81
|
// No default here as need theme from parent surface
|
|
82
82
|
_this.backgroundColorProperty = options === null || options === void 0 ? void 0 : options.backgroundColor;
|
|
83
83
|
_this.textColorProperty = options === null || options === void 0 ? void 0 : options.textColor;
|
|
84
|
+
_this.update = _this.update.bind(_this);
|
|
84
85
|
return _this;
|
|
85
86
|
}
|
|
86
87
|
SciChartLegendBase.prototype.setInvalidateParentSurface = function (value) {
|
|
@@ -108,16 +109,14 @@ var SciChartLegendBase = /** @class */ (function (_super) {
|
|
|
108
109
|
* @param sciChartSurface
|
|
109
110
|
*/
|
|
110
111
|
SciChartLegendBase.prototype.attachTo = function (sciChartSurface) {
|
|
111
|
-
var _this = this;
|
|
112
112
|
this.setParentSurface(sciChartSurface);
|
|
113
113
|
this.setRootDiv(sciChartSurface.domDivContainer);
|
|
114
114
|
this.setInvalidateParentSurface(sciChartSurface.invalidateElement);
|
|
115
|
-
sciChartSurface.rendered.subscribe(
|
|
116
|
-
_this.update();
|
|
117
|
-
});
|
|
115
|
+
sciChartSurface.rendered.subscribe(this.update);
|
|
118
116
|
};
|
|
119
117
|
SciChartLegendBase.prototype.detach = function () {
|
|
120
118
|
this.setRootDiv(undefined);
|
|
119
|
+
this.parentSurfaceProperty.rendered.unsubscribe(this.update);
|
|
121
120
|
this.setInvalidateParentSurface(undefined);
|
|
122
121
|
this.setParentSurface(undefined);
|
|
123
122
|
this.delete();
|
|
@@ -8,8 +8,11 @@ import { BaseRenderableSeries } from "./BaseRenderableSeries";
|
|
|
8
8
|
import { IHitTestProvider } from "./HitTest/IHitTestProvider";
|
|
9
9
|
import { IBaseRenderableSeriesOptions } from "./IBaseRenderableSeriesOptions";
|
|
10
10
|
export interface IBaseOhlcRenderableSeriesOptions extends IBaseRenderableSeriesOptions {
|
|
11
|
+
/** Sets the stoke when candlestick close is greater than open, as an HTML color code */
|
|
11
12
|
strokeUp?: string;
|
|
13
|
+
/** Sets the stoke when candlestick close is less than open, as an HTML color code */
|
|
12
14
|
strokeDown?: string;
|
|
15
|
+
/** Sets the width of candles as a fraction of available space. Valid values range from 0.0 - 1.0 */
|
|
13
16
|
dataPointWidth?: number;
|
|
14
17
|
}
|
|
15
18
|
export declare abstract class BaseOhlcRenderableSeries extends BaseRenderableSeries {
|
|
@@ -336,7 +336,8 @@ var BaseStackedRenderableSeries = /** @class */ (function (_super) {
|
|
|
336
336
|
* instead set on the {@link StackedColumnCollection} or {@link StackedMountainCollection}
|
|
337
337
|
*/
|
|
338
338
|
get: function () {
|
|
339
|
-
|
|
339
|
+
var _a;
|
|
340
|
+
return (_a = this.parentCollection) === null || _a === void 0 ? void 0 : _a.yAxisId;
|
|
340
341
|
},
|
|
341
342
|
/**
|
|
342
343
|
* yAxisId property is not supported for BaseStackedRenderableSeries,
|
|
@@ -118,7 +118,7 @@ var LineSeriesDrawingProvider = /** @class */ (function (_super) {
|
|
|
118
118
|
this.args.digitalYX = lineType === BaseLineRenderableSeries_1.ELineType.DigitalYX;
|
|
119
119
|
this.args.forceShaderMethod = true;
|
|
120
120
|
this.args.containsNaN = containsNaN;
|
|
121
|
-
this.args.forceClamp =
|
|
121
|
+
this.args.forceClamp = !this.args.isDigitalLine;
|
|
122
122
|
this.args.lineGaps = containsNaN
|
|
123
123
|
? drawNaNAs === WebGlRenderContext2D_1.ELineDrawMode.DiscontinuousLine
|
|
124
124
|
? this.webAssemblyContext.SCRTLineGapMode.DrawGaps
|
|
@@ -62,6 +62,84 @@ var OhlcSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
62
62
|
}
|
|
63
63
|
return hitTestInfo;
|
|
64
64
|
};
|
|
65
|
+
// Alternate method that deals slighty better with unsorted data where multiple candles share an x value, but fails for large candles.
|
|
66
|
+
// See the new Editable Event Markers demo for yet another method which does better still, for a slightly special case
|
|
67
|
+
// public hitTest(x: number, y: number, hitTestRadius: number = 0): HitTestInfo {
|
|
68
|
+
// const hitTestPoint = this.getTranslatedHitTestPoint(x, y);
|
|
69
|
+
// if (!hitTestPoint) {
|
|
70
|
+
// return HitTestInfo.empty();
|
|
71
|
+
// }
|
|
72
|
+
// const { xCoordinateCalculator, yCoordinateCalculator, isVerticalChart } = this.currentRenderPassData;
|
|
73
|
+
// const xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
74
|
+
// const yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
75
|
+
// const renderableSeries = this.parentSeries as BaseOhlcRenderableSeries;
|
|
76
|
+
// const dataSeries = this.parentSeries.dataSeries as OhlcDataSeries;
|
|
77
|
+
// if (!dataSeries) {
|
|
78
|
+
// return HitTestInfo.empty();
|
|
79
|
+
// }
|
|
80
|
+
// const isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
|
|
81
|
+
// const xValues = isCategoryAxis ? dataSeries.getNativeIndexes() : dataSeries.getNativeXValues();
|
|
82
|
+
// const isSorted = dataSeries.dataDistributionCalculator.isSortedAscending;
|
|
83
|
+
// const nearestClose = hitTestHelpers.getNearestPoint(
|
|
84
|
+
// this.webAssemblyContext,
|
|
85
|
+
// xCoordinateCalculator,
|
|
86
|
+
// yCoordinateCalculator,
|
|
87
|
+
// xValues,
|
|
88
|
+
// dataSeries.getNativeCloseValues(),
|
|
89
|
+
// isSorted,
|
|
90
|
+
// xHitCoord,
|
|
91
|
+
// yHitCoord,
|
|
92
|
+
// hitTestRadius
|
|
93
|
+
// );
|
|
94
|
+
// const nearestOpen = hitTestHelpers.getNearestPoint(
|
|
95
|
+
// this.webAssemblyContext,
|
|
96
|
+
// xCoordinateCalculator,
|
|
97
|
+
// yCoordinateCalculator,
|
|
98
|
+
// xValues,
|
|
99
|
+
// dataSeries.getNativeOpenValues(),
|
|
100
|
+
// isSorted,
|
|
101
|
+
// xHitCoord,
|
|
102
|
+
// yHitCoord,
|
|
103
|
+
// hitTestRadius
|
|
104
|
+
// );
|
|
105
|
+
// const nearestPoint = nearestClose.distance < nearestOpen.distance ? nearestClose : nearestOpen;
|
|
106
|
+
// const xNativeValues = dataSeries.getNativeXValues();
|
|
107
|
+
// const yNativeValues = dataSeries.getNativeYValues();
|
|
108
|
+
// const hitTestInfo = hitTestHelpers.createHitTestInfo(
|
|
109
|
+
// this.parentSeries,
|
|
110
|
+
// xCoordinateCalculator,
|
|
111
|
+
// yCoordinateCalculator,
|
|
112
|
+
// isVerticalChart,
|
|
113
|
+
// dataSeries,
|
|
114
|
+
// xNativeValues,
|
|
115
|
+
// yNativeValues,
|
|
116
|
+
// xHitCoord,
|
|
117
|
+
// yHitCoord,
|
|
118
|
+
// nearestPoint.nearestPointIndex,
|
|
119
|
+
// hitTestRadius,
|
|
120
|
+
// nearestPoint.distance
|
|
121
|
+
// );
|
|
122
|
+
// if (nearestPoint.nearestPointIndex >= 0) {
|
|
123
|
+
// const res = hitTestHelpers.testIsHitForOHLC(
|
|
124
|
+
// xCoordinateCalculator,
|
|
125
|
+
// yCoordinateCalculator,
|
|
126
|
+
// renderableSeries,
|
|
127
|
+
// dataSeries,
|
|
128
|
+
// nearestPoint.nearestPointIndex,
|
|
129
|
+
// xHitCoord,
|
|
130
|
+
// yHitCoord,
|
|
131
|
+
// hitTestRadius
|
|
132
|
+
// );
|
|
133
|
+
// hitTestInfo.isHit = res.isHit;
|
|
134
|
+
// hitTestInfo.openValue = res.openValue;
|
|
135
|
+
// hitTestInfo.highValue = res.highValue;
|
|
136
|
+
// hitTestInfo.lowValue = res.lowValue;
|
|
137
|
+
// hitTestInfo.closeValue = res.closeValue;
|
|
138
|
+
// } else {
|
|
139
|
+
// hitTestInfo.isHit = false;
|
|
140
|
+
// }
|
|
141
|
+
// return hitTestInfo;
|
|
142
|
+
// }
|
|
65
143
|
/**
|
|
66
144
|
* @inheritDoc
|
|
67
145
|
*/
|
|
@@ -15,6 +15,10 @@ import { IRenderableSeries } from "../IRenderableSeries";
|
|
|
15
15
|
import { HitTestInfo } from "./HitTestInfo";
|
|
16
16
|
export declare const hitTestHelpers: {
|
|
17
17
|
createHitTestInfo: (renderableSeries: IRenderableSeries, xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, isVerticalChart: boolean, dataSeries: BaseDataSeries, xNativeValues: SCRTDoubleVector, yNativeValues: SCRTDoubleVector, xHitCoord: number, yHitCoord: number, nearestPointIndex: number, hitTestRadius: number, distance?: number) => HitTestInfo;
|
|
18
|
+
getNearestPoint: (webassemblyContext: TSciChart, xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, xValues: SCRTDoubleVector, yValues: SCRTDoubleVector, isSorted: boolean, xHitCoord: number, yHitCoord: number, hitTestRadius: number) => {
|
|
19
|
+
nearestPointIndex: number;
|
|
20
|
+
distance: number;
|
|
21
|
+
};
|
|
18
22
|
getNearestXPoint: (webAssemblyContext: TSciChart, xCoordinateCalculator: CoordinateCalculatorBase, dataSeries: IDataSeries, xHitCoord: number, isSorted: boolean) => number;
|
|
19
23
|
getNearestXyPoint: (webassemblyContext: TSciChart, xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, dataSeries: IDataSeries, xHitCoord: number, yHitCoord: number, hitTestRadius: number) => {
|
|
20
24
|
nearestPointIndex: number;
|
|
@@ -83,9 +83,12 @@ var getNearestXyPoint = function (webassemblyContext, xCoordinateCalculator, yCo
|
|
|
83
83
|
var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
|
|
84
84
|
var dataX = isCategoryAxis ? dataSeries.getNativeIndexes() : dataSeries.getNativeXValues();
|
|
85
85
|
var dataY = dataSeries.getNativeYValues();
|
|
86
|
+
return getNearestPoint(webassemblyContext, xCoordinateCalculator, yCoordinateCalculator, dataX, dataY, dataSeries.dataDistributionCalculator.isSortedAscending, xHitCoord, yHitCoord, hitTestRadius);
|
|
87
|
+
};
|
|
88
|
+
var getNearestPoint = function (webassemblyContext, xCoordinateCalculator, yCoordinateCalculator, xValues, yValues, isSorted, xHitCoord, yHitCoord, hitTestRadius) {
|
|
86
89
|
var result;
|
|
87
90
|
try {
|
|
88
|
-
result = webassemblyContext.SCRTHitTestHelper.GetNearestXyPoint(xCoordinateCalculator.nativeCalculator, yCoordinateCalculator.nativeCalculator,
|
|
91
|
+
result = webassemblyContext.SCRTHitTestHelper.GetNearestXyPoint(xCoordinateCalculator.nativeCalculator, yCoordinateCalculator.nativeCalculator, xValues, yValues, isSorted, xHitCoord, yHitCoord, hitTestRadius !== null && hitTestRadius !== void 0 ? hitTestRadius : 1 // Default to 1 here so unsorted data will get nearest by x and y
|
|
89
92
|
);
|
|
90
93
|
return { nearestPointIndex: result.minD, distance: result.maxD };
|
|
91
94
|
}
|
|
@@ -396,6 +399,7 @@ var testIsHitForMountain = function (isDigitalLine, xCoordinateCalculator, yCoor
|
|
|
396
399
|
};
|
|
397
400
|
exports.hitTestHelpers = {
|
|
398
401
|
createHitTestInfo: createHitTestInfo,
|
|
402
|
+
getNearestPoint: getNearestPoint,
|
|
399
403
|
getNearestXPoint: getNearestXPoint,
|
|
400
404
|
getNearestXyPoint: getNearestXyPoint,
|
|
401
405
|
getNearestXyyPoint: getNearestXyyPoint,
|
package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.js
CHANGED
|
@@ -143,9 +143,11 @@ var RolloverModifierRenderableSeriesProps = /** @class */ (function () {
|
|
|
143
143
|
if (!((_a = this.marker) === null || _a === void 0 ? void 0 : _a.isDeleted)) {
|
|
144
144
|
this.marker = (0, Deleter_1.deleteSafe)(this.marker);
|
|
145
145
|
}
|
|
146
|
+
this.marker = undefined;
|
|
146
147
|
if (!((_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.isDeleted)) {
|
|
147
148
|
this.tooltip = (0, Deleter_1.deleteSafe)(this.tooltip);
|
|
148
149
|
}
|
|
150
|
+
this.tooltip = undefined;
|
|
149
151
|
};
|
|
150
152
|
RolloverModifierRenderableSeriesProps.prototype.notifyPropertyChanged = function (propertyName) {
|
|
151
153
|
if (this.invalidateParentCallback) {
|
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.532";
|
|
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 = "2023-
|
|
4
|
+
var buildStamp = "2023-12-01T00: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.532";
|
|
8
8
|
var checkBuildStamp = function (wasmContext) {
|
|
9
9
|
if (result !== undefined)
|
|
10
10
|
return result;
|