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
|
@@ -0,0 +1,141 @@
|
|
|
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.HlcFilterBase = void 0;
|
|
19
|
+
var HlcDataSeries_1 = require("../HlcDataSeries");
|
|
20
|
+
var IDataSeries_1 = require("../IDataSeries");
|
|
21
|
+
var XyFilterBase_1 = require("./XyFilterBase");
|
|
22
|
+
var HlcFilterBase = /** @class */ (function (_super) {
|
|
23
|
+
__extends(HlcFilterBase, _super);
|
|
24
|
+
function HlcFilterBase(originalSeries, options) {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
var _this = _super.call(this, originalSeries.webAssemblyContext, options) || this;
|
|
27
|
+
_this.closefield = XyFilterBase_1.EDataSeriesField.Close;
|
|
28
|
+
_this.highfield = XyFilterBase_1.EDataSeriesField.High;
|
|
29
|
+
_this.lowfield = XyFilterBase_1.EDataSeriesField.Low;
|
|
30
|
+
_this.originalSeries = originalSeries;
|
|
31
|
+
_this.closefield = (_a = options === null || options === void 0 ? void 0 : options.closefield) !== null && _a !== void 0 ? _a : _this.closefield;
|
|
32
|
+
_this.highfield = (_b = options === null || options === void 0 ? void 0 : options.highfield) !== null && _b !== void 0 ? _b : _this.highfield;
|
|
33
|
+
_this.onBaseDataChanged = _this.onBaseDataChanged.bind(_this);
|
|
34
|
+
originalSeries.dataChanged.subscribe(_this.onBaseDataChanged);
|
|
35
|
+
switch (_this.originalSeries.type) {
|
|
36
|
+
case IDataSeries_1.EDataSeriesType.Ohlc:
|
|
37
|
+
var ohlcSeries_1 = _this.originalSeries;
|
|
38
|
+
_this.getOriginalYValues = function () {
|
|
39
|
+
return (0, XyFilterBase_1.switchData)(_this.closefield, ohlcSeries_1.getNativeYValues(), ohlcSeries_1.getNativeOpenValues(), ohlcSeries_1.getNativeHighValues(), ohlcSeries_1.getNativeLowValues());
|
|
40
|
+
};
|
|
41
|
+
_this.getOriginalHighValues = function () {
|
|
42
|
+
return (0, XyFilterBase_1.switchData)(_this.highfield, ohlcSeries_1.getNativeYValues(), ohlcSeries_1.getNativeOpenValues(), ohlcSeries_1.getNativeHighValues(), ohlcSeries_1.getNativeLowValues());
|
|
43
|
+
};
|
|
44
|
+
_this.getOriginalLowValues = function () {
|
|
45
|
+
return (0, XyFilterBase_1.switchData)(_this.lowfield, ohlcSeries_1.getNativeYValues(), ohlcSeries_1.getNativeOpenValues(), ohlcSeries_1.getNativeHighValues(), ohlcSeries_1.getNativeLowValues());
|
|
46
|
+
};
|
|
47
|
+
break;
|
|
48
|
+
case IDataSeries_1.EDataSeriesType.Xy:
|
|
49
|
+
var xySeries_1 = _this.originalSeries;
|
|
50
|
+
_this.getOriginalYValues = function () { return xySeries_1.getNativeYValues(); };
|
|
51
|
+
_this.getOriginalHighValues = function () { return xySeries_1.getNativeYValues(); };
|
|
52
|
+
_this.getOriginalLowValues = function () { return xySeries_1.getNativeYValues(); };
|
|
53
|
+
break;
|
|
54
|
+
case IDataSeries_1.EDataSeriesType.Xyy:
|
|
55
|
+
var xyySeries_1 = _this.originalSeries;
|
|
56
|
+
_this.getOriginalYValues = function () {
|
|
57
|
+
return (0, XyFilterBase_1.switchData)(_this.closefield, xyySeries_1.getNativeYValues(), xyySeries_1.getNativeY1Values());
|
|
58
|
+
};
|
|
59
|
+
_this.getOriginalHighValues = function () {
|
|
60
|
+
return (0, XyFilterBase_1.switchData)(_this.highfield, xyySeries_1.getNativeYValues(), xyySeries_1.getNativeY1Values());
|
|
61
|
+
};
|
|
62
|
+
_this.getOriginalLowValues = function () {
|
|
63
|
+
return (0, XyFilterBase_1.switchData)(_this.lowfield, xyySeries_1.getNativeYValues(), xyySeries_1.getNativeY1Values());
|
|
64
|
+
};
|
|
65
|
+
break;
|
|
66
|
+
case IDataSeries_1.EDataSeriesType.Xyz:
|
|
67
|
+
var xyzSeries_1 = _this.originalSeries;
|
|
68
|
+
_this.getOriginalYValues = function () {
|
|
69
|
+
return (0, XyFilterBase_1.switchData)(_this.closefield, xyzSeries_1.getNativeYValues(), xyzSeries_1.getNativeZValues());
|
|
70
|
+
};
|
|
71
|
+
_this.getOriginalHighValues = function () {
|
|
72
|
+
return (0, XyFilterBase_1.switchData)(_this.highfield, xyzSeries_1.getNativeYValues(), xyzSeries_1.getNativeZValues());
|
|
73
|
+
};
|
|
74
|
+
_this.getOriginalLowValues = function () {
|
|
75
|
+
return (0, XyFilterBase_1.switchData)(_this.lowfield, xyzSeries_1.getNativeYValues(), xyzSeries_1.getNativeZValues());
|
|
76
|
+
};
|
|
77
|
+
break;
|
|
78
|
+
default:
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
return _this;
|
|
82
|
+
}
|
|
83
|
+
HlcFilterBase.prototype.getOriginalXValues = function () {
|
|
84
|
+
return this.originalSeries.getNativeXValues();
|
|
85
|
+
};
|
|
86
|
+
HlcFilterBase.prototype.getOriginalYValues = function () {
|
|
87
|
+
return this.originalSeries.getNativeYValues();
|
|
88
|
+
};
|
|
89
|
+
HlcFilterBase.prototype.getOriginalHighValues = function () {
|
|
90
|
+
return this.originalSeries.getNativeHighValues();
|
|
91
|
+
};
|
|
92
|
+
HlcFilterBase.prototype.getOriginalLowValues = function () {
|
|
93
|
+
return this.originalSeries.getNativeLowValues();
|
|
94
|
+
};
|
|
95
|
+
HlcFilterBase.prototype.getOriginalCount = function () {
|
|
96
|
+
return this.originalSeries.count();
|
|
97
|
+
};
|
|
98
|
+
HlcFilterBase.prototype.onOriginalPropertyChanged = function (name) { };
|
|
99
|
+
HlcFilterBase.prototype.filterOnAppend = function (count) {
|
|
100
|
+
this.filterAll();
|
|
101
|
+
};
|
|
102
|
+
HlcFilterBase.prototype.filterOnUpdate = function (index) {
|
|
103
|
+
this.filterAll();
|
|
104
|
+
};
|
|
105
|
+
HlcFilterBase.prototype.filterOnInsert = function (startIndex, count) {
|
|
106
|
+
this.filterAll();
|
|
107
|
+
};
|
|
108
|
+
HlcFilterBase.prototype.filterOnRemove = function (startIndex, count) {
|
|
109
|
+
this.filterAll();
|
|
110
|
+
};
|
|
111
|
+
HlcFilterBase.prototype.onClear = function () {
|
|
112
|
+
this.clear();
|
|
113
|
+
};
|
|
114
|
+
HlcFilterBase.prototype.onBaseDataChanged = function (args) {
|
|
115
|
+
var changeType = args.changeType, name = args.name, index = args.index, count = args.count;
|
|
116
|
+
switch (changeType) {
|
|
117
|
+
case IDataSeries_1.EDataChangeType.Property:
|
|
118
|
+
this.onOriginalPropertyChanged(name);
|
|
119
|
+
return;
|
|
120
|
+
case IDataSeries_1.EDataChangeType.Append:
|
|
121
|
+
this.filterOnAppend(count);
|
|
122
|
+
break;
|
|
123
|
+
case IDataSeries_1.EDataChangeType.Clear:
|
|
124
|
+
this.onClear();
|
|
125
|
+
break;
|
|
126
|
+
case IDataSeries_1.EDataChangeType.Insert:
|
|
127
|
+
this.filterOnInsert(index, count);
|
|
128
|
+
break;
|
|
129
|
+
case IDataSeries_1.EDataChangeType.Remove:
|
|
130
|
+
this.filterOnRemove(index, count);
|
|
131
|
+
break;
|
|
132
|
+
case IDataSeries_1.EDataChangeType.Update:
|
|
133
|
+
this.filterOnUpdate(index);
|
|
134
|
+
break;
|
|
135
|
+
default:
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
return HlcFilterBase;
|
|
140
|
+
}(HlcDataSeries_1.HlcDataSeries));
|
|
141
|
+
exports.HlcFilterBase = HlcFilterBase;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseDataSeries } from "../BaseDataSeries";
|
|
2
|
+
import { HlcCustomFilter } from "./HlcCustomFilter";
|
|
3
|
+
import { IHlcFilterOptions } from "./HlcFilterBase";
|
|
4
|
+
export interface IHlcScaleOffsetFilterOptions extends IHlcFilterOptions {
|
|
5
|
+
scale?: number;
|
|
6
|
+
offset?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class HlcScaleOffsetFilter extends HlcCustomFilter {
|
|
9
|
+
private scaleProperty;
|
|
10
|
+
private offsetProperty;
|
|
11
|
+
get scale(): number;
|
|
12
|
+
set scale(value: number);
|
|
13
|
+
get offset(): number;
|
|
14
|
+
set offset(value: number);
|
|
15
|
+
constructor(originalSeries: BaseDataSeries, options?: IHlcScaleOffsetFilterOptions);
|
|
16
|
+
toJSON(excludeData?: boolean): any;
|
|
17
|
+
protected defaultFunction(index: number, y: number): number;
|
|
18
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.HlcScaleOffsetFilter = void 0;
|
|
30
|
+
var DataFilterType_1 = require("../../../types/DataFilterType");
|
|
31
|
+
var IDataSeries_1 = require("../IDataSeries");
|
|
32
|
+
var HlcCustomFilter_1 = require("./HlcCustomFilter");
|
|
33
|
+
var HlcScaleOffsetFilter = /** @class */ (function (_super) {
|
|
34
|
+
__extends(HlcScaleOffsetFilter, _super);
|
|
35
|
+
function HlcScaleOffsetFilter(originalSeries, options) {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
var _this = _super.call(this, originalSeries, options) || this;
|
|
38
|
+
_this.scaleProperty = 1;
|
|
39
|
+
_this.offsetProperty = 0;
|
|
40
|
+
if (originalSeries.type !== IDataSeries_1.EDataSeriesType.Hlc) {
|
|
41
|
+
throw new Error("HlcScaleOffsetFilter only supports Hlc original series");
|
|
42
|
+
}
|
|
43
|
+
_this.scaleProperty = (_a = options === null || options === void 0 ? void 0 : options.scale) !== null && _a !== void 0 ? _a : _this.scaleProperty;
|
|
44
|
+
_this.offsetProperty = (_b = options === null || options === void 0 ? void 0 : options.offset) !== null && _b !== void 0 ? _b : _this.offsetProperty;
|
|
45
|
+
if (_this.getOriginalCount() > 0) {
|
|
46
|
+
_this.filterAll();
|
|
47
|
+
}
|
|
48
|
+
return _this;
|
|
49
|
+
}
|
|
50
|
+
Object.defineProperty(HlcScaleOffsetFilter.prototype, "scale", {
|
|
51
|
+
get: function () {
|
|
52
|
+
return this.scaleProperty;
|
|
53
|
+
},
|
|
54
|
+
set: function (value) {
|
|
55
|
+
this.scaleProperty = value;
|
|
56
|
+
this.filterAll();
|
|
57
|
+
},
|
|
58
|
+
enumerable: false,
|
|
59
|
+
configurable: true
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(HlcScaleOffsetFilter.prototype, "offset", {
|
|
62
|
+
get: function () {
|
|
63
|
+
return this.offsetProperty;
|
|
64
|
+
},
|
|
65
|
+
set: function (value) {
|
|
66
|
+
this.offsetProperty = value;
|
|
67
|
+
this.filterAll();
|
|
68
|
+
},
|
|
69
|
+
enumerable: false,
|
|
70
|
+
configurable: true
|
|
71
|
+
});
|
|
72
|
+
// @ts-ignore
|
|
73
|
+
HlcScaleOffsetFilter.prototype.toJSON = function (excludeData) {
|
|
74
|
+
if (excludeData === void 0) { excludeData = false; }
|
|
75
|
+
var original = this.originalSeries.toJSON(excludeData);
|
|
76
|
+
return __assign(__assign({}, original), { filter: {
|
|
77
|
+
type: DataFilterType_1.EDataFilterType.HlcScaleOffset,
|
|
78
|
+
options: { scale: this.scale, offset: this.offset }
|
|
79
|
+
} });
|
|
80
|
+
};
|
|
81
|
+
HlcScaleOffsetFilter.prototype.defaultFunction = function (index, y) {
|
|
82
|
+
return y * this.scaleProperty + this.offsetProperty;
|
|
83
|
+
};
|
|
84
|
+
return HlcScaleOffsetFilter;
|
|
85
|
+
}(HlcCustomFilter_1.HlcCustomFilter));
|
|
86
|
+
exports.HlcScaleOffsetFilter = HlcScaleOffsetFilter;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SCRTDoubleVector } from "../../../types/TSciChart";
|
|
2
2
|
import { BaseDataSeries } from "../BaseDataSeries";
|
|
3
|
+
import { HlcDataSeries } from "../HlcDataSeries";
|
|
3
4
|
import { IDataChangeArgs } from "../IDataSeries";
|
|
4
5
|
import { OhlcDataSeries } from "../OhlcDataSeries";
|
|
5
6
|
import { IXyDataSeriesOptions, XyDataSeries } from "../XyDataSeries";
|
|
@@ -98,5 +99,6 @@ export declare abstract class XyFilterBase extends XyDataSeries {
|
|
|
98
99
|
protected getYValuesFromOHLC(ohlcSeries: OhlcDataSeries): any;
|
|
99
100
|
protected getYValuesFromXyy(xyySeries: XyyDataSeries): any;
|
|
100
101
|
protected getYValuesFromXyz(xyzSeries: XyzDataSeries): any;
|
|
102
|
+
protected getYValuesFromHlc(hlcSeries: HlcDataSeries): any;
|
|
101
103
|
}
|
|
102
104
|
export declare const switchData: (field: EDataSeriesField, closey: any, openy1z?: any, high?: any, low?: any) => any;
|
|
@@ -65,6 +65,9 @@ var XyFilterBase = /** @class */ (function (_super) {
|
|
|
65
65
|
case IDataSeries_1.EDataSeriesType.Xyz:
|
|
66
66
|
_this.getOriginalYValues = function () { return _this.getYValuesFromXyz(_this.originalSeries); };
|
|
67
67
|
break;
|
|
68
|
+
case IDataSeries_1.EDataSeriesType.Hlc:
|
|
69
|
+
_this.getOriginalYValues = function () { return _this.getYValuesFromHlc(_this.originalSeries); };
|
|
70
|
+
break;
|
|
68
71
|
default:
|
|
69
72
|
break;
|
|
70
73
|
}
|
|
@@ -163,6 +166,9 @@ var XyFilterBase = /** @class */ (function (_super) {
|
|
|
163
166
|
XyFilterBase.prototype.getYValuesFromXyz = function (xyzSeries) {
|
|
164
167
|
return (0, exports.switchData)(this.field, xyzSeries.getNativeYValues(), xyzSeries.getNativeZValues());
|
|
165
168
|
};
|
|
169
|
+
XyFilterBase.prototype.getYValuesFromHlc = function (hlcSeries) {
|
|
170
|
+
return (0, exports.switchData)(this.field, hlcSeries.getNativeYValues(), undefined, hlcSeries.getNativeHighValues(), hlcSeries.getNativeLowValues());
|
|
171
|
+
};
|
|
166
172
|
return XyFilterBase;
|
|
167
173
|
}(XyDataSeries_1.XyDataSeries));
|
|
168
174
|
exports.XyFilterBase = XyFilterBase;
|
|
@@ -55,6 +55,15 @@ var XyyFilterBase = /** @class */ (function (_super) {
|
|
|
55
55
|
return (0, XyFilterBase_1.switchData)(_this.y1field, xyzSeries_1.getNativeYValues(), xyzSeries_1.getNativeZValues());
|
|
56
56
|
};
|
|
57
57
|
break;
|
|
58
|
+
case IDataSeries_1.EDataSeriesType.Hlc:
|
|
59
|
+
var hlcSeries_1 = _this.originalSeries;
|
|
60
|
+
_this.getOriginalYValues = function () {
|
|
61
|
+
return (0, XyFilterBase_1.switchData)(_this.yfield, hlcSeries_1.getNativeYValues(), undefined, hlcSeries_1.getNativeHighValues(), hlcSeries_1.getNativeLowValues());
|
|
62
|
+
};
|
|
63
|
+
_this.getOriginalY1Values = function () {
|
|
64
|
+
return (0, XyFilterBase_1.switchData)(_this.y1field, hlcSeries_1.getNativeYValues(), undefined, hlcSeries_1.getNativeHighValues(), hlcSeries_1.getNativeLowValues());
|
|
65
|
+
};
|
|
66
|
+
break;
|
|
58
67
|
default:
|
|
59
68
|
break;
|
|
60
69
|
}
|
|
@@ -47,12 +47,21 @@ var XyzFilterBase = /** @class */ (function (_super) {
|
|
|
47
47
|
_this.getOriginalZValues = function () { return xySeries_1.getNativeYValues(); };
|
|
48
48
|
break;
|
|
49
49
|
case IDataSeries_1.EDataSeriesType.Xyy:
|
|
50
|
-
var
|
|
50
|
+
var xyySeries_1 = _this.originalSeries;
|
|
51
51
|
_this.getOriginalYValues = function () {
|
|
52
|
-
return (0, XyFilterBase_1.switchData)(_this.yfield,
|
|
52
|
+
return (0, XyFilterBase_1.switchData)(_this.yfield, xyySeries_1.getNativeYValues(), xyySeries_1.getNativeY1Values());
|
|
53
53
|
};
|
|
54
54
|
_this.getOriginalZValues = function () {
|
|
55
|
-
return (0, XyFilterBase_1.switchData)(_this.zfield,
|
|
55
|
+
return (0, XyFilterBase_1.switchData)(_this.zfield, xyySeries_1.getNativeYValues(), xyySeries_1.getNativeY1Values());
|
|
56
|
+
};
|
|
57
|
+
break;
|
|
58
|
+
case IDataSeries_1.EDataSeriesType.Hlc:
|
|
59
|
+
var hlcSeries_1 = _this.originalSeries;
|
|
60
|
+
_this.getOriginalYValues = function () {
|
|
61
|
+
return (0, XyFilterBase_1.switchData)(_this.yfield, hlcSeries_1.getNativeYValues(), undefined, hlcSeries_1.getNativeHighValues(), hlcSeries_1.getNativeLowValues());
|
|
62
|
+
};
|
|
63
|
+
_this.getOriginalZValues = function () {
|
|
64
|
+
return (0, XyFilterBase_1.switchData)(_this.zfield, hlcSeries_1.getNativeYValues(), undefined, hlcSeries_1.getNativeHighValues(), hlcSeries_1.getNativeLowValues());
|
|
56
65
|
};
|
|
57
66
|
break;
|
|
58
67
|
default:
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { NumberRange } from "../../Core/NumberRange";
|
|
2
|
+
import { NumberArray } from "../../types/NumberArray";
|
|
3
|
+
import { SCRTDoubleVector, TSciChart } from "../../types/TSciChart";
|
|
4
|
+
import { SeriesAnimation } from "../Visuals/RenderableSeries/Animations/SeriesAnimation";
|
|
5
|
+
import { BaseDataSeries, IBaseDataSeriesOptions } from "./BaseDataSeries";
|
|
6
|
+
import { EDataSeriesType, EDataSeriesValueType } from "./IDataSeries";
|
|
7
|
+
import { IPointMetadata } from "./IPointMetadata";
|
|
8
|
+
/**
|
|
9
|
+
* Options to pass to the {@link XyDataSeries} constructor
|
|
10
|
+
*/
|
|
11
|
+
export interface IHlcDataSeriesOptions extends IBaseDataSeriesOptions {
|
|
12
|
+
/**
|
|
13
|
+
* The X-values array to pre-populate the {@link HlcDataSeries}
|
|
14
|
+
*/
|
|
15
|
+
xValues?: NumberArray;
|
|
16
|
+
/**
|
|
17
|
+
* The Y-values array to pre-populate the {@link HlcDataSeries}
|
|
18
|
+
*/
|
|
19
|
+
yValues?: NumberArray;
|
|
20
|
+
/**
|
|
21
|
+
* The H-values array to pre-populate the {@link HlcDataSeries}
|
|
22
|
+
*/
|
|
23
|
+
highValues?: NumberArray;
|
|
24
|
+
/**
|
|
25
|
+
* The L-values array to pre-populate the {@link HlcDataSeries}
|
|
26
|
+
*/
|
|
27
|
+
lowValues?: NumberArray;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* HlcDataSeries is a DataSeries for holding X, Y, H, L data in SciChart's 2D
|
|
31
|
+
* {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}
|
|
32
|
+
* @remarks
|
|
33
|
+
* The HlcDataSeries is primarily used with our {@link FastErrorBarsRenderableSeries | JavaScript Error Bars Chart},
|
|
34
|
+
* which draws a High-Low Bars around points
|
|
35
|
+
*
|
|
36
|
+
* A DataSeries stores the data to render. This is independent from the {@link IRenderableSeries | RenderableSeries}
|
|
37
|
+
* which defines how that data should be rendered.
|
|
38
|
+
*
|
|
39
|
+
* See derived types of {@link BaseDataSeries} to find out what data-series are available.
|
|
40
|
+
* See derived types of {@link IRenderableSeries} to find out what 2D JavaScript Chart types are available.
|
|
41
|
+
*/
|
|
42
|
+
export declare class HlcDataSeries extends BaseDataSeries {
|
|
43
|
+
/** @inheritDoc */
|
|
44
|
+
readonly type = EDataSeriesType.Hlc;
|
|
45
|
+
/**
|
|
46
|
+
* H vector with initial animation values
|
|
47
|
+
*/
|
|
48
|
+
hInitialAnimationValues: SCRTDoubleVector;
|
|
49
|
+
/**
|
|
50
|
+
* H vector with final animation values
|
|
51
|
+
*/
|
|
52
|
+
hFinalAnimationValues: SCRTDoubleVector;
|
|
53
|
+
/**
|
|
54
|
+
* Y1 vector with initial animation values
|
|
55
|
+
*/
|
|
56
|
+
lInitialAnimationValues: SCRTDoubleVector;
|
|
57
|
+
/**
|
|
58
|
+
* Y1 vector with final animation values
|
|
59
|
+
*/
|
|
60
|
+
lFinalAnimationValues: SCRTDoubleVector;
|
|
61
|
+
protected highValues: SCRTDoubleVector;
|
|
62
|
+
protected lowValues: SCRTDoubleVector;
|
|
63
|
+
/**
|
|
64
|
+
* Creates an instance of {@link HlcDataSeries}
|
|
65
|
+
* @param webAssemblyContext the {@link TSciChart | SciChart WebAssembly Context} containing native methods
|
|
66
|
+
* and access to our underlying WebGL2 rendering engine
|
|
67
|
+
* @param options the {@link IHlcDataSeriesOptions} which can be passed to configure the DataSeries at construct time
|
|
68
|
+
*/
|
|
69
|
+
constructor(webAssemblyContext: TSciChart, options?: IHlcDataSeriesOptions);
|
|
70
|
+
/**
|
|
71
|
+
* Gets a native / WebAssembly vector of H-values in the DataSeries
|
|
72
|
+
*/
|
|
73
|
+
getNativeHighValues(): SCRTDoubleVector;
|
|
74
|
+
/**
|
|
75
|
+
* Gets a native / WebAssembly vector of L-values in the DataSeries
|
|
76
|
+
*/
|
|
77
|
+
getNativeLowValues(): SCRTDoubleVector;
|
|
78
|
+
/**
|
|
79
|
+
* Appends a single X, Y, Y1 point to the DataSeries
|
|
80
|
+
* @remarks
|
|
81
|
+
* For best performance on drawing large datasets, use the {@link appendRange} method
|
|
82
|
+
*
|
|
83
|
+
* Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
84
|
+
* @param x The X-value
|
|
85
|
+
* @param y The Y1-value
|
|
86
|
+
* @param h The H-value
|
|
87
|
+
* @param l The L-value
|
|
88
|
+
* @param metadata The point metadata
|
|
89
|
+
*/
|
|
90
|
+
append(x: number, y: number, h: number, l: number, metadata?: IPointMetadata): void;
|
|
91
|
+
/**
|
|
92
|
+
* Appends a range of X, Y, Y1 points to the DataSeries
|
|
93
|
+
* @remarks
|
|
94
|
+
* This method is considerably higher performance than {@link append} which appends a single point
|
|
95
|
+
*
|
|
96
|
+
* Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
97
|
+
* @param xValues The X-values
|
|
98
|
+
* @param yValues The Y-values
|
|
99
|
+
* @param y1Values The Y1-values
|
|
100
|
+
* @param metadata The array of point metadata
|
|
101
|
+
*/
|
|
102
|
+
appendRange(xValues: NumberArray, yValues: NumberArray, hValues: NumberArray, lValues: NumberArray, metadata?: IPointMetadata[]): void;
|
|
103
|
+
/**
|
|
104
|
+
* Updates a single Y, H, L-value by X-index
|
|
105
|
+
* @remarks Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
106
|
+
* @param index the index to update
|
|
107
|
+
* @param y The new Y value
|
|
108
|
+
* @param h The new H value
|
|
109
|
+
* @param l The new L value
|
|
110
|
+
* @param metadata The point metadata
|
|
111
|
+
*/
|
|
112
|
+
update(index: number, y: number, h: number, l: number, metadata?: IPointMetadata): void;
|
|
113
|
+
/**
|
|
114
|
+
* Updates a single X, Y, H, L-value by X-index. Might also need to set isSorted = false
|
|
115
|
+
* @remarks Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
116
|
+
* @param index the index to update
|
|
117
|
+
* @param x The new X value
|
|
118
|
+
* @param y The new Y value
|
|
119
|
+
* @param h The new H value
|
|
120
|
+
* @param l The new L value
|
|
121
|
+
* @param metadata The point metadata
|
|
122
|
+
*/
|
|
123
|
+
updateXyhl(index: number, x: number, y: number, h: number, l: number, metadata?: IPointMetadata): void;
|
|
124
|
+
/**
|
|
125
|
+
* Inserts a single X,Y, H, L value at the start index
|
|
126
|
+
* @remarks
|
|
127
|
+
* For best performance on drawing large datasets, use the {@link insertRange} method
|
|
128
|
+
*
|
|
129
|
+
* Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
130
|
+
* @param startIndex the index to insert at
|
|
131
|
+
* @param x the XValue
|
|
132
|
+
* @param y the YValue
|
|
133
|
+
* @param h the HighValue
|
|
134
|
+
* @param l the LowValue
|
|
135
|
+
* @param metadata The point metadata
|
|
136
|
+
*/
|
|
137
|
+
insert(startIndex: number, x: number, y: number, h: number, l: number, metadata?: IPointMetadata): void;
|
|
138
|
+
/**
|
|
139
|
+
* Inserts a range of X,Y, H, L values at the startIndex
|
|
140
|
+
* @remarks
|
|
141
|
+
* Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
142
|
+
* @param startIndex the index to insert at
|
|
143
|
+
* @param xValues the XValues
|
|
144
|
+
* @param yValues the YValues
|
|
145
|
+
* @param hValues the HValues
|
|
146
|
+
* @param lValues the LValues
|
|
147
|
+
* @param metadata The array of point metadata
|
|
148
|
+
*/
|
|
149
|
+
insertRange(startIndex: number, xValues: NumberArray, yValues: NumberArray, hValues: NumberArray, lValues: NumberArray, metadata?: IPointMetadata[]): void;
|
|
150
|
+
/**
|
|
151
|
+
* Removes a single X,Y, H, L value at the specified index
|
|
152
|
+
* @remarks Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
153
|
+
* @param index the index to remove at
|
|
154
|
+
*/
|
|
155
|
+
removeAt(index: number): void;
|
|
156
|
+
/**
|
|
157
|
+
* Removes a range of X, Y, H, L values at the specified index
|
|
158
|
+
* @remarks Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
159
|
+
* @param startIndex the start index to remove at
|
|
160
|
+
* @param count the number of points to remove
|
|
161
|
+
*/
|
|
162
|
+
removeRange(startIndex: number, count: number): void;
|
|
163
|
+
/**
|
|
164
|
+
* Clears the entire DataSeries.
|
|
165
|
+
* @remarks
|
|
166
|
+
* Note this does not free memory, WebAssembly/Native memory is released by calling {@link delete}, after which the
|
|
167
|
+
* DataSeries is no longer usable.
|
|
168
|
+
*
|
|
169
|
+
* Any changes of the DataSeries will trigger a redraw on the parent {@link SciChartSurface}
|
|
170
|
+
*/
|
|
171
|
+
clear(): void;
|
|
172
|
+
/** @inheritDoc */
|
|
173
|
+
getXRange(dataSeriesValueType?: EDataSeriesValueType, isHorizontalDirection?: boolean, hasHighCap?: boolean, hasLowCap?: boolean): NumberRange;
|
|
174
|
+
/** @inheritDoc */
|
|
175
|
+
getWindowedYRange(xRange: NumberRange, getPositiveRange: boolean, isXCategoryAxis?: boolean, dataSeriesValueType?: EDataSeriesValueType, isHorizontalDirection?: boolean, hasHighCap?: boolean, hasLowCap?: boolean): NumberRange;
|
|
176
|
+
/** @inheritDoc */
|
|
177
|
+
delete(): void;
|
|
178
|
+
/** @inheritDoc */
|
|
179
|
+
setInitialAnimationVectors(dataSeries?: HlcDataSeries): void;
|
|
180
|
+
/** @inheritDoc */
|
|
181
|
+
setFinalAnimationVectors(dataSeries?: HlcDataSeries): void;
|
|
182
|
+
/** @inheritDoc */
|
|
183
|
+
validateAnimationVectors(): void;
|
|
184
|
+
/** @inheritDoc */
|
|
185
|
+
updateAnimationProperties(progress: number, animation: SeriesAnimation): void;
|
|
186
|
+
/** @inheritDoc */
|
|
187
|
+
toJSON(excludeData?: boolean): any;
|
|
188
|
+
private getHlcValues;
|
|
189
|
+
}
|