scichart 2.0.2228 → 2.1.2273
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/ChartModifiers/LegendModifier.d.ts +2 -2
- package/Charting/ChartModifiers/RolloverModifier.d.ts +5 -3
- package/Charting/ChartModifiers/RolloverModifier.js +38 -80
- 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 +234 -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 +125 -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/CategoryAxisBase.d.ts +52 -0
- package/Charting/Visuals/Axis/CategoryAxisBase.js +94 -20
- package/Charting/Visuals/Axis/IAxisCoreOptions.d.ts +5 -0
- package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +7 -4
- 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/Legend/SciChartLegend.d.ts +6 -0
- package/Charting/Visuals/Legend/SciChartLegend.js +30 -13
- package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +20 -6
- package/Charting/Visuals/Legend/SciChartLegendBase.js +22 -4
- package/Charting/Visuals/Legend/SciChartPieLegend.d.ts +2 -0
- package/Charting/Visuals/Legend/SciChartPieLegend.js +17 -6
- 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 +113 -0
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +42 -6
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +129 -21
- 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.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +31 -19
- 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 +11 -2
- package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +17 -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 +2 -7
- 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/SciChartPieSurface/SciChartPieSurface.d.ts +4 -2
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +46 -32
- package/Charting/Visuals/licenseManager2D.js +21 -20
- package/Charting/Visuals/licenseManager2dState.d.ts +4 -0
- package/Charting/Visuals/licenseManager2dState.js +12 -0
- package/Charting/Visuals/loader.js +2 -0
- package/Charting/Visuals/sciChartInitCommon.js +4 -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/README.md +223 -1
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.js +12 -12
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +13 -13
- 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 +144 -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/tooltip.d.ts +42 -0
- package/utils/tooltip.js +119 -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,54 @@
|
|
|
1
|
+
import { IDeletable } from "../../../Core/IDeletable";
|
|
2
|
+
import { IntVector, SCRTDoubleResamplerMergeIndicesParams, SCRTDoubleVector, TSciChart } from "../../../types/TSciChart";
|
|
3
|
+
import { ResamplingParams } from "./ResamplingParams";
|
|
4
|
+
/**
|
|
5
|
+
* Helper class for functions which optimise drawing
|
|
6
|
+
*/
|
|
7
|
+
export declare class ExtremeResamplerHelper implements IDeletable {
|
|
8
|
+
readonly nativeMergeIndexParams: SCRTDoubleResamplerMergeIndicesParams;
|
|
9
|
+
private readonly wasmContext;
|
|
10
|
+
private readonly nativeResampler;
|
|
11
|
+
private readonly xInput;
|
|
12
|
+
private readonly nativeArgs;
|
|
13
|
+
private readonly output;
|
|
14
|
+
private isDeleted;
|
|
15
|
+
constructor(wasmContext: TSciChart);
|
|
16
|
+
/**
|
|
17
|
+
* Calls native RequiresReduction method to calculate if resampling is needed
|
|
18
|
+
* @param rp The resampling params
|
|
19
|
+
* @param xOriginalValues XValues
|
|
20
|
+
* @param fillBasicNativeArgs Update nativeArgs if True
|
|
21
|
+
* @param updateResamplingMode Update {@link ResamplingArgs.Resampling} property if True
|
|
22
|
+
*/
|
|
23
|
+
needsResampling(rp: ResamplingParams, xOriginalValues: SCRTDoubleVector, fillBasicNativeArgs?: boolean, updateResamplingMode?: boolean): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* This method calls does resampling by calling the native resampling methods.
|
|
26
|
+
* It does similar things as WPF AvxExtremeResamplerDoubleDouble.ResampleInternal() method
|
|
27
|
+
* The needsResampling() method must be called before, this is done in {@link SciChartRenderer.resampleSeries}
|
|
28
|
+
* @param wasmContext The WebAssembly context
|
|
29
|
+
* @param rp The resampling parameters
|
|
30
|
+
* @param xOriginalValues The original not resampled X values
|
|
31
|
+
* @param yOriginalValues The original not resampled Y values
|
|
32
|
+
* @param indexesOut The indices output
|
|
33
|
+
* @param xResampledValuesOut The resampled X values output
|
|
34
|
+
* @param yResampledValuesOut The resampled Y values output
|
|
35
|
+
* @param fillBasicNativeArgs If set to True resets and fill nativeArgs with basic properties,
|
|
36
|
+
* you can set it to False if {@link needsResampling()} was called before this method
|
|
37
|
+
* @returns indicesVector The resampled vector of indices
|
|
38
|
+
*/
|
|
39
|
+
resampleIntoPointSeries(wasmContext: TSciChart, rp: ResamplingParams, xOriginalValues: SCRTDoubleVector, yOriginalValues: SCRTDoubleVector, indexesOut: IntVector, xResampledValuesOut: SCRTDoubleVector, yResampledValuesOut: SCRTDoubleVector, fillBasicNativeArgs?: boolean): void;
|
|
40
|
+
mergeIndexes(indices: IntVector, size1: number, size2: number, mergedIndicesOut: IntVector): number;
|
|
41
|
+
copyValuesByIndexes(indices: IntVector, xValues: SCRTDoubleVector, yValues: SCRTDoubleVector, y1Values: SCRTDoubleVector, count: number, isCategoryAxis: boolean, xValuesOut: SCRTDoubleVector, yValuesOut: SCRTDoubleVector, y1ValuesOut: SCRTDoubleVector, y1Offset?: number): void;
|
|
42
|
+
/** @inheritDoc */
|
|
43
|
+
delete(): void;
|
|
44
|
+
private debugParameters;
|
|
45
|
+
private debugRect;
|
|
46
|
+
private debugResamplingDataEnum;
|
|
47
|
+
private debugResamplingModeEnum;
|
|
48
|
+
private getDataDistribution;
|
|
49
|
+
private getNativeResamplingMode;
|
|
50
|
+
/**
|
|
51
|
+
* Fills basic native args needed for {@link needsResampling()} and {@link resampleIntoPointSeries} methods
|
|
52
|
+
*/
|
|
53
|
+
private resetAndFillBasicNativeArgs;
|
|
54
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExtremeResamplerHelper = void 0;
|
|
4
|
+
var Deleter_1 = require("../../../Core/Deleter");
|
|
5
|
+
var Guard_1 = require("../../../Core/Guard");
|
|
6
|
+
var ResamplingMode_1 = require("./ResamplingMode");
|
|
7
|
+
/**
|
|
8
|
+
* Helper class for functions which optimise drawing
|
|
9
|
+
*/
|
|
10
|
+
var ExtremeResamplerHelper = /** @class */ (function () {
|
|
11
|
+
function ExtremeResamplerHelper(wasmContext) {
|
|
12
|
+
this.isDeleted = false;
|
|
13
|
+
this.nativeMergeIndexParams = new wasmContext.SCRTDoubleResamplerMergeIndicesParams();
|
|
14
|
+
this.wasmContext = wasmContext;
|
|
15
|
+
this.nativeResampler = new this.wasmContext.SCRTDoubleResampler();
|
|
16
|
+
this.xInput = new this.wasmContext.SCRTXvaluesProvider();
|
|
17
|
+
this.nativeArgs = new this.wasmContext.ResamplingArgs();
|
|
18
|
+
this.output = new this.wasmContext.SCRTDoubleArraysXyResampleOutput();
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Calls native RequiresReduction method to calculate if resampling is needed
|
|
22
|
+
* @param rp The resampling params
|
|
23
|
+
* @param xOriginalValues XValues
|
|
24
|
+
* @param fillBasicNativeArgs Update nativeArgs if True
|
|
25
|
+
* @param updateResamplingMode Update {@link ResamplingArgs.Resampling} property if True
|
|
26
|
+
*/
|
|
27
|
+
ExtremeResamplerHelper.prototype.needsResampling = function (rp, xOriginalValues, fillBasicNativeArgs, updateResamplingMode) {
|
|
28
|
+
if (fillBasicNativeArgs === void 0) { fillBasicNativeArgs = true; }
|
|
29
|
+
if (updateResamplingMode === void 0) { updateResamplingMode = false; }
|
|
30
|
+
if (fillBasicNativeArgs)
|
|
31
|
+
this.resetAndFillBasicNativeArgs(rp, xOriginalValues);
|
|
32
|
+
var needsResampling = this.nativeResampler.RequiresReduction(this.nativeArgs);
|
|
33
|
+
if (updateResamplingMode && !needsResampling) {
|
|
34
|
+
this.nativeArgs.Resampling = this.getNativeResamplingMode(ResamplingMode_1.EResamplingMode.None);
|
|
35
|
+
}
|
|
36
|
+
return needsResampling;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* This method calls does resampling by calling the native resampling methods.
|
|
40
|
+
* It does similar things as WPF AvxExtremeResamplerDoubleDouble.ResampleInternal() method
|
|
41
|
+
* The needsResampling() method must be called before, this is done in {@link SciChartRenderer.resampleSeries}
|
|
42
|
+
* @param wasmContext The WebAssembly context
|
|
43
|
+
* @param rp The resampling parameters
|
|
44
|
+
* @param xOriginalValues The original not resampled X values
|
|
45
|
+
* @param yOriginalValues The original not resampled Y values
|
|
46
|
+
* @param indexesOut The indices output
|
|
47
|
+
* @param xResampledValuesOut The resampled X values output
|
|
48
|
+
* @param yResampledValuesOut The resampled Y values output
|
|
49
|
+
* @param fillBasicNativeArgs If set to True resets and fill nativeArgs with basic properties,
|
|
50
|
+
* you can set it to False if {@link needsResampling()} was called before this method
|
|
51
|
+
* @returns indicesVector The resampled vector of indices
|
|
52
|
+
*/
|
|
53
|
+
ExtremeResamplerHelper.prototype.resampleIntoPointSeries = function (wasmContext, rp, xOriginalValues, yOriginalValues, indexesOut, xResampledValuesOut, yResampledValuesOut, fillBasicNativeArgs) {
|
|
54
|
+
if (fillBasicNativeArgs === void 0) { fillBasicNativeArgs = true; }
|
|
55
|
+
if (this.isDeleted) {
|
|
56
|
+
throw new Error("should not call resampleIntoPointSeries() if deleted");
|
|
57
|
+
}
|
|
58
|
+
Guard_1.Guard.notNull(xOriginalValues, "xDataValues");
|
|
59
|
+
Guard_1.Guard.notNull(yOriginalValues, "yDataValues");
|
|
60
|
+
Guard_1.Guard.notNull(xOriginalValues, "xOriginalValues");
|
|
61
|
+
Guard_1.Guard.notNull(yOriginalValues, "yOriginalValues");
|
|
62
|
+
Guard_1.Guard.notNull(rp, "resamplingParams");
|
|
63
|
+
if (fillBasicNativeArgs)
|
|
64
|
+
this.resetAndFillBasicNativeArgs(rp, xOriginalValues);
|
|
65
|
+
// Set X Values
|
|
66
|
+
this.xInput.SetInput(xOriginalValues);
|
|
67
|
+
this.nativeArgs.FifoCapacity = rp.fifoCapacity;
|
|
68
|
+
this.nativeArgs.HasNaN = rp.dataHasNaN;
|
|
69
|
+
this.nativeArgs.IsFifo = rp.dataIsFifo;
|
|
70
|
+
this.nativeArgs.ResamplingPrecision = rp.precision;
|
|
71
|
+
this.nativeArgs.ZeroLineY = rp.zeroLineY;
|
|
72
|
+
this.nativeArgs.NewDataPointCount = -1;
|
|
73
|
+
if (fillBasicNativeArgs === true) {
|
|
74
|
+
this.needsResampling(rp, xOriginalValues, false, true);
|
|
75
|
+
}
|
|
76
|
+
// this.debugParameters(rp, this.nativeArgs);
|
|
77
|
+
// What does this method do???
|
|
78
|
+
var requestedSize = this.nativeResampler.UpdateIndices(indexesOut, this.xInput, yOriginalValues, this.nativeArgs.Resampling, this.nativeArgs);
|
|
79
|
+
// SC-5145 Adds +1 to be sure that reserved Capacity is not less than the actual resampled count,
|
|
80
|
+
// otherwise resampledXValues and resampledYValues will be recreated with default 0.0 values
|
|
81
|
+
xResampledValuesOut.resizeFast(requestedSize + 1);
|
|
82
|
+
yResampledValuesOut.resizeFast(requestedSize + 1);
|
|
83
|
+
this.output.Reset(xResampledValuesOut, yResampledValuesOut);
|
|
84
|
+
// Execute resampling and update indexesOut vector
|
|
85
|
+
this.nativeResampler.Execute(this.xInput, yOriginalValues, this.output, indexesOut, this.nativeArgs.Resampling, this.nativeArgs);
|
|
86
|
+
var resultCount = indexesOut.size();
|
|
87
|
+
xResampledValuesOut.resizeFast(resultCount);
|
|
88
|
+
yResampledValuesOut.resizeFast(resultCount);
|
|
89
|
+
};
|
|
90
|
+
ExtremeResamplerHelper.prototype.mergeIndexes = function (indices, size1, size2, mergedIndicesOut) {
|
|
91
|
+
return this.nativeResampler.MergeIndices(indices, size1, size2, mergedIndicesOut);
|
|
92
|
+
};
|
|
93
|
+
ExtremeResamplerHelper.prototype.copyValuesByIndexes = function (indices, xValues, yValues, y1Values, count, isCategoryAxis, xValuesOut, yValuesOut, y1ValuesOut, y1Offset) {
|
|
94
|
+
if (y1Offset === void 0) { y1Offset = 0; }
|
|
95
|
+
var mp = this.nativeMergeIndexParams;
|
|
96
|
+
mp.SetIndices(indices);
|
|
97
|
+
this.xInput.SetInput(xValues);
|
|
98
|
+
mp.SetXInput(this.xInput);
|
|
99
|
+
mp.SetYInput(yValues);
|
|
100
|
+
mp.SetY1Input(y1Values);
|
|
101
|
+
mp.SetY1Offset(y1Offset);
|
|
102
|
+
mp.count = count;
|
|
103
|
+
mp.isCategoryData = isCategoryAxis;
|
|
104
|
+
mp.SetXOut(xValuesOut);
|
|
105
|
+
mp.SetYOut(yValuesOut);
|
|
106
|
+
mp.SetY1Out(y1ValuesOut);
|
|
107
|
+
this.nativeResampler.CopyValuesByIndices(mp);
|
|
108
|
+
};
|
|
109
|
+
/** @inheritDoc */
|
|
110
|
+
ExtremeResamplerHelper.prototype.delete = function () {
|
|
111
|
+
if (!this.isDeleted) {
|
|
112
|
+
(0, Deleter_1.deleteSafe)(this.nativeResampler);
|
|
113
|
+
(0, Deleter_1.deleteSafe)(this.xInput);
|
|
114
|
+
(0, Deleter_1.deleteSafe)(this.nativeArgs);
|
|
115
|
+
(0, Deleter_1.deleteSafe)(this.output);
|
|
116
|
+
(0, Deleter_1.deleteSafe)(this.nativeMergeIndexParams);
|
|
117
|
+
this.isDeleted = true;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
ExtremeResamplerHelper.prototype.debugParameters = function (rp, nativeArgs) {
|
|
121
|
+
console.log(31415);
|
|
122
|
+
console.log("ResamplingParams:");
|
|
123
|
+
console.log(".. zeroLineY: ".concat(rp.zeroLineY));
|
|
124
|
+
console.log(".. resamplingPrecision: ".concat(rp.precision));
|
|
125
|
+
console.log(".. xVisibleRange: ".concat(rp.xVisibleRange));
|
|
126
|
+
console.log(".. indicesRange: ".concat(rp.indexesRange));
|
|
127
|
+
console.log(".. viewportRect: ".concat(this.debugRect(rp.viewportRect)));
|
|
128
|
+
console.log(".. isCategoryAxis: ".concat(rp.isCategoryAxis));
|
|
129
|
+
console.log(".. isXAxisAutoRanged: ".concat(rp.isXAxisAutoRanged));
|
|
130
|
+
console.log(".. resamplingMode: ".concat(rp.resamplingMode));
|
|
131
|
+
console.log(".. renderableSeriesHash: ".concat(rp.renderableSeriesHash));
|
|
132
|
+
console.log(".. enableExperimentalResampling: ".concat(rp.enableExperimentalResampling));
|
|
133
|
+
console.log(".. dataHasNan: ".concat(rp.dataHasNaN));
|
|
134
|
+
console.log(".. dataIsFifo: ".concat(rp.dataIsFifo));
|
|
135
|
+
console.log(".. fifoCapacity: ".concat(rp.fifoCapacity));
|
|
136
|
+
console.log(".. dataEvenlySpaced: ".concat(rp.dataEvenlySpaced));
|
|
137
|
+
console.log("native Resampling Args:");
|
|
138
|
+
console.log(".. ResamplingData: ".concat(this.debugResamplingDataEnum(nativeArgs.Data)));
|
|
139
|
+
console.log(".. StartIndex: ".concat(nativeArgs.StartIndex));
|
|
140
|
+
console.log(".. EndIndex: ".concat(nativeArgs.EndIndex));
|
|
141
|
+
console.log(".. FifoCapacity: ".concat(nativeArgs.FifoCapacity));
|
|
142
|
+
console.log(".. HasNaN: ".concat(nativeArgs.HasNaN));
|
|
143
|
+
console.log(".. IsFifo: ".concat(nativeArgs.IsFifo));
|
|
144
|
+
console.log(".. MaxXInclusive: ".concat(nativeArgs.MaxXInclusive));
|
|
145
|
+
console.log(".. MinXInclusive: ".concat(nativeArgs.MinXInclusive));
|
|
146
|
+
console.log(".. ResamplingMode: ".concat(this.debugResamplingModeEnum(nativeArgs.Resampling)));
|
|
147
|
+
console.log(".. ResamplingPrecision: ".concat(nativeArgs.ResamplingPrecision));
|
|
148
|
+
console.log(".. ViewportWidth: ".concat(nativeArgs.ViewportWidth));
|
|
149
|
+
console.log(".. ZeroLineY: ".concat(nativeArgs.ZeroLineY));
|
|
150
|
+
console.log(".. NewDataPointCount: ".concat(nativeArgs.NewDataPointCount));
|
|
151
|
+
console.log(".. InputBaseIndex: ".concat(nativeArgs.InputBaseIndex));
|
|
152
|
+
};
|
|
153
|
+
ExtremeResamplerHelper.prototype.debugRect = function (rect) {
|
|
154
|
+
return "X ".concat(rect.x, " Y ").concat(rect.y, " Width ").concat(rect.width, " Height ").concat(rect.height);
|
|
155
|
+
};
|
|
156
|
+
ExtremeResamplerHelper.prototype.debugResamplingDataEnum = function (resamplingData) {
|
|
157
|
+
return resamplingData === this.wasmContext.ResamplingData.LinearData
|
|
158
|
+
? "LinearData"
|
|
159
|
+
: resamplingData === this.wasmContext.ResamplingData.CategoryData
|
|
160
|
+
? "CategoryData"
|
|
161
|
+
: resamplingData === this.wasmContext.ResamplingData.UnsortedData
|
|
162
|
+
? "UnsortedData"
|
|
163
|
+
: resamplingData === this.wasmContext.ResamplingData.UnevenlySpacedData
|
|
164
|
+
? "UnevenlySpacedData"
|
|
165
|
+
: "Unknown";
|
|
166
|
+
};
|
|
167
|
+
ExtremeResamplerHelper.prototype.debugResamplingModeEnum = function (resamplingMode) {
|
|
168
|
+
return resamplingMode === this.wasmContext.ResamplingMode.MinMax
|
|
169
|
+
? "MinMax"
|
|
170
|
+
: resamplingMode === this.wasmContext.ResamplingMode.Auto
|
|
171
|
+
? "Auto"
|
|
172
|
+
: "Unknown";
|
|
173
|
+
};
|
|
174
|
+
ExtremeResamplerHelper.prototype.getDataDistribution = function (dataEvenlySpaced, isCategoryAxis) {
|
|
175
|
+
if (isCategoryAxis) {
|
|
176
|
+
return this.wasmContext.ResamplingData.CategoryData;
|
|
177
|
+
}
|
|
178
|
+
return dataEvenlySpaced
|
|
179
|
+
? this.wasmContext.ResamplingData.LinearData
|
|
180
|
+
: this.wasmContext.ResamplingData.UnevenlySpacedData;
|
|
181
|
+
};
|
|
182
|
+
// A different requireReduction method
|
|
183
|
+
// private requireReduction(resamplingMode: EResamplingMode, indicesRange: NumberRange, viewportWidth: number) {
|
|
184
|
+
// const setLength = indicesRange.max - indicesRange.min + 1;
|
|
185
|
+
// const resampledLength = 4 * viewportWidth;
|
|
186
|
+
//
|
|
187
|
+
// return resamplingMode !== EResamplingMode.None && setLength > resampledLength;
|
|
188
|
+
// }
|
|
189
|
+
ExtremeResamplerHelper.prototype.getNativeResamplingMode = function (resamplingMode) {
|
|
190
|
+
switch (resamplingMode) {
|
|
191
|
+
case ResamplingMode_1.EResamplingMode.Auto:
|
|
192
|
+
return this.wasmContext.ResamplingMode.Auto;
|
|
193
|
+
case ResamplingMode_1.EResamplingMode.Max:
|
|
194
|
+
return this.wasmContext.ResamplingMode.Max;
|
|
195
|
+
case ResamplingMode_1.EResamplingMode.Mid:
|
|
196
|
+
return this.wasmContext.ResamplingMode.Mid;
|
|
197
|
+
case ResamplingMode_1.EResamplingMode.Min:
|
|
198
|
+
return this.wasmContext.ResamplingMode.Min;
|
|
199
|
+
case ResamplingMode_1.EResamplingMode.MinMax:
|
|
200
|
+
return this.wasmContext.ResamplingMode.MinMax;
|
|
201
|
+
case ResamplingMode_1.EResamplingMode.MinOrMax:
|
|
202
|
+
return this.wasmContext.ResamplingMode.MinOrMax;
|
|
203
|
+
case ResamplingMode_1.EResamplingMode.None:
|
|
204
|
+
return this.wasmContext.ResamplingMode.None;
|
|
205
|
+
default:
|
|
206
|
+
throw new Error("Unknown resamplingMode ".concat(resamplingMode));
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Fills basic native args needed for {@link needsResampling()} and {@link resampleIntoPointSeries} methods
|
|
211
|
+
*/
|
|
212
|
+
ExtremeResamplerHelper.prototype.resetAndFillBasicNativeArgs = function (rp, xOriginalValues) {
|
|
213
|
+
this.nativeArgs.Reset();
|
|
214
|
+
this.nativeArgs.Data = this.getDataDistribution(rp.dataEvenlySpaced, rp.isCategoryAxis);
|
|
215
|
+
this.nativeArgs.StartIndex = rp.indexesRange.min;
|
|
216
|
+
this.nativeArgs.EndIndex = rp.indexesRange.max;
|
|
217
|
+
this.nativeArgs.MaxXInclusive = rp.xVisibleRange.max;
|
|
218
|
+
this.nativeArgs.MinXInclusive = rp.xVisibleRange.min;
|
|
219
|
+
this.nativeArgs.Resampling = this.getNativeResamplingMode(rp.resamplingMode);
|
|
220
|
+
this.nativeArgs.ViewportWidth = rp.viewportRect.width;
|
|
221
|
+
if (rp.isCategoryAxis) {
|
|
222
|
+
this.nativeArgs.MinXInclusive = rp.indexesRange.min;
|
|
223
|
+
this.nativeArgs.MaxXInclusive = rp.indexesRange.max;
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
var firstPoint = xOriginalValues.get(rp.indexesRange.min);
|
|
227
|
+
var lastPoint = xOriginalValues.get(rp.indexesRange.max);
|
|
228
|
+
this.nativeArgs.MinXInclusive = Math.max(firstPoint, rp.xVisibleRange.min);
|
|
229
|
+
this.nativeArgs.MaxXInclusive = Math.min(lastPoint, rp.xVisibleRange.max);
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
return ExtremeResamplerHelper;
|
|
233
|
+
}());
|
|
234
|
+
exports.ExtremeResamplerHelper = ExtremeResamplerHelper;
|
|
@@ -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;
|