scichart 2.1.2301 → 2.2.2389
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/Builder/buildAxis.d.ts +7 -0
- package/Builder/buildAxis.js +6 -0
- package/Builder/buildDataSeries.d.ts +19 -1
- package/Builder/buildDataSeries.js +22 -1
- package/Builder/buildModifiers.d.ts +2 -1
- package/Builder/buildSeries.d.ts +7 -2
- package/Builder/buildSeries.js +5 -1
- package/Charting/ChartModifiers/CursorModifier.d.ts +5 -0
- package/Charting/ChartModifiers/CursorModifier.js +15 -10
- package/Charting/ChartModifiers/LegendModifier.d.ts +31 -0
- package/Charting/ChartModifiers/LegendModifier.js +22 -0
- package/Charting/ChartModifiers/ModifierMouseArgs.d.ts +2 -2
- package/Charting/ChartModifiers/ModifierMouseArgs.js +4 -2
- package/Charting/ChartModifiers/RolloverModifier.d.ts +10 -0
- package/Charting/ChartModifiers/RolloverModifier.js +76 -19
- package/Charting/Drawing/WebGlRenderContext2D.js +26 -42
- package/Charting/LayoutManager/LayoutManager.js +6 -1
- package/Charting/Model/BaseHeatmapDataSeries.d.ts +1 -0
- package/Charting/Model/BaseHeatmapDataSeries.js +5 -2
- package/Charting/Model/ChartData/HlcSeriesInfo.d.ts +12 -0
- package/Charting/Model/ChartData/HlcSeriesInfo.js +52 -0
- package/Charting/Model/Filters/HlcCustomFilter.d.ts +41 -0
- package/Charting/Model/Filters/HlcCustomFilter.js +119 -0
- package/Charting/Model/Filters/HlcFilterBase.d.ts +30 -0
- package/Charting/Model/Filters/HlcFilterBase.js +141 -0
- package/Charting/Model/Filters/HlcScaleOffsetFilter.d.ts +18 -0
- package/Charting/Model/Filters/HlcScaleOffsetFilter.js +86 -0
- package/Charting/Model/Filters/XyFilterBase.d.ts +2 -0
- package/Charting/Model/Filters/XyFilterBase.js +6 -0
- package/Charting/Model/Filters/XyyFilterBase.js +9 -0
- package/Charting/Model/Filters/XyzFilterBase.js +12 -3
- package/Charting/Model/HlcDataSeries.d.ts +189 -0
- package/Charting/Model/HlcDataSeries.js +557 -0
- package/Charting/Model/IDataSeries.d.ts +5 -1
- package/Charting/Model/IDataSeries.js +4 -0
- package/Charting/Model/PointSeries/BasePointSeriesWrapped.d.ts +1 -1
- package/Charting/Model/PointSeries/BasePointSeriesWrapped.js +2 -2
- package/Charting/Model/PointSeries/HlcPointSeriesWrapped.d.ts +10 -0
- package/Charting/Model/PointSeries/HlcPointSeriesWrapped.js +31 -0
- package/Charting/Model/PointSeries/IPointSeries.d.ts +5 -0
- package/Charting/Model/PointSeries/XyyPointSeriesWrapped.d.ts +1 -1
- package/Charting/Model/PointSeries/XyyPointSeriesWrapped.js +3 -3
- package/Charting/Numerics/CoordinateCalculators/LogarithmicCoordinateCalculator.d.ts +2 -2
- package/Charting/Numerics/CoordinateCalculators/LogarithmicCoordinateCalculator.js +15 -6
- package/Charting/Services/SciChartRenderer.d.ts +1 -0
- package/Charting/Services/SciChartRenderer.js +6 -0
- package/Charting/Visuals/Annotations/AnnotationBase.d.ts +6 -1
- package/Charting/Visuals/Annotations/AnnotationBase.js +23 -2
- package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +6 -0
- package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +46 -5
- package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +3 -1
- package/Charting/Visuals/Annotations/CustomAnnotation.js +14 -3
- package/Charting/Visuals/Annotations/HorizontalLineAnnotation.d.ts +4 -0
- package/Charting/Visuals/Annotations/HorizontalLineAnnotation.js +3 -2
- package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/RolloverLegendSvgAnnotation.js +13 -3
- package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +13 -0
- package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +71 -14
- package/Charting/Visuals/Annotations/VerticalLineAnnotation.d.ts +2 -0
- package/Charting/Visuals/Annotations/VerticalLineAnnotation.js +3 -2
- package/Charting/Visuals/Annotations/constants.d.ts +2 -1
- package/Charting/Visuals/Annotations/constants.js +1 -0
- package/Charting/Visuals/Axis/AxisBase2D.d.ts +11 -1
- package/Charting/Visuals/Axis/AxisBase2D.js +75 -17
- package/Charting/Visuals/Axis/AxisCore.d.ts +4 -0
- package/Charting/Visuals/Axis/AxisCore.js +6 -0
- package/Charting/Visuals/Axis/AxisRenderer.js +6 -10
- package/Charting/Visuals/Axis/DateTimeNumericAxis.d.ts +11 -0
- package/Charting/Visuals/Axis/DateTimeNumericAxis.js +36 -0
- package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.d.ts +28 -0
- package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +125 -0
- package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.d.ts +34 -0
- package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +82 -0
- package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.d.ts +2 -2
- package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +39 -6
- package/Charting/Visuals/Axis/LogarithmicAxis.d.ts +1 -0
- package/Charting/Visuals/Axis/LogarithmicAxis.js +5 -3
- package/Charting/Visuals/Helpers/NativeObject.d.ts +13 -0
- package/Charting/Visuals/Helpers/NativeObject.js +101 -0
- package/Charting/Visuals/Helpers/createNativeRect.d.ts +2 -2
- package/Charting/Visuals/Helpers/createNativeRect.js +3 -1
- package/Charting/Visuals/Helpers/drawBorder.js +2 -2
- package/Charting/Visuals/Helpers/drawLabel.d.ts +3 -3
- package/Charting/Visuals/Helpers/drawLabel.js +38 -18
- package/Charting/Visuals/I2DSurfaceOptions.d.ts +6 -0
- package/Charting/Visuals/Legend/SciChartLegend.d.ts +4 -0
- package/Charting/Visuals/Legend/SciChartLegend.js +8 -2
- package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +1 -0
- package/Charting/Visuals/Legend/SciChartLegendBase.js +4 -2
- package/Charting/Visuals/Legend/SciChartPieLegend.js +1 -1
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +24 -8
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +109 -31
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +3 -0
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +8 -0
- package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +17 -166
- package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +35 -328
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +5 -2
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +5 -3
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +14 -11
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.d.ts +46 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ErrorSeriesDrawingProvider.js +252 -0
- package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.d.ts +188 -0
- package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.js +357 -0
- package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.js +3 -10
- package/Charting/Visuals/RenderableSeries/HitTest/ErrorSeriesHitTestProvider.d.ts +20 -0
- package/Charting/Visuals/RenderableSeries/HitTest/ErrorSeriesHitTestProvider.js +120 -0
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +6 -0
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +36 -0
- package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +8 -0
- package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +6 -0
- package/Charting/Visuals/RenderableSeries/SeriesVisibleChangedArgs.d.ts +6 -0
- package/Charting/Visuals/RenderableSeries/SeriesVisibleChangedArgs.js +11 -0
- package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +1 -2
- package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.d.ts +22 -0
- package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.js +38 -1
- package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +2 -2
- package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +26 -45
- package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.d.ts +77 -18
- package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +139 -42
- package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -0
- package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +21 -1
- package/Charting/Visuals/RenderableSeries/constants.d.ts +7 -0
- package/Charting/Visuals/RenderableSeries/constants.js +7 -0
- package/Charting/Visuals/SciChartPieSurface/IPieSurfaceOptions.d.ts +25 -2
- package/Charting/Visuals/SciChartPieSurface/PieSegment/IPieSegment.d.ts +9 -1
- package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.d.ts +128 -2
- package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +202 -21
- package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.d.ts +6 -1
- package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.js +5 -0
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +77 -3
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +373 -81
- package/Charting/Visuals/SciChartPieSurface/constants.d.ts +7 -1
- package/Charting/Visuals/SciChartPieSurface/constants.js +6 -0
- package/Charting/Visuals/SciChartSurface.d.ts +13 -2
- package/Charting/Visuals/SciChartSurface.js +39 -3
- package/Charting/Visuals/createMaster.js +17 -13
- package/Charting/Visuals/createSingle.js +5 -3
- package/Charting/Visuals/licenseManager2D.d.ts +6 -0
- package/Charting/Visuals/licenseManager2D.js +98 -9
- package/Charting/Visuals/licenseManager2dState.d.ts +11 -0
- package/Charting/Visuals/licenseManager2dState.js +37 -1
- package/Charting/Visuals/loader.js +4 -1
- package/Charting/Visuals/sciChartInitCommon.d.ts +2 -2
- package/Charting/Visuals/sciChartInitCommon.js +13 -9
- package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +6 -2
- package/Charting3D/Visuals/SciChart3DRenderer.js +1 -1
- package/Charting3D/Visuals/SciChart3DSurface.d.ts +8 -3
- package/Charting3D/Visuals/SciChart3DSurface.js +12 -3
- package/Charting3D/Visuals/createMaster3d.js +20 -14
- package/Charting3D/Visuals/createSingle3d.js +3 -4
- package/Charting3D/Visuals/licenseManager3D.js +3 -1
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/Core/Telemetry.d.ts +7 -0
- package/Core/Telemetry.js +109 -0
- package/Core/storage/localStorageApi.d.ts +4 -0
- package/Core/storage/localStorageApi.js +12 -0
- package/README.md +49 -13
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.js +95 -95
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +97 -97
- package/_wasm/scichart3d.wasm +0 -0
- package/package.json +1 -1
- package/types/AxisType.d.ts +5 -1
- package/types/AxisType.js +4 -0
- package/types/Color.d.ts +1 -0
- package/types/Color.js +1 -0
- package/types/DataFilterType.d.ts +1 -0
- package/types/DataFilterType.js +1 -0
- package/types/DataPointWidthMode.d.ts +13 -0
- package/types/DataPointWidthMode.js +17 -0
- package/types/ErrorDirection.d.ts +13 -0
- package/types/ErrorDirection.js +17 -0
- package/types/ErrorMode.d.ts +17 -0
- package/types/ErrorMode.js +21 -0
- package/types/LabelPlacement.d.ts +8 -0
- package/types/LabelPlacement.js +11 -1
- package/types/LabelProviderType.d.ts +5 -1
- package/types/LabelProviderType.js +4 -0
- package/types/SeriesType.d.ts +3 -1
- package/types/SeriesType.js +2 -0
- package/types/TSciChart.d.ts +8 -2
- package/types/TSciChart3D.d.ts +5 -2
- package/types/TSciChartSurfaceCanvases.d.ts +1 -0
- package/utils/date.d.ts +1 -0
- package/utils/date.js +15 -1
- package/utils/guid.d.ts +6 -0
- package/utils/guid.js +17 -1
|
@@ -72,7 +72,7 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
72
72
|
* @param options Optional parameters {@link IRolloverModifierOptions} used to configure the modifier
|
|
73
73
|
*/
|
|
74
74
|
function RolloverModifier(options) {
|
|
75
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
75
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
76
76
|
var _this = _super.call(this, options) || this;
|
|
77
77
|
_this.type = ChartModifierType_1.EChart2DModifierType.Rollover;
|
|
78
78
|
/**
|
|
@@ -94,11 +94,12 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
94
94
|
_this.allowTooltipOverlappingProperty = false;
|
|
95
95
|
_this.includedSeriesMap = new Map();
|
|
96
96
|
_this.hitTestRenderableSeries = _this.hitTestRenderableSeries.bind(_this);
|
|
97
|
+
_this.placementDivIdProperty = (_a = options === null || options === void 0 ? void 0 : options.placementDivId) !== null && _a !== void 0 ? _a : _this.placementDivIdProperty;
|
|
97
98
|
_this.rolloverLineAnnotation = new LineAnnotation_1.LineAnnotation({
|
|
98
99
|
xCoordinateMode: AnnotationBase_1.ECoordinateMode.Pixel,
|
|
99
100
|
yCoordinateMode: AnnotationBase_1.ECoordinateMode.Pixel,
|
|
100
|
-
strokeThickness: (
|
|
101
|
-
stroke: (
|
|
101
|
+
strokeThickness: (_b = options === null || options === void 0 ? void 0 : options.rolloverLineStrokeThickness) !== null && _b !== void 0 ? _b : 2,
|
|
102
|
+
stroke: (_c = options === null || options === void 0 ? void 0 : options.rolloverLineStroke) !== null && _c !== void 0 ? _c : SciChartSurfaceBase_1.SciChartSurfaceBase.DEFAULT_THEME.cursorLineBrush,
|
|
102
103
|
isHidden: true,
|
|
103
104
|
xAxisId: _this.xAxisId,
|
|
104
105
|
yAxisId: _this.yAxisId
|
|
@@ -111,9 +112,9 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
_this.tooltipLegendTemplate =
|
|
114
|
-
(
|
|
115
|
-
_this.tooltipLegendOffsetX = (
|
|
116
|
-
_this.tooltipLegendOffsetY = (
|
|
115
|
+
(_d = options === null || options === void 0 ? void 0 : options.tooltipLegendTemplate) !== null && _d !== void 0 ? _d : _this.tooltipLegendTemplate;
|
|
116
|
+
_this.tooltipLegendOffsetX = (_e = options === null || options === void 0 ? void 0 : options.tooltipLegendOffsetX) !== null && _e !== void 0 ? _e : _this.tooltipLegendOffsetX;
|
|
117
|
+
_this.tooltipLegendOffsetY = (_f = options === null || options === void 0 ? void 0 : options.tooltipLegendOffsetY) !== null && _f !== void 0 ? _f : _this.tooltipLegendOffsetY;
|
|
117
118
|
if (options === null || options === void 0 ? void 0 : options.tooltipDataTemplate) {
|
|
118
119
|
if (typeof options.tooltipDataTemplate === "string") {
|
|
119
120
|
_this.typeMap.set("tooltipDataTemplate", options.tooltipDataTemplate);
|
|
@@ -122,9 +123,9 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
125
|
_this.tooltipDataTemplateProperty =
|
|
125
|
-
(
|
|
126
|
-
_this.showRolloverLineProperty = (
|
|
127
|
-
_this.showTooltipProperty = (
|
|
126
|
+
(_g = options === null || options === void 0 ? void 0 : options.tooltipDataTemplate) !== null && _g !== void 0 ? _g : _this.tooltipDataTemplateProperty;
|
|
127
|
+
_this.showRolloverLineProperty = (_h = options === null || options === void 0 ? void 0 : options.showRolloverLine) !== null && _h !== void 0 ? _h : _this.showRolloverLineProperty;
|
|
128
|
+
_this.showTooltipProperty = (_j = options === null || options === void 0 ? void 0 : options.showTooltip) !== null && _j !== void 0 ? _j : _this.showTooltipProperty;
|
|
128
129
|
_this.legendAnnotation = new RolloverLegendSvgAnnotation_1.RolloverLegendSvgAnnotation({
|
|
129
130
|
tooltipLegendTemplate: _this.tooltipLegendTemplate,
|
|
130
131
|
tooltipLegendOffsetX: _this.tooltipLegendOffsetX,
|
|
@@ -132,8 +133,8 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
132
133
|
xAxisId: _this.xAxisId,
|
|
133
134
|
yAxisId: _this.yAxisId
|
|
134
135
|
});
|
|
135
|
-
_this.allowTooltipOverlappingProperty = (
|
|
136
|
-
_this.snapToDataPoint = (
|
|
136
|
+
_this.allowTooltipOverlappingProperty = (_k = options === null || options === void 0 ? void 0 : options.allowTooltipOverlapping) !== null && _k !== void 0 ? _k : _this.allowTooltipOverlappingProperty;
|
|
137
|
+
_this.snapToDataPoint = (_l = options === null || options === void 0 ? void 0 : options.snapToDataPoint) !== null && _l !== void 0 ? _l : _this.snapToDataPoint;
|
|
137
138
|
return _this;
|
|
138
139
|
}
|
|
139
140
|
/**
|
|
@@ -416,10 +417,13 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
416
417
|
* @param rs
|
|
417
418
|
*/
|
|
418
419
|
RolloverModifier.prototype.addSeriesAnnotationsToParentSurface = function (rs) {
|
|
419
|
-
if (!this.parentSurface
|
|
420
|
+
if (!this.parentSurface ||
|
|
421
|
+
rs.type === SeriesType_1.ESeriesType.StackedMountainCollection ||
|
|
422
|
+
rs.type === SeriesType_1.ESeriesType.StackedColumnCollection) {
|
|
420
423
|
return;
|
|
424
|
+
}
|
|
421
425
|
rs.rolloverModifierProps.rolloverModifier = this;
|
|
422
|
-
createAnnotations(rs);
|
|
426
|
+
createAnnotations(rs, this.placementDivIdProperty);
|
|
423
427
|
this.parentSurface.modifierAnnotations.add(rs.rolloverModifierProps.marker);
|
|
424
428
|
this.parentSurface.modifierAnnotations.add(rs.rolloverModifierProps.tooltip);
|
|
425
429
|
if (rs.type === SeriesType_1.ESeriesType.BandSeries) {
|
|
@@ -494,11 +498,16 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
494
498
|
var _this = this;
|
|
495
499
|
var rsList = this.getIncludedRenderableSeries();
|
|
496
500
|
rsList.forEach(function (rs) {
|
|
501
|
+
rs.rolloverModifierProps.marker.suspendInvalidate();
|
|
502
|
+
rs.rolloverModifierProps.tooltip.suspendInvalidate();
|
|
497
503
|
rs.rolloverModifierProps.marker.isHidden = true;
|
|
498
504
|
rs.rolloverModifierProps.tooltip.isHidden = true;
|
|
499
505
|
rs.rolloverModifierProps.tooltip.x1 = undefined;
|
|
500
506
|
rs.rolloverModifierProps.tooltip.y1 = undefined;
|
|
507
|
+
// TODO should be more general than looking at series type
|
|
501
508
|
if (rs.type === SeriesType_1.ESeriesType.BandSeries) {
|
|
509
|
+
rs.rolloverModifierProps1.marker.suspendInvalidate();
|
|
510
|
+
rs.rolloverModifierProps1.tooltip.suspendInvalidate();
|
|
502
511
|
rs.rolloverModifierProps1.marker.isHidden = true;
|
|
503
512
|
rs.rolloverModifierProps1.tooltip.isHidden = true;
|
|
504
513
|
rs.rolloverModifierProps1.tooltip.x1 = undefined;
|
|
@@ -506,6 +515,14 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
506
515
|
}
|
|
507
516
|
});
|
|
508
517
|
if (this.mousePosition !== EMousePosition.SeriesArea) {
|
|
518
|
+
rsList.forEach(function (rs) {
|
|
519
|
+
rs.rolloverModifierProps.marker.resumeInvalidate();
|
|
520
|
+
rs.rolloverModifierProps.tooltip.resumeInvalidate();
|
|
521
|
+
if (rs.type === SeriesType_1.ESeriesType.BandSeries) {
|
|
522
|
+
rs.rolloverModifierProps1.marker.resumeInvalidate();
|
|
523
|
+
rs.rolloverModifierProps1.tooltip.resumeInvalidate();
|
|
524
|
+
}
|
|
525
|
+
});
|
|
509
526
|
return;
|
|
510
527
|
}
|
|
511
528
|
var tooltipArray = [];
|
|
@@ -545,10 +562,18 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
545
562
|
var showTooltip = _this.showTooltip && el.seriesInfo.isHit;
|
|
546
563
|
var showMarker = el.seriesInfo.isHit;
|
|
547
564
|
if (el.isY1) {
|
|
548
|
-
updateRolloverModifierProps(rs.rolloverModifierProps1, rs, el, showTooltip, showMarker);
|
|
565
|
+
updateRolloverModifierProps(rs.rolloverModifierProps1, rs, el, showTooltip, showMarker, _this.placementDivId);
|
|
549
566
|
}
|
|
550
567
|
else {
|
|
551
|
-
updateRolloverModifierProps(rs.rolloverModifierProps, rs, el, showTooltip, showMarker);
|
|
568
|
+
updateRolloverModifierProps(rs.rolloverModifierProps, rs, el, showTooltip, showMarker, _this.placementDivId);
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
rsList.forEach(function (rs) {
|
|
572
|
+
rs.rolloverModifierProps.marker.resumeInvalidate();
|
|
573
|
+
rs.rolloverModifierProps.tooltip.resumeInvalidate();
|
|
574
|
+
if (rs.type === SeriesType_1.ESeriesType.BandSeries) {
|
|
575
|
+
rs.rolloverModifierProps1.marker.resumeInvalidate();
|
|
576
|
+
rs.rolloverModifierProps1.tooltip.resumeInvalidate();
|
|
552
577
|
}
|
|
553
578
|
});
|
|
554
579
|
};
|
|
@@ -572,6 +597,30 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
572
597
|
})
|
|
573
598
|
.filter(function (rs) { return rs !== undefined; });
|
|
574
599
|
};
|
|
600
|
+
Object.defineProperty(RolloverModifier.prototype, "placementDivId", {
|
|
601
|
+
/**
|
|
602
|
+
* Gets or sets the parent div element reference or id for the Tooltip
|
|
603
|
+
*/
|
|
604
|
+
get: function () {
|
|
605
|
+
return this.placementDivIdProperty;
|
|
606
|
+
},
|
|
607
|
+
/**
|
|
608
|
+
* Gets or sets the parent div element reference or id for the Tooltip
|
|
609
|
+
*/
|
|
610
|
+
set: function (value) {
|
|
611
|
+
var _this = this;
|
|
612
|
+
var _a;
|
|
613
|
+
if (this.placementDivIdProperty !== value) {
|
|
614
|
+
this.placementDivIdProperty = value;
|
|
615
|
+
(_a = this.parentSurface) === null || _a === void 0 ? void 0 : _a.renderableSeries.asArray().forEach(function (rs) {
|
|
616
|
+
rs.rolloverModifierProps.tooltip.placementDivId = _this.placementDivIdProperty;
|
|
617
|
+
rs.rolloverModifierProps1.tooltip.placementDivId = _this.placementDivIdProperty;
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
enumerable: false,
|
|
622
|
+
configurable: true
|
|
623
|
+
});
|
|
575
624
|
return RolloverModifier;
|
|
576
625
|
}(ChartModifierBase2D_1.ChartModifierBase2D));
|
|
577
626
|
exports.RolloverModifier = RolloverModifier;
|
|
@@ -674,7 +723,7 @@ exports.calcTooltipPositions = calcTooltipPositions;
|
|
|
674
723
|
* @description Creates MarkerAnnotation and TooltipAnnotation and assigns to rolloverSeries properties
|
|
675
724
|
* @param rs RenderableSeries
|
|
676
725
|
*/
|
|
677
|
-
var createAnnotations = function (rs) {
|
|
726
|
+
var createAnnotations = function (rs, placementDivId) {
|
|
678
727
|
var _a, _b, _c, _d, _e, _f;
|
|
679
728
|
if (!rs.rolloverModifierProps.marker) {
|
|
680
729
|
rs.rolloverModifierProps.marker = new RolloverMarkerSvgAnnotation_1.RolloverMarkerSvgAnnotation(rs.rolloverModifierProps);
|
|
@@ -688,7 +737,8 @@ var createAnnotations = function (rs) {
|
|
|
688
737
|
rs.rolloverModifierProps.tooltipTitle = (_b = (_a = rs.rolloverModifierProps.tooltipTitle) !== null && _a !== void 0 ? _a : rs.getDataSeriesName()) !== null && _b !== void 0 ? _b : "";
|
|
689
738
|
rs.rolloverModifierProps.tooltipColor = (_c = rs.rolloverModifierProps.tooltipColor) !== null && _c !== void 0 ? _c : rs.stroke;
|
|
690
739
|
rs.rolloverModifierProps.tooltip = new RolloverTooltipSvgAnnotation_1.RolloverTooltipSvgAnnotation(rs.rolloverModifierProps, {
|
|
691
|
-
seriesType: rs.type
|
|
740
|
+
seriesType: rs.type,
|
|
741
|
+
placementDivId: placementDivId
|
|
692
742
|
});
|
|
693
743
|
// Rollover tooltips for multiple Y-Axes are not supported for stacked series
|
|
694
744
|
if (!rs.isStacked) {
|
|
@@ -707,14 +757,16 @@ var createAnnotations = function (rs) {
|
|
|
707
757
|
bandRs.rolloverModifierProps1.tooltipTitle =
|
|
708
758
|
(_e = (_d = bandRs.rolloverModifierProps1.tooltipTitle) !== null && _d !== void 0 ? _d : bandRs.getDataSeriesName()) !== null && _e !== void 0 ? _e : "";
|
|
709
759
|
bandRs.rolloverModifierProps1.tooltipColor = (_f = bandRs.rolloverModifierProps1.tooltipColor) !== null && _f !== void 0 ? _f : bandRs.strokeY1;
|
|
710
|
-
bandRs.rolloverModifierProps1.tooltip = new RolloverTooltipSvgAnnotation_1.RolloverTooltipSvgAnnotation(bandRs.rolloverModifierProps1
|
|
760
|
+
bandRs.rolloverModifierProps1.tooltip = new RolloverTooltipSvgAnnotation_1.RolloverTooltipSvgAnnotation(bandRs.rolloverModifierProps1, {
|
|
761
|
+
placementDivId: placementDivId
|
|
762
|
+
});
|
|
711
763
|
bandRs.rolloverModifierProps1.tooltip.xAxisId = bandRs.xAxisId;
|
|
712
764
|
bandRs.rolloverModifierProps1.tooltip.yAxisId = bandRs.yAxisId;
|
|
713
765
|
}
|
|
714
766
|
}
|
|
715
767
|
};
|
|
716
768
|
/** @ignore */
|
|
717
|
-
var updateRolloverModifierProps = function (rolloverRSProps, rs, tooltipProps, showTooltip, showMarker) {
|
|
769
|
+
var updateRolloverModifierProps = function (rolloverRSProps, rs, tooltipProps, showTooltip, showMarker, placementDivId) {
|
|
718
770
|
rolloverRSProps.tooltip.seriesInfo = tooltipProps.seriesInfo;
|
|
719
771
|
if (tooltipProps.isY1) {
|
|
720
772
|
rolloverRSProps.tooltip.seriesInfo.isFirstSeries = false;
|
|
@@ -732,4 +784,9 @@ var updateRolloverModifierProps = function (rolloverRSProps, rs, tooltipProps, s
|
|
|
732
784
|
rolloverRSProps.tooltip.xCoordShift = tooltipProps.xCoordShift;
|
|
733
785
|
rolloverRSProps.tooltip.yCoordShift = tooltipProps.yCoordShift;
|
|
734
786
|
}
|
|
787
|
+
else {
|
|
788
|
+
if (placementDivId) {
|
|
789
|
+
rolloverRSProps.tooltip.delete();
|
|
790
|
+
}
|
|
791
|
+
}
|
|
735
792
|
};
|
|
@@ -6,6 +6,7 @@ var Guard_1 = require("../../Core/Guard");
|
|
|
6
6
|
var RenderLayer_1 = require("../../types/RenderLayer");
|
|
7
7
|
var parseColor_1 = require("../../utils/parseColor");
|
|
8
8
|
var createNativeRect_1 = require("../Visuals/Helpers/createNativeRect");
|
|
9
|
+
var NativeObject_1 = require("../Visuals/Helpers/NativeObject");
|
|
9
10
|
var WebGlBrush_1 = require("./WebGlBrush");
|
|
10
11
|
var WebGlPen_1 = require("./WebGlPen");
|
|
11
12
|
/**
|
|
@@ -195,26 +196,18 @@ var WebGlRenderContext2D = /** @class */ (function () {
|
|
|
195
196
|
Guard_1.Guard.notNull(scrtPen, "WasmPen.scrtPen");
|
|
196
197
|
var isStrips = false;
|
|
197
198
|
var nativeContext = this.getNativeContext();
|
|
198
|
-
var vertices =
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
nativeContext.DrawLinesBatchVec(isStrips, vertices, scrtPen);
|
|
211
|
-
nativeContext.PopMatrix();
|
|
212
|
-
nativeContext.PopState();
|
|
213
|
-
}
|
|
214
|
-
finally {
|
|
215
|
-
vertices.clear();
|
|
216
|
-
vertices.delete();
|
|
217
|
-
}
|
|
199
|
+
var vertices = (0, NativeObject_1.getVectorColorVertex)(this.webAssemblyContext);
|
|
200
|
+
var vertex0 = (0, NativeObject_1.getVertex)(this.webAssemblyContext, x1, y1);
|
|
201
|
+
vertices.push_back(vertex0);
|
|
202
|
+
var vertex1 = (0, NativeObject_1.getVertex)(this.webAssemblyContext, x2, y2);
|
|
203
|
+
vertices.push_back(vertex1);
|
|
204
|
+
nativeContext.PushMatrix();
|
|
205
|
+
nativeContext.PushState();
|
|
206
|
+
nativeContext.Translate(viewRect.x, viewRect.y);
|
|
207
|
+
nativeContext.SetClipRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);
|
|
208
|
+
nativeContext.DrawLinesBatchVec(isStrips, vertices, scrtPen);
|
|
209
|
+
nativeContext.PopMatrix();
|
|
210
|
+
nativeContext.PopState();
|
|
218
211
|
};
|
|
219
212
|
/**
|
|
220
213
|
* @inheritDoc
|
|
@@ -229,26 +222,19 @@ var WebGlRenderContext2D = /** @class */ (function () {
|
|
|
229
222
|
Guard_1.Guard.notNull(scrtPen, "WebGlPen.scrtPen");
|
|
230
223
|
var isStrips = lineDrawMode === ELineDrawMode.PolyLine;
|
|
231
224
|
var nativeContext = this.getNativeContext();
|
|
232
|
-
var vertices =
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
vertices.push_back(vertex);
|
|
238
|
-
vertex.delete();
|
|
239
|
-
}
|
|
240
|
-
nativeContext.PushMatrix();
|
|
241
|
-
nativeContext.PushState();
|
|
242
|
-
nativeContext.Translate(viewRect.x, viewRect.y);
|
|
243
|
-
nativeContext.SetClipRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);
|
|
244
|
-
nativeContext.DrawLinesBatchVec(isStrips, vertices, scrtPen);
|
|
245
|
-
nativeContext.PopMatrix();
|
|
246
|
-
nativeContext.PopState();
|
|
247
|
-
}
|
|
248
|
-
finally {
|
|
249
|
-
vertices.clear();
|
|
250
|
-
vertices.delete();
|
|
225
|
+
var vertices = (0, NativeObject_1.getVectorColorVertex)(this.webAssemblyContext);
|
|
226
|
+
for (var i = 0; i < xyValues.length; i += 2) {
|
|
227
|
+
var vertex = (0, NativeObject_1.getVertex)(this.webAssemblyContext, xyValues[i], xyValues[i + 1]);
|
|
228
|
+
vertex.m_vPosition.z = 0;
|
|
229
|
+
vertices.push_back(vertex);
|
|
251
230
|
}
|
|
231
|
+
nativeContext.PushMatrix();
|
|
232
|
+
nativeContext.PushState();
|
|
233
|
+
nativeContext.Translate(viewRect.x, viewRect.y);
|
|
234
|
+
nativeContext.SetClipRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);
|
|
235
|
+
nativeContext.DrawLinesBatchVec(isStrips, vertices, scrtPen);
|
|
236
|
+
nativeContext.PopMatrix();
|
|
237
|
+
nativeContext.PopState();
|
|
252
238
|
};
|
|
253
239
|
/**
|
|
254
240
|
* @inheritDoc
|
|
@@ -258,14 +244,13 @@ var WebGlRenderContext2D = /** @class */ (function () {
|
|
|
258
244
|
var nativeContext = this.getNativeContext();
|
|
259
245
|
var scrtBrush = fillBrush.scrtBrush;
|
|
260
246
|
Guard_1.Guard.notNull(scrtBrush, "WebGlBrush.scrtBrush");
|
|
261
|
-
var vertices =
|
|
247
|
+
var vertices = (0, NativeObject_1.getVectorRectVertex)(this.webAssemblyContext);
|
|
262
248
|
var anchorParams = new this.webAssemblyContext.TSRVector4();
|
|
263
249
|
try {
|
|
264
250
|
anchorParams.x = 0;
|
|
265
251
|
anchorParams.y = 0;
|
|
266
252
|
var nativeRect = (0, createNativeRect_1.createNativeRect)(this.webAssemblyContext, rect.x, rect.y, rect.right, rect.bottom);
|
|
267
253
|
vertices.push_back(nativeRect);
|
|
268
|
-
nativeRect.delete();
|
|
269
254
|
nativeContext.PushMatrix();
|
|
270
255
|
nativeContext.PushState();
|
|
271
256
|
nativeContext.Translate(viewRect.x, viewRect.y);
|
|
@@ -276,7 +261,6 @@ var WebGlRenderContext2D = /** @class */ (function () {
|
|
|
276
261
|
}
|
|
277
262
|
finally {
|
|
278
263
|
anchorParams.delete();
|
|
279
|
-
vertices.delete();
|
|
280
264
|
}
|
|
281
265
|
}
|
|
282
266
|
if (strokePen) {
|
|
@@ -100,7 +100,12 @@ var LayoutManager = /** @class */ (function () {
|
|
|
100
100
|
var bottomStart = topEnd + (remainingHeight < MIN_SERIES_AREA_SIZE ? MIN_SERIES_AREA_SIZE : remainingHeight);
|
|
101
101
|
var bottomEnd = bottomStart + this.chartLayoutState.bottomOuterAreaSize;
|
|
102
102
|
// layout center parts
|
|
103
|
-
this.
|
|
103
|
+
if (this.sciChartSurface.drawSeriesBehindAxis) {
|
|
104
|
+
this.layoutChartCenter(leftStart, topStart, rightEnd, bottomEnd);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
this.layoutChartCenter(leftEnd, topEnd, rightStart, bottomStart);
|
|
108
|
+
}
|
|
104
109
|
// layout outer axes
|
|
105
110
|
this.leftOuterAxesLayoutStrategy.layoutAxes(leftStart, topEnd, leftEnd - this.sciChartSurface.leftViewportBorder, bottomStart, this.axesGroupedByLayoutStrategy.leftOuterAxes);
|
|
106
111
|
this.rightOuterAxesLayoutStrategy.layoutAxes(rightStart + this.sciChartSurface.rightViewportBorder, topEnd, rightEnd, bottomStart, this.axesGroupedByLayoutStrategy.rightOuterAxes);
|
|
@@ -91,6 +91,7 @@ export declare abstract class BaseHeatmapDataSeries implements IHeatmapSeries {
|
|
|
91
91
|
private hasNaNsProperty;
|
|
92
92
|
private lastZMin;
|
|
93
93
|
private lastZMax;
|
|
94
|
+
private lastFillValuesOutOfRange;
|
|
94
95
|
private metadataGeneratorProperty;
|
|
95
96
|
private changeCountProperty;
|
|
96
97
|
/**
|
|
@@ -49,6 +49,7 @@ var BaseHeatmapDataSeries = /** @class */ (function () {
|
|
|
49
49
|
this.hasNaNsProperty = false;
|
|
50
50
|
this.lastZMin = -1;
|
|
51
51
|
this.lastZMax = -1;
|
|
52
|
+
this.lastFillValuesOutOfRange = undefined;
|
|
52
53
|
this.metadataGeneratorProperty = undefined;
|
|
53
54
|
this.changeCountProperty = 0;
|
|
54
55
|
this.webAssemblyContext = webAssemblyContext;
|
|
@@ -409,10 +410,12 @@ var BaseHeatmapDataSeries = /** @class */ (function () {
|
|
|
409
410
|
if (this.hasDataChangesProperty ||
|
|
410
411
|
size !== this.normalizedVector.size() ||
|
|
411
412
|
colorMap.minimum !== this.lastZMin ||
|
|
412
|
-
colorMap.maximum !== this.lastZMax
|
|
413
|
+
colorMap.maximum !== this.lastZMax ||
|
|
414
|
+
fillValuesOutOfRange !== this.lastFillValuesOutOfRange) {
|
|
413
415
|
this.recreateNormalizedVector(colorMap.minimum, colorMap.maximum, fillValuesOutOfRange);
|
|
414
416
|
this.lastZMin = colorMap.minimum;
|
|
415
417
|
this.lastZMax = colorMap.maximum;
|
|
418
|
+
this.lastFillValuesOutOfRange = fillValuesOutOfRange;
|
|
416
419
|
this.hasDataChangesProperty = false;
|
|
417
420
|
}
|
|
418
421
|
return this.normalizedVector;
|
|
@@ -441,7 +444,7 @@ var BaseHeatmapDataSeries = /** @class */ (function () {
|
|
|
441
444
|
if (isNaN(this.zValuesProperty[y][x])) {
|
|
442
445
|
zValue = 0;
|
|
443
446
|
}
|
|
444
|
-
else if (zValue < newZMin) {
|
|
447
|
+
else if (zValue < zMin - newZMin) {
|
|
445
448
|
zValue = fillValuesOutOfRange ? zMin - newZMin : 0;
|
|
446
449
|
}
|
|
447
450
|
else if (zValue > zMax - newZMin) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HitTestInfo } from "../../Visuals/RenderableSeries/HitTest/HitTestInfo";
|
|
2
|
+
import { IRenderableSeries } from "../../Visuals/RenderableSeries/IRenderableSeries";
|
|
3
|
+
import { SeriesInfo } from "./SeriesInfo";
|
|
4
|
+
export declare class HlcSeriesInfo extends SeriesInfo {
|
|
5
|
+
highValue: number;
|
|
6
|
+
lowValue: number;
|
|
7
|
+
closeValue: number;
|
|
8
|
+
constructor(renderableSeries: IRenderableSeries, hitTestInfo: HitTestInfo);
|
|
9
|
+
get formattedHighValue(): string;
|
|
10
|
+
get formattedLowValue(): string;
|
|
11
|
+
get formattedCloseValue(): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.HlcSeriesInfo = void 0;
|
|
19
|
+
var SeriesInfo_1 = require("./SeriesInfo");
|
|
20
|
+
var HlcSeriesInfo = /** @class */ (function (_super) {
|
|
21
|
+
__extends(HlcSeriesInfo, _super);
|
|
22
|
+
function HlcSeriesInfo(renderableSeries, hitTestInfo) {
|
|
23
|
+
var _this = _super.call(this, renderableSeries, hitTestInfo) || this;
|
|
24
|
+
_this.highValue = hitTestInfo.highValue;
|
|
25
|
+
_this.lowValue = hitTestInfo.lowValue;
|
|
26
|
+
_this.closeValue = hitTestInfo.closeValue;
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
Object.defineProperty(HlcSeriesInfo.prototype, "formattedHighValue", {
|
|
30
|
+
get: function () {
|
|
31
|
+
return this.getYCursorFormattedValue(this.highValue);
|
|
32
|
+
},
|
|
33
|
+
enumerable: false,
|
|
34
|
+
configurable: true
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(HlcSeriesInfo.prototype, "formattedLowValue", {
|
|
37
|
+
get: function () {
|
|
38
|
+
return this.getYCursorFormattedValue(this.lowValue);
|
|
39
|
+
},
|
|
40
|
+
enumerable: false,
|
|
41
|
+
configurable: true
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(HlcSeriesInfo.prototype, "formattedCloseValue", {
|
|
44
|
+
get: function () {
|
|
45
|
+
return this.getYCursorFormattedValue(this.closeValue);
|
|
46
|
+
},
|
|
47
|
+
enumerable: false,
|
|
48
|
+
configurable: true
|
|
49
|
+
});
|
|
50
|
+
return HlcSeriesInfo;
|
|
51
|
+
}(SeriesInfo_1.SeriesInfo));
|
|
52
|
+
exports.HlcSeriesInfo = HlcSeriesInfo;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BaseDataSeries } from "../BaseDataSeries";
|
|
2
|
+
import { HlcFilterBase, IHlcFilterOptions } from "./HlcFilterBase";
|
|
3
|
+
import { TfilterFunction } from "./XyCustomFilter";
|
|
4
|
+
/**
|
|
5
|
+
* Options for the {@link HlcCustomFilter}
|
|
6
|
+
*/
|
|
7
|
+
export interface IHlcCustomFilterOptions extends IHlcFilterOptions {
|
|
8
|
+
/**
|
|
9
|
+
* The function to apply to each high value in the original series
|
|
10
|
+
* If this is not set, the filterFunction will be applied.
|
|
11
|
+
*/
|
|
12
|
+
highfilterFunction?: TfilterFunction;
|
|
13
|
+
/**
|
|
14
|
+
* The function to apply to each low value in the original series
|
|
15
|
+
* If this is not set, the filterFunction will be applied.
|
|
16
|
+
*/
|
|
17
|
+
lowfilterFunction?: TfilterFunction;
|
|
18
|
+
/**
|
|
19
|
+
* The function to apply to each close value in the original series,
|
|
20
|
+
* And to the other values if they do not have specific functions set
|
|
21
|
+
*/
|
|
22
|
+
closefilterFunction?: TfilterFunction;
|
|
23
|
+
}
|
|
24
|
+
export declare class HlcCustomFilter extends HlcFilterBase {
|
|
25
|
+
get closefilterFunction(): (index: number, y: number) => number;
|
|
26
|
+
set closefilterFunction(ff: (index: number, y: number) => number);
|
|
27
|
+
get highfilterFunction(): (index: number, y: number) => number;
|
|
28
|
+
set highfilterFunction(ff: (index: number, y: number) => number);
|
|
29
|
+
get lowfilterFunction(): (index: number, y: number) => number;
|
|
30
|
+
set lowfilterFunction(ff: (index: number, y: number) => number);
|
|
31
|
+
constructor(originalSeries: BaseDataSeries, options?: IHlcCustomFilterOptions);
|
|
32
|
+
protected highfilterFunctionProperty(index: number, y: number): number;
|
|
33
|
+
protected lowfilterFunctionProperty(index: number, y: number): number;
|
|
34
|
+
protected closefilterFunctionProperty(index: number, y: number): number;
|
|
35
|
+
protected filterOnAppend(count: number): void;
|
|
36
|
+
protected filterOnUpdate(index: number): void;
|
|
37
|
+
protected filterOnInsert(startIndex: number, count: number): void;
|
|
38
|
+
protected filterOnRemove(startIndex: number, count: number): void;
|
|
39
|
+
protected filterAll(): void;
|
|
40
|
+
private filter;
|
|
41
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.HlcCustomFilter = void 0;
|
|
19
|
+
var IDataSeries_1 = require("../IDataSeries");
|
|
20
|
+
var HlcFilterBase_1 = require("./HlcFilterBase");
|
|
21
|
+
var HlcCustomFilter = /** @class */ (function (_super) {
|
|
22
|
+
__extends(HlcCustomFilter, _super);
|
|
23
|
+
function HlcCustomFilter(originalSeries, options) {
|
|
24
|
+
var _a, _b, _c;
|
|
25
|
+
var _this = _super.call(this, originalSeries, options) || this;
|
|
26
|
+
if (originalSeries.type !== IDataSeries_1.EDataSeriesType.Hlc) {
|
|
27
|
+
throw new Error("HlcCustomFilter only supports Hlc original series");
|
|
28
|
+
}
|
|
29
|
+
_this.closefilterFunctionProperty = (_a = options === null || options === void 0 ? void 0 : options.closefilterFunction) !== null && _a !== void 0 ? _a : _this.closefilterFunctionProperty;
|
|
30
|
+
_this.highfilterFunctionProperty = (_b = options === null || options === void 0 ? void 0 : options.highfilterFunction) !== null && _b !== void 0 ? _b : _this.closefilterFunction;
|
|
31
|
+
_this.lowfilterFunctionProperty = (_c = options === null || options === void 0 ? void 0 : options.lowfilterFunction) !== null && _c !== void 0 ? _c : _this.closefilterFunction;
|
|
32
|
+
if (_this.getOriginalCount() > 0 &&
|
|
33
|
+
((options === null || options === void 0 ? void 0 : options.closefilterFunction) || (options === null || options === void 0 ? void 0 : options.highfilterFunction) || (options === null || options === void 0 ? void 0 : options.lowfilterFunction))) {
|
|
34
|
+
_this.filterAll();
|
|
35
|
+
}
|
|
36
|
+
return _this;
|
|
37
|
+
}
|
|
38
|
+
Object.defineProperty(HlcCustomFilter.prototype, "closefilterFunction", {
|
|
39
|
+
get: function () {
|
|
40
|
+
return this.closefilterFunctionProperty;
|
|
41
|
+
},
|
|
42
|
+
set: function (ff) {
|
|
43
|
+
this.closefilterFunctionProperty = ff;
|
|
44
|
+
this.filterAll();
|
|
45
|
+
},
|
|
46
|
+
enumerable: false,
|
|
47
|
+
configurable: true
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(HlcCustomFilter.prototype, "highfilterFunction", {
|
|
50
|
+
get: function () {
|
|
51
|
+
return this.highfilterFunctionProperty;
|
|
52
|
+
},
|
|
53
|
+
set: function (ff) {
|
|
54
|
+
this.highfilterFunctionProperty = ff;
|
|
55
|
+
this.filterAll();
|
|
56
|
+
},
|
|
57
|
+
enumerable: false,
|
|
58
|
+
configurable: true
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(HlcCustomFilter.prototype, "lowfilterFunction", {
|
|
61
|
+
get: function () {
|
|
62
|
+
return this.lowfilterFunctionProperty;
|
|
63
|
+
},
|
|
64
|
+
set: function (ff) {
|
|
65
|
+
this.lowfilterFunctionProperty = ff;
|
|
66
|
+
this.filterAll();
|
|
67
|
+
},
|
|
68
|
+
enumerable: false,
|
|
69
|
+
configurable: true
|
|
70
|
+
});
|
|
71
|
+
HlcCustomFilter.prototype.highfilterFunctionProperty = function (index, y) {
|
|
72
|
+
return y;
|
|
73
|
+
};
|
|
74
|
+
HlcCustomFilter.prototype.lowfilterFunctionProperty = function (index, y) {
|
|
75
|
+
return y;
|
|
76
|
+
};
|
|
77
|
+
HlcCustomFilter.prototype.closefilterFunctionProperty = function (index, y) {
|
|
78
|
+
return y;
|
|
79
|
+
};
|
|
80
|
+
HlcCustomFilter.prototype.filterOnAppend = function (count) {
|
|
81
|
+
var _a = this.filter(this.count(), count), xValues = _a.xValues, highValues = _a.highValues, lowValues = _a.lowValues, closeValues = _a.closeValues;
|
|
82
|
+
this.appendRange(xValues, closeValues, highValues, lowValues);
|
|
83
|
+
};
|
|
84
|
+
HlcCustomFilter.prototype.filterOnUpdate = function (index) {
|
|
85
|
+
var hlcSeries = this.originalSeries;
|
|
86
|
+
this.update(index, this.highfilterFunction(index, hlcSeries.getNativeHighValues().get(index)), this.lowfilterFunction(index, hlcSeries.getNativeLowValues().get(index)), this.closefilterFunction(index, hlcSeries.getNativeYValues().get(index)));
|
|
87
|
+
};
|
|
88
|
+
HlcCustomFilter.prototype.filterOnInsert = function (startIndex, count) {
|
|
89
|
+
var _a = this.filter(startIndex, count), xValues = _a.xValues, highValues = _a.highValues, lowValues = _a.lowValues, closeValues = _a.closeValues;
|
|
90
|
+
this.insertRange(startIndex, xValues, closeValues, highValues, lowValues);
|
|
91
|
+
};
|
|
92
|
+
HlcCustomFilter.prototype.filterOnRemove = function (startIndex, count) {
|
|
93
|
+
this.removeRange(startIndex, count);
|
|
94
|
+
};
|
|
95
|
+
HlcCustomFilter.prototype.filterAll = function () {
|
|
96
|
+
this.clear();
|
|
97
|
+
var _a = this.filter(0, this.getOriginalCount()), xValues = _a.xValues, highValues = _a.highValues, lowValues = _a.lowValues, closeValues = _a.closeValues;
|
|
98
|
+
this.appendRange(xValues, closeValues, highValues, lowValues);
|
|
99
|
+
};
|
|
100
|
+
HlcCustomFilter.prototype.filter = function (startIndex, count) {
|
|
101
|
+
var rawX = this.getOriginalXValues();
|
|
102
|
+
var rawClose = this.getOriginalYValues();
|
|
103
|
+
var rawHigh = this.getOriginalHighValues();
|
|
104
|
+
var rawLow = this.getOriginalLowValues();
|
|
105
|
+
var xValues = [];
|
|
106
|
+
var highValues = [];
|
|
107
|
+
var lowValues = [];
|
|
108
|
+
var closeValues = [];
|
|
109
|
+
for (var i = startIndex; i < startIndex + count; i++) {
|
|
110
|
+
xValues.push(rawX.get(i));
|
|
111
|
+
highValues.push(this.highfilterFunction(i, rawHigh.get(i)));
|
|
112
|
+
lowValues.push(this.lowfilterFunction(i, rawLow.get(i)));
|
|
113
|
+
closeValues.push(this.closefilterFunction(i, rawClose.get(i)));
|
|
114
|
+
}
|
|
115
|
+
return { xValues: xValues, highValues: highValues, lowValues: lowValues, closeValues: closeValues };
|
|
116
|
+
};
|
|
117
|
+
return HlcCustomFilter;
|
|
118
|
+
}(HlcFilterBase_1.HlcFilterBase));
|
|
119
|
+
exports.HlcCustomFilter = HlcCustomFilter;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SCRTDoubleVector } from "../../../types/TSciChart";
|
|
2
|
+
import { BaseDataSeries } from "../BaseDataSeries";
|
|
3
|
+
import { HlcDataSeries, IHlcDataSeriesOptions } from "../HlcDataSeries";
|
|
4
|
+
import { IDataChangeArgs } from "../IDataSeries";
|
|
5
|
+
import { EDataSeriesField } from "./XyFilterBase";
|
|
6
|
+
export interface IHlcFilterOptions extends IHlcDataSeriesOptions {
|
|
7
|
+
closefield?: EDataSeriesField;
|
|
8
|
+
highfield?: EDataSeriesField;
|
|
9
|
+
lowfield?: EDataSeriesField;
|
|
10
|
+
}
|
|
11
|
+
export declare abstract class HlcFilterBase extends HlcDataSeries {
|
|
12
|
+
readonly closefield: EDataSeriesField;
|
|
13
|
+
readonly highfield: EDataSeriesField;
|
|
14
|
+
readonly lowfield: EDataSeriesField;
|
|
15
|
+
readonly originalSeries: BaseDataSeries;
|
|
16
|
+
constructor(originalSeries: BaseDataSeries, options?: IHlcFilterOptions);
|
|
17
|
+
getOriginalXValues(): SCRTDoubleVector;
|
|
18
|
+
getOriginalYValues(): SCRTDoubleVector;
|
|
19
|
+
getOriginalHighValues(): SCRTDoubleVector;
|
|
20
|
+
getOriginalLowValues(): SCRTDoubleVector;
|
|
21
|
+
getOriginalCount(): number;
|
|
22
|
+
protected abstract filterAll(): void;
|
|
23
|
+
protected onOriginalPropertyChanged(name: string): void;
|
|
24
|
+
protected filterOnAppend(count: number): void;
|
|
25
|
+
protected filterOnUpdate(index: number): void;
|
|
26
|
+
protected filterOnInsert(startIndex: number, count: number): void;
|
|
27
|
+
protected filterOnRemove(startIndex: number, count: number): void;
|
|
28
|
+
protected onClear(): void;
|
|
29
|
+
protected onBaseDataChanged(args: IDataChangeArgs): void;
|
|
30
|
+
}
|