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
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { NumberRange } from "../../../Core/NumberRange";
|
|
2
|
-
import {
|
|
2
|
+
import { SCRTDoubleVector, TSciChart } from "../../../types/TSciChart";
|
|
3
|
+
import { IOhlcPointSeries } from "../../Model/PointSeries/IPointSeries";
|
|
4
|
+
import { OhlcPointSeriesResampled } from "../../Model/PointSeries/OhlcPointSeriesResampled";
|
|
5
|
+
import { ResamplingParams } from "../../Numerics/Resamplers/ResamplingParams";
|
|
3
6
|
import { IThemeProvider } from "../../Themes/IThemeProvider";
|
|
4
7
|
import { BaseRenderableSeries } from "./BaseRenderableSeries";
|
|
5
8
|
import { IHitTestProvider } from "./HitTest/IHitTestProvider";
|
|
@@ -10,9 +13,11 @@ export interface IBaseOhlcRenderableSeriesOptions extends IBaseRenderableSeriesO
|
|
|
10
13
|
dataPointWidth?: number;
|
|
11
14
|
}
|
|
12
15
|
export declare abstract class BaseOhlcRenderableSeries extends BaseRenderableSeries {
|
|
16
|
+
protected pointSeries: OhlcPointSeriesResampled;
|
|
13
17
|
private strokeUpProperty;
|
|
14
18
|
private strokeDownProperty;
|
|
15
19
|
private dataPointWidthProperty;
|
|
20
|
+
private xyyTempPointSeries;
|
|
16
21
|
constructor(webAssemblyContext: TSciChart, options?: IBaseOhlcRenderableSeriesOptions);
|
|
17
22
|
/** @inheritDoc */
|
|
18
23
|
applyTheme(themeProvider: IThemeProvider): void;
|
|
@@ -49,19 +54,21 @@ export declare abstract class BaseOhlcRenderableSeries extends BaseRenderableSer
|
|
|
49
54
|
/**
|
|
50
55
|
* Returns the {@link IDataSeries.getNativeOpenValues} for the associated {@link dataSeries}
|
|
51
56
|
*/
|
|
52
|
-
getNativeOpenValues():
|
|
57
|
+
getNativeOpenValues(): SCRTDoubleVector;
|
|
53
58
|
/**
|
|
54
59
|
* Returns the {@link IDataSeries.getNativeHighValues} for the associated {@link dataSeries}
|
|
55
60
|
*/
|
|
56
|
-
getNativeHighValues():
|
|
61
|
+
getNativeHighValues(): SCRTDoubleVector;
|
|
57
62
|
/**
|
|
58
63
|
* Returns the {@link IDataSeries.getNativeLowValues} for the associated {@link dataSeries}
|
|
59
64
|
*/
|
|
60
|
-
getNativeLowValues():
|
|
65
|
+
getNativeLowValues(): SCRTDoubleVector;
|
|
61
66
|
/**
|
|
62
67
|
* Returns the {@link IDataSeries.getNativeCloseValues} for the associated {@link dataSeries}
|
|
63
68
|
*/
|
|
64
|
-
getNativeCloseValues():
|
|
69
|
+
getNativeCloseValues(): SCRTDoubleVector;
|
|
70
|
+
/** @inheritDoc */
|
|
71
|
+
toPointSeries(rp?: ResamplingParams): IOhlcPointSeries;
|
|
65
72
|
/** @inheritDoc */
|
|
66
73
|
protected newHitTestProvider(): IHitTestProvider;
|
|
67
74
|
}
|
|
@@ -16,8 +16,13 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.BaseOhlcRenderableSeries = void 0;
|
|
19
|
+
var Deleter_1 = require("../../../Core/Deleter");
|
|
19
20
|
var NumberRange_1 = require("../../../Core/NumberRange");
|
|
20
21
|
var IDataSeries_1 = require("../../Model/IDataSeries");
|
|
22
|
+
var OhlcPointSeriesResampled_1 = require("../../Model/PointSeries/OhlcPointSeriesResampled");
|
|
23
|
+
var OhlcPointSeriesWrapped_1 = require("../../Model/PointSeries/OhlcPointSeriesWrapped");
|
|
24
|
+
var XyyPointSeriesResampled_1 = require("../../Model/PointSeries/XyyPointSeriesResampled");
|
|
25
|
+
var ResamplingMode_1 = require("../../Numerics/Resamplers/ResamplingMode");
|
|
21
26
|
var SciChartSurfaceBase_1 = require("../SciChartSurfaceBase");
|
|
22
27
|
var BaseRenderableSeries_1 = require("./BaseRenderableSeries");
|
|
23
28
|
var constants_1 = require("./constants");
|
|
@@ -123,6 +128,9 @@ var BaseOhlcRenderableSeries = /** @class */ (function (_super) {
|
|
|
123
128
|
/** @inheritDoc */
|
|
124
129
|
BaseOhlcRenderableSeries.prototype.delete = function () {
|
|
125
130
|
_super.prototype.delete.call(this);
|
|
131
|
+
this.resamplerHelper = (0, Deleter_1.deleteSafe)(this.resamplerHelper);
|
|
132
|
+
this.xyyTempPointSeries = (0, Deleter_1.deleteSafe)(this.xyyTempPointSeries);
|
|
133
|
+
this.pointSeries = (0, Deleter_1.deleteSafe)(this.pointSeries);
|
|
126
134
|
};
|
|
127
135
|
/**
|
|
128
136
|
* Returns the {@link IDataSeries.getNativeOpenValues} for the associated {@link dataSeries}
|
|
@@ -149,6 +157,111 @@ var BaseOhlcRenderableSeries = /** @class */ (function (_super) {
|
|
|
149
157
|
return this.dataSeries.getNativeYValues();
|
|
150
158
|
};
|
|
151
159
|
/** @inheritDoc */
|
|
160
|
+
BaseOhlcRenderableSeries.prototype.toPointSeries = function (rp) {
|
|
161
|
+
if (rp) {
|
|
162
|
+
if (!this.xyyTempPointSeries) {
|
|
163
|
+
this.xyyTempPointSeries = new XyyPointSeriesResampled_1.XyyPointSeriesResampled(this.webAssemblyContext, rp.xVisibleRange);
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
this.xyyTempPointSeries.xRange = rp.xVisibleRange;
|
|
167
|
+
}
|
|
168
|
+
if (!this.pointSeries) {
|
|
169
|
+
this.pointSeries = new OhlcPointSeriesResampled_1.OhlcPointSeriesResampled(this.webAssemblyContext, rp.xVisibleRange);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
this.pointSeries.xRange = rp.xVisibleRange;
|
|
173
|
+
}
|
|
174
|
+
var ps = this.pointSeries;
|
|
175
|
+
var ds = this.dataSeries;
|
|
176
|
+
var xValues = ds.getNativeXValues();
|
|
177
|
+
var openValues = ds.getNativeOpenValues();
|
|
178
|
+
var highValues = ds.getNativeHighValues();
|
|
179
|
+
var lowValues = ds.getNativeLowValues();
|
|
180
|
+
var closeValues = ds.getNativeCloseValues();
|
|
181
|
+
var originalIndexes = ds.getNativeIndexes();
|
|
182
|
+
// 1) calc ps.highValues
|
|
183
|
+
var rpHigh = rp.clone({
|
|
184
|
+
resamplingMode: rp.resamplingMode === ResamplingMode_1.EResamplingMode.None ? ResamplingMode_1.EResamplingMode.None : ResamplingMode_1.EResamplingMode.Max
|
|
185
|
+
});
|
|
186
|
+
this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext, rpHigh, xValues, highValues, this.xyyTempPointSeries.intIndexes, // don't care
|
|
187
|
+
this.xyyTempPointSeries.xValues, // don't care
|
|
188
|
+
ps.highValues);
|
|
189
|
+
// console.log("high count ", ps.highValues.size());
|
|
190
|
+
this.xyyTempPointSeries.clearIntIndexes();
|
|
191
|
+
// 2) calc ps.lowValues
|
|
192
|
+
var rpLow = rp.clone({
|
|
193
|
+
resamplingMode: rp.resamplingMode === ResamplingMode_1.EResamplingMode.None ? ResamplingMode_1.EResamplingMode.None : ResamplingMode_1.EResamplingMode.Min
|
|
194
|
+
});
|
|
195
|
+
this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext, rpLow, xValues, lowValues, this.xyyTempPointSeries.intIndexes, // don't care
|
|
196
|
+
this.xyyTempPointSeries.xValues, ps.lowValues);
|
|
197
|
+
// console.log("low count ", ps.lowValues.size());
|
|
198
|
+
// We don't want the indexes for high/low
|
|
199
|
+
this.xyyTempPointSeries.clearIntIndexes();
|
|
200
|
+
this.xyyTempPointSeries.y1Values.clear();
|
|
201
|
+
// 3) Get batch indexes
|
|
202
|
+
// Resample indexes to get start and end of batch
|
|
203
|
+
var rpOpenClose = rp.clone({
|
|
204
|
+
resamplingMode: rp.resamplingMode === ResamplingMode_1.EResamplingMode.None ? ResamplingMode_1.EResamplingMode.None : ResamplingMode_1.EResamplingMode.Min
|
|
205
|
+
});
|
|
206
|
+
this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext, rpOpenClose, xValues, originalIndexes, ps.intIndexes, this.xyyTempPointSeries.xValues, // don't care
|
|
207
|
+
this.xyyTempPointSeries.y1Values // don't care
|
|
208
|
+
);
|
|
209
|
+
var openCloseSize = ps.intIndexes.size();
|
|
210
|
+
this.xyyTempPointSeries.y1Values.clear();
|
|
211
|
+
// 4) calc ps.openValues, ps.closeValues
|
|
212
|
+
// console.log("open/close count ", openCloseSize);
|
|
213
|
+
// indexes 0, 1, 2, 3, 4, 5, 6, 7
|
|
214
|
+
// opens 3, 4, 7, 8, 3, 5, 9, 6
|
|
215
|
+
// closes 8, 3, 5, 9, 6, 3
|
|
216
|
+
// batch 0, 3, 6
|
|
217
|
+
// batch 0 - open 3 (index 0), close 8 (index 2)
|
|
218
|
+
var lastIndexOfFirstBatch = ps.intIndexes.get(3) - ps.intIndexes.get(2) - 1;
|
|
219
|
+
// console.log(
|
|
220
|
+
// "indexes ",
|
|
221
|
+
// ps.intIndexes.get(0),
|
|
222
|
+
// ps.intIndexes.get(1),
|
|
223
|
+
// ps.intIndexes.get(2),
|
|
224
|
+
// ps.intIndexes.get(3),
|
|
225
|
+
// ps.intIndexes.get(4),
|
|
226
|
+
// ps.intIndexes.get(5),
|
|
227
|
+
// ps.intIndexes.get(6)
|
|
228
|
+
// );
|
|
229
|
+
// console.log(
|
|
230
|
+
// "x values ",
|
|
231
|
+
// xValues.get(0),
|
|
232
|
+
// xValues.get(1),
|
|
233
|
+
// xValues.get(2),
|
|
234
|
+
// xValues.get(3),
|
|
235
|
+
// xValues.get(4),
|
|
236
|
+
// xValues.get(5),
|
|
237
|
+
// xValues.get(6)
|
|
238
|
+
// );
|
|
239
|
+
// console.log("Max index", rp.indexesRange.max);
|
|
240
|
+
// const batchWidth = rp.xVisibleRange.diff / rp.viewportRect.width;
|
|
241
|
+
// console.log(
|
|
242
|
+
// "Batch width ",
|
|
243
|
+
// batchWidth,
|
|
244
|
+
// Math.floor(Math.log2(batchWidth)),
|
|
245
|
+
// Math.pow(2, Math.floor(Math.log2(batchWidth)))
|
|
246
|
+
// );
|
|
247
|
+
// console.log("X Spacing ", rp.xVisibleRange.diff / rp.indexesRange.max);
|
|
248
|
+
// console.log("original points / resampled points ", xValues.size() / openCloseSize);
|
|
249
|
+
// console.log("lastIndexOfFirstBatch ", lastIndexOfFirstBatch);
|
|
250
|
+
// Get values by indexes for Open values
|
|
251
|
+
this.resamplerHelper.copyValuesByIndexes(ps.intIndexes, xValues, openValues, closeValues, openCloseSize, rp.isCategoryAxis, ps.xValues, ps.openValues, ps.closeValues, lastIndexOfFirstBatch);
|
|
252
|
+
// Last close value is handled in c++;
|
|
253
|
+
// 5) update indexes for category axis
|
|
254
|
+
if (rp.isCategoryAxis)
|
|
255
|
+
ps.updateIndexes();
|
|
256
|
+
ps.clearIntIndexes();
|
|
257
|
+
// ps.debugOutputForUnitTests();
|
|
258
|
+
return ps;
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
return new OhlcPointSeriesWrapped_1.OhlcPointSeriesWrapped(this.dataSeries);
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
/** @inheritDoc */
|
|
152
265
|
BaseOhlcRenderableSeries.prototype.newHitTestProvider = function () {
|
|
153
266
|
return new OhlcSeriesHitTestProvider_1.OhlcSeriesHitTestProvider(this, this.webAssemblyContext);
|
|
154
267
|
};
|
|
@@ -3,12 +3,17 @@ import { SeriesAnimationFiniteStateMachine } from "../../../Core/Animations/Anim
|
|
|
3
3
|
import { EventHandler } from "../../../Core/EventHandler";
|
|
4
4
|
import { NumberRange } from "../../../Core/NumberRange";
|
|
5
5
|
import { ESeriesType } from "../../../types/SeriesType";
|
|
6
|
-
import {
|
|
6
|
+
import { SCRTDoubleVector, TSciChart } from "../../../types/TSciChart";
|
|
7
7
|
import { ELineDrawMode, WebGlRenderContext2D } from "../../Drawing/WebGlRenderContext2D";
|
|
8
8
|
import { SeriesInfo } from "../../Model/ChartData/SeriesInfo";
|
|
9
9
|
import { IDataSeries } from "../../Model/IDataSeries";
|
|
10
10
|
import { IPaletteProvider } from "../../Model/IPaletteProvider";
|
|
11
|
+
import { IPointSeries } from "../../Model/PointSeries/IPointSeries";
|
|
12
|
+
import { XyPointSeriesResampled } from "../../Model/PointSeries/XyPointSeriesResampled";
|
|
11
13
|
import { CoordinateCalculatorBase } from "../../Numerics/CoordinateCalculators/CoordinateCalculatorBase";
|
|
14
|
+
import { ExtremeResamplerHelper } from "../../Numerics/Resamplers/ExtremeResamplerHelper";
|
|
15
|
+
import { EResamplingMode } from "../../Numerics/Resamplers/ResamplingMode";
|
|
16
|
+
import { ResamplingParams } from "../../Numerics/Resamplers/ResamplingParams";
|
|
12
17
|
import { RenderPassData } from "../../Services/RenderPassData";
|
|
13
18
|
import { IThemeProvider } from "../../Themes/IThemeProvider";
|
|
14
19
|
import { AxisCore } from "../Axis/AxisCore";
|
|
@@ -63,7 +68,10 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
|
|
|
63
68
|
protected dataSeriesProperty: IDataSeries;
|
|
64
69
|
protected animationFSM: SeriesAnimationFiniteStateMachine;
|
|
65
70
|
protected animationQueue: SeriesAnimation[];
|
|
71
|
+
protected paletteProviderProperty: IPaletteProvider;
|
|
66
72
|
protected typeMap: Map<string, string>;
|
|
73
|
+
protected resamplerHelper: ExtremeResamplerHelper;
|
|
74
|
+
protected pointSeries: XyPointSeriesResampled;
|
|
67
75
|
private xAxisIdProperty;
|
|
68
76
|
private yAxisIdProperty;
|
|
69
77
|
private strokeThicknessProperty;
|
|
@@ -73,10 +81,12 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
|
|
|
73
81
|
private drawNaNAsProperty;
|
|
74
82
|
private isVisibleProperty;
|
|
75
83
|
private effectProperty;
|
|
76
|
-
private paletteProviderProperty;
|
|
77
84
|
private isDigitalLineProperty;
|
|
78
85
|
private isSelectedProperty;
|
|
79
86
|
private isHoveredProperty;
|
|
87
|
+
private currentRenderPassData;
|
|
88
|
+
private resamplingModeProperty;
|
|
89
|
+
private resamplingPrecisionProperty;
|
|
80
90
|
/**
|
|
81
91
|
* Creates an instance of the {@link BaseRenderableSeries}
|
|
82
92
|
* @param webAssemblyContext The {@link TSciChart | SciChart WebAssembly Context} containing
|
|
@@ -142,6 +152,8 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
|
|
|
142
152
|
get dataSeries(): IDataSeries;
|
|
143
153
|
/** @inheritDoc */
|
|
144
154
|
set dataSeries(dataSeries: IDataSeries);
|
|
155
|
+
/** @inheritDoc */
|
|
156
|
+
get enableDrawingOptimisations(): boolean;
|
|
145
157
|
/**
|
|
146
158
|
* Gets an optional {@link ShaderEffect} for modifying the render output of this {@link IRenderableSeries}
|
|
147
159
|
* @remarks Options include {@link GlowEffect} and {@link ShadowEffect}. Apply an effect to see how it modifies rendering!
|
|
@@ -152,6 +164,16 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
|
|
|
152
164
|
* @remarks Options include {@link GlowEffect} and {@link ShadowEffect}. Apply an effect to see how it modifies rendering!
|
|
153
165
|
*/
|
|
154
166
|
set effect(effect: ShaderEffect);
|
|
167
|
+
/**
|
|
168
|
+
* Gets or Sets the resamplingMode {@link EResamplingMode}
|
|
169
|
+
*/
|
|
170
|
+
get resamplingMode(): EResamplingMode;
|
|
171
|
+
set resamplingMode(value: EResamplingMode);
|
|
172
|
+
/**
|
|
173
|
+
* Gets or Sets the resamplingPrecision
|
|
174
|
+
*/
|
|
175
|
+
get resamplingPrecision(): number;
|
|
176
|
+
set resamplingPrecision(value: number);
|
|
155
177
|
/** @inheritDoc */
|
|
156
178
|
get isSpline(): boolean;
|
|
157
179
|
/** @inheritDoc */
|
|
@@ -189,11 +211,11 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
|
|
|
189
211
|
/** @inheritDoc */
|
|
190
212
|
getDataSeriesName(): string;
|
|
191
213
|
/** @inheritDoc */
|
|
192
|
-
getNativeXValues():
|
|
214
|
+
getNativeXValues(): SCRTDoubleVector;
|
|
193
215
|
/**
|
|
194
216
|
* Returns the {@link IDataSeries.getNativeYValues} for the associated {@link dataSeries}
|
|
195
217
|
*/
|
|
196
|
-
getNativeYValues():
|
|
218
|
+
getNativeYValues(): SCRTDoubleVector;
|
|
197
219
|
/** @inheritDoc */
|
|
198
220
|
checkIsOutOfDataRange(xValue: number, yValue: number): boolean;
|
|
199
221
|
/**
|
|
@@ -211,7 +233,7 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
|
|
|
211
233
|
/** @inheritDoc */
|
|
212
234
|
runAnimation(animation: SeriesAnimation): void;
|
|
213
235
|
/**
|
|
214
|
-
* Sets a start up animation class, a child class for {@link
|
|
236
|
+
* Sets a start up animation class, a child class for {@link SeriesAnimation}
|
|
215
237
|
*/
|
|
216
238
|
set animation(value: SeriesAnimation);
|
|
217
239
|
/** @inheritDoc */
|
|
@@ -222,6 +244,19 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
|
|
|
222
244
|
get isRunningDataAnimation(): boolean;
|
|
223
245
|
/** @inheritDoc */
|
|
224
246
|
onAnimate(timeElapsed: number): void;
|
|
247
|
+
/** @inheritDoc */
|
|
248
|
+
toPointSeries(rp?: ResamplingParams): IPointSeries;
|
|
249
|
+
/** @inheritDoc */
|
|
250
|
+
getIndicesRange(xRange: NumberRange, isCategoryData?: boolean): NumberRange;
|
|
251
|
+
/** @inheritDoc */
|
|
252
|
+
getCurrentRenderPassData(): RenderPassData;
|
|
253
|
+
/** @inheritDoc */
|
|
254
|
+
get supportsResampling(): boolean;
|
|
255
|
+
/**
|
|
256
|
+
* Used internally to check if resampling is needed for the renderable series
|
|
257
|
+
* @protected
|
|
258
|
+
*/
|
|
259
|
+
needsResampling(rp: ResamplingParams): boolean;
|
|
225
260
|
/**
|
|
226
261
|
* Sets initial and end animation vectors
|
|
227
262
|
* @param animation
|
|
@@ -256,8 +291,9 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
|
|
|
256
291
|
*/
|
|
257
292
|
protected dataSeriesDataChanged(): void;
|
|
258
293
|
protected valueChanged(oldValue: any, newValue: any): boolean;
|
|
294
|
+
protected setPaletteProvider(paletteProvider: IPaletteProvider): void;
|
|
259
295
|
private invalidateParent;
|
|
260
296
|
private effectPropertyChanged;
|
|
261
297
|
private get canDraw();
|
|
262
298
|
}
|
|
263
|
-
export declare const getDataPointWidth: (xValues:
|
|
299
|
+
export declare const getDataPointWidth: (xValues: SCRTDoubleVector, xCoordCalc: CoordinateCalculatorBase, seriesViewRectWidth: number, widthFraction: number, isCategoryAxis: boolean) => number;
|
|
@@ -18,7 +18,12 @@ var XySeriesInfo_1 = require("../../Model/ChartData/XySeriesInfo");
|
|
|
18
18
|
var XyySeriesInfo_1 = require("../../Model/ChartData/XyySeriesInfo");
|
|
19
19
|
var IDataSeries_1 = require("../../Model/IDataSeries");
|
|
20
20
|
var IPaletteProvider_1 = require("../../Model/IPaletteProvider");
|
|
21
|
+
var XyPointSeriesResampled_1 = require("../../Model/PointSeries/XyPointSeriesResampled");
|
|
22
|
+
var XyPointSeriesWrapped_1 = require("../../Model/PointSeries/XyPointSeriesWrapped");
|
|
23
|
+
var ExtremeResamplerHelper_1 = require("../../Numerics/Resamplers/ExtremeResamplerHelper");
|
|
24
|
+
var ResamplingMode_1 = require("../../Numerics/Resamplers/ResamplingMode");
|
|
21
25
|
var AxisCore_1 = require("../Axis/AxisCore");
|
|
26
|
+
var SciChartDefaults_1 = require("../SciChartDefaults");
|
|
22
27
|
var SciChartSurfaceBase_1 = require("../SciChartSurfaceBase");
|
|
23
28
|
var animationHelpers_1 = require("./Animations/animationHelpers");
|
|
24
29
|
var constants_1 = require("./constants");
|
|
@@ -43,7 +48,7 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
43
48
|
* @param options optional parameters of type {@link IBaseRenderableSeriesOptions} applied when constructing the series type
|
|
44
49
|
*/
|
|
45
50
|
function BaseRenderableSeries(webAssemblyContext, options) {
|
|
46
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
51
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
47
52
|
/** @inheritDoc */
|
|
48
53
|
this.isStacked = false;
|
|
49
54
|
/** @inheritDoc */
|
|
@@ -57,6 +62,7 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
57
62
|
/** @inheritDoc */
|
|
58
63
|
this.hovered = new EventHandler_1.EventHandler();
|
|
59
64
|
this.animationQueue = [];
|
|
65
|
+
this.paletteProviderProperty = IPaletteProvider_1.DefaultPaletteProvider.createEmpty();
|
|
60
66
|
// used to track if registered types were used for function propertes, so they can be serialized
|
|
61
67
|
this.typeMap = new Map();
|
|
62
68
|
this.xAxisIdProperty = AxisCore_1.AxisCore.DEFAULT_AXIS_ID;
|
|
@@ -66,8 +72,9 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
66
72
|
this.opacityProperty = 1;
|
|
67
73
|
this.drawNaNAsProperty = WebGlRenderContext2D_1.ELineDrawMode.DiscontinuousLine;
|
|
68
74
|
this.isVisibleProperty = true;
|
|
69
|
-
this.paletteProviderProperty = IPaletteProvider_1.DefaultPaletteProvider.createEmpty();
|
|
70
75
|
this.isDigitalLineProperty = false;
|
|
76
|
+
this.resamplingModeProperty = ResamplingMode_1.EResamplingMode.Auto;
|
|
77
|
+
this.resamplingPrecisionProperty = 0;
|
|
71
78
|
this.webAssemblyContext = webAssemblyContext;
|
|
72
79
|
this.id = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : (0, guid_1.generateGuid)();
|
|
73
80
|
// It is very important to add bind(this) first line in constructor,
|
|
@@ -99,6 +106,8 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
99
106
|
this.yAxisIdProperty = (_h = options === null || options === void 0 ? void 0 : options.yAxisId) !== null && _h !== void 0 ? _h : this.yAxisIdProperty;
|
|
100
107
|
this.isVisibleProperty = (_j = options === null || options === void 0 ? void 0 : options.isVisible) !== null && _j !== void 0 ? _j : this.isVisibleProperty;
|
|
101
108
|
this.isDigitalLineProperty = (_k = options === null || options === void 0 ? void 0 : options.isDigitalLine) !== null && _k !== void 0 ? _k : this.isDigitalLineProperty;
|
|
109
|
+
this.resamplingModeProperty = (_l = options === null || options === void 0 ? void 0 : options.resamplingMode) !== null && _l !== void 0 ? _l : this.resamplingModeProperty;
|
|
110
|
+
this.resamplingPrecisionProperty = (_m = options === null || options === void 0 ? void 0 : options.resamplingPrecision) !== null && _m !== void 0 ? _m : this.resamplingPrecisionProperty;
|
|
102
111
|
if (options === null || options === void 0 ? void 0 : options.effect) {
|
|
103
112
|
if (!("getNativeEffect" in options.effect)) {
|
|
104
113
|
options.effect = (0, classFactory_1.createType)(BaseType_1.EBaseType.ShaderEffect, options.effect.type, webAssemblyContext, options.effect.options);
|
|
@@ -115,12 +124,12 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
115
124
|
}
|
|
116
125
|
}
|
|
117
126
|
}
|
|
118
|
-
this.paletteProviderProperty = (
|
|
127
|
+
this.paletteProviderProperty = (_o = options === null || options === void 0 ? void 0 : options.paletteProvider) !== null && _o !== void 0 ? _o : this.paletteProviderProperty;
|
|
119
128
|
// PaletteProvider.onAttached must be called by the top level series, as the series type is not available here
|
|
120
|
-
this.drawNaNAsProperty = (
|
|
129
|
+
this.drawNaNAsProperty = (_p = options === null || options === void 0 ? void 0 : options.drawNaNAs) !== null && _p !== void 0 ? _p : this.drawNaNAsProperty;
|
|
121
130
|
this.hitTestProvider = this.newHitTestProvider();
|
|
122
|
-
this.isSelected = (
|
|
123
|
-
this.isHovered = (
|
|
131
|
+
this.isSelected = (_q = options === null || options === void 0 ? void 0 : options.isSelected) !== null && _q !== void 0 ? _q : false;
|
|
132
|
+
this.isHovered = (_r = options === null || options === void 0 ? void 0 : options.isHovered) !== null && _r !== void 0 ? _r : false;
|
|
124
133
|
if (options === null || options === void 0 ? void 0 : options.onSelectedChanged) {
|
|
125
134
|
if (typeof options.onSelectedChanged === "string") {
|
|
126
135
|
this.typeMap.set("onSelectedChanged", options.onSelectedChanged);
|
|
@@ -158,6 +167,7 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
158
167
|
}
|
|
159
168
|
}
|
|
160
169
|
this.onDpiChanged = this.onDpiChanged.bind(this);
|
|
170
|
+
this.resamplerHelper = new ExtremeResamplerHelper_1.ExtremeResamplerHelper(webAssemblyContext);
|
|
161
171
|
}
|
|
162
172
|
/** @inheritDoc */
|
|
163
173
|
BaseRenderableSeries.prototype.applyTheme = function (themeProvider) {
|
|
@@ -213,15 +223,7 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
213
223
|
},
|
|
214
224
|
/** @inheritDoc */
|
|
215
225
|
set: function (paletteProvider) {
|
|
216
|
-
|
|
217
|
-
if ((_a = this.paletteProviderProperty) === null || _a === void 0 ? void 0 : _a.onDetached) {
|
|
218
|
-
this.paletteProviderProperty.onDetached();
|
|
219
|
-
}
|
|
220
|
-
this.paletteProviderProperty = paletteProvider;
|
|
221
|
-
if ((_b = this.paletteProviderProperty) === null || _b === void 0 ? void 0 : _b.onAttached) {
|
|
222
|
-
this.paletteProviderProperty.onAttached(this);
|
|
223
|
-
}
|
|
224
|
-
this.notifyPropertyChanged(constants_1.PROPERTY.PALETTE_PROVIDER);
|
|
226
|
+
this.setPaletteProvider(paletteProvider);
|
|
225
227
|
},
|
|
226
228
|
enumerable: false,
|
|
227
229
|
configurable: true
|
|
@@ -383,6 +385,14 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
383
385
|
enumerable: false,
|
|
384
386
|
configurable: true
|
|
385
387
|
});
|
|
388
|
+
Object.defineProperty(BaseRenderableSeries.prototype, "enableDrawingOptimisations", {
|
|
389
|
+
/** @inheritDoc */
|
|
390
|
+
get: function () {
|
|
391
|
+
return this.resamplingModeProperty !== ResamplingMode_1.EResamplingMode.None;
|
|
392
|
+
},
|
|
393
|
+
enumerable: false,
|
|
394
|
+
configurable: true
|
|
395
|
+
});
|
|
386
396
|
Object.defineProperty(BaseRenderableSeries.prototype, "effect", {
|
|
387
397
|
/**
|
|
388
398
|
* Gets an optional {@link ShaderEffect} for modifying the render output of this {@link IRenderableSeries}
|
|
@@ -405,6 +415,34 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
405
415
|
enumerable: false,
|
|
406
416
|
configurable: true
|
|
407
417
|
});
|
|
418
|
+
Object.defineProperty(BaseRenderableSeries.prototype, "resamplingMode", {
|
|
419
|
+
/**
|
|
420
|
+
* Gets or Sets the resamplingMode {@link EResamplingMode}
|
|
421
|
+
*/
|
|
422
|
+
get: function () {
|
|
423
|
+
return this.resamplingModeProperty;
|
|
424
|
+
},
|
|
425
|
+
set: function (value) {
|
|
426
|
+
this.resamplingModeProperty = value;
|
|
427
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.RESAMPLING_MODE);
|
|
428
|
+
},
|
|
429
|
+
enumerable: false,
|
|
430
|
+
configurable: true
|
|
431
|
+
});
|
|
432
|
+
Object.defineProperty(BaseRenderableSeries.prototype, "resamplingPrecision", {
|
|
433
|
+
/**
|
|
434
|
+
* Gets or Sets the resamplingPrecision
|
|
435
|
+
*/
|
|
436
|
+
get: function () {
|
|
437
|
+
return this.resamplingPrecisionProperty;
|
|
438
|
+
},
|
|
439
|
+
set: function (value) {
|
|
440
|
+
this.resamplingPrecisionProperty = value;
|
|
441
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.RESAMPLING_PRECISION);
|
|
442
|
+
},
|
|
443
|
+
enumerable: false,
|
|
444
|
+
configurable: true
|
|
445
|
+
});
|
|
408
446
|
Object.defineProperty(BaseRenderableSeries.prototype, "isSpline", {
|
|
409
447
|
/** @inheritDoc */
|
|
410
448
|
get: function () {
|
|
@@ -416,13 +454,12 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
416
454
|
/** @inheritDoc */
|
|
417
455
|
BaseRenderableSeries.prototype.draw = function (renderContext, renderPassData) {
|
|
418
456
|
var _a;
|
|
457
|
+
this.currentRenderPassData = renderPassData;
|
|
419
458
|
(_a = this.hitTestProvider) === null || _a === void 0 ? void 0 : _a.update(renderPassData);
|
|
420
459
|
if (this.canDraw) {
|
|
421
460
|
try {
|
|
422
461
|
renderContext.pushShaderEffect(this.effect);
|
|
423
|
-
this.drawingProviders.forEach(function (dp,
|
|
424
|
-
dp.draw(renderContext, renderPassData);
|
|
425
|
-
});
|
|
462
|
+
this.drawingProviders.forEach(function (dp) { return dp.draw(renderContext, renderPassData); });
|
|
426
463
|
}
|
|
427
464
|
finally {
|
|
428
465
|
renderContext.popShaderEffect();
|
|
@@ -437,6 +474,7 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
437
474
|
this.dataSeries = (0, Deleter_1.deleteSafe)(this.dataSeries);
|
|
438
475
|
this.effect = (0, Deleter_1.deleteSafe)(this.effect);
|
|
439
476
|
(_a = this.pointMarker) === null || _a === void 0 ? void 0 : _a.delete();
|
|
477
|
+
this.resamplerHelper = (0, Deleter_1.deleteSafe)(this.resamplerHelper);
|
|
440
478
|
};
|
|
441
479
|
/** @inheritDoc */
|
|
442
480
|
BaseRenderableSeries.prototype.getXRange = function () {
|
|
@@ -500,7 +538,8 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
500
538
|
};
|
|
501
539
|
/** @inheritDoc */
|
|
502
540
|
BaseRenderableSeries.prototype.hasDataSeriesValues = function () {
|
|
503
|
-
|
|
541
|
+
var _a;
|
|
542
|
+
return (_a = this.dataSeries) === null || _a === void 0 ? void 0 : _a.hasValues;
|
|
504
543
|
};
|
|
505
544
|
/** @inheritDoc */
|
|
506
545
|
BaseRenderableSeries.prototype.hasDataSeries = function () {
|
|
@@ -589,7 +628,9 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
589
628
|
strokeThickness: this.strokeThickness,
|
|
590
629
|
xAxisId: this.xAxisId,
|
|
591
630
|
yAxisId: this.yAxisId,
|
|
592
|
-
animation: this.animation
|
|
631
|
+
animation: this.animation,
|
|
632
|
+
resamplingMode: this.resamplingMode,
|
|
633
|
+
resamplingPrecision: this.resamplingPrecision
|
|
593
634
|
// onSelectedChanged: this.onSelectedChanged
|
|
594
635
|
};
|
|
595
636
|
if (((_c = this.dataSeries) === null || _c === void 0 ? void 0 : _c.type) === IDataSeries_1.EDataSeriesType.Xy) {
|
|
@@ -631,7 +672,7 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
631
672
|
};
|
|
632
673
|
Object.defineProperty(BaseRenderableSeries.prototype, "animation", {
|
|
633
674
|
/**
|
|
634
|
-
* Sets a start up animation class, a child class for {@link
|
|
675
|
+
* Sets a start up animation class, a child class for {@link SeriesAnimation}
|
|
635
676
|
*/
|
|
636
677
|
set: function (value) {
|
|
637
678
|
if (value) {
|
|
@@ -678,6 +719,62 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
678
719
|
return;
|
|
679
720
|
animationHelpers_1.animationHelpers.animationUpdate(this.animationFSM, timeElapsed, this.beforeAnimationStart, this.afterAnimationComplete, this.updateAnimationProperties);
|
|
680
721
|
};
|
|
722
|
+
/** @inheritDoc */
|
|
723
|
+
BaseRenderableSeries.prototype.toPointSeries = function (rp) {
|
|
724
|
+
if (rp) {
|
|
725
|
+
if (!this.pointSeries) {
|
|
726
|
+
this.pointSeries = new XyPointSeriesResampled_1.XyPointSeriesResampled(this.webAssemblyContext, rp.xVisibleRange);
|
|
727
|
+
}
|
|
728
|
+
else {
|
|
729
|
+
this.pointSeries.xRange = rp.xVisibleRange;
|
|
730
|
+
}
|
|
731
|
+
this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext, rp, this.dataSeries.getNativeXValues(), this.dataSeries.getNativeYValues(), this.pointSeries.intIndexes, this.pointSeries.xValues, this.pointSeries.yValues, false);
|
|
732
|
+
if (rp.isCategoryAxis) {
|
|
733
|
+
this.pointSeries.updateIndexes();
|
|
734
|
+
}
|
|
735
|
+
this.pointSeries.clearIntIndexes();
|
|
736
|
+
// this.pointSeries.debugOutputForUnitTests();
|
|
737
|
+
return this.pointSeries;
|
|
738
|
+
}
|
|
739
|
+
else {
|
|
740
|
+
return new XyPointSeriesWrapped_1.XyPointSeriesWrapped(this.dataSeries);
|
|
741
|
+
}
|
|
742
|
+
};
|
|
743
|
+
/** @inheritDoc */
|
|
744
|
+
BaseRenderableSeries.prototype.getIndicesRange = function (xRange, isCategoryData) {
|
|
745
|
+
var _a;
|
|
746
|
+
if (isCategoryData === void 0) { isCategoryData = false; }
|
|
747
|
+
return (_a = this.dataSeries) === null || _a === void 0 ? void 0 : _a.getIndicesRange(xRange, isCategoryData);
|
|
748
|
+
};
|
|
749
|
+
/** @inheritDoc */
|
|
750
|
+
BaseRenderableSeries.prototype.getCurrentRenderPassData = function () {
|
|
751
|
+
return this.currentRenderPassData;
|
|
752
|
+
};
|
|
753
|
+
Object.defineProperty(BaseRenderableSeries.prototype, "supportsResampling", {
|
|
754
|
+
/** @inheritDoc */
|
|
755
|
+
get: function () {
|
|
756
|
+
var seriesTypeSupportsResampling = ![
|
|
757
|
+
SeriesType_1.ESeriesType.UniformContoursSeries,
|
|
758
|
+
SeriesType_1.ESeriesType.UniformHeatmapSeries,
|
|
759
|
+
SeriesType_1.ESeriesType.ScatterSeries
|
|
760
|
+
].includes(this.type);
|
|
761
|
+
return (seriesTypeSupportsResampling &&
|
|
762
|
+
SciChartDefaults_1.SciChartDefaults.enableResampling &&
|
|
763
|
+
this.enableDrawingOptimisations &&
|
|
764
|
+
this.dataSeries &&
|
|
765
|
+
this.dataSeries.count() > 0 &&
|
|
766
|
+
this.dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
767
|
+
},
|
|
768
|
+
enumerable: false,
|
|
769
|
+
configurable: true
|
|
770
|
+
});
|
|
771
|
+
/**
|
|
772
|
+
* Used internally to check if resampling is needed for the renderable series
|
|
773
|
+
* @protected
|
|
774
|
+
*/
|
|
775
|
+
BaseRenderableSeries.prototype.needsResampling = function (rp) {
|
|
776
|
+
return this.resamplerHelper.needsResampling(rp, this.getNativeXValues());
|
|
777
|
+
};
|
|
681
778
|
/**
|
|
682
779
|
* Sets initial and end animation vectors
|
|
683
780
|
* @param animation
|
|
@@ -745,6 +842,17 @@ var BaseRenderableSeries = /** @class */ (function () {
|
|
|
745
842
|
BaseRenderableSeries.prototype.valueChanged = function (oldValue, newValue) {
|
|
746
843
|
return oldValue !== newValue;
|
|
747
844
|
};
|
|
845
|
+
BaseRenderableSeries.prototype.setPaletteProvider = function (paletteProvider) {
|
|
846
|
+
var _a, _b;
|
|
847
|
+
if ((_a = this.paletteProviderProperty) === null || _a === void 0 ? void 0 : _a.onDetached) {
|
|
848
|
+
this.paletteProviderProperty.onDetached();
|
|
849
|
+
}
|
|
850
|
+
this.paletteProviderProperty = paletteProvider;
|
|
851
|
+
if ((_b = this.paletteProviderProperty) === null || _b === void 0 ? void 0 : _b.onAttached) {
|
|
852
|
+
this.paletteProviderProperty.onAttached(this);
|
|
853
|
+
}
|
|
854
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.PALETTE_PROVIDER);
|
|
855
|
+
};
|
|
748
856
|
BaseRenderableSeries.prototype.invalidateParent = function () {
|
|
749
857
|
if (this.invalidateParentCallback) {
|
|
750
858
|
this.invalidateParentCallback();
|