scichart 2.2.2351 → 2.2.2393
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/buildSeries.d.ts +7 -2
- package/Builder/buildSeries.js +5 -1
- package/Charting/ChartModifiers/ModifierMouseArgs.d.ts +2 -2
- package/Charting/ChartModifiers/ModifierMouseArgs.js +4 -2
- package/Charting/Drawing/WebGlRenderContext2D.js +26 -42
- package/Charting/Model/BaseHeatmapDataSeries.js +1 -1
- 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/HlcPointSeriesWrapped.d.ts +10 -0
- package/Charting/Model/PointSeries/HlcPointSeriesWrapped.js +31 -0
- package/Charting/Model/PointSeries/IPointSeries.d.ts +5 -0
- 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/RolloverTooltipSvgAnnotation.js +8 -0
- package/Charting/Visuals/Axis/AxisBase2D.d.ts +1 -1
- package/Charting/Visuals/Axis/AxisBase2D.js +9 -22
- 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 +7 -2
- package/Charting/Visuals/Axis/LabelProvider/PieLabelProvider.js +9 -4
- package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +18 -2
- 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/Legend/SciChartLegend.js +1 -1
- 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 +9 -2
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +74 -22
- 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/StackedColumnCollection.js +1 -2
- package/Charting/Visuals/RenderableSeries/constants.d.ts +5 -0
- package/Charting/Visuals/RenderableSeries/constants.js +5 -0
- package/Charting/Visuals/SciChartPieSurface/IPieSurfaceOptions.d.ts +2 -1
- package/Charting/Visuals/SciChartPieSurface/PieSegment/IPieSegment.d.ts +5 -0
- package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.d.ts +116 -1
- package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +139 -4
- package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.d.ts +4 -1
- package/Charting/Visuals/SciChartPieSurface/PieSegment/constants.js +3 -0
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +13 -3
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +114 -74
- package/Charting/Visuals/SciChartPieSurface/constants.d.ts +2 -1
- package/Charting/Visuals/SciChartPieSurface/constants.js +1 -0
- package/Charting/Visuals/createMaster.js +15 -11
- package/Charting/Visuals/createSingle.js +3 -1
- 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/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 +22 -16
- package/Charting3D/Visuals/createSingle3d.js +5 -6
- 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 +10 -10
- 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/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/NumericFormat.d.ts +4 -0
- package/types/NumericFormat.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/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
- package/utils/number.js +15 -2
package/Builder/buildAxis.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AxisBase2D } from "../Charting/Visuals/Axis/AxisBase2D";
|
|
2
2
|
import { ICategoryAxisOptions } from "../Charting/Visuals/Axis/CategoryAxis";
|
|
3
|
+
import { IDateTimeNumericAxisOptions } from "../Charting/Visuals/Axis/DateTimeNumericAxis";
|
|
3
4
|
import { ILabelOptions } from "../Charting/Visuals/Axis/LabelProvider/LabelProvider";
|
|
4
5
|
import { ITextLabelOptions } from "../Charting/Visuals/Axis/LabelProvider/TextLabelProvider";
|
|
5
6
|
import { ILogarithmicAxisOptions } from "../Charting/Visuals/Axis/LogarithmicAxis";
|
|
@@ -17,6 +18,9 @@ export declare type TAxisDefinition = {
|
|
|
17
18
|
} | {
|
|
18
19
|
type: EAxisType.CategoryAxis;
|
|
19
20
|
options?: ICategoryAxisOptions;
|
|
21
|
+
} | {
|
|
22
|
+
type: EAxisType.DateTimeNumericAxis;
|
|
23
|
+
options?: IDateTimeNumericAxisOptions;
|
|
20
24
|
};
|
|
21
25
|
/** Definition of a {@link LabelProviderBase2D}, comprising a {@link ELabelProviderType} and the relevant options */
|
|
22
26
|
export declare type TLabelProviderDefinition = {
|
|
@@ -34,6 +38,9 @@ export declare type TLabelProviderDefinition = {
|
|
|
34
38
|
} | {
|
|
35
39
|
type: ELabelProviderType.Text;
|
|
36
40
|
options?: ITextLabelOptions;
|
|
41
|
+
} | {
|
|
42
|
+
type: ELabelProviderType.Pie;
|
|
43
|
+
options?: ILabelOptions;
|
|
37
44
|
};
|
|
38
45
|
/**
|
|
39
46
|
* Build one or more axes from a definition that can be pure data.
|
package/Builder/buildAxis.js
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildAxes = void 0;
|
|
4
4
|
var CategoryAxis_1 = require("../Charting/Visuals/Axis/CategoryAxis");
|
|
5
|
+
var DateTimeNumericAxis_1 = require("../Charting/Visuals/Axis/DateTimeNumericAxis");
|
|
5
6
|
var DateLabelProvider_1 = require("../Charting/Visuals/Axis/LabelProvider/DateLabelProvider");
|
|
6
7
|
var LogarithmicLabelProvider_1 = require("../Charting/Visuals/Axis/LabelProvider/LogarithmicLabelProvider");
|
|
7
8
|
var NumericLabelProvider_1 = require("../Charting/Visuals/Axis/LabelProvider/NumericLabelProvider");
|
|
9
|
+
var PieLabelProvider_1 = require("../Charting/Visuals/Axis/LabelProvider/PieLabelProvider");
|
|
8
10
|
var SmartDateLabelProvider_1 = require("../Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider");
|
|
9
11
|
var TextLabelProvider_1 = require("../Charting/Visuals/Axis/LabelProvider/TextLabelProvider");
|
|
10
12
|
var LogarithmicAxis_1 = require("../Charting/Visuals/Axis/LogarithmicAxis");
|
|
@@ -20,6 +22,7 @@ var classFactory_1 = require("./classFactory");
|
|
|
20
22
|
(0, classFactory_1.registerType)(BaseType_1.EBaseType.LabelProvider, LabelProviderType_1.ELabelProviderType.Logarithmic, function (options) { return new LogarithmicLabelProvider_1.LogarithmicLabelProvider(options); }, true);
|
|
21
23
|
(0, classFactory_1.registerType)(BaseType_1.EBaseType.LabelProvider, LabelProviderType_1.ELabelProviderType.SmartDate, function (options) { return new SmartDateLabelProvider_1.SmartDateLabelProvider(); }, true);
|
|
22
24
|
(0, classFactory_1.registerType)(BaseType_1.EBaseType.LabelProvider, LabelProviderType_1.ELabelProviderType.Text, function (options) { return new TextLabelProvider_1.TextLabelProvider(options); }, true);
|
|
25
|
+
(0, classFactory_1.registerType)(BaseType_1.EBaseType.LabelProvider, LabelProviderType_1.ELabelProviderType.Pie, function (options) { return new PieLabelProvider_1.PieLabelProvider(options); }, true);
|
|
23
26
|
/**
|
|
24
27
|
* Build one or more axes from a definition that can be pure data.
|
|
25
28
|
* @param wasmContext A {@link TSciChart | SciChart 2D WebAssembly Context} or {@link TSciChart | SciChart 3D WebAssembly Context}
|
|
@@ -55,6 +58,9 @@ var buildAxis = function (wasmContext, definition) {
|
|
|
55
58
|
case AxisType_1.EAxisType.LogarithmicAxis:
|
|
56
59
|
axis = new LogarithmicAxis_1.LogarithmicAxis(wasmContext, definition.options);
|
|
57
60
|
break;
|
|
61
|
+
case AxisType_1.EAxisType.DateTimeNumericAxis:
|
|
62
|
+
axis = new DateTimeNumericAxis_1.DateTimeNumericAxis(wasmContext, definition.options);
|
|
63
|
+
break;
|
|
58
64
|
default:
|
|
59
65
|
axis = new NumericAxis_1.NumericAxis(wasmContext, {});
|
|
60
66
|
break;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IHlcScaleOffsetFilterOptions } from "../Charting/Model/Filters/HlcScaleOffsetFilter";
|
|
1
2
|
import { IOhlcScaleOffsetFilterOptions } from "../Charting/Model/Filters/OhlcScaleOffsetFilter";
|
|
2
3
|
import { IXyFilterOptions } from "../Charting/Model/Filters/XyFilterBase";
|
|
3
4
|
import { IXyMovingAverageFilterOptions } from "../Charting/Model/Filters/XyMovingAverageFilter";
|
|
@@ -5,6 +6,7 @@ import { IXyRatioFilterOptions } from "../Charting/Model/Filters/XyRatioFilter";
|
|
|
5
6
|
import { IXyScaleOffsetFilterOptions } from "../Charting/Model/Filters/XyScaleOffsetFilter";
|
|
6
7
|
import { IXyyScaleOffsetFilterOptions } from "../Charting/Model/Filters/XyyScaleOffsetFilter";
|
|
7
8
|
import { IXyzScaleOffsetFilterOptions } from "../Charting/Model/Filters/XyzScaleOffsetFilter";
|
|
9
|
+
import { IHlcDataSeriesOptions } from "../Charting/Model/HlcDataSeries";
|
|
8
10
|
import { IDataSeries } from "../Charting/Model/IDataSeries";
|
|
9
11
|
import { IOhlcDataSeriesOptions } from "../Charting/Model/OhlcDataSeries";
|
|
10
12
|
import { IUniformHeatmapSeriesOptions } from "../Charting/Model/UniformHeatmapDataSeries";
|
|
@@ -38,6 +40,9 @@ declare type TFilterDefinition = {
|
|
|
38
40
|
} | {
|
|
39
41
|
type: EDataFilterType.XyzScaleOffset;
|
|
40
42
|
options?: IXyzScaleOffsetFilterOptions;
|
|
43
|
+
} | {
|
|
44
|
+
type: EDataFilterType.HlcScaleOffset;
|
|
45
|
+
options?: IHlcScaleOffsetFilterOptions;
|
|
41
46
|
} | {
|
|
42
47
|
type: EDataFilterType.OhlcScaleOffset;
|
|
43
48
|
options?: IOhlcScaleOffsetFilterOptions;
|
|
@@ -100,8 +105,21 @@ export declare type TOhlcSeriesData = {
|
|
|
100
105
|
} & IOhlcDataSeriesOptions & {
|
|
101
106
|
filter?: TFilterDefinition;
|
|
102
107
|
};
|
|
108
|
+
/** Definition of Open, High, Low, Close data */
|
|
109
|
+
export declare type THlcSeriesData = {
|
|
110
|
+
/** The id of sharedData to use for X data. You must either use all DataId or all Values properties. You cannot mix them. */
|
|
111
|
+
xDataId?: number | string;
|
|
112
|
+
/** The id of sharedData to use for High data. You must either use all DataId or all Values properties. You cannot mix them. */
|
|
113
|
+
highDataId?: number | string;
|
|
114
|
+
/** The id of sharedData to use for Low data. You must either use all DataId or all Values properties. You cannot mix them. */
|
|
115
|
+
lowDataId?: number | string;
|
|
116
|
+
/** The id of sharedData to use for Close data. You must either use all DataId or all Values properties. You cannot mix them. */
|
|
117
|
+
closeDataId?: number | string;
|
|
118
|
+
} & IHlcDataSeriesOptions & {
|
|
119
|
+
filter?: TFilterDefinition;
|
|
120
|
+
};
|
|
103
121
|
/** Definition of series data, which can take various shapes */
|
|
104
|
-
export declare type TSeriesDataDefinition = TXySeriesData | TXyySeriesData | TXyzSeriesData | TOhlcSeriesData | IUniformHeatmapSeriesOptions;
|
|
122
|
+
export declare type TSeriesDataDefinition = TXySeriesData | TXyySeriesData | TXyzSeriesData | THlcSeriesData | TOhlcSeriesData | IUniformHeatmapSeriesOptions;
|
|
105
123
|
/**
|
|
106
124
|
* Build a data series from a definition that can be pure data.
|
|
107
125
|
* @param wasmContext A {@link TSciChart | SciChart 2D WebAssembly Context} or {@link TSciChart | SciChart 3D WebAssembly Context}
|
|
@@ -12,6 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.buildDataSeries = void 0;
|
|
15
|
+
var HlcScaleOffsetFilter_1 = require("../Charting/Model/Filters/HlcScaleOffsetFilter");
|
|
15
16
|
var OhlcScaleOffsetFilter_1 = require("../Charting/Model/Filters/OhlcScaleOffsetFilter");
|
|
16
17
|
var XyLinearTrendFilter_1 = require("../Charting/Model/Filters/XyLinearTrendFilter");
|
|
17
18
|
var XyMovingAverageFilter_1 = require("../Charting/Model/Filters/XyMovingAverageFilter");
|
|
@@ -19,6 +20,7 @@ var XyRatioFilter_1 = require("../Charting/Model/Filters/XyRatioFilter");
|
|
|
19
20
|
var XyScaleOffsetFilter_1 = require("../Charting/Model/Filters/XyScaleOffsetFilter");
|
|
20
21
|
var XyyScaleOffsetFilter_1 = require("../Charting/Model/Filters/XyyScaleOffsetFilter");
|
|
21
22
|
var XyzScaleOffsetFilter_1 = require("../Charting/Model/Filters/XyzScaleOffsetFilter");
|
|
23
|
+
var HlcDataSeries_1 = require("../Charting/Model/HlcDataSeries");
|
|
22
24
|
var OhlcDataSeries_1 = require("../Charting/Model/OhlcDataSeries");
|
|
23
25
|
var UniformHeatmapDataSeries_1 = require("../Charting/Model/UniformHeatmapDataSeries");
|
|
24
26
|
var XyDataSeries_1 = require("../Charting/Model/XyDataSeries");
|
|
@@ -89,6 +91,22 @@ var buildDataSeries = function (wasmContext, seriesDefinition, sharedData) {
|
|
|
89
91
|
filterDef = data.filter;
|
|
90
92
|
}
|
|
91
93
|
}
|
|
94
|
+
else if (hasOwnProperty(seriesDefinition, "hlcData")) {
|
|
95
|
+
var data = seriesDefinition.hlcData;
|
|
96
|
+
if (sharedData && data.xDataId) {
|
|
97
|
+
var xValues = sharedData[data.xDataId];
|
|
98
|
+
var highValues = sharedData[data.highDataId];
|
|
99
|
+
var lowValues = sharedData[data.lowDataId];
|
|
100
|
+
var yValues = sharedData[data.closeDataId];
|
|
101
|
+
dataSeries = new HlcDataSeries_1.HlcDataSeries(wasmContext, __assign({ xValues: xValues, highValues: highValues, lowValues: lowValues, yValues: yValues }, data));
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
dataSeries = new HlcDataSeries_1.HlcDataSeries(wasmContext, data);
|
|
105
|
+
}
|
|
106
|
+
if (hasOwnProperty(data, "filter")) {
|
|
107
|
+
filterDef = data.filter;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
92
110
|
else if (hasOwnProperty(seriesDefinition, "ohlcData")) {
|
|
93
111
|
var data = seriesDefinition.ohlcData;
|
|
94
112
|
if (sharedData && data.xDataId) {
|
|
@@ -124,7 +142,10 @@ var buildDataSeries = function (wasmContext, seriesDefinition, sharedData) {
|
|
|
124
142
|
};
|
|
125
143
|
exports.buildDataSeries = buildDataSeries;
|
|
126
144
|
var buildFilter = function (dataSeries, definition) {
|
|
127
|
-
if (definition.type === DataFilterType_1.EDataFilterType.
|
|
145
|
+
if (definition.type === DataFilterType_1.EDataFilterType.HlcScaleOffset) {
|
|
146
|
+
return new HlcScaleOffsetFilter_1.HlcScaleOffsetFilter(dataSeries, definition.options);
|
|
147
|
+
}
|
|
148
|
+
else if (definition.type === DataFilterType_1.EDataFilterType.OhlcScaleOffset) {
|
|
128
149
|
return new OhlcScaleOffsetFilter_1.OhlcScaleOffsetFilter(dataSeries, definition.options);
|
|
129
150
|
}
|
|
130
151
|
else if (definition.type === DataFilterType_1.EDataFilterType.XyLinearTrend) {
|
package/Builder/buildSeries.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { ISelectedPointOptions } from "../Charting/Model/DataPointSelectionPalet
|
|
|
2
2
|
import { IUniformHeatmapSeriesOptions } from "../Charting/Model/UniformHeatmapDataSeries";
|
|
3
3
|
import { IPointMarkerOptions } from "../Charting/Visuals/PointMarkers/BasePointMarker";
|
|
4
4
|
import { ISpritePointMarkerOptions } from "../Charting/Visuals/PointMarkers/SpritePointMarker";
|
|
5
|
-
import { IBaseAnimationOptions } from "../Charting/Visuals/RenderableSeries/Animations/SeriesAnimation";
|
|
6
5
|
import { IFadeAnimationOptions } from "../Charting/Visuals/RenderableSeries/Animations/FadeAnimation";
|
|
7
6
|
import { IScaleAnimationOptions } from "../Charting/Visuals/RenderableSeries/Animations/ScaleAnimation";
|
|
7
|
+
import { IBaseAnimationOptions } from "../Charting/Visuals/RenderableSeries/Animations/SeriesAnimation";
|
|
8
8
|
import { ISweepAnimationOptions } from "../Charting/Visuals/RenderableSeries/Animations/SweepAnimation";
|
|
9
9
|
import { IWaveAnimationOptions } from "../Charting/Visuals/RenderableSeries/Animations/WaveAnimation";
|
|
10
10
|
import { IBaseStackedCollectionOptions } from "../Charting/Visuals/RenderableSeries/BaseStackedCollection";
|
|
@@ -12,6 +12,7 @@ import { IBandRenderableSeriesOptions } from "../Charting/Visuals/RenderableSeri
|
|
|
12
12
|
import { IBubbleRenderableSeriesOptions } from "../Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries";
|
|
13
13
|
import { ICandlestickRenderableSeriesOptions } from "../Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries";
|
|
14
14
|
import { IColumnRenderableSeriesOptions } from "../Charting/Visuals/RenderableSeries/FastColumnRenderableSeries";
|
|
15
|
+
import { IFastErrorBarsRenderableSeriesOptions } from "../Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries";
|
|
15
16
|
import { IFastLineRenderableSeriesOptions } from "../Charting/Visuals/RenderableSeries/FastLineRenderableSeries";
|
|
16
17
|
import { IMountainRenderableSeriesOptions } from "../Charting/Visuals/RenderableSeries/FastMountainRenderableSeries";
|
|
17
18
|
import { IOhlcRenderableSeriesOptions } from "../Charting/Visuals/RenderableSeries/FastOhlcRenderableSeries";
|
|
@@ -34,7 +35,7 @@ import { EPointMarkerType } from "../types/PointMarkerType";
|
|
|
34
35
|
import { ESeriesType } from "../types/SeriesType";
|
|
35
36
|
import { EShaderEffectType } from "../types/ShaderEffectType";
|
|
36
37
|
import { TSciChart } from "../types/TSciChart";
|
|
37
|
-
import { TOhlcSeriesData, TSharedDataDefinition, TXySeriesData, TXyySeriesData, TXyzSeriesData } from "./buildDataSeries";
|
|
38
|
+
import { THlcSeriesData, TOhlcSeriesData, TSharedDataDefinition, TXySeriesData, TXyySeriesData, TXyzSeriesData } from "./buildDataSeries";
|
|
38
39
|
import { IImpulseRenderableSeries } from "../Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries";
|
|
39
40
|
/** Definition of a pointmarker, comprising a {@link EPointMarkerType} and the relevant options */
|
|
40
41
|
export declare type TPointMarkerDefinition = {
|
|
@@ -130,6 +131,10 @@ export declare type TSeriesDefinition = {
|
|
|
130
131
|
type: ESeriesType.MountainSeries;
|
|
131
132
|
options?: IMountainRenderableSeriesOptions;
|
|
132
133
|
xyData?: TXySeriesData;
|
|
134
|
+
} | {
|
|
135
|
+
type: ESeriesType.ErrorBarsSeries;
|
|
136
|
+
options?: IFastErrorBarsRenderableSeriesOptions;
|
|
137
|
+
hlcData?: THlcSeriesData;
|
|
133
138
|
} | {
|
|
134
139
|
type: ESeriesType.OhlcSeries;
|
|
135
140
|
options?: IOhlcRenderableSeriesOptions;
|
package/Builder/buildSeries.js
CHANGED
|
@@ -18,6 +18,7 @@ var FastBandRenderableSeries_1 = require("../Charting/Visuals/RenderableSeries/F
|
|
|
18
18
|
var FastBubbleRenderableSeries_1 = require("../Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries");
|
|
19
19
|
var FastCandlestickRenderableSeries_1 = require("../Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries");
|
|
20
20
|
var FastColumnRenderableSeries_1 = require("../Charting/Visuals/RenderableSeries/FastColumnRenderableSeries");
|
|
21
|
+
var FastErrorBarsRenderableSeries_1 = require("../Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries");
|
|
21
22
|
var FastLineRenderableSeries_1 = require("../Charting/Visuals/RenderableSeries/FastLineRenderableSeries");
|
|
22
23
|
var FastMountainRenderableSeries_1 = require("../Charting/Visuals/RenderableSeries/FastMountainRenderableSeries");
|
|
23
24
|
var FastOhlcRenderableSeries_1 = require("../Charting/Visuals/RenderableSeries/FastOhlcRenderableSeries");
|
|
@@ -40,8 +41,8 @@ var PointMarkerType_1 = require("../types/PointMarkerType");
|
|
|
40
41
|
var SeriesType_1 = require("../types/SeriesType");
|
|
41
42
|
var ShaderEffectType_1 = require("../types/ShaderEffectType");
|
|
42
43
|
var buildDataSeries_1 = require("./buildDataSeries");
|
|
43
|
-
var classFactory_1 = require("./classFactory");
|
|
44
44
|
var chartBuilder_1 = require("./chartBuilder");
|
|
45
|
+
var classFactory_1 = require("./classFactory");
|
|
45
46
|
var FastImpulseRenderableSeries_1 = require("../Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries");
|
|
46
47
|
(0, classFactory_1.registerWasmType)(BaseType_1.EBaseType.PointMarker, PointMarkerType_1.EPointMarkerType.Cross, function (wasm, options) { return new CrossPointMarker_1.CrossPointMarker(wasm, options); }, true);
|
|
47
48
|
(0, classFactory_1.registerWasmType)(BaseType_1.EBaseType.PointMarker, PointMarkerType_1.EPointMarkerType.Ellipse, function (wasm, options) { return new EllipsePointMarker_1.EllipsePointMarker(wasm, options); }, true);
|
|
@@ -103,6 +104,9 @@ var buildSeries = function (wasmContext, definition, sharedData) {
|
|
|
103
104
|
else if (seriesDef.type === SeriesType_1.ESeriesType.MountainSeries) {
|
|
104
105
|
series = new FastMountainRenderableSeries_1.FastMountainRenderableSeries(wasmContext, seriesDef.options);
|
|
105
106
|
}
|
|
107
|
+
else if (seriesDef.type === SeriesType_1.ESeriesType.ErrorBarsSeries) {
|
|
108
|
+
series = new FastErrorBarsRenderableSeries_1.FastErrorBarsRenderableSeries(wasmContext, seriesDef.options);
|
|
109
|
+
}
|
|
106
110
|
else if (seriesDef.type === SeriesType_1.ESeriesType.OhlcSeries) {
|
|
107
111
|
series = new FastOhlcRenderableSeries_1.FastOhlcRenderableSeries(wasmContext, seriesDef.options);
|
|
108
112
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Point } from "../../Core/Point";
|
|
2
|
-
import {
|
|
2
|
+
import { Rect } from "../../Core/Rect";
|
|
3
3
|
import { ModifierArgsBase } from "./ModifierArgsBase";
|
|
4
4
|
declare type TModifierMouseArgsParams = {
|
|
5
5
|
mousePoint?: Point;
|
|
@@ -40,7 +40,7 @@ export declare class ModifierMouseArgs extends ModifierArgsBase {
|
|
|
40
40
|
* @param masterViewport the master viewport or parent chart issuing mouse events
|
|
41
41
|
* @param slaveViewport the slave viewport or child chart receiving mouse events
|
|
42
42
|
*/
|
|
43
|
-
static copy(args: ModifierMouseArgs, modifierGroup: string, masterViewport:
|
|
43
|
+
static copy(args: ModifierMouseArgs, modifierGroup: string, masterViewport: Rect, slaveViewport: Rect): ModifierMouseArgs;
|
|
44
44
|
/**
|
|
45
45
|
* The MousePoint as an X,Y coordinate where the event occurred
|
|
46
46
|
*/
|
|
@@ -29,8 +29,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.ModifierMouseArgs = void 0;
|
|
30
30
|
var Guard_1 = require("../../Core/Guard");
|
|
31
31
|
var Point_1 = require("../../Core/Point");
|
|
32
|
-
var ModifierArgsBase_1 = require("./ModifierArgsBase");
|
|
33
32
|
var DpiHelper_1 = require("../Visuals/TextureManager/DpiHelper");
|
|
33
|
+
var ModifierArgsBase_1 = require("./ModifierArgsBase");
|
|
34
34
|
/**
|
|
35
35
|
* Mouse arguments passed to {@link ChartModifierBase} methods
|
|
36
36
|
*/
|
|
@@ -119,9 +119,11 @@ var ModifierMouseArgs = /** @class */ (function (_super) {
|
|
|
119
119
|
ModifierMouseArgs.copy = function (args, modifierGroup, masterViewport, slaveViewport) {
|
|
120
120
|
var mousePoint = args.mousePoint;
|
|
121
121
|
if (masterViewport && slaveViewport) {
|
|
122
|
+
var sourceX = args.mousePoint.x - masterViewport.x;
|
|
123
|
+
var sourceY = args.mousePoint.y - masterViewport.y;
|
|
122
124
|
var scaleX = slaveViewport.width / masterViewport.width;
|
|
123
125
|
var scaleY = slaveViewport.height / masterViewport.height;
|
|
124
|
-
mousePoint = new Point_1.Point(
|
|
126
|
+
mousePoint = new Point_1.Point(slaveViewport.x + sourceX * scaleX, slaveViewport.y + sourceY * scaleY);
|
|
125
127
|
}
|
|
126
128
|
return __assign(__assign({}, args), { isMaster: false, handled: false, modifierGroup: modifierGroup, mousePoint: mousePoint });
|
|
127
129
|
};
|
|
@@ -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) {
|
|
@@ -444,7 +444,7 @@ var BaseHeatmapDataSeries = /** @class */ (function () {
|
|
|
444
444
|
if (isNaN(this.zValuesProperty[y][x])) {
|
|
445
445
|
zValue = 0;
|
|
446
446
|
}
|
|
447
|
-
else if (zValue < newZMin) {
|
|
447
|
+
else if (zValue < zMin - newZMin) {
|
|
448
448
|
zValue = fillValuesOutOfRange ? zMin - newZMin : 0;
|
|
449
449
|
}
|
|
450
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
|
+
}
|