scichart 2.2.2351 → 2.2.2378
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/Drawing/WebGlRenderContext2D.js +26 -42
- 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/RenderableSeries/BaseRenderableSeries.d.ts +9 -2
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +53 -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 +83 -8
- 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/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 +106 -0
- package/Core/storage/localStorageApi.d.ts +4 -0
- package/Core/storage/localStorageApi.js +12 -0
- 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/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/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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IDeletable } from "../../../Core/IDeletable";
|
|
2
|
+
import { SCRTColorVertex, SCRTRectVertex, TSciChart, VectorColorVertex, VectorRectVertex } from "../../../types/TSciChart";
|
|
3
|
+
export declare const freeCache: (wasmContext: TSciChart) => IDeletable;
|
|
4
|
+
/**
|
|
5
|
+
* Returns an empty vector of Rectangles
|
|
6
|
+
* @param wasmContext
|
|
7
|
+
* @param maxSize
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare const getVectorRectVertex: (wasmContext: TSciChart, maxSize?: number) => VectorRectVertex;
|
|
11
|
+
export declare const getVectorColorVertex: (wasmContext: TSciChart, maxSize?: number) => VectorColorVertex;
|
|
12
|
+
export declare const getVertex: (wasmContext: TSciChart, x: number, y: number) => SCRTColorVertex;
|
|
13
|
+
export declare const getNativeRect: (wasmContext: TSciChart, xTopLeft: number, yTopLeft: number, xBottomRight: number, yBottomRight: number) => SCRTRectVertex;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNativeRect = exports.getVertex = exports.getVectorColorVertex = exports.getVectorRectVertex = exports.freeCache = void 0;
|
|
4
|
+
var Deleter_1 = require("../../../Core/Deleter");
|
|
5
|
+
var objectCache = new Map();
|
|
6
|
+
var getCache = function (wasmContext) {
|
|
7
|
+
if (!wasmContext.canvas)
|
|
8
|
+
return undefined;
|
|
9
|
+
var canvasId = wasmContext.canvas.id;
|
|
10
|
+
if (!objectCache.has(canvasId)) {
|
|
11
|
+
objectCache.set(canvasId, {
|
|
12
|
+
vecRects: undefined,
|
|
13
|
+
vecColorVertex: undefined,
|
|
14
|
+
vertex: undefined,
|
|
15
|
+
rect: undefined
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return objectCache.get(canvasId);
|
|
19
|
+
};
|
|
20
|
+
var freeCache = function (wasmContext) {
|
|
21
|
+
return {
|
|
22
|
+
delete: function () {
|
|
23
|
+
if (!wasmContext.canvas)
|
|
24
|
+
return;
|
|
25
|
+
var canvasId = wasmContext.canvas.id;
|
|
26
|
+
var cache = objectCache.get(canvasId);
|
|
27
|
+
if (cache) {
|
|
28
|
+
(0, Deleter_1.deleteSafe)(cache.vecRects);
|
|
29
|
+
(0, Deleter_1.deleteSafe)(cache.vecColorVertex);
|
|
30
|
+
(0, Deleter_1.deleteSafe)(cache.vertex);
|
|
31
|
+
(0, Deleter_1.deleteSafe)(cache.rect);
|
|
32
|
+
}
|
|
33
|
+
objectCache.delete(canvasId);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
exports.freeCache = freeCache;
|
|
38
|
+
/**
|
|
39
|
+
* Returns an empty vector of Rectangles
|
|
40
|
+
* @param wasmContext
|
|
41
|
+
* @param maxSize
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
var getVectorRectVertex = function (wasmContext, maxSize) {
|
|
45
|
+
if (maxSize === void 0) { maxSize = 100; }
|
|
46
|
+
var cache = getCache(wasmContext);
|
|
47
|
+
if (!cache)
|
|
48
|
+
return undefined;
|
|
49
|
+
var vecRects = cache.vecRects;
|
|
50
|
+
if (!vecRects) {
|
|
51
|
+
vecRects = new wasmContext.VectorRectVertex();
|
|
52
|
+
vecRects.reserve(maxSize);
|
|
53
|
+
cache.vecRects = vecRects;
|
|
54
|
+
}
|
|
55
|
+
vecRects.clear();
|
|
56
|
+
return vecRects;
|
|
57
|
+
};
|
|
58
|
+
exports.getVectorRectVertex = getVectorRectVertex;
|
|
59
|
+
var getVectorColorVertex = function (wasmContext, maxSize) {
|
|
60
|
+
if (maxSize === void 0) { maxSize = 100; }
|
|
61
|
+
var cache = getCache(wasmContext);
|
|
62
|
+
if (!cache)
|
|
63
|
+
return undefined;
|
|
64
|
+
var vecColorVertex = cache.vecColorVertex;
|
|
65
|
+
if (!vecColorVertex) {
|
|
66
|
+
vecColorVertex = new wasmContext.VectorColorVertex();
|
|
67
|
+
vecColorVertex.reserve(maxSize);
|
|
68
|
+
cache.vecColorVertex = vecColorVertex;
|
|
69
|
+
}
|
|
70
|
+
vecColorVertex.clear();
|
|
71
|
+
return vecColorVertex;
|
|
72
|
+
};
|
|
73
|
+
exports.getVectorColorVertex = getVectorColorVertex;
|
|
74
|
+
var getVertex = function (wasmContext, x, y) {
|
|
75
|
+
var cache = getCache(wasmContext);
|
|
76
|
+
if (!cache)
|
|
77
|
+
return undefined;
|
|
78
|
+
var vertex = cache.vertex;
|
|
79
|
+
if (!vertex) {
|
|
80
|
+
vertex = new wasmContext.SCRTColorVertex(x, y);
|
|
81
|
+
cache.vertex = vertex;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
vertex.SetPosition(x, y);
|
|
85
|
+
}
|
|
86
|
+
return vertex;
|
|
87
|
+
};
|
|
88
|
+
exports.getVertex = getVertex;
|
|
89
|
+
var getNativeRect = function (wasmContext, xTopLeft, yTopLeft, xBottomRight, yBottomRight) {
|
|
90
|
+
var cache = getCache(wasmContext);
|
|
91
|
+
var rect = cache.rect;
|
|
92
|
+
if (!rect) {
|
|
93
|
+
rect = new wasmContext.SCRTRectVertex(xTopLeft, yTopLeft, xBottomRight - xTopLeft, yBottomRight - yTopLeft);
|
|
94
|
+
cache.rect = rect;
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
rect.Assign(xTopLeft, yTopLeft, xBottomRight - xTopLeft, yBottomRight - yTopLeft);
|
|
98
|
+
}
|
|
99
|
+
return rect;
|
|
100
|
+
};
|
|
101
|
+
exports.getNativeRect = getNativeRect;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TSciChart } from "../../../types/TSciChart";
|
|
1
|
+
import { SCRTRectVertex, TSciChart } from "../../../types/TSciChart";
|
|
2
2
|
/**
|
|
3
3
|
* Helper function to create a {@link SCRTRectVertex} native rectangle vertex
|
|
4
4
|
* @param webAssemblyContext The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and
|
|
@@ -8,4 +8,4 @@ import { TSciChart } from "../../../types/TSciChart";
|
|
|
8
8
|
* @param xBottomRight
|
|
9
9
|
* @param yBottomRight
|
|
10
10
|
*/
|
|
11
|
-
export declare const createNativeRect: (webAssemblyContext: TSciChart, xTopLeft: number, yTopLeft: number, xBottomRight: number, yBottomRight: number) =>
|
|
11
|
+
export declare const createNativeRect: (webAssemblyContext: TSciChart, xTopLeft: number, yTopLeft: number, xBottomRight: number, yBottomRight: number) => SCRTRectVertex;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createNativeRect = void 0;
|
|
4
|
+
var NativeObject_1 = require("./NativeObject");
|
|
5
|
+
var rect;
|
|
4
6
|
/**
|
|
5
7
|
* Helper function to create a {@link SCRTRectVertex} native rectangle vertex
|
|
6
8
|
* @param webAssemblyContext The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and
|
|
@@ -11,6 +13,6 @@ exports.createNativeRect = void 0;
|
|
|
11
13
|
* @param yBottomRight
|
|
12
14
|
*/
|
|
13
15
|
var createNativeRect = function (webAssemblyContext, xTopLeft, yTopLeft, xBottomRight, yBottomRight) {
|
|
14
|
-
return
|
|
16
|
+
return (0, NativeObject_1.getNativeRect)(webAssemblyContext, xTopLeft, yTopLeft, xBottomRight, yBottomRight);
|
|
15
17
|
};
|
|
16
18
|
exports.createNativeRect = createNativeRect;
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.drawBorder = void 0;
|
|
4
4
|
var createNativeRect_1 = require("./createNativeRect");
|
|
5
|
+
var NativeObject_1 = require("./NativeObject");
|
|
5
6
|
var drawBorder = function (renderContext, webAssemblyContext2D, solidBrushCacheBorder, borderRect, leftBorder, topBorder, rightBorder, bottomBorder, color) {
|
|
6
7
|
if (bottomBorder === 0 && topBorder === 0 && leftBorder === 0 && rightBorder === 0) {
|
|
7
8
|
return;
|
|
8
9
|
}
|
|
9
10
|
var solidBrush = solidBrushCacheBorder.newBrush(color, true);
|
|
10
|
-
var vecRects =
|
|
11
|
+
var vecRects = (0, NativeObject_1.getVectorRectVertex)(webAssemblyContext2D);
|
|
11
12
|
vecRects.push_back((0, createNativeRect_1.createNativeRect)(webAssemblyContext2D, borderRect.x, borderRect.y - topBorder, borderRect.x + borderRect.width + rightBorder, borderRect.y));
|
|
12
13
|
vecRects.push_back((0, createNativeRect_1.createNativeRect)(webAssemblyContext2D, borderRect.x + borderRect.width, borderRect.y, borderRect.x + borderRect.width + rightBorder, borderRect.y + borderRect.height + bottomBorder));
|
|
13
14
|
vecRects.push_back((0, createNativeRect_1.createNativeRect)(webAssemblyContext2D, borderRect.x - leftBorder, borderRect.y + borderRect.height, borderRect.x + borderRect.width, borderRect.y + borderRect.height + bottomBorder));
|
|
14
15
|
vecRects.push_back((0, createNativeRect_1.createNativeRect)(webAssemblyContext2D, borderRect.x - leftBorder, borderRect.y - topBorder, borderRect.x, borderRect.y + borderRect.height));
|
|
15
16
|
renderContext.drawRects(vecRects, solidBrush, 0, 0);
|
|
16
|
-
vecRects.delete();
|
|
17
17
|
};
|
|
18
18
|
exports.drawBorder = drawBorder;
|
|
@@ -30,8 +30,8 @@ import { IRenderableSeries } from "./IRenderableSeries";
|
|
|
30
30
|
import { RolloverModifierRenderableSeriesProps } from "./RolloverModifier/RolloverModifierRenderableSeriesProps";
|
|
31
31
|
import { SeriesHoveredArgs } from "./SeriesHoveredArgs";
|
|
32
32
|
import { SeriesSelectedArgs } from "./SeriesSelectedArgs";
|
|
33
|
-
import { ShaderEffect } from "./ShaderEffect";
|
|
34
33
|
import { SeriesVisibleChangedArgs } from "./SeriesVisibleChangedArgs";
|
|
34
|
+
import { ShaderEffect } from "./ShaderEffect";
|
|
35
35
|
/**
|
|
36
36
|
* @summary Defines the base class to a Render Series (or Chart Type) in SciChart's High Performance Real-time
|
|
37
37
|
* {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}
|
|
@@ -305,4 +305,11 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
|
|
|
305
305
|
private effectPropertyChanged;
|
|
306
306
|
private get canDraw();
|
|
307
307
|
}
|
|
308
|
-
|
|
308
|
+
/** @ignore */
|
|
309
|
+
export declare const getDataPointWidth: (xValues: SCRTDoubleVector, xCoordCalc: CoordinateCalculatorBase, seriesViewRectWidth: number, widthFraction: number, isCategoryAxis: boolean, wasmContext: TSciChart) => number;
|
|
310
|
+
/** @ignore */
|
|
311
|
+
export declare const getDelta: ({ pointSize, areaSize, range }: {
|
|
312
|
+
pointSize: number;
|
|
313
|
+
areaSize: number;
|
|
314
|
+
range: NumberRange;
|
|
315
|
+
}) => number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDataPointWidth = exports.BaseRenderableSeries = void 0;
|
|
3
|
+
exports.getDelta = exports.getDataPointWidth = exports.BaseRenderableSeries = void 0;
|
|
4
4
|
var classFactory_1 = require("../../../Builder/classFactory");
|
|
5
5
|
var AnimationFiniteStateMachine_1 = require("../../../Core/Animations/AnimationFiniteStateMachine");
|
|
6
6
|
var Deleter_1 = require("../../../Core/Deleter");
|
|
@@ -13,6 +13,7 @@ var SeriesType_1 = require("../../../types/SeriesType");
|
|
|
13
13
|
var guid_1 = require("../../../utils/guid");
|
|
14
14
|
var WebGlRenderContext2D_1 = require("../../Drawing/WebGlRenderContext2D");
|
|
15
15
|
var HeatmapSeriesInfo_1 = require("../../Model/ChartData/HeatmapSeriesInfo");
|
|
16
|
+
var HlcSeriesInfo_1 = require("../../Model/ChartData/HlcSeriesInfo");
|
|
16
17
|
var OhlcSeriesInfo_1 = require("../../Model/ChartData/OhlcSeriesInfo");
|
|
17
18
|
var XySeriesInfo_1 = require("../../Model/ChartData/XySeriesInfo");
|
|
18
19
|
var XyySeriesInfo_1 = require("../../Model/ChartData/XyySeriesInfo");
|
|
@@ -25,6 +26,7 @@ var ResamplingMode_1 = require("../../Numerics/Resamplers/ResamplingMode");
|
|
|
25
26
|
var AxisCore_1 = require("../Axis/AxisCore");
|
|
26
27
|
var SciChartDefaults_1 = require("../SciChartDefaults");
|
|
27
28
|
var SciChartSurfaceBase_1 = require("../SciChartSurfaceBase");
|
|
29
|
+
var DpiHelper_1 = require("../TextureManager/DpiHelper");
|
|
28
30
|
var animationHelpers_1 = require("./Animations/animationHelpers");
|
|
29
31
|
var constants_1 = require("./constants");
|
|
30
32
|
var RolloverModifierRenderableSeriesProps_1 = require("./RolloverModifier/RolloverModifierRenderableSeriesProps");
|
|
@@ -422,10 +424,16 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
422
424
|
},
|
|
423
425
|
/** @inheritDoc */
|
|
424
426
|
set: function (dataSeries) {
|
|
425
|
-
var _a, _b;
|
|
426
|
-
(
|
|
427
|
+
var _a, _b, _c;
|
|
428
|
+
if (this.dataSeriesProperty) {
|
|
429
|
+
var xAxis = (_a = this.parentSurface) === null || _a === void 0 ? void 0 : _a.getXAxisById(this.xAxisId);
|
|
430
|
+
if (xAxis && xAxis.isCategoryAxis) {
|
|
431
|
+
xAxis.clearCoordCalcCache();
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
(_b = this.dataSeriesProperty) === null || _b === void 0 ? void 0 : _b.dataChanged.unsubscribe(this.dataSeriesDataChanged);
|
|
427
435
|
this.dataSeriesProperty = dataSeries;
|
|
428
|
-
(
|
|
436
|
+
(_c = this.dataSeriesProperty) === null || _c === void 0 ? void 0 : _c.dataChanged.subscribe(this.dataSeriesDataChanged);
|
|
429
437
|
this.notifyPropertyChanged(constants_1.PROPERTY.DATA_SERIES);
|
|
430
438
|
},
|
|
431
439
|
enumerable: false,
|
|
@@ -546,9 +554,9 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
546
554
|
*/
|
|
547
555
|
BaseRenderableSeries.prototype.getDataPointWidth = function (xCoordCalc, widthFraction) {
|
|
548
556
|
var xValues = this.dataSeries.getNativeXValues();
|
|
549
|
-
var seriesViewRectWidth =
|
|
550
|
-
var isCategoryAxis =
|
|
551
|
-
return (0, exports.getDataPointWidth)(xValues, xCoordCalc, seriesViewRectWidth, widthFraction, isCategoryAxis);
|
|
557
|
+
var seriesViewRectWidth = xCoordCalc.viewportDimension;
|
|
558
|
+
var isCategoryAxis = xCoordCalc.isCategoryCoordinateCalculator;
|
|
559
|
+
return (0, exports.getDataPointWidth)(xValues, xCoordCalc, seriesViewRectWidth, widthFraction, isCategoryAxis, this.webAssemblyContext);
|
|
552
560
|
};
|
|
553
561
|
/** @inheritDoc */
|
|
554
562
|
BaseRenderableSeries.prototype.onDetach = function () {
|
|
@@ -633,6 +641,8 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
633
641
|
return new XyySeriesInfo_1.XyySeriesInfo(this, hitTestInfo);
|
|
634
642
|
case IDataSeries_1.EDataSeriesType.HeatmapUniform:
|
|
635
643
|
return new HeatmapSeriesInfo_1.HeatmapSeriesInfo(this, hitTestInfo);
|
|
644
|
+
case IDataSeries_1.EDataSeriesType.Hlc:
|
|
645
|
+
return new HlcSeriesInfo_1.HlcSeriesInfo(this, hitTestInfo);
|
|
636
646
|
default:
|
|
637
647
|
return new XySeriesInfo_1.XySeriesInfo(this, hitTestInfo);
|
|
638
648
|
}
|
|
@@ -648,7 +658,7 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
648
658
|
};
|
|
649
659
|
/** @inheritDoc */
|
|
650
660
|
BaseRenderableSeries.prototype.toJSON = function (excludeData) {
|
|
651
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
661
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
652
662
|
if (excludeData === void 0) { excludeData = false; }
|
|
653
663
|
var paletteProvider;
|
|
654
664
|
if (this.paletteProvider) {
|
|
@@ -680,27 +690,24 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
680
690
|
// onSelectedChanged: this.onSelectedChanged
|
|
681
691
|
};
|
|
682
692
|
if (((_c = this.dataSeries) === null || _c === void 0 ? void 0 : _c.type) === IDataSeries_1.EDataSeriesType.Xy) {
|
|
683
|
-
// @ts-ignore
|
|
684
693
|
return { type: this.type, options: options, xyData: this.dataSeries.toJSON(excludeData) };
|
|
685
694
|
}
|
|
686
695
|
else if (((_d = this.dataSeries) === null || _d === void 0 ? void 0 : _d.type) === IDataSeries_1.EDataSeriesType.Xyy) {
|
|
687
|
-
// @ts-ignore
|
|
688
696
|
return { type: this.type, options: options, xyyData: this.dataSeries.toJSON(excludeData) };
|
|
689
697
|
}
|
|
690
698
|
else if (((_e = this.dataSeries) === null || _e === void 0 ? void 0 : _e.type) === IDataSeries_1.EDataSeriesType.Xyz) {
|
|
691
|
-
// @ts-ignore
|
|
692
699
|
return { type: this.type, options: options, xyzData: this.dataSeries.toJSON(excludeData) };
|
|
693
700
|
}
|
|
694
701
|
else if (((_f = this.dataSeries) === null || _f === void 0 ? void 0 : _f.type) === IDataSeries_1.EDataSeriesType.Ohlc) {
|
|
695
|
-
// @ts-ignore
|
|
696
702
|
return { type: this.type, options: options, ohlcData: this.dataSeries.toJSON(excludeData) };
|
|
697
703
|
}
|
|
698
|
-
else if (((_g = this.dataSeries) === null || _g === void 0 ? void 0 : _g.type) === IDataSeries_1.EDataSeriesType.
|
|
699
|
-
|
|
704
|
+
else if (((_g = this.dataSeries) === null || _g === void 0 ? void 0 : _g.type) === IDataSeries_1.EDataSeriesType.Hlc) {
|
|
705
|
+
return { type: this.type, options: options, hlcData: this.dataSeries.toJSON(excludeData) };
|
|
706
|
+
}
|
|
707
|
+
else if (((_h = this.dataSeries) === null || _h === void 0 ? void 0 : _h.type) === IDataSeries_1.EDataSeriesType.HeatmapUniform) {
|
|
700
708
|
return { type: this.type, options: options, heatmapData: this.dataSeries.toJSON(excludeData) };
|
|
701
709
|
}
|
|
702
710
|
else {
|
|
703
|
-
// @ts-ignore
|
|
704
711
|
return { type: this.type, options: options };
|
|
705
712
|
}
|
|
706
713
|
};
|
|
@@ -775,9 +782,7 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
775
782
|
this.pointSeries.xRange = rp.xVisibleRange;
|
|
776
783
|
}
|
|
777
784
|
this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext, rp, this.dataSeries.getNativeXValues(), this.dataSeries.getNativeYValues(), this.pointSeries.intIndexes, this.pointSeries.xValues, this.pointSeries.yValues, false);
|
|
778
|
-
|
|
779
|
-
this.pointSeries.updateIndexes();
|
|
780
|
-
}
|
|
785
|
+
this.pointSeries.updateIndexes();
|
|
781
786
|
this.pointSeries.clearIntIndexes();
|
|
782
787
|
// this.pointSeries.debugOutputForUnitTests();
|
|
783
788
|
return this.pointSeries;
|
|
@@ -802,7 +807,8 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
802
807
|
var seriesTypeSupportsResampling = ![
|
|
803
808
|
SeriesType_1.ESeriesType.UniformContoursSeries,
|
|
804
809
|
SeriesType_1.ESeriesType.UniformHeatmapSeries,
|
|
805
|
-
SeriesType_1.ESeriesType.ScatterSeries
|
|
810
|
+
SeriesType_1.ESeriesType.ScatterSeries,
|
|
811
|
+
SeriesType_1.ESeriesType.ErrorBarsSeries
|
|
806
812
|
].includes(this.type);
|
|
807
813
|
return (seriesTypeSupportsResampling &&
|
|
808
814
|
SciChartDefaults_1.SciChartDefaults.enableResampling &&
|
|
@@ -918,7 +924,8 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
918
924
|
return BaseRenderableSeries;
|
|
919
925
|
}());
|
|
920
926
|
exports.BaseRenderableSeries = BaseRenderableSeries;
|
|
921
|
-
|
|
927
|
+
/** @ignore */
|
|
928
|
+
var getDataPointWidth = function (xValues, xCoordCalc, seriesViewRectWidth, widthFraction, isCategoryAxis, wasmContext) {
|
|
922
929
|
if (widthFraction < 0 || widthFraction > 1) {
|
|
923
930
|
throw new Error("WidthFraction should be between 0.0 and 1.0 inclusive");
|
|
924
931
|
}
|
|
@@ -928,12 +935,28 @@ var getDataPointWidth = function (xValues, xCoordCalc, seriesViewRectWidth, widt
|
|
|
928
935
|
var barsAmount = count;
|
|
929
936
|
// TODO: logarithmic axis
|
|
930
937
|
if (barsAmount > 1) {
|
|
931
|
-
var max =
|
|
932
|
-
var min =
|
|
938
|
+
var max = Number.MIN_VALUE;
|
|
939
|
+
var min = Number.MAX_VALUE;
|
|
933
940
|
if (isCategoryAxis) {
|
|
934
941
|
max = xCoordCalc.getCoordinate(count - 1);
|
|
935
942
|
min = xCoordCalc.getCoordinate(0);
|
|
936
943
|
}
|
|
944
|
+
else {
|
|
945
|
+
var minMax = void 0;
|
|
946
|
+
try {
|
|
947
|
+
minMax = wasmContext.NumberUtil.MinMax(xValues);
|
|
948
|
+
// if (!isRealNumber(minMax.minD) || !isRealNumber(minMax.maxD)) {
|
|
949
|
+
// return new NumberRange(0, 0);
|
|
950
|
+
// }
|
|
951
|
+
min = minMax.minD;
|
|
952
|
+
max = minMax.maxD;
|
|
953
|
+
}
|
|
954
|
+
finally {
|
|
955
|
+
(0, Deleter_1.deleteSafe)(minMax);
|
|
956
|
+
}
|
|
957
|
+
max = xCoordCalc.getCoordinate(max);
|
|
958
|
+
min = xCoordCalc.getCoordinate(min);
|
|
959
|
+
}
|
|
937
960
|
dataPointWidth = Math.abs(max - min) / (barsAmount - 1);
|
|
938
961
|
}
|
|
939
962
|
else if (barsAmount === 1) {
|
|
@@ -946,3 +969,11 @@ var getDataPointWidth = function (xValues, xCoordCalc, seriesViewRectWidth, widt
|
|
|
946
969
|
return candleWidth;
|
|
947
970
|
};
|
|
948
971
|
exports.getDataPointWidth = getDataPointWidth;
|
|
972
|
+
/** @ignore */
|
|
973
|
+
var getDelta = function (_a) {
|
|
974
|
+
var pointSize = _a.pointSize, areaSize = _a.areaSize, range = _a.range;
|
|
975
|
+
var pointScaled = pointSize * DpiHelper_1.DpiHelper.PIXEL_RATIO;
|
|
976
|
+
var k = areaSize / (areaSize - pointScaled);
|
|
977
|
+
return (Math.abs(range.max - range.min) * (k - 1)) / 2;
|
|
978
|
+
};
|
|
979
|
+
exports.getDelta = getDelta;
|
|
@@ -83,7 +83,7 @@ var BaseSeriesDrawingProvider = /** @class */ (function () {
|
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
BaseSeriesDrawingProvider.prototype.applyStrokeFillPaletting = function (stroke, strokePen, fill, fillBrush, opacity, usePalette, resetPenBrushColors) {
|
|
86
|
-
var _a, _b, _c;
|
|
86
|
+
var _a, _b, _c, _d, _e;
|
|
87
87
|
if (usePalette === void 0) { usePalette = false; }
|
|
88
88
|
if (resetPenBrushColors === void 0) { resetPenBrushColors = true; }
|
|
89
89
|
var hasStrokePaletteProvider = this.parentSeries.hasStrokePaletteProvider();
|
|
@@ -113,12 +113,16 @@ var BaseSeriesDrawingProvider = /** @class */ (function () {
|
|
|
113
113
|
throw Error("updatePalette(): fillColor " + fillColor + " cannot be converted to a valid color");
|
|
114
114
|
}
|
|
115
115
|
var dataSeries = this.parentSeries.dataSeries;
|
|
116
|
+
var renderPassData = this.parentSeries.getCurrentRenderPassData();
|
|
117
|
+
var pointSeries = renderPassData === null || renderPassData === void 0 ? void 0 : renderPassData.pointSeries;
|
|
118
|
+
var xValues = (_a = pointSeries === null || pointSeries === void 0 ? void 0 : pointSeries.xValues) !== null && _a !== void 0 ? _a : dataSeries.getNativeXValues();
|
|
119
|
+
var yValues = (_b = pointSeries === null || pointSeries === void 0 ? void 0 : pointSeries.yValues) !== null && _b !== void 0 ? _b : dataSeries.getNativeYValues();
|
|
120
|
+
var dataSize = pointSeries ? pointSeries.indexes.size() : xValues.size();
|
|
116
121
|
// Recreate palettedColors if the size changed
|
|
117
|
-
if (!this.palettingState.palettedColors ||
|
|
118
|
-
this.palettingState.palettedColors.size() !== dataSeries.count()) {
|
|
122
|
+
if (!this.palettingState.palettedColors || this.palettingState.palettedColors.size() !== dataSize) {
|
|
119
123
|
(0, Deleter_1.deleteSafe)(this.palettingState.palettedColors);
|
|
120
124
|
this.palettingState.palettedColors = new this.webAssemblyContext.UIntVector();
|
|
121
|
-
this.palettingState.palettedColors.reserve(
|
|
125
|
+
this.palettingState.palettedColors.reserve(dataSize * 2);
|
|
122
126
|
this.palettingState.paletteTextureCache.reset();
|
|
123
127
|
}
|
|
124
128
|
// Commented this code out, because I don't know what this code does
|
|
@@ -142,15 +146,14 @@ var BaseSeriesDrawingProvider = /** @class */ (function () {
|
|
|
142
146
|
// }
|
|
143
147
|
// }
|
|
144
148
|
// Override stroke and fill colors
|
|
145
|
-
var xValues = dataSeries.getNativeXValues();
|
|
146
|
-
var yValues = dataSeries.getNativeYValues();
|
|
147
149
|
var hashCode = 0;
|
|
148
|
-
for (var index = 0; index <
|
|
150
|
+
for (var index = 0; index < dataSize; index++) {
|
|
151
|
+
var originalDataIndex = pointSeries ? pointSeries.indexes.get(index) : index;
|
|
149
152
|
var xValue = xValues.get(index);
|
|
150
153
|
var yValue = yValues.get(index);
|
|
151
|
-
var overriddenColors = this.overridePaletteProviderColors(this.parentSeries, xValue, yValue, index, opacity, dataSeries.getMetadataAt(
|
|
152
|
-
var overrideStrokeColor = (
|
|
153
|
-
var overrideFillColor = (
|
|
154
|
+
var overriddenColors = this.overridePaletteProviderColors(this.parentSeries, xValue, yValue, index, opacity, dataSeries.getMetadataAt(originalDataIndex));
|
|
155
|
+
var overrideStrokeColor = (_c = overriddenColors.stroke) !== null && _c !== void 0 ? _c : strokeColor;
|
|
156
|
+
var overrideFillColor = (_d = overriddenColors.fill) !== null && _d !== void 0 ? _d : fillColor;
|
|
154
157
|
this.palettingState.palettedColors.push_back(overrideStrokeColor);
|
|
155
158
|
this.palettingState.palettedColors.push_back(overrideFillColor);
|
|
156
159
|
hashCode = (0, number_1.numericHashCode)(hashCode, overrideStrokeColor);
|
|
@@ -167,7 +170,7 @@ var BaseSeriesDrawingProvider = /** @class */ (function () {
|
|
|
167
170
|
}
|
|
168
171
|
else {
|
|
169
172
|
this.palettingState.paletteTextureCache.reset();
|
|
170
|
-
(
|
|
173
|
+
(_e = this.palettingState.palettedColors) === null || _e === void 0 ? void 0 : _e.clear();
|
|
171
174
|
// This was needed for resetPenBrushColors, therefore commented out as well
|
|
172
175
|
// if (strokePen) {
|
|
173
176
|
// if (this.palettingState.originalPenColor) {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { TSciChart } from "../../../../types/TSciChart";
|
|
2
|
+
import { WebGlRenderContext2D } from "../../../Drawing/WebGlRenderContext2D";
|
|
3
|
+
import { RenderPassData } from "../../../Services/RenderPassData";
|
|
4
|
+
import { TDpiChangedEventArgs } from "../../TextureManager/DpiHelper";
|
|
5
|
+
import { FastErrorBarsRenderableSeries } from "../FastErrorBarsRenderableSeries";
|
|
6
|
+
import { BaseSeriesDrawingProvider } from "./BaseSeriesDrawingProvider";
|
|
7
|
+
/**
|
|
8
|
+
* Used internally - a drawing provider performs drawing for a {@link BaseBandRenderableSeries} using
|
|
9
|
+
* our WebAssembly WebGL rendering engine
|
|
10
|
+
*/
|
|
11
|
+
export declare class ErrorSeriesDrawingProvider extends BaseSeriesDrawingProvider<FastErrorBarsRenderableSeries> {
|
|
12
|
+
private linesPenCache;
|
|
13
|
+
private vertices;
|
|
14
|
+
/**
|
|
15
|
+
* Creates an instance of the {@link BandSeriesDrawingProvider}
|
|
16
|
+
* @param webAssemblyContext The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and
|
|
17
|
+
* access to our WebGL2 Engine and WebAssembly numerical methods
|
|
18
|
+
* @param parentSeries the parent {@link BaseBandRenderableSeries} which this drawing provider is attached to
|
|
19
|
+
*/
|
|
20
|
+
constructor(webAssemblyContext: TSciChart, parentSeries: FastErrorBarsRenderableSeries);
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
onAttachSeries(): void;
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
onDetachSeries(): void;
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
delete(): void;
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
draw(renderContext: WebGlRenderContext2D, renderPassData: RenderPassData): void;
|
|
37
|
+
/**
|
|
38
|
+
* @inheritDoc
|
|
39
|
+
*/
|
|
40
|
+
onDpiChanged(args: TDpiChangedEventArgs): void;
|
|
41
|
+
/**
|
|
42
|
+
* @inheritDoc
|
|
43
|
+
*/
|
|
44
|
+
onSeriesPropertyChange(propertyName: string): void;
|
|
45
|
+
private addLineVertices;
|
|
46
|
+
}
|