scichart 2.0.2228 → 2.1.0-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Charting/ChartModifiers/DataPointSelectionModifier.js +0 -1
- package/Charting/Drawing/WebGlRenderContext2D.d.ts +1 -0
- package/Charting/Drawing/WebGlRenderContext2D.js +4 -1
- package/Charting/Model/BaseDataSeries.d.ts +42 -15
- package/Charting/Model/BaseDataSeries.js +77 -28
- package/Charting/Model/BaseHeatmapDataSeries.d.ts +31 -23
- package/Charting/Model/BaseHeatmapDataSeries.js +45 -18
- package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.d.ts +23 -0
- package/Charting/Model/DataDistributionCalculator/DataDistributionCalculator.js +122 -0
- package/Charting/Model/DataDistributionCalculator/IDataDistributionCalculator.d.ts +57 -0
- package/Charting/Model/DataDistributionCalculator/IDataDistributionCalculator.js +2 -0
- package/Charting/Model/Filters/OhlcFilterBase.d.ts +2 -2
- package/Charting/Model/Filters/XyFilterBase.d.ts +3 -3
- package/Charting/Model/Filters/XyMovingAverageFilter.js +1 -1
- package/Charting/Model/Filters/XyyFilterBase.d.ts +4 -4
- package/Charting/Model/Filters/XyzFilterBase.d.ts +4 -4
- package/Charting/Model/IDataSeries.d.ts +37 -5
- package/Charting/Model/OhlcDataSeries.d.ts +12 -11
- package/Charting/Model/OhlcDataSeries.js +37 -34
- package/Charting/Model/PointSeries/BasePointSeriesResampled.d.ts +21 -0
- package/Charting/Model/PointSeries/BasePointSeriesResampled.js +56 -0
- package/Charting/Model/PointSeries/BasePointSeriesWrapped.d.ts +14 -0
- package/Charting/Model/PointSeries/BasePointSeriesWrapped.js +23 -0
- package/Charting/Model/PointSeries/IPointSeries.d.ts +31 -0
- package/Charting/Model/PointSeries/IPointSeries.js +2 -0
- package/Charting/Model/PointSeries/OhlcPointSeriesResampled.d.ts +13 -0
- package/Charting/Model/PointSeries/OhlcPointSeriesResampled.js +59 -0
- package/Charting/Model/PointSeries/OhlcPointSeriesWrapped.d.ts +11 -0
- package/Charting/Model/PointSeries/OhlcPointSeriesWrapped.js +32 -0
- package/Charting/Model/PointSeries/XyPointSeriesResampled.d.ts +7 -0
- package/Charting/Model/PointSeries/XyPointSeriesResampled.js +27 -0
- package/Charting/Model/PointSeries/XyPointSeriesWrapped.d.ts +6 -0
- package/Charting/Model/PointSeries/XyPointSeriesWrapped.js +27 -0
- package/Charting/Model/PointSeries/XyyPointSeriesResampled.d.ts +10 -0
- package/Charting/Model/PointSeries/XyyPointSeriesResampled.js +48 -0
- package/Charting/Model/PointSeries/XyyPointSeriesWrapped.d.ts +8 -0
- package/Charting/Model/PointSeries/XyyPointSeriesWrapped.js +29 -0
- package/Charting/Model/PointSeries/XyzPointSeriesWrapped.d.ts +8 -0
- package/Charting/Model/PointSeries/XyzPointSeriesWrapped.js +29 -0
- package/Charting/Model/XyDataSeries.d.ts +3 -2
- package/Charting/Model/XyDataSeries.js +22 -22
- package/Charting/Model/XyyDataSeries.d.ts +5 -5
- package/Charting/Model/XyyDataSeries.js +24 -21
- package/Charting/Model/XyzDataSeries.d.ts +5 -5
- package/Charting/Model/XyzDataSeries.js +24 -21
- package/Charting/Numerics/CoordinateCalculators/CategoryCoordinateCalculator.d.ts +2 -2
- package/Charting/Numerics/CoordinateCalculators/FlippedCategoryCoordinateCalculator.d.ts +2 -2
- package/Charting/Numerics/CoordinateCalculators/FlippedNumericCoordinateCalculator.d.ts +2 -1
- package/Charting/Numerics/CoordinateCalculators/FlippedNumericCoordinateCalculator.js +6 -2
- package/Charting/Numerics/CoordinateCalculators/NumericCoordinateCalculator.d.ts +2 -1
- package/Charting/Numerics/CoordinateCalculators/NumericCoordinateCalculator.js +6 -2
- package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.d.ts +54 -0
- package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +232 -0
- package/Charting/Numerics/Resamplers/ResamplingMode.d.ts +37 -0
- package/Charting/Numerics/Resamplers/ResamplingMode.js +41 -0
- package/Charting/Numerics/Resamplers/ResamplingParams.d.ts +39 -0
- package/Charting/Numerics/Resamplers/ResamplingParams.js +52 -0
- package/Charting/Services/RenderPassData.d.ts +6 -1
- package/Charting/Services/RenderPassData.js +5 -1
- package/Charting/Services/RenderPassInfo.d.ts +18 -0
- package/Charting/Services/RenderPassInfo.js +14 -0
- package/Charting/Services/SciChartRenderer.d.ts +14 -1
- package/Charting/Services/SciChartRenderer.js +122 -31
- package/Charting/Visuals/Axis/AxisCore.d.ts +11 -0
- package/Charting/Visuals/Axis/AxisCore.js +39 -18
- package/Charting/Visuals/Axis/AxisRenderer.d.ts +1 -0
- package/Charting/Visuals/Axis/AxisRenderer.js +6 -6
- package/Charting/Visuals/Axis/IAxisCoreOptions.d.ts +5 -0
- package/Charting/Visuals/Axis/NumericAxis.js +2 -2
- package/Charting/Visuals/Axis/constants.d.ts +1 -0
- package/Charting/Visuals/Axis/constants.js +1 -0
- package/Charting/Visuals/RenderableSeries/Animations/FadeAnimation.d.ts +2 -2
- package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.d.ts +2 -2
- package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.d.ts +3 -3
- package/Charting/Visuals/RenderableSeries/Animations/SweepAnimation.d.ts +2 -2
- package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.d.ts +2 -2
- package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.d.ts +6 -6
- package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.js +2 -2
- package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +9 -2
- package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +45 -1
- package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.js +1 -0
- package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.js +1 -0
- package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +12 -5
- package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +59 -0
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +40 -5
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +114 -10
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +36 -4
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +51 -3
- package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +38 -4
- package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +54 -3
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +8 -14
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +4 -3
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +5 -11
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +4 -11
- package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.d.ts +2 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +17 -21
- package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +6 -12
- package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.js +9 -15
- package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.d.ts +4 -3
- package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +16 -21
- package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformContoursDrawingProvider.js +2 -9
- package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +0 -7
- package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +6 -2
- package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +5 -0
- package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.js +1 -0
- package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.js +6 -0
- package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +2 -2
- package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/ColumnSeriesHitTestProvider.js +2 -2
- package/Charting/Visuals/RenderableSeries/HitTest/LineSeriesHitTestProvider.js +2 -2
- package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.js +2 -2
- package/Charting/Visuals/RenderableSeries/HitTest/ScatterSeriesHitTestProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/StackedColumnSeriesHitTestProvider.js +2 -2
- package/Charting/Visuals/RenderableSeries/HitTest/StackedMountainSeriesHitTestProvider.js +2 -2
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +6 -6
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +1 -1
- package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +12 -1
- package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +38 -2
- package/Charting/Visuals/RenderableSeries/ISpline.d.ts +3 -3
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.d.ts +4 -4
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +5 -5
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +3 -3
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +3 -3
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.d.ts +3 -3
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +3 -3
- package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +0 -6
- package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +1 -7
- package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.d.ts +5 -0
- package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.js +6 -0
- package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.d.ts +5 -0
- package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +6 -0
- package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -3
- package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +6 -3
- package/Charting/Visuals/RenderableSeries/constants.d.ts +3 -0
- package/Charting/Visuals/RenderableSeries/constants.js +3 -0
- package/Charting/Visuals/SciChartDefaults.d.ts +9 -1
- package/Charting/Visuals/SciChartDefaults.js +9 -1
- package/Charting/Visuals/licenseManager2D.js +19 -20
- package/Charting/Visuals/licenseManager2dState.d.ts +4 -0
- package/Charting/Visuals/licenseManager2dState.js +12 -0
- package/Charting3D/Model/DataSeries/XyzDataSeries3D.d.ts +7 -7
- package/Charting3D/Model/DataSeries/XyzDataSeries3D.js +3 -3
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/Core/OneTimePerformanceWarning.d.ts +6 -0
- package/Core/OneTimePerformanceWarning.js +19 -0
- package/Core/storage/localStorageApi.d.ts +9 -0
- package/Core/storage/localStorageApi.js +32 -0
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.js +95 -95
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +96 -96
- package/_wasm/scichart3d.wasm +0 -0
- package/constants/performanceWarnings.d.ts +5 -0
- package/constants/performanceWarnings.js +8 -0
- package/package.json +1 -1
- package/types/SearchMode.d.ts +21 -0
- package/types/SearchMode.js +25 -0
- package/types/TSciChart.d.ts +143 -40
- package/types/TSciChart3D.d.ts +66 -28
- package/utils/array.d.ts +7 -0
- package/utils/array.js +19 -1
- package/utils/calcAverage.d.ts +2 -2
- package/utils/ccall/appendDoubleVectorFromJsArray.d.ts +19 -0
- package/utils/ccall/appendDoubleVectorFromJsArray.js +91 -0
- package/utils/hash.d.ts +7 -0
- package/utils/hash.js +35 -0
- package/utils/ccall/fillDoubleVectorFromJsArray.d.ts +0 -3
- package/utils/ccall/fillDoubleVectorFromJsArray.js +0 -33
- package/utils/performance.d.ts +0 -5
- package/utils/performance.js +0 -11
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare enum EResamplingMode {
|
|
2
|
+
/**
|
|
3
|
+
* Do not use resampling when redrawing a series
|
|
4
|
+
*/
|
|
5
|
+
None = "None",
|
|
6
|
+
/**
|
|
7
|
+
* Assumes Evenly-spaced data (TimeSeries). Resample by taking the min-max of oversampled data.
|
|
8
|
+
* This results in the most visually accurate resampling, with the most performan
|
|
9
|
+
*/
|
|
10
|
+
MinMax = "MinMax",
|
|
11
|
+
/**
|
|
12
|
+
* Assumes Evenly-spaced data (TimeSeries). Resample by taking the median point of oversampled data
|
|
13
|
+
*/
|
|
14
|
+
Mid = "Mid",
|
|
15
|
+
/**
|
|
16
|
+
* Assumes Evenly-spaced data (TimeSeries). Resample by taking the maximum point of oversampled data
|
|
17
|
+
*/
|
|
18
|
+
Max = "Max",
|
|
19
|
+
/**
|
|
20
|
+
* Assumes Evenly-spaced data (TimeSeries). Resample by taking the minimum point of oversampled data
|
|
21
|
+
*/
|
|
22
|
+
Min = "Min",
|
|
23
|
+
/**
|
|
24
|
+
* Does not assume Evenly-spaced data (TimeSeries). Resample by taking the min-max of oversampled data.
|
|
25
|
+
* This results in the most visually accurate resampling, with the most performant rendering
|
|
26
|
+
*/
|
|
27
|
+
MinMaxWithUnevenSpacing = "MinMaxWithUnevenSpacing",
|
|
28
|
+
/**
|
|
29
|
+
* Auto-detect the most suitable resampling algorithm (Fastest, plus most accurate) for the type of data appended
|
|
30
|
+
*/
|
|
31
|
+
Auto = "Auto",
|
|
32
|
+
/**
|
|
33
|
+
* EXPERIMENTAL! Assumes Evenly-spaced data (TimeSeries).
|
|
34
|
+
* Resample by taking the Min, or the Max point of oversampled data. Outputs Min and Max when points in the resampling bucket span zero
|
|
35
|
+
*/
|
|
36
|
+
MinOrMax = "MinOrMax"
|
|
37
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EResamplingMode = void 0;
|
|
4
|
+
var EResamplingMode;
|
|
5
|
+
(function (EResamplingMode) {
|
|
6
|
+
/**
|
|
7
|
+
* Do not use resampling when redrawing a series
|
|
8
|
+
*/
|
|
9
|
+
EResamplingMode["None"] = "None";
|
|
10
|
+
/**
|
|
11
|
+
* Assumes Evenly-spaced data (TimeSeries). Resample by taking the min-max of oversampled data.
|
|
12
|
+
* This results in the most visually accurate resampling, with the most performan
|
|
13
|
+
*/
|
|
14
|
+
EResamplingMode["MinMax"] = "MinMax";
|
|
15
|
+
/**
|
|
16
|
+
* Assumes Evenly-spaced data (TimeSeries). Resample by taking the median point of oversampled data
|
|
17
|
+
*/
|
|
18
|
+
EResamplingMode["Mid"] = "Mid";
|
|
19
|
+
/**
|
|
20
|
+
* Assumes Evenly-spaced data (TimeSeries). Resample by taking the maximum point of oversampled data
|
|
21
|
+
*/
|
|
22
|
+
EResamplingMode["Max"] = "Max";
|
|
23
|
+
/**
|
|
24
|
+
* Assumes Evenly-spaced data (TimeSeries). Resample by taking the minimum point of oversampled data
|
|
25
|
+
*/
|
|
26
|
+
EResamplingMode["Min"] = "Min";
|
|
27
|
+
/**
|
|
28
|
+
* Does not assume Evenly-spaced data (TimeSeries). Resample by taking the min-max of oversampled data.
|
|
29
|
+
* This results in the most visually accurate resampling, with the most performant rendering
|
|
30
|
+
*/
|
|
31
|
+
EResamplingMode["MinMaxWithUnevenSpacing"] = "MinMaxWithUnevenSpacing";
|
|
32
|
+
/**
|
|
33
|
+
* Auto-detect the most suitable resampling algorithm (Fastest, plus most accurate) for the type of data appended
|
|
34
|
+
*/
|
|
35
|
+
EResamplingMode["Auto"] = "Auto";
|
|
36
|
+
/**
|
|
37
|
+
* EXPERIMENTAL! Assumes Evenly-spaced data (TimeSeries).
|
|
38
|
+
* Resample by taking the Min, or the Max point of oversampled data. Outputs Min and Max when points in the resampling bucket span zero
|
|
39
|
+
*/
|
|
40
|
+
EResamplingMode["MinOrMax"] = "MinOrMax";
|
|
41
|
+
})(EResamplingMode = exports.EResamplingMode || (exports.EResamplingMode = {}));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { NumberRange } from "../../../Core/NumberRange";
|
|
2
|
+
import { Rect } from "../../../Core/Rect";
|
|
3
|
+
import { AxisBase2D } from "../../Visuals/Axis/AxisBase2D";
|
|
4
|
+
import { IRenderableSeries } from "../../Visuals/RenderableSeries/IRenderableSeries";
|
|
5
|
+
import { EResamplingMode } from "./ResamplingMode";
|
|
6
|
+
export interface IResamplingParamsCloneOptions {
|
|
7
|
+
zeroLineY?: number;
|
|
8
|
+
precision?: number;
|
|
9
|
+
xVisibleRange?: NumberRange;
|
|
10
|
+
indicesRange?: NumberRange;
|
|
11
|
+
viewportRect?: Rect;
|
|
12
|
+
isCategoryAxis?: boolean;
|
|
13
|
+
isXAxisAutoRanged?: boolean;
|
|
14
|
+
resamplingMode?: EResamplingMode;
|
|
15
|
+
renderableSeriesHash?: number;
|
|
16
|
+
enableExperimentalResampling?: boolean;
|
|
17
|
+
dataHasNaN?: boolean;
|
|
18
|
+
dataIsFifo?: boolean;
|
|
19
|
+
fifoCapacity?: number;
|
|
20
|
+
dataEvenlySpaced?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare class ResamplingParams {
|
|
23
|
+
zeroLineY: number;
|
|
24
|
+
precision: number;
|
|
25
|
+
xVisibleRange: NumberRange;
|
|
26
|
+
indexesRange: NumberRange;
|
|
27
|
+
viewportRect: Rect;
|
|
28
|
+
isCategoryAxis: boolean;
|
|
29
|
+
isXAxisAutoRanged: boolean;
|
|
30
|
+
resamplingMode: EResamplingMode;
|
|
31
|
+
renderableSeriesHash: number;
|
|
32
|
+
enableExperimentalResampling: boolean;
|
|
33
|
+
dataHasNaN: boolean;
|
|
34
|
+
dataIsFifo: boolean;
|
|
35
|
+
fifoCapacity: number;
|
|
36
|
+
dataEvenlySpaced: boolean;
|
|
37
|
+
constructor(seriesViewRect: Rect, rs: IRenderableSeries, xAxis: AxisBase2D);
|
|
38
|
+
clone(options: IResamplingParamsCloneOptions): ResamplingParams;
|
|
39
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResamplingParams = void 0;
|
|
4
|
+
var AutoRange_1 = require("../../../types/AutoRange");
|
|
5
|
+
var ResamplingParams = /** @class */ (function () {
|
|
6
|
+
function ResamplingParams(seriesViewRect, rs, xAxis) {
|
|
7
|
+
this.zeroLineY = 0;
|
|
8
|
+
this.precision = 0;
|
|
9
|
+
this.enableExperimentalResampling = false;
|
|
10
|
+
this.dataIsFifo = false;
|
|
11
|
+
this.fifoCapacity = 0;
|
|
12
|
+
this.viewportRect = seriesViewRect;
|
|
13
|
+
if (rs) {
|
|
14
|
+
var dataSeries = rs.dataSeries;
|
|
15
|
+
this.resamplingMode = rs.resamplingMode;
|
|
16
|
+
this.precision = rs.resamplingPrecision;
|
|
17
|
+
if (xAxis) {
|
|
18
|
+
this.indexesRange = rs.getIndicesRange(xAxis.visibleRange, xAxis.isCategoryAxis);
|
|
19
|
+
// console.log("visible range", xAxis.visibleRange.min, xAxis.visibleRange.max);
|
|
20
|
+
// console.log("indexes range", this.indexesRange.min, this.indexesRange.max);
|
|
21
|
+
this.isCategoryAxis = xAxis.isCategoryAxis;
|
|
22
|
+
this.isXAxisAutoRanged = xAxis.autoRange === AutoRange_1.EAutoRange.Always;
|
|
23
|
+
this.xVisibleRange = xAxis.visibleRange;
|
|
24
|
+
}
|
|
25
|
+
if (dataSeries) {
|
|
26
|
+
this.dataHasNaN = dataSeries === null || dataSeries === void 0 ? void 0 : dataSeries.dataDistributionCalculator.containsNaN;
|
|
27
|
+
this.dataEvenlySpaced = dataSeries === null || dataSeries === void 0 ? void 0 : dataSeries.isEvenlySpaced;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
ResamplingParams.prototype.clone = function (options) {
|
|
32
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
33
|
+
var rp = new ResamplingParams(undefined, undefined, undefined);
|
|
34
|
+
rp.zeroLineY = (_a = options === null || options === void 0 ? void 0 : options.zeroLineY) !== null && _a !== void 0 ? _a : this.zeroLineY;
|
|
35
|
+
rp.precision = (_b = options === null || options === void 0 ? void 0 : options.precision) !== null && _b !== void 0 ? _b : this.precision;
|
|
36
|
+
rp.xVisibleRange = (_c = options === null || options === void 0 ? void 0 : options.xVisibleRange) !== null && _c !== void 0 ? _c : this.xVisibleRange;
|
|
37
|
+
rp.indexesRange = (_d = options === null || options === void 0 ? void 0 : options.indicesRange) !== null && _d !== void 0 ? _d : this.indexesRange;
|
|
38
|
+
rp.viewportRect = (_e = options === null || options === void 0 ? void 0 : options.viewportRect) !== null && _e !== void 0 ? _e : this.viewportRect;
|
|
39
|
+
rp.isCategoryAxis = (_f = options === null || options === void 0 ? void 0 : options.isCategoryAxis) !== null && _f !== void 0 ? _f : this.isCategoryAxis;
|
|
40
|
+
rp.isXAxisAutoRanged = (_g = options === null || options === void 0 ? void 0 : options.isXAxisAutoRanged) !== null && _g !== void 0 ? _g : this.isXAxisAutoRanged;
|
|
41
|
+
rp.resamplingMode = (_h = options === null || options === void 0 ? void 0 : options.resamplingMode) !== null && _h !== void 0 ? _h : this.resamplingMode;
|
|
42
|
+
rp.renderableSeriesHash = (_j = options === null || options === void 0 ? void 0 : options.renderableSeriesHash) !== null && _j !== void 0 ? _j : this.renderableSeriesHash;
|
|
43
|
+
rp.enableExperimentalResampling = (_k = options === null || options === void 0 ? void 0 : options.enableExperimentalResampling) !== null && _k !== void 0 ? _k : this.enableExperimentalResampling;
|
|
44
|
+
rp.dataHasNaN = (_l = options === null || options === void 0 ? void 0 : options.dataHasNaN) !== null && _l !== void 0 ? _l : this.dataHasNaN;
|
|
45
|
+
rp.dataIsFifo = (_m = options === null || options === void 0 ? void 0 : options.dataIsFifo) !== null && _m !== void 0 ? _m : this.dataIsFifo;
|
|
46
|
+
rp.fifoCapacity = (_o = options === null || options === void 0 ? void 0 : options.fifoCapacity) !== null && _o !== void 0 ? _o : this.fifoCapacity;
|
|
47
|
+
rp.dataEvenlySpaced = (_p = options === null || options === void 0 ? void 0 : options.dataEvenlySpaced) !== null && _p !== void 0 ? _p : this.dataEvenlySpaced;
|
|
48
|
+
return rp;
|
|
49
|
+
};
|
|
50
|
+
return ResamplingParams;
|
|
51
|
+
}());
|
|
52
|
+
exports.ResamplingParams = ResamplingParams;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NumberRange } from "../../Core/NumberRange";
|
|
2
|
+
import { IPointSeries } from "../Model/PointSeries/IPointSeries";
|
|
2
3
|
import { CoordinateCalculatorBase } from "../Numerics/CoordinateCalculators/CoordinateCalculatorBase";
|
|
3
4
|
/**
|
|
4
5
|
* @summary RenderPassData contains properties which are passed to {@link BaseRenderableSeries} at the time of drawing
|
|
@@ -8,6 +9,8 @@ export declare class RenderPassData {
|
|
|
8
9
|
readonly xCoordinateCalculator: CoordinateCalculatorBase;
|
|
9
10
|
readonly yCoordinateCalculator: CoordinateCalculatorBase;
|
|
10
11
|
readonly isVerticalChart: boolean;
|
|
12
|
+
readonly pointSeries?: IPointSeries;
|
|
13
|
+
readonly resamplingHash?: number;
|
|
11
14
|
/**
|
|
12
15
|
* Creates an instance of RenderPassData
|
|
13
16
|
* @param indexRange The min and max index to data-range currently visible on the {@link SciChartSurface}
|
|
@@ -16,6 +19,8 @@ export declare class RenderPassData {
|
|
|
16
19
|
* @param yCoordinateCalculator The YAxis {@link CoordinateCalculatorBase | Coordinate Calculator},
|
|
17
20
|
* used to transform between pixel and data-coordinates
|
|
18
21
|
* @param isVerticalChart A flag indicating if the chart is currently vertically arranged (XAxis on the left, YAxis on the top/bottom)
|
|
22
|
+
* @param pointSeries The point series
|
|
23
|
+
* @param resamplingHash The resampling hash value, used for caching
|
|
19
24
|
*/
|
|
20
|
-
constructor(indexRange: NumberRange, xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, isVerticalChart: boolean);
|
|
25
|
+
constructor(indexRange: NumberRange, xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, isVerticalChart: boolean, pointSeries?: IPointSeries, resamplingHash?: number);
|
|
21
26
|
}
|
|
@@ -13,12 +13,16 @@ var RenderPassData = /** @class */ (function () {
|
|
|
13
13
|
* @param yCoordinateCalculator The YAxis {@link CoordinateCalculatorBase | Coordinate Calculator},
|
|
14
14
|
* used to transform between pixel and data-coordinates
|
|
15
15
|
* @param isVerticalChart A flag indicating if the chart is currently vertically arranged (XAxis on the left, YAxis on the top/bottom)
|
|
16
|
+
* @param pointSeries The point series
|
|
17
|
+
* @param resamplingHash The resampling hash value, used for caching
|
|
16
18
|
*/
|
|
17
|
-
function RenderPassData(indexRange, xCoordinateCalculator, yCoordinateCalculator, isVerticalChart) {
|
|
19
|
+
function RenderPassData(indexRange, xCoordinateCalculator, yCoordinateCalculator, isVerticalChart, pointSeries, resamplingHash) {
|
|
18
20
|
this.indexRange = indexRange;
|
|
19
21
|
this.xCoordinateCalculator = xCoordinateCalculator;
|
|
20
22
|
this.yCoordinateCalculator = yCoordinateCalculator;
|
|
21
23
|
this.isVerticalChart = isVerticalChart;
|
|
24
|
+
this.pointSeries = pointSeries;
|
|
25
|
+
this.resamplingHash = resamplingHash;
|
|
22
26
|
}
|
|
23
27
|
return RenderPassData;
|
|
24
28
|
}());
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NumberRange } from "../../Core/NumberRange";
|
|
2
|
+
import { Rect } from "../../Core/Rect";
|
|
3
|
+
import { IPointSeries } from "../Model/PointSeries/IPointSeries";
|
|
4
|
+
import { IRenderableSeries } from "../Visuals/RenderableSeries/IRenderableSeries";
|
|
5
|
+
export declare type TSeriesRenderPassInfo = {
|
|
6
|
+
pointSeries: IPointSeries;
|
|
7
|
+
renderableSeries: IRenderableSeries;
|
|
8
|
+
indicesRange: NumberRange;
|
|
9
|
+
resamplingHash: number;
|
|
10
|
+
};
|
|
11
|
+
export declare class RenderPassInfo {
|
|
12
|
+
pointSeriesArray: IPointSeries[];
|
|
13
|
+
renderableSeriesArray: IRenderableSeries[];
|
|
14
|
+
indicesRanges: NumberRange[];
|
|
15
|
+
resamplingHashes: number[];
|
|
16
|
+
seriesViewRect: Rect;
|
|
17
|
+
constructor(seriesCount: number, seriesViewRect: Rect);
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RenderPassInfo = void 0;
|
|
4
|
+
var RenderPassInfo = /** @class */ (function () {
|
|
5
|
+
function RenderPassInfo(seriesCount, seriesViewRect) {
|
|
6
|
+
this.pointSeriesArray = [];
|
|
7
|
+
this.renderableSeriesArray = [];
|
|
8
|
+
this.indicesRanges = [];
|
|
9
|
+
this.resamplingHashes = [];
|
|
10
|
+
this.seriesViewRect = seriesViewRect;
|
|
11
|
+
}
|
|
12
|
+
return RenderPassInfo;
|
|
13
|
+
}());
|
|
14
|
+
exports.RenderPassInfo = RenderPassInfo;
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
+
import { Rect } from "../../Core/Rect";
|
|
1
2
|
import { WebGlRenderContext2D } from "../Drawing/WebGlRenderContext2D";
|
|
3
|
+
import { AxisBase2D } from "../Visuals/Axis/AxisBase2D";
|
|
4
|
+
import { IRenderableSeries } from "../Visuals/RenderableSeries/IRenderableSeries";
|
|
2
5
|
import { SciChartSurface } from "../Visuals/SciChartSurface";
|
|
6
|
+
import { TSeriesRenderPassInfo } from "./RenderPassInfo";
|
|
3
7
|
/**
|
|
4
8
|
* A class used internally in SciChart to perform layout, arrangement, data-preparation and rendering on the Cartesian 2D {@link SciChartSurface}
|
|
5
9
|
*/
|
|
6
10
|
export declare class SciChartRenderer {
|
|
11
|
+
/**
|
|
12
|
+
* Used internally
|
|
13
|
+
* @param xAxis
|
|
14
|
+
* @param rs
|
|
15
|
+
* @param seriesViewRect
|
|
16
|
+
*/
|
|
17
|
+
static resampleSeries(xAxis: AxisBase2D, rs: IRenderableSeries, seriesViewRect: Rect): TSeriesRenderPassInfo;
|
|
18
|
+
private static calculateResamplingHash;
|
|
7
19
|
private sciChartSurface;
|
|
8
20
|
private previousTime;
|
|
9
21
|
/**
|
|
@@ -20,7 +32,8 @@ export declare class SciChartRenderer {
|
|
|
20
32
|
private drawSvgAnnotations;
|
|
21
33
|
private validate;
|
|
22
34
|
private updateSvgCanvasSize;
|
|
23
|
-
private
|
|
35
|
+
private prepareAxesRenderData;
|
|
36
|
+
private prepareSeriesRenderData;
|
|
24
37
|
private drawAxes;
|
|
25
38
|
private drawSeries;
|
|
26
39
|
private drawDebugAxes;
|
|
@@ -11,15 +11,17 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SciChartRenderer = void 0;
|
|
13
13
|
var Dictionary_1 = require("../../Core/Dictionary");
|
|
14
|
-
var NumberRange_1 = require("../../Core/NumberRange");
|
|
15
14
|
var Rect_1 = require("../../Core/Rect");
|
|
16
15
|
var AutoRange_1 = require("../../types/AutoRange");
|
|
17
16
|
var AxisAlignment_1 = require("../../types/AxisAlignment");
|
|
18
17
|
var RenderLayer_1 = require("../../types/RenderLayer");
|
|
18
|
+
var hash_1 = require("../../utils/hash");
|
|
19
|
+
var ResamplingParams_1 = require("../Numerics/Resamplers/ResamplingParams");
|
|
19
20
|
var IAnnotation_1 = require("../Visuals/Annotations/IAnnotation");
|
|
20
21
|
var SciChartSurfaceBase_1 = require("../Visuals/SciChartSurfaceBase");
|
|
21
22
|
var DpiHelper_1 = require("../Visuals/TextureManager/DpiHelper");
|
|
22
23
|
var RenderPassData_1 = require("./RenderPassData");
|
|
24
|
+
var RenderPassInfo_1 = require("./RenderPassInfo");
|
|
23
25
|
/**
|
|
24
26
|
* A class used internally in SciChart to perform layout, arrangement, data-preparation and rendering on the Cartesian 2D {@link SciChartSurface}
|
|
25
27
|
*/
|
|
@@ -31,6 +33,66 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
31
33
|
function SciChartRenderer(sciChartSurface) {
|
|
32
34
|
this.sciChartSurface = sciChartSurface;
|
|
33
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Used internally
|
|
38
|
+
* @param xAxis
|
|
39
|
+
* @param rs
|
|
40
|
+
* @param seriesViewRect
|
|
41
|
+
*/
|
|
42
|
+
SciChartRenderer.resampleSeries = function (xAxis, rs, seriesViewRect) {
|
|
43
|
+
/**
|
|
44
|
+
* Stacked series and Heatmap do not support resampling
|
|
45
|
+
* If a series does not support resampling, the pointSeries is not used in the drawing provider.
|
|
46
|
+
* For example, UniformHeatmapDrawingProvider does not use renderPassData.pointSeries,
|
|
47
|
+
* but LineSeriesDrawingProvider use renderPassData.pointSeries in the draw() method!
|
|
48
|
+
*/
|
|
49
|
+
if (!rs.supportsResampling)
|
|
50
|
+
return {
|
|
51
|
+
pointSeries: rs.toPointSeries(),
|
|
52
|
+
renderableSeries: rs,
|
|
53
|
+
indicesRange: undefined,
|
|
54
|
+
resamplingHash: undefined
|
|
55
|
+
};
|
|
56
|
+
var rp = new ResamplingParams_1.ResamplingParams(seriesViewRect, rs, xAxis);
|
|
57
|
+
if (!rs.needsResampling(rp))
|
|
58
|
+
return {
|
|
59
|
+
pointSeries: rs.toPointSeries(),
|
|
60
|
+
renderableSeries: rs,
|
|
61
|
+
indicesRange: undefined,
|
|
62
|
+
resamplingHash: undefined
|
|
63
|
+
};
|
|
64
|
+
var resamplingHash = SciChartRenderer.calculateResamplingHash(rs, rp);
|
|
65
|
+
var prevRPD = rs.getCurrentRenderPassData();
|
|
66
|
+
var useFromCache = Boolean(prevRPD && prevRPD.resamplingHash === resamplingHash);
|
|
67
|
+
// console.log("resampling ...");
|
|
68
|
+
// console.log("useFromCache", useFromCache);
|
|
69
|
+
var pointSeries = useFromCache ? prevRPD.pointSeries : rs.toPointSeries(rp);
|
|
70
|
+
return {
|
|
71
|
+
pointSeries: pointSeries,
|
|
72
|
+
renderableSeries: rs,
|
|
73
|
+
indicesRange: rp.indexesRange,
|
|
74
|
+
resamplingHash: resamplingHash
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
SciChartRenderer.calculateResamplingHash = function (rs, rp) {
|
|
78
|
+
var hashes = [];
|
|
79
|
+
var enableDrawingOptimizationsHash = hash_1.hashUtils.generateBooleanHash(rs.enableDrawingOptimisations);
|
|
80
|
+
hashes.push(enableDrawingOptimizationsHash);
|
|
81
|
+
var dataSeries = rs.dataSeries;
|
|
82
|
+
if (dataSeries) {
|
|
83
|
+
var dataSeriesHash = hash_1.hashUtils.generateHash(dataSeries.id);
|
|
84
|
+
hashes.push(dataSeriesHash);
|
|
85
|
+
var dataSeriesCountHash = hash_1.hashUtils.generateNumberHash(dataSeries.count());
|
|
86
|
+
hashes.push(dataSeriesCountHash);
|
|
87
|
+
var dataSeriesSortedHash = hash_1.hashUtils.generateBooleanHash(dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
88
|
+
hashes.push(dataSeriesSortedHash);
|
|
89
|
+
var dataSeriesChangeCountHash = hash_1.hashUtils.generateNumberHash(dataSeries.changeCount);
|
|
90
|
+
hashes.push(dataSeriesChangeCountHash);
|
|
91
|
+
}
|
|
92
|
+
var resamplingParamsHash = hash_1.hashUtils.generateObjectHash(rp);
|
|
93
|
+
hashes.push(resamplingParamsHash);
|
|
94
|
+
return hash_1.hashUtils.generateCombinedHash(hashes);
|
|
95
|
+
};
|
|
34
96
|
/**
|
|
35
97
|
* Render loop for the current {@SciChartSurface}
|
|
36
98
|
* @param renderContext the {@WebGLRenderContext2D} used for drawing
|
|
@@ -61,7 +123,8 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
61
123
|
var seriesViewRect = this.sciChartSurface.layoutManager.layoutChart(renderContext.viewportSize);
|
|
62
124
|
this.updateSvgCanvasSize(seriesViewRect);
|
|
63
125
|
// Step 4 prepare render data
|
|
64
|
-
var
|
|
126
|
+
var _a = this.prepareAxesRenderData(), xAxesById = _a.xAxesById, yAxesById = _a.yAxesById;
|
|
127
|
+
var renderPassInfo = this.prepareSeriesRenderData(seriesViewRect, xAxesById);
|
|
65
128
|
// Draw seriesViewRect border
|
|
66
129
|
this.sciChartSurface.drawBorder(renderContext);
|
|
67
130
|
// Step 5 Draw X, Y axis and gridlines
|
|
@@ -81,22 +144,21 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
81
144
|
el.type === IAnnotation_1.EAnnotationType.RenderContextAxisMarkerAnnotation);
|
|
82
145
|
});
|
|
83
146
|
renderContext.enqueueLayeredDraw(function () {
|
|
84
|
-
_this.drawRenderContextAnnotations(renderContextAnnotations,
|
|
147
|
+
_this.drawRenderContextAnnotations(renderContextAnnotations, xAxesById, yAxesById, IAnnotation_1.EAnnotationLayer.BelowChart, renderContext, seriesViewRect);
|
|
85
148
|
}, RenderLayer_1.ERenderLayer.Third);
|
|
86
|
-
//
|
|
87
|
-
renderContext.enqueueLayeredDraw(function () { return _this.drawSeries(_this.sciChartSurface,
|
|
149
|
+
// Step 7 Draw series. Queue series rendering after grid lines and bands, but before the axes
|
|
150
|
+
renderContext.enqueueLayeredDraw(function () { return _this.drawSeries(_this.sciChartSurface, renderPassInfo, renderContext); }, RenderLayer_1.ERenderLayer.Third);
|
|
88
151
|
// Execute rendering of queued elements
|
|
89
152
|
renderContext.drawLayers();
|
|
90
|
-
// Step 7 Draw series
|
|
91
153
|
// Step 8 Draw annotations above the series
|
|
92
|
-
this.drawRenderContextAnnotations(renderContextAnnotations,
|
|
154
|
+
this.drawRenderContextAnnotations(renderContextAnnotations, xAxesById, yAxesById, IAnnotation_1.EAnnotationLayer.AboveChart, renderContext, seriesViewRect);
|
|
93
155
|
// Step 9 Draw SVG or Html Overlays
|
|
94
156
|
var svgAnnotations = annotations.filter(function (el) {
|
|
95
157
|
return el.type === IAnnotation_1.EAnnotationType.SVG ||
|
|
96
158
|
el.type === IAnnotation_1.EAnnotationType.SVGTextAnnotation ||
|
|
97
159
|
el.type === IAnnotation_1.EAnnotationType.SVGCustomAnnotation;
|
|
98
160
|
});
|
|
99
|
-
this.drawSvgAnnotations(svgAnnotations,
|
|
161
|
+
this.drawSvgAnnotations(svgAnnotations, xAxesById, yAxesById);
|
|
100
162
|
// Update watermark
|
|
101
163
|
this.updateWatermark(renderContext, seriesViewRect);
|
|
102
164
|
// Step 10 Call OnParentSurfaceRendered
|
|
@@ -175,7 +237,7 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
175
237
|
svgRootElement.currentScale = 1;
|
|
176
238
|
}
|
|
177
239
|
};
|
|
178
|
-
SciChartRenderer.prototype.
|
|
240
|
+
SciChartRenderer.prototype.prepareAxesRenderData = function () {
|
|
179
241
|
var xAxesById = new Dictionary_1.Dictionary();
|
|
180
242
|
var yAxesById = new Dictionary_1.Dictionary();
|
|
181
243
|
// Prepare XAxes
|
|
@@ -188,7 +250,23 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
188
250
|
yAxesById.add(yAxis.id, yAxis);
|
|
189
251
|
yAxis.prepareRenderData();
|
|
190
252
|
});
|
|
191
|
-
return
|
|
253
|
+
return { xAxesById: xAxesById, yAxesById: yAxesById };
|
|
254
|
+
};
|
|
255
|
+
SciChartRenderer.prototype.prepareSeriesRenderData = function (seriesViewRect, xAxesById) {
|
|
256
|
+
var seriesCount = this.sciChartSurface.renderableSeries.size();
|
|
257
|
+
var renderPassInfo = new RenderPassInfo_1.RenderPassInfo(seriesCount, seriesViewRect);
|
|
258
|
+
// TODO: Calculate XRange before resample but YRange after resample for faster autorange on large datasets
|
|
259
|
+
for (var i = 0; i < this.sciChartSurface.renderableSeries.size(); i++) {
|
|
260
|
+
var series = this.sciChartSurface.renderableSeries.get(i);
|
|
261
|
+
// TODO: Do resampling, store result for use in drawing
|
|
262
|
+
var xAxis = xAxesById.item(series.xAxisId);
|
|
263
|
+
var seriesRenderPassInfo = SciChartRenderer.resampleSeries(xAxis, series, seriesViewRect);
|
|
264
|
+
renderPassInfo.renderableSeriesArray.push(seriesRenderPassInfo.renderableSeries);
|
|
265
|
+
renderPassInfo.pointSeriesArray.push(seriesRenderPassInfo.pointSeries);
|
|
266
|
+
renderPassInfo.indicesRanges.push(seriesRenderPassInfo.indicesRange);
|
|
267
|
+
renderPassInfo.resamplingHashes.push(seriesRenderPassInfo.resamplingHash);
|
|
268
|
+
}
|
|
269
|
+
return renderPassInfo;
|
|
192
270
|
};
|
|
193
271
|
SciChartRenderer.prototype.drawAxes = function (scs, renderContext) {
|
|
194
272
|
scs.xAxes.asArray().forEach(function (xAxis) {
|
|
@@ -198,31 +276,30 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
198
276
|
yAxis.draw(renderContext);
|
|
199
277
|
});
|
|
200
278
|
};
|
|
201
|
-
SciChartRenderer.prototype.drawSeries = function (scs,
|
|
202
|
-
var
|
|
203
|
-
|
|
204
|
-
var
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
var
|
|
209
|
-
if (!
|
|
210
|
-
throw Error("Cannot find
|
|
211
|
-
}
|
|
212
|
-
if (
|
|
279
|
+
SciChartRenderer.prototype.drawSeries = function (scs, renderPassInfo, renderContext) {
|
|
280
|
+
var renderableSeriesArray = renderPassInfo.renderableSeriesArray, pointSeriesArray = renderPassInfo.pointSeriesArray, resamplingHashes = renderPassInfo.resamplingHashes, indicesRanges = renderPassInfo.indicesRanges;
|
|
281
|
+
var drawSeriesImpl = function (index) {
|
|
282
|
+
var renderableSeries = renderableSeriesArray[index];
|
|
283
|
+
var pointSeries = pointSeriesArray[index];
|
|
284
|
+
var resamplingHash = resamplingHashes[index];
|
|
285
|
+
var indexRange = indicesRanges[index];
|
|
286
|
+
var xAxis = scs.xAxes.asArray().find(function (a) { return a.id === renderableSeries.xAxisId; });
|
|
287
|
+
if (!xAxis)
|
|
288
|
+
throw Error("Cannot find an X Axis with ID = " + renderableSeries.xAxisId);
|
|
289
|
+
var yAxis = scs.yAxes.asArray().find(function (a) { return a.id === renderableSeries.yAxisId; });
|
|
290
|
+
if (!yAxis)
|
|
291
|
+
throw Error("Cannot find a Y Axis with ID = " + renderableSeries.yAxisId);
|
|
292
|
+
if (xAxis.isVerticalChart && ![AxisAlignment_1.EAxisAlignment.Top, AxisAlignment_1.EAxisAlignment.Bottom].includes(yAxis.axisAlignment))
|
|
213
293
|
throw Error("For vertical chart (chart with X Axis alignment Left or Right) Y Axis alignment should be Top or Bottom, X Axis ID = ".concat(xAxis.id));
|
|
214
|
-
|
|
215
|
-
if ((0, AxisAlignment_1.getIsVertical)(xAxis.axisAlignment) && (0, AxisAlignment_1.getIsVertical)(yAxis.axisAlignment)) {
|
|
294
|
+
if ((0, AxisAlignment_1.getIsVertical)(xAxis.axisAlignment) && (0, AxisAlignment_1.getIsVertical)(yAxis.axisAlignment))
|
|
216
295
|
throw Error("Both x and y axes can't have vertical alignment");
|
|
217
|
-
|
|
218
|
-
if ((0, AxisAlignment_1.getIsHorizontal)(xAxis.axisAlignment) && (0, AxisAlignment_1.getIsHorizontal)(yAxis.axisAlignment)) {
|
|
296
|
+
if ((0, AxisAlignment_1.getIsHorizontal)(xAxis.axisAlignment) && (0, AxisAlignment_1.getIsHorizontal)(yAxis.axisAlignment))
|
|
219
297
|
throw Error("Both x and y axes can't have horizontal alignment");
|
|
220
|
-
}
|
|
221
298
|
var xCalc = xAxis.getCurrentCoordinateCalculator();
|
|
222
299
|
var yCalc = yAxis.getCurrentCoordinateCalculator();
|
|
223
300
|
try {
|
|
224
|
-
var renderPassData = new RenderPassData_1.RenderPassData(indexRange, xCalc, yCalc, xAxis.isVerticalChart);
|
|
225
|
-
|
|
301
|
+
var renderPassData = new RenderPassData_1.RenderPassData(indexRange, xCalc, yCalc, xAxis.isVerticalChart, pointSeries, resamplingHash);
|
|
302
|
+
renderableSeries.draw(renderContext, renderPassData);
|
|
226
303
|
}
|
|
227
304
|
finally {
|
|
228
305
|
// We can not delete calculators because we use them in Hit Test
|
|
@@ -230,10 +307,24 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
230
307
|
// yCalc.delete();
|
|
231
308
|
}
|
|
232
309
|
};
|
|
310
|
+
var nativeContext = renderContext.getNativeContext();
|
|
311
|
+
var viewRect = this.sciChartSurface.seriesViewRect;
|
|
312
|
+
nativeContext.PushMatrix();
|
|
313
|
+
nativeContext.PushState();
|
|
314
|
+
nativeContext.Translate(viewRect.x, viewRect.y);
|
|
315
|
+
nativeContext.SetClipRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);
|
|
233
316
|
// Draw unselected series first
|
|
234
|
-
|
|
317
|
+
renderableSeriesArray.forEach(function (rs, index) {
|
|
318
|
+
if (rs.isVisible && !rs.isSelected)
|
|
319
|
+
drawSeriesImpl(index);
|
|
320
|
+
});
|
|
235
321
|
// Draw selected series at higher z-index
|
|
236
|
-
|
|
322
|
+
renderableSeriesArray.forEach(function (rs, index) {
|
|
323
|
+
if (rs.isVisible && rs.isSelected)
|
|
324
|
+
drawSeriesImpl(index);
|
|
325
|
+
});
|
|
326
|
+
nativeContext.PopMatrix();
|
|
327
|
+
nativeContext.PopState();
|
|
237
328
|
};
|
|
238
329
|
SciChartRenderer.prototype.drawDebugAxes = function (scs, renderContext) {
|
|
239
330
|
scs.xAxes.asArray().forEach(function (xAxis) {
|
|
@@ -275,6 +275,7 @@ export declare abstract class AxisCore implements IAxisParams, IDeletable {
|
|
|
275
275
|
protected maxAutoTicksProperty: number;
|
|
276
276
|
protected visibleRangeAnimationToken: IGenericAnimation;
|
|
277
277
|
protected readonly defaultVisibleRange: NumberRange;
|
|
278
|
+
protected allowFastMathProperty: boolean;
|
|
278
279
|
/**
|
|
279
280
|
* Creates an instance of an {@link AxisCore}
|
|
280
281
|
* @param options Optional parameters of type {@link IAxisCoreOptions} used to define properties at instantiation time
|
|
@@ -290,6 +291,16 @@ export declare abstract class AxisCore implements IAxisParams, IDeletable {
|
|
|
290
291
|
* See {@link AxisBase2D.axisAlignment} if you want to set a 2D Axis alignment to the left, right, top or bottom
|
|
291
292
|
*/
|
|
292
293
|
get isXAxis(): boolean;
|
|
294
|
+
/**
|
|
295
|
+
* When true, 32-bit faster paths for coordinate calculation maths are used. This improves performance in
|
|
296
|
+
* edge-cases where every CPU cycle counts.
|
|
297
|
+
*/
|
|
298
|
+
get allowFastMath(): boolean;
|
|
299
|
+
/**
|
|
300
|
+
* When true, 32-bit faster paths for coordinate calculation maths are used. This improves performance in
|
|
301
|
+
* edge-cases where every CPU cycle counts.
|
|
302
|
+
*/
|
|
303
|
+
set allowFastMath(allowFastMath: boolean);
|
|
293
304
|
/**
|
|
294
305
|
* When true, the axis has a valid {@link AxisCore.visibleRange} which can be drawn
|
|
295
306
|
* @remarks
|
|
@@ -44,7 +44,7 @@ var AxisCore = /** @class */ (function () {
|
|
|
44
44
|
* @param options Optional parameters of type {@link IAxisCoreOptions} used to define properties at instantiation time
|
|
45
45
|
*/
|
|
46
46
|
function AxisCore(options) {
|
|
47
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
47
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
48
48
|
/**
|
|
49
49
|
* An {@link EventHandler} which fires a callback when the {@link AxisCore.visibleRange} property changes.
|
|
50
50
|
* @desc
|
|
@@ -161,6 +161,7 @@ var AxisCore = /** @class */ (function () {
|
|
|
161
161
|
*/
|
|
162
162
|
this.maxAutoTicksProperty = 10;
|
|
163
163
|
this.defaultVisibleRange = new NumberRange_1.NumberRange(0, 10);
|
|
164
|
+
this.allowFastMathProperty = false;
|
|
164
165
|
this.visibleRange = (options === null || options === void 0 ? void 0 : options.visibleRange) || this.defaultVisibleRange;
|
|
165
166
|
this.id = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : this.id;
|
|
166
167
|
this.growBy = (_b = options === null || options === void 0 ? void 0 : options.growBy) !== null && _b !== void 0 ? _b : this.growBy;
|
|
@@ -168,23 +169,24 @@ var AxisCore = /** @class */ (function () {
|
|
|
168
169
|
this.isVisible = (_d = options === null || options === void 0 ? void 0 : options.isVisible) !== null && _d !== void 0 ? _d : this.isVisible;
|
|
169
170
|
this.axisTitle = (_e = options === null || options === void 0 ? void 0 : options.axisTitle) !== null && _e !== void 0 ? _e : this.axisTitle;
|
|
170
171
|
this.axisTitleStyle = (_f = options === null || options === void 0 ? void 0 : options.axisTitleStyle) !== null && _f !== void 0 ? _f : this.axisTitleStyle;
|
|
171
|
-
this.
|
|
172
|
-
this.
|
|
173
|
-
this.
|
|
174
|
-
this.
|
|
175
|
-
this.
|
|
176
|
-
this.
|
|
177
|
-
this.
|
|
178
|
-
this.
|
|
179
|
-
this.
|
|
180
|
-
this.
|
|
181
|
-
this.
|
|
182
|
-
this.
|
|
183
|
-
this.
|
|
184
|
-
this.
|
|
185
|
-
this.
|
|
186
|
-
this.
|
|
187
|
-
this.
|
|
172
|
+
this.allowFastMath = (_g = options === null || options === void 0 ? void 0 : options.allowFastMath) !== null && _g !== void 0 ? _g : this.allowFastMathProperty;
|
|
173
|
+
this.autoTicksProperty = (_h = options === null || options === void 0 ? void 0 : options.autoTicks) !== null && _h !== void 0 ? _h : this.autoTicksProperty;
|
|
174
|
+
this.maxAutoTicksProperty = (_j = options === null || options === void 0 ? void 0 : options.maxAutoTicks) !== null && _j !== void 0 ? _j : this.maxAutoTicksProperty;
|
|
175
|
+
this.minorsPerMajorProperty = (_k = options === null || options === void 0 ? void 0 : options.minorsPerMajor) !== null && _k !== void 0 ? _k : this.minorsPerMajorProperty;
|
|
176
|
+
this.majorDeltaProperty = (_l = options === null || options === void 0 ? void 0 : options.majorDelta) !== null && _l !== void 0 ? _l : this.majorDeltaProperty;
|
|
177
|
+
this.minorDeltaProperty = (_m = options === null || options === void 0 ? void 0 : options.minorDelta) !== null && _m !== void 0 ? _m : this.minorDeltaProperty;
|
|
178
|
+
this.drawLabelsProperty = (_o = options === null || options === void 0 ? void 0 : options.drawLabels) !== null && _o !== void 0 ? _o : this.drawLabelsProperty;
|
|
179
|
+
this.drawMajorTickLinesProperty = (_p = options === null || options === void 0 ? void 0 : options.drawMajorTickLines) !== null && _p !== void 0 ? _p : this.drawMajorTickLinesProperty;
|
|
180
|
+
this.drawMinorTickLinesProperty = (_q = options === null || options === void 0 ? void 0 : options.drawMinorTickLines) !== null && _q !== void 0 ? _q : this.drawMinorTickLinesProperty;
|
|
181
|
+
this.drawMinorGridLinesProperty = (_r = options === null || options === void 0 ? void 0 : options.drawMinorGridLines) !== null && _r !== void 0 ? _r : this.drawMinorGridLinesProperty;
|
|
182
|
+
this.drawMajorGridLinesProperty = (_s = options === null || options === void 0 ? void 0 : options.drawMajorGridLines) !== null && _s !== void 0 ? _s : this.drawMajorGridLinesProperty;
|
|
183
|
+
this.majorGridLineStyleProperty = (_t = options === null || options === void 0 ? void 0 : options.majorGridLineStyle) !== null && _t !== void 0 ? _t : this.majorGridLineStyleProperty;
|
|
184
|
+
this.minorGridLineStyleProperty = (_u = options === null || options === void 0 ? void 0 : options.minorGridLineStyle) !== null && _u !== void 0 ? _u : this.minorGridLineStyleProperty;
|
|
185
|
+
this.majorTickLineStyleProperty = (_v = options === null || options === void 0 ? void 0 : options.majorTickLineStyle) !== null && _v !== void 0 ? _v : this.majorTickLineStyleProperty;
|
|
186
|
+
this.minorTickLineStyleProperty = (_w = options === null || options === void 0 ? void 0 : options.minorTickLineStyle) !== null && _w !== void 0 ? _w : this.minorTickLineStyleProperty;
|
|
187
|
+
this.drawMajorBandsProperty = (_x = options === null || options === void 0 ? void 0 : options.drawMajorBands) !== null && _x !== void 0 ? _x : this.drawMajorBandsProperty;
|
|
188
|
+
this.axisBandsFillProperty = (_y = options === null || options === void 0 ? void 0 : options.axisBandsFill) !== null && _y !== void 0 ? _y : this.axisBandsFillProperty;
|
|
189
|
+
this.flippedCoordinatesProperty = (_z = options === null || options === void 0 ? void 0 : options.flippedCoordinates) !== null && _z !== void 0 ? _z : this.flippedCoordinatesProperty;
|
|
188
190
|
}
|
|
189
191
|
Object.defineProperty(AxisCore.prototype, "isCategoryAxis", {
|
|
190
192
|
/**
|
|
@@ -208,6 +210,25 @@ var AxisCore = /** @class */ (function () {
|
|
|
208
210
|
enumerable: false,
|
|
209
211
|
configurable: true
|
|
210
212
|
});
|
|
213
|
+
Object.defineProperty(AxisCore.prototype, "allowFastMath", {
|
|
214
|
+
/**
|
|
215
|
+
* When true, 32-bit faster paths for coordinate calculation maths are used. This improves performance in
|
|
216
|
+
* edge-cases where every CPU cycle counts.
|
|
217
|
+
*/
|
|
218
|
+
get: function () {
|
|
219
|
+
return this.allowFastMathProperty;
|
|
220
|
+
},
|
|
221
|
+
/**
|
|
222
|
+
* When true, 32-bit faster paths for coordinate calculation maths are used. This improves performance in
|
|
223
|
+
* edge-cases where every CPU cycle counts.
|
|
224
|
+
*/
|
|
225
|
+
set: function (allowFastMath) {
|
|
226
|
+
this.allowFastMathProperty = allowFastMath;
|
|
227
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.ALLOW_FAST_MATH);
|
|
228
|
+
},
|
|
229
|
+
enumerable: false,
|
|
230
|
+
configurable: true
|
|
231
|
+
});
|
|
211
232
|
/**
|
|
212
233
|
* When true, the axis has a valid {@link AxisCore.visibleRange} which can be drawn
|
|
213
234
|
* @remarks
|