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
|
@@ -4,11 +4,14 @@ import { EventHandler } from "../../../Core/EventHandler";
|
|
|
4
4
|
import { NumberRange } from "../../../Core/NumberRange";
|
|
5
5
|
import { ObservableArray } from "../../../Core/ObservableArray";
|
|
6
6
|
import { ESeriesType } from "../../../types/SeriesType";
|
|
7
|
-
import {
|
|
7
|
+
import { SCRTDoubleVector, TSciChart } from "../../../types/TSciChart";
|
|
8
8
|
import { ELineDrawMode, WebGlRenderContext2D } from "../../Drawing/WebGlRenderContext2D";
|
|
9
9
|
import { SeriesInfo } from "../../Model/ChartData/SeriesInfo";
|
|
10
10
|
import { IDataSeries } from "../../Model/IDataSeries";
|
|
11
11
|
import { IPaletteProvider } from "../../Model/IPaletteProvider";
|
|
12
|
+
import { IPointSeries } from "../../Model/PointSeries/IPointSeries";
|
|
13
|
+
import { EResamplingMode } from "../../Numerics/Resamplers/ResamplingMode";
|
|
14
|
+
import { ResamplingParams } from "../../Numerics/Resamplers/ResamplingParams";
|
|
12
15
|
import { RenderPassData } from "../../Services/RenderPassData";
|
|
13
16
|
import { IThemeProvider } from "../../Themes/IThemeProvider";
|
|
14
17
|
import { AxisCore } from "../Axis/AxisCore";
|
|
@@ -54,22 +57,32 @@ export interface IBaseStackedCollectionOptions {
|
|
|
54
57
|
* Concrete types are {@link StackedColumnCollection} and {@link StackedMountainCollection}
|
|
55
58
|
*/
|
|
56
59
|
export declare abstract class BaseStackedCollection<T extends BaseStackedRenderableSeries> extends ObservableArray<T> implements IRenderableSeries {
|
|
60
|
+
/** @inheritDoc */
|
|
57
61
|
abstract readonly type: ESeriesType;
|
|
62
|
+
/** @inheritDoc */
|
|
58
63
|
readonly id: string;
|
|
64
|
+
/** @inheritDoc */
|
|
59
65
|
readonly isStacked = true;
|
|
66
|
+
/** @inheritDoc */
|
|
67
|
+
readonly supportsResampling = false;
|
|
68
|
+
/** @inheritDoc */
|
|
60
69
|
readonly isSpline = false;
|
|
70
|
+
/** @inheritDoc */
|
|
61
71
|
parentSurface: SciChartSurface;
|
|
72
|
+
/** @inheritDoc */
|
|
62
73
|
invalidateParentCallback: () => void;
|
|
63
74
|
/**
|
|
64
75
|
* the accumulated values which are used to draw each column/band for {@link BaseStackedRenderableSeries}
|
|
65
76
|
*/
|
|
66
|
-
accumulatedValues0:
|
|
77
|
+
accumulatedValues0: SCRTDoubleVector;
|
|
78
|
+
/** @inheritDoc */
|
|
79
|
+
enableDrawingOptimisations: boolean;
|
|
67
80
|
/**
|
|
68
81
|
* The {@link TSciChart | SciChart WebAssembly Context} containing
|
|
69
82
|
* native methods and access to our WebGL2 WebAssembly Drawing Engine
|
|
70
83
|
*/
|
|
71
84
|
protected webAssemblyContext: TSciChart;
|
|
72
|
-
protected accumulatedFinalAnimationValues0:
|
|
85
|
+
protected accumulatedFinalAnimationValues0: SCRTDoubleVector;
|
|
73
86
|
protected isAccumulatedVectorDirty: boolean;
|
|
74
87
|
protected firstAnimationRender: boolean;
|
|
75
88
|
protected animationFSM: SeriesAnimationFiniteStateMachine;
|
|
@@ -82,6 +95,7 @@ export declare abstract class BaseStackedCollection<T extends BaseStackedRendera
|
|
|
82
95
|
* Creates an instance of the {@link BaseStackedCollection}
|
|
83
96
|
* @param webAssemblyContext The {@link TSciChart | SciChart WebAssembly Context} containing
|
|
84
97
|
* native methods and access to our WebGL2 WebAssembly Drawing Engine
|
|
98
|
+
* @param options Optional parameters of type {@link IBaseStackedCollectionOptions} to configure the series
|
|
85
99
|
*/
|
|
86
100
|
protected constructor(webAssemblyContext: TSciChart, options?: IBaseStackedCollectionOptions);
|
|
87
101
|
/** @inheritDoc */
|
|
@@ -222,6 +236,18 @@ export declare abstract class BaseStackedCollection<T extends BaseStackedRendera
|
|
|
222
236
|
* rolloverModifierProps1() is not supported for BaseStackedCollection
|
|
223
237
|
*/
|
|
224
238
|
get rolloverModifierProps1(): RolloverModifierRenderableSeriesProps;
|
|
239
|
+
/**
|
|
240
|
+
* resamplingMode property is not supported for BaseStackedCollection
|
|
241
|
+
*/
|
|
242
|
+
get resamplingMode(): EResamplingMode;
|
|
243
|
+
set resamplingMode(value: EResamplingMode);
|
|
244
|
+
/**
|
|
245
|
+
* resamplingPrecision property is not supported for BaseStackedCollection
|
|
246
|
+
*/
|
|
247
|
+
get resamplingPrecision(): number;
|
|
248
|
+
set resamplingPrecision(value: number);
|
|
249
|
+
/** @inheritDoc */
|
|
250
|
+
getIndicesRange(xRange: NumberRange): NumberRange;
|
|
225
251
|
protected get canDraw(): boolean;
|
|
226
252
|
/** @inheritDoc */
|
|
227
253
|
pushPalettedColors?(color: number, palettingState: TPalettingState): void;
|
|
@@ -244,7 +270,7 @@ export declare abstract class BaseStackedCollection<T extends BaseStackedRendera
|
|
|
244
270
|
/** @inheritDoc */
|
|
245
271
|
getDataSeriesValuesCount(): number;
|
|
246
272
|
/** @inheritDoc */
|
|
247
|
-
getNativeXValues():
|
|
273
|
+
getNativeXValues(): SCRTDoubleVector;
|
|
248
274
|
/** @inheritDoc */
|
|
249
275
|
abstract getXRange(): NumberRange;
|
|
250
276
|
/** @inheritDoc */
|
|
@@ -290,6 +316,12 @@ export declare abstract class BaseStackedCollection<T extends BaseStackedRendera
|
|
|
290
316
|
*/
|
|
291
317
|
checkIsOutOfDataRange(xValue: number, yValue: number): boolean;
|
|
292
318
|
/** @inheritDoc */
|
|
319
|
+
toPointSeries(resamplingParams?: ResamplingParams): IPointSeries;
|
|
320
|
+
/**
|
|
321
|
+
* getCurrentRenderPassData method is not supported for BaseStackedCollection
|
|
322
|
+
*/
|
|
323
|
+
getCurrentRenderPassData(): RenderPassData;
|
|
324
|
+
/** @inheritDoc */
|
|
293
325
|
toJSON(excludeData?: boolean): TSeriesDefinition;
|
|
294
326
|
protected isAllDataSeriesSet(): boolean;
|
|
295
327
|
/**
|
|
@@ -35,13 +35,21 @@ var BaseStackedCollection = /** @class */ (function (_super) {
|
|
|
35
35
|
* Creates an instance of the {@link BaseStackedCollection}
|
|
36
36
|
* @param webAssemblyContext The {@link TSciChart | SciChart WebAssembly Context} containing
|
|
37
37
|
* native methods and access to our WebGL2 WebAssembly Drawing Engine
|
|
38
|
+
* @param options Optional parameters of type {@link IBaseStackedCollectionOptions} to configure the series
|
|
38
39
|
*/
|
|
39
40
|
function BaseStackedCollection(webAssemblyContext, options) {
|
|
40
41
|
var _a, _b, _c, _d;
|
|
41
42
|
var _this = _super.call(this) || this;
|
|
43
|
+
/** @inheritDoc */
|
|
42
44
|
_this.id = (0, guid_1.generateGuid)();
|
|
45
|
+
/** @inheritDoc */
|
|
43
46
|
_this.isStacked = true;
|
|
47
|
+
/** @inheritDoc */
|
|
48
|
+
_this.supportsResampling = false;
|
|
49
|
+
/** @inheritDoc */
|
|
44
50
|
_this.isSpline = false;
|
|
51
|
+
/** @inheritDoc */
|
|
52
|
+
_this.enableDrawingOptimisations = true;
|
|
45
53
|
_this.isAccumulatedVectorDirty = true;
|
|
46
54
|
_this.firstAnimationRender = false;
|
|
47
55
|
_this.isVisibleProperty = true;
|
|
@@ -60,8 +68,8 @@ var BaseStackedCollection = /** @class */ (function (_super) {
|
|
|
60
68
|
_this.beforeAnimationStart = _this.beforeAnimationStart.bind(_this);
|
|
61
69
|
_this.afterAnimationComplete = _this.afterAnimationComplete.bind(_this);
|
|
62
70
|
_this.updateAnimationProperties = _this.updateAnimationProperties.bind(_this);
|
|
63
|
-
_this.accumulatedValues0 = new _this.webAssemblyContext.
|
|
64
|
-
_this.accumulatedFinalAnimationValues0 = new _this.webAssemblyContext.
|
|
71
|
+
_this.accumulatedValues0 = new _this.webAssemblyContext.SCRTDoubleVector();
|
|
72
|
+
_this.accumulatedFinalAnimationValues0 = new _this.webAssemblyContext.SCRTDoubleVector();
|
|
65
73
|
return _this;
|
|
66
74
|
}
|
|
67
75
|
Object.defineProperty(BaseStackedCollection.prototype, "selected", {
|
|
@@ -386,6 +394,36 @@ var BaseStackedCollection = /** @class */ (function (_super) {
|
|
|
386
394
|
enumerable: false,
|
|
387
395
|
configurable: true
|
|
388
396
|
});
|
|
397
|
+
Object.defineProperty(BaseStackedCollection.prototype, "resamplingMode", {
|
|
398
|
+
/**
|
|
399
|
+
* resamplingMode property is not supported for BaseStackedCollection
|
|
400
|
+
*/
|
|
401
|
+
get: function () {
|
|
402
|
+
throw Error("resamplingMode property is not supported for BaseStackedCollection");
|
|
403
|
+
},
|
|
404
|
+
set: function (value) {
|
|
405
|
+
throw Error("resamplingMode property is not supported for BaseStackedCollection");
|
|
406
|
+
},
|
|
407
|
+
enumerable: false,
|
|
408
|
+
configurable: true
|
|
409
|
+
});
|
|
410
|
+
Object.defineProperty(BaseStackedCollection.prototype, "resamplingPrecision", {
|
|
411
|
+
/**
|
|
412
|
+
* resamplingPrecision property is not supported for BaseStackedCollection
|
|
413
|
+
*/
|
|
414
|
+
get: function () {
|
|
415
|
+
throw Error("resamplingPrecision property is not supported for BaseStackedCollection");
|
|
416
|
+
},
|
|
417
|
+
set: function (value) {
|
|
418
|
+
throw Error("resamplingPrecision property is not supported for BaseStackedCollection");
|
|
419
|
+
},
|
|
420
|
+
enumerable: false,
|
|
421
|
+
configurable: true
|
|
422
|
+
});
|
|
423
|
+
/** @inheritDoc */
|
|
424
|
+
BaseStackedCollection.prototype.getIndicesRange = function (xRange) {
|
|
425
|
+
throw Error("getIndicesRange() method is not supported for BaseStackedCollection");
|
|
426
|
+
};
|
|
389
427
|
Object.defineProperty(BaseStackedCollection.prototype, "canDraw", {
|
|
390
428
|
get: function () {
|
|
391
429
|
return animationHelpers_1.animationHelpers.checkCanDraw(this.animationFSM);
|
|
@@ -561,6 +599,17 @@ var BaseStackedCollection = /** @class */ (function (_super) {
|
|
|
561
599
|
throw Error("checkIsOutOfDataRange() method is not supported for BaseStackedCollection");
|
|
562
600
|
};
|
|
563
601
|
/** @inheritDoc */
|
|
602
|
+
BaseStackedCollection.prototype.toPointSeries = function (resamplingParams) {
|
|
603
|
+
// not used for BaseStackedCollection
|
|
604
|
+
return undefined;
|
|
605
|
+
};
|
|
606
|
+
/**
|
|
607
|
+
* getCurrentRenderPassData method is not supported for BaseStackedCollection
|
|
608
|
+
*/
|
|
609
|
+
BaseStackedCollection.prototype.getCurrentRenderPassData = function () {
|
|
610
|
+
throw Error("getCurrentRenderPassData method is not supported for BaseStackedCollection");
|
|
611
|
+
};
|
|
612
|
+
/** @inheritDoc */
|
|
564
613
|
BaseStackedCollection.prototype.toJSON = function (excludeData) {
|
|
565
614
|
if (excludeData === void 0) { excludeData = false; }
|
|
566
615
|
var series = [];
|
|
@@ -577,7 +626,6 @@ var BaseStackedCollection = /** @class */ (function (_super) {
|
|
|
577
626
|
// @ts-ignore
|
|
578
627
|
return { type: this.type, series: series, options: options };
|
|
579
628
|
};
|
|
580
|
-
// Un-Supported PROPERTIES END
|
|
581
629
|
BaseStackedCollection.prototype.isAllDataSeriesSet = function () {
|
|
582
630
|
var isDataSeriesSet = true;
|
|
583
631
|
this.asArray().forEach(function (el) {
|
|
@@ -3,11 +3,14 @@ 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 { EResamplingMode } from "../../Numerics/Resamplers/ResamplingMode";
|
|
13
|
+
import { ResamplingParams } from "../../Numerics/Resamplers/ResamplingParams";
|
|
11
14
|
import { RenderPassData } from "../../Services/RenderPassData";
|
|
12
15
|
import { IThemeProvider } from "../../Themes/IThemeProvider";
|
|
13
16
|
import { AxisCore } from "../Axis/AxisCore";
|
|
@@ -46,9 +49,15 @@ export interface IBasedStackedRenderableSeriesOptions {
|
|
|
46
49
|
* details on how to implement stacked column and mountain charts in SciChart
|
|
47
50
|
*/
|
|
48
51
|
export declare abstract class BaseStackedRenderableSeries implements IRenderableSeries {
|
|
52
|
+
/** @inheritDoc */
|
|
49
53
|
abstract readonly type: ESeriesType;
|
|
54
|
+
/** @inheritDoc */
|
|
50
55
|
readonly id: string;
|
|
56
|
+
/** @inheritDoc */
|
|
51
57
|
readonly isStacked: boolean;
|
|
58
|
+
/** @inheritDoc */
|
|
59
|
+
readonly supportsResampling = false;
|
|
60
|
+
/** @inheritDoc */
|
|
52
61
|
readonly isSpline: boolean;
|
|
53
62
|
readonly rolloverModifierProps: RolloverModifierRenderableSeriesProps;
|
|
54
63
|
/** @inheritDoc */
|
|
@@ -59,8 +68,12 @@ export declare abstract class BaseStackedRenderableSeries implements IRenderable
|
|
|
59
68
|
/**
|
|
60
69
|
* the accumulated values which are used to draw each column/band for {@link BaseStackedRenderableSeries}
|
|
61
70
|
*/
|
|
62
|
-
accumulatedValues:
|
|
63
|
-
|
|
71
|
+
accumulatedValues: SCRTDoubleVector;
|
|
72
|
+
/**
|
|
73
|
+
* When true, enables drawing optimizations on the series for extra performance
|
|
74
|
+
*/
|
|
75
|
+
enableDrawingOptimisations: boolean;
|
|
76
|
+
protected accumulatedFinalAnimationValues: SCRTDoubleVector;
|
|
64
77
|
protected webAssemblyContext: TSciChart;
|
|
65
78
|
protected parentCollection: BaseStackedCollection<BaseStackedRenderableSeries>;
|
|
66
79
|
protected notifyParentPropertyChangedFn: (propertyName: string) => void;
|
|
@@ -114,7 +127,7 @@ export declare abstract class BaseStackedRenderableSeries implements IRenderable
|
|
|
114
127
|
/**
|
|
115
128
|
* @inheritDoc
|
|
116
129
|
*/
|
|
117
|
-
getNativeXValues():
|
|
130
|
+
getNativeXValues(): SCRTDoubleVector;
|
|
118
131
|
/**
|
|
119
132
|
* Called when the {@link BaseStackedRenderableSeries} is detached from its parent {@link BaseStackedCollection}
|
|
120
133
|
*/
|
|
@@ -193,6 +206,18 @@ export declare abstract class BaseStackedRenderableSeries implements IRenderable
|
|
|
193
206
|
* animation() is not supported for BaseStackedRenderableSeries
|
|
194
207
|
*/
|
|
195
208
|
get animation(): SeriesAnimation;
|
|
209
|
+
/** @inheritDoc */
|
|
210
|
+
getIndicesRange(xRange: NumberRange): NumberRange;
|
|
211
|
+
/**
|
|
212
|
+
* resamplingMode property is not supported for BaseStackedRenderableSeries
|
|
213
|
+
*/
|
|
214
|
+
get resamplingMode(): EResamplingMode;
|
|
215
|
+
set resamplingMode(value: EResamplingMode);
|
|
216
|
+
/**
|
|
217
|
+
* resamplingPrecision property is not supported for BaseStackedRenderableSeries
|
|
218
|
+
*/
|
|
219
|
+
get resamplingPrecision(): number;
|
|
220
|
+
set resamplingPrecision(value: number);
|
|
196
221
|
/**
|
|
197
222
|
* @inheritDoc
|
|
198
223
|
*/
|
|
@@ -286,6 +311,15 @@ export declare abstract class BaseStackedRenderableSeries implements IRenderable
|
|
|
286
311
|
getSeriesInfo(hitTestInfo: HitTestInfo): SeriesInfo;
|
|
287
312
|
/** @inheritDoc */
|
|
288
313
|
toJSON(excludeData?: boolean): TSeriesDefinition;
|
|
314
|
+
/**
|
|
315
|
+
* toPointSeries method is not supported for BaseStackedRenderableSeries
|
|
316
|
+
* @param resamplingParams
|
|
317
|
+
*/
|
|
318
|
+
toPointSeries(resamplingParams?: ResamplingParams): IPointSeries;
|
|
319
|
+
/**
|
|
320
|
+
* getCurrentRenderPassData method is not supported for BaseStackedRenderableSeries
|
|
321
|
+
*/
|
|
322
|
+
getCurrentRenderPassData(): RenderPassData;
|
|
289
323
|
/**
|
|
290
324
|
* drawingProviders property is not supported for BaseStackedRenderableSeries
|
|
291
325
|
* instead set on the {@link StackedColumnCollection} or {@link StackedMountainCollection}
|
|
@@ -26,14 +26,23 @@ var BaseStackedRenderableSeries = /** @class */ (function () {
|
|
|
26
26
|
*/
|
|
27
27
|
function BaseStackedRenderableSeries(webAssemblyContext, options) {
|
|
28
28
|
var _a, _b;
|
|
29
|
+
/** @inheritDoc */
|
|
29
30
|
this.id = (0, guid_1.generateGuid)();
|
|
31
|
+
/** @inheritDoc */
|
|
30
32
|
this.isStacked = true;
|
|
33
|
+
/** @inheritDoc */
|
|
34
|
+
this.supportsResampling = false;
|
|
35
|
+
/** @inheritDoc */
|
|
31
36
|
this.isSpline = false;
|
|
32
37
|
this.rolloverModifierProps = new RolloverModifierRenderableSeriesProps_1.RolloverModifierRenderableSeriesProps(this);
|
|
33
38
|
/** @inheritDoc */
|
|
34
39
|
this.selected = new EventHandler_1.EventHandler();
|
|
35
40
|
/** @inheritDoc */
|
|
36
41
|
this.hovered = new EventHandler_1.EventHandler();
|
|
42
|
+
/**
|
|
43
|
+
* When true, enables drawing optimizations on the series for extra performance
|
|
44
|
+
*/
|
|
45
|
+
this.enableDrawingOptimisations = true;
|
|
37
46
|
this.drawNaNAsProperty = WebGlRenderContext2D_1.ELineDrawMode.DiscontinuousLine;
|
|
38
47
|
this.isVisibleProperty = true;
|
|
39
48
|
this.strokeThicknessProperty = 2;
|
|
@@ -44,8 +53,8 @@ var BaseStackedRenderableSeries = /** @class */ (function () {
|
|
|
44
53
|
this.isHoveredProperty = false;
|
|
45
54
|
this.notifyDataSeriesChanged = this.notifyDataSeriesChanged.bind(this);
|
|
46
55
|
this.notifyPointMarkerChanged = this.notifyPointMarkerChanged.bind(this);
|
|
47
|
-
this.accumulatedValues = new webAssemblyContext.
|
|
48
|
-
this.accumulatedFinalAnimationValues = new webAssemblyContext.
|
|
56
|
+
this.accumulatedValues = new webAssemblyContext.SCRTDoubleVector();
|
|
57
|
+
this.accumulatedFinalAnimationValues = new webAssemblyContext.SCRTDoubleVector();
|
|
49
58
|
this.dataSeries = (_a = options === null || options === void 0 ? void 0 : options.dataSeries) !== null && _a !== void 0 ? _a : this.dataSeriesProperty;
|
|
50
59
|
this.opacityProperty = (_b = options === null || options === void 0 ? void 0 : options.opacity) !== null && _b !== void 0 ? _b : 1;
|
|
51
60
|
this.webAssemblyContext = webAssemblyContext;
|
|
@@ -266,6 +275,36 @@ var BaseStackedRenderableSeries = /** @class */ (function () {
|
|
|
266
275
|
enumerable: false,
|
|
267
276
|
configurable: true
|
|
268
277
|
});
|
|
278
|
+
/** @inheritDoc */
|
|
279
|
+
BaseStackedRenderableSeries.prototype.getIndicesRange = function (xRange) {
|
|
280
|
+
throw Error("getIndicesRange() method is not supported for BaseStackedRenderableSeries");
|
|
281
|
+
};
|
|
282
|
+
Object.defineProperty(BaseStackedRenderableSeries.prototype, "resamplingMode", {
|
|
283
|
+
/**
|
|
284
|
+
* resamplingMode property is not supported for BaseStackedRenderableSeries
|
|
285
|
+
*/
|
|
286
|
+
get: function () {
|
|
287
|
+
throw Error("resamplingMode property is not supported for BaseStackedRenderableSeries");
|
|
288
|
+
},
|
|
289
|
+
set: function (value) {
|
|
290
|
+
throw Error("resamplingMode property is not supported for BaseStackedRenderableSeries");
|
|
291
|
+
},
|
|
292
|
+
enumerable: false,
|
|
293
|
+
configurable: true
|
|
294
|
+
});
|
|
295
|
+
Object.defineProperty(BaseStackedRenderableSeries.prototype, "resamplingPrecision", {
|
|
296
|
+
/**
|
|
297
|
+
* resamplingPrecision property is not supported for BaseStackedRenderableSeries
|
|
298
|
+
*/
|
|
299
|
+
get: function () {
|
|
300
|
+
throw Error("resamplingPrecision property is not supported for BaseStackedRenderableSeries");
|
|
301
|
+
},
|
|
302
|
+
set: function (value) {
|
|
303
|
+
throw Error("resamplingPrecision property is not supported for BaseStackedRenderableSeries");
|
|
304
|
+
},
|
|
305
|
+
enumerable: false,
|
|
306
|
+
configurable: true
|
|
307
|
+
});
|
|
269
308
|
Object.defineProperty(BaseStackedRenderableSeries.prototype, "parentSurface", {
|
|
270
309
|
// NOT SUPPORTED METHODS END
|
|
271
310
|
/**
|
|
@@ -497,8 +536,20 @@ var BaseStackedRenderableSeries = /** @class */ (function () {
|
|
|
497
536
|
return { type: this.type, options: options };
|
|
498
537
|
}
|
|
499
538
|
};
|
|
539
|
+
/**
|
|
540
|
+
* toPointSeries method is not supported for BaseStackedRenderableSeries
|
|
541
|
+
* @param resamplingParams
|
|
542
|
+
*/
|
|
543
|
+
BaseStackedRenderableSeries.prototype.toPointSeries = function (resamplingParams) {
|
|
544
|
+
throw Error("toPointSeries method is not supported for BaseStackedRenderableSeries");
|
|
545
|
+
};
|
|
546
|
+
/**
|
|
547
|
+
* getCurrentRenderPassData method is not supported for BaseStackedRenderableSeries
|
|
548
|
+
*/
|
|
549
|
+
BaseStackedRenderableSeries.prototype.getCurrentRenderPassData = function () {
|
|
550
|
+
throw Error("getCurrentRenderPassData method is not supported for BaseStackedRenderableSeries");
|
|
551
|
+
};
|
|
500
552
|
Object.defineProperty(BaseStackedRenderableSeries.prototype, "drawingProviders", {
|
|
501
|
-
// NOT SUPPORTED PROPERTIES BEGIN
|
|
502
553
|
/**
|
|
503
554
|
* drawingProviders property is not supported for BaseStackedRenderableSeries
|
|
504
555
|
* instead set on the {@link StackedColumnCollection} or {@link StackedMountainCollection}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TSciChart } from "../../../../types/TSciChart";
|
|
2
2
|
import { WebGlRenderContext2D } from "../../../Drawing/WebGlRenderContext2D";
|
|
3
3
|
import { RenderPassData } from "../../../Services/RenderPassData";
|
|
4
|
+
import { TDpiChangedEventArgs } from "../../TextureManager/DpiHelper";
|
|
4
5
|
import { BaseBandRenderableSeries } from "../BaseBandRenderableSeries";
|
|
5
6
|
import { BaseSeriesDrawingProvider } from "./BaseSeriesDrawingProvider";
|
|
6
|
-
import { TDpiChangedEventArgs } from "../../TextureManager/DpiHelper";
|
|
7
7
|
/**
|
|
8
8
|
* Used internally - a drawing provider performs drawing for a {@link BaseBandRenderableSeries} using
|
|
9
9
|
* our WebAssembly WebGL rendering engine
|
|
@@ -18,8 +18,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.BandSeriesDrawingProvider = void 0;
|
|
19
19
|
var Deleter_1 = require("../../../../Core/Deleter");
|
|
20
20
|
var SeriesType_1 = require("../../../../types/SeriesType");
|
|
21
|
-
var Pen2DCache_1 = require("../../../Drawing/Pen2DCache");
|
|
22
21
|
var BrushCache_1 = require("../../../Drawing/BrushCache");
|
|
22
|
+
var Pen2DCache_1 = require("../../../Drawing/Pen2DCache");
|
|
23
23
|
var WebGlRenderContext2D_1 = require("../../../Drawing/WebGlRenderContext2D");
|
|
24
24
|
var constants_1 = require("../constants");
|
|
25
25
|
var BaseSeriesDrawingProvider_1 = require("./BaseSeriesDrawingProvider");
|
|
@@ -78,11 +78,12 @@ var BandSeriesDrawingProvider = /** @class */ (function (_super) {
|
|
|
78
78
|
*/
|
|
79
79
|
BandSeriesDrawingProvider.prototype.draw = function (renderContext, renderPassData) {
|
|
80
80
|
var _a;
|
|
81
|
-
var
|
|
81
|
+
var pointSeries = renderPassData.pointSeries;
|
|
82
|
+
var containsNaN = this.parentSeries.dataSeries.dataDistributionCalculator.containsNaN;
|
|
82
83
|
var args = new this.webAssemblyContext.SCRTBandDrawingParams();
|
|
83
84
|
args.forceShaderMethod = true;
|
|
84
85
|
args.verticalChart = renderPassData.isVerticalChart;
|
|
85
|
-
args.lineGaps =
|
|
86
|
+
args.lineGaps = containsNaN
|
|
86
87
|
? this.parentSeries.drawNaNAs === WebGlRenderContext2D_1.ELineDrawMode.DiscontinuousLine
|
|
87
88
|
? this.webAssemblyContext.SCRTLineGapMode.DrawGaps
|
|
88
89
|
: this.webAssemblyContext.SCRTLineGapMode.CloseGaps
|
|
@@ -105,10 +106,10 @@ var BandSeriesDrawingProvider = /** @class */ (function (_super) {
|
|
|
105
106
|
args.SetLinesPen1(strokePenY1);
|
|
106
107
|
}
|
|
107
108
|
var isCategoryAxis = renderPassData.xCoordinateCalculator.isCategoryCoordinateCalculator;
|
|
108
|
-
var xValues =
|
|
109
|
-
var xDrawValues = isCategoryAxis ?
|
|
110
|
-
var yDrawValues =
|
|
111
|
-
var y1DrawValues =
|
|
109
|
+
var xValues = pointSeries.xValues;
|
|
110
|
+
var xDrawValues = isCategoryAxis ? pointSeries.indexes : xValues;
|
|
111
|
+
var yDrawValues = pointSeries.yValues;
|
|
112
|
+
var y1DrawValues = pointSeries.y1Values;
|
|
112
113
|
var isSplineBandSeries = this.parentSeries.type === SeriesType_1.ESeriesType.SplineBandSeries && xValues.size() > 1;
|
|
113
114
|
if (isSplineBandSeries) {
|
|
114
115
|
var splineBandSeries = this.parentSeries;
|
|
@@ -128,14 +129,7 @@ var BandSeriesDrawingProvider = /** @class */ (function (_super) {
|
|
|
128
129
|
}
|
|
129
130
|
args.isSmoothColors = this.palettingState.gradientPaletting;
|
|
130
131
|
var nativeContext = renderContext.getNativeContext();
|
|
131
|
-
var viewRect = this.parentSeries.parentSurface.seriesViewRect;
|
|
132
|
-
nativeContext.PushMatrix();
|
|
133
|
-
nativeContext.PushState();
|
|
134
|
-
nativeContext.Translate(viewRect.x, viewRect.y);
|
|
135
|
-
nativeContext.SetClipRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);
|
|
136
132
|
this.nativeDrawingProvider.DrawPointsVec(nativeContext, xDrawValues, yDrawValues, y1DrawValues, renderPassData.xCoordinateCalculator.nativeCalculator, renderPassData.yCoordinateCalculator.nativeCalculator, args);
|
|
137
|
-
nativeContext.PopMatrix();
|
|
138
|
-
nativeContext.PopState();
|
|
139
133
|
args.delete();
|
|
140
134
|
};
|
|
141
135
|
/**
|
|
@@ -44,6 +44,7 @@ var BaseSeriesDrawingProvider = /** @class */ (function () {
|
|
|
44
44
|
* @returns the new {@link UIntVector} with ARGB colors
|
|
45
45
|
*/
|
|
46
46
|
BaseSeriesDrawingProvider.prototype.applyStrokePaletting = function (strokePen) {
|
|
47
|
+
var _a;
|
|
47
48
|
if (this.parentSeries.hasStrokePaletteProvider()) {
|
|
48
49
|
var strokeColorArgb = (0, colorUtil_1.uintArgbColorMultiplyOpacity)((0, parseColor_1.parseColorToUIntArgb)(this.parentSeries.stroke), this.parentSeries.opacity);
|
|
49
50
|
if (isNaN(strokeColorArgb)) {
|
|
@@ -70,11 +71,11 @@ var BaseSeriesDrawingProvider = /** @class */ (function () {
|
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
else {
|
|
73
|
-
this.palettingState.palettedColors = (0, Deleter_1.deleteSafe)(this.palettingState.palettedColors);
|
|
74
74
|
if (this.palettingState.originalPenColor) {
|
|
75
75
|
strokePen.m_uiColor = this.palettingState.originalPenColor;
|
|
76
76
|
this.palettingState.originalPenColor = undefined;
|
|
77
77
|
}
|
|
78
|
+
(_a = this.palettingState.palettedColors) === null || _a === void 0 ? void 0 : _a.clear();
|
|
78
79
|
}
|
|
79
80
|
// Due to pass-by-pointer limitations of WASM binding, we pass an empty vector rather than null
|
|
80
81
|
if (!this.palettingState.palettedColors) {
|
|
@@ -82,7 +83,7 @@ var BaseSeriesDrawingProvider = /** @class */ (function () {
|
|
|
82
83
|
}
|
|
83
84
|
};
|
|
84
85
|
BaseSeriesDrawingProvider.prototype.applyStrokeFillPaletting = function (stroke, strokePen, fill, fillBrush, opacity, usePalette, resetPenBrushColors) {
|
|
85
|
-
var _a, _b;
|
|
86
|
+
var _a, _b, _c;
|
|
86
87
|
if (usePalette === void 0) { usePalette = false; }
|
|
87
88
|
if (resetPenBrushColors === void 0) { resetPenBrushColors = true; }
|
|
88
89
|
var hasStrokePaletteProvider = this.parentSeries.hasStrokePaletteProvider();
|
|
@@ -165,8 +166,8 @@ var BaseSeriesDrawingProvider = /** @class */ (function () {
|
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
168
|
else {
|
|
168
|
-
this.palettingState.palettedColors = (0, Deleter_1.deleteSafe)(this.palettingState.palettedColors);
|
|
169
169
|
this.palettingState.paletteTextureCache.reset();
|
|
170
|
+
(_c = this.palettingState.palettedColors) === null || _c === void 0 ? void 0 : _c.clear();
|
|
170
171
|
// This was needed for resetPenBrushColors, therefore commented out as well
|
|
171
172
|
// if (strokePen) {
|
|
172
173
|
// if (this.palettingState.originalPenColor) {
|
|
@@ -51,12 +51,12 @@ var BubbleSeriesDrawingProvider = /** @class */ (function (_super) {
|
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
var spriteTexture = pointMarker.getSprite();
|
|
54
|
-
var
|
|
54
|
+
var pointSeries = renderPassData.pointSeries;
|
|
55
55
|
var isCategoryAxis = renderPassData.xCoordinateCalculator.isCategoryCoordinateCalculator;
|
|
56
56
|
var args = new this.webAssemblyContext.SCRTPointDrawingParams();
|
|
57
|
-
var xValues =
|
|
58
|
-
var yValues =
|
|
59
|
-
var zValues =
|
|
57
|
+
var xValues = pointSeries.xValues;
|
|
58
|
+
var yValues = pointSeries.yValues;
|
|
59
|
+
var zValues = pointSeries.zValues;
|
|
60
60
|
args.count = yValues.size();
|
|
61
61
|
args.verticalChart = renderPassData.isVerticalChart;
|
|
62
62
|
args.forceShaderMethod = true;
|
|
@@ -66,7 +66,7 @@ var BubbleSeriesDrawingProvider = /** @class */ (function (_super) {
|
|
|
66
66
|
args.SetPalettedColors(this.palettingState.palettedColors);
|
|
67
67
|
args.zMultiplier = DpiHelper_1.DpiHelper.PIXEL_RATIO;
|
|
68
68
|
var nativeContext = renderContext.getNativeContext();
|
|
69
|
-
this.drawPoints(nativeContext, isCategoryAxis ?
|
|
69
|
+
this.drawPoints(nativeContext, isCategoryAxis ? pointSeries.indexes : xValues, yValues, zValues, renderPassData.xCoordinateCalculator.nativeCalculator, renderPassData.yCoordinateCalculator.nativeCalculator, args, this.parentSeries.parentSurface.seriesViewRect);
|
|
70
70
|
args.delete();
|
|
71
71
|
};
|
|
72
72
|
/**
|
|
@@ -89,13 +89,7 @@ var BubbleSeriesDrawingProvider = /** @class */ (function (_super) {
|
|
|
89
89
|
return false;
|
|
90
90
|
};
|
|
91
91
|
BubbleSeriesDrawingProvider.prototype.drawPoints = function (nativeContext, xValues, yValues, zValues, xCoordCalc, yCoordCalc, args, viewRect) {
|
|
92
|
-
nativeContext.PushMatrix();
|
|
93
|
-
nativeContext.PushState();
|
|
94
|
-
nativeContext.Translate(viewRect.x, viewRect.y);
|
|
95
|
-
nativeContext.SetClipRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);
|
|
96
92
|
this.nativeDrawingProvider.DrawPointsVec(nativeContext, xValues, yValues, zValues, xCoordCalc, yCoordCalc, args);
|
|
97
|
-
nativeContext.PopMatrix();
|
|
98
|
-
nativeContext.PopState();
|
|
99
93
|
};
|
|
100
94
|
return BubbleSeriesDrawingProvider;
|
|
101
95
|
}(BaseSeriesDrawingProvider_1.BaseSeriesDrawingProvider));
|
|
@@ -11,6 +11,7 @@ import { BaseSeriesDrawingProvider } from "./BaseSeriesDrawingProvider";
|
|
|
11
11
|
export declare class ColumnSeriesDrawingProvider extends BaseSeriesDrawingProvider<FastColumnRenderableSeries> {
|
|
12
12
|
private nativeDrawingProvider;
|
|
13
13
|
private strokePenCache;
|
|
14
|
+
private strokePenFillColoredCache;
|
|
14
15
|
private fillBrushCache;
|
|
15
16
|
/**
|
|
16
17
|
* Creates an instance of the {@link ColumnSeriesDrawingProvider}
|
|
@@ -37,9 +37,14 @@ var ColumnSeriesDrawingProvider = /** @class */ (function (_super) {
|
|
|
37
37
|
var _this = _super.call(this, webAssemblyContext, parentSeries) || this;
|
|
38
38
|
_this.nativeDrawingProvider = new webAssemblyContext.SCRTColumnSeriesDrawingProvider();
|
|
39
39
|
_this.strokePenCache = new Pen2DCache_1.Pen2DCache(webAssemblyContext);
|
|
40
|
+
_this.strokePenFillColoredCache = new Pen2DCache_1.Pen2DCache(webAssemblyContext);
|
|
40
41
|
_this.fillBrushCache = new BrushCache_1.BrushCache(webAssemblyContext);
|
|
41
42
|
var _a = _this.parentSeries, stroke = _a.stroke, strokeThickness = _a.strokeThickness, fill = _a.fill, opacity = _a.opacity;
|
|
42
43
|
(0, Pen2DCache_1.createPenInCache)(_this.strokePenCache, stroke, strokeThickness, opacity);
|
|
44
|
+
// the pen is used to fix a bug when columns disappear when zooming out with zero stroke thickness
|
|
45
|
+
if (strokeThickness === 0) {
|
|
46
|
+
(0, Pen2DCache_1.createPenInCache)(_this.strokePenFillColoredCache, fill, 1, opacity);
|
|
47
|
+
}
|
|
43
48
|
(0, BrushCache_1.createBrushInCache)(_this.fillBrushCache, fill, opacity);
|
|
44
49
|
return _this;
|
|
45
50
|
}
|
|
@@ -49,6 +54,7 @@ var ColumnSeriesDrawingProvider = /** @class */ (function (_super) {
|
|
|
49
54
|
ColumnSeriesDrawingProvider.prototype.delete = function () {
|
|
50
55
|
this.nativeDrawingProvider = (0, Deleter_1.deleteSafe)(this.nativeDrawingProvider);
|
|
51
56
|
this.strokePenCache = (0, Deleter_1.deleteSafe)(this.strokePenCache);
|
|
57
|
+
this.strokePenFillColoredCache = (0, Deleter_1.deleteSafe)(this.strokePenFillColoredCache);
|
|
52
58
|
this.fillBrushCache = (0, Deleter_1.deleteSafe)(this.fillBrushCache);
|
|
53
59
|
_super.prototype.delete.call(this);
|
|
54
60
|
};
|
|
@@ -56,39 +62,39 @@ var ColumnSeriesDrawingProvider = /** @class */ (function (_super) {
|
|
|
56
62
|
* @inheritDoc
|
|
57
63
|
*/
|
|
58
64
|
ColumnSeriesDrawingProvider.prototype.draw = function (renderContext, renderPassData) {
|
|
59
|
-
|
|
60
|
-
var dataSeries = this.parentSeries.dataSeries;
|
|
65
|
+
var pointSeries = renderPassData.pointSeries;
|
|
61
66
|
var viewRect = this.parentSeries.parentSurface.seriesViewRect;
|
|
67
|
+
var strokeThickness = this.parentSeries.strokeThickness;
|
|
62
68
|
var args = new this.webAssemblyContext.SCRTColumnDrawingParams();
|
|
63
69
|
args.forceShaderMethod = true;
|
|
64
70
|
args.verticalChart = renderPassData.isVerticalChart;
|
|
65
71
|
args.zeroLineY = this.parentSeries.zeroLineY;
|
|
66
72
|
args.columnWidth = this.parentSeries.getDataPointWidth(renderPassData.xCoordinateCalculator, this.parentSeries.dataPointWidth);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (
|
|
71
|
-
|
|
73
|
+
var strokePenCache = this.strokePenCache;
|
|
74
|
+
// ISSUE: If the strokeThickness property is not provided,
|
|
75
|
+
// the fill will be disappeared with large zoom (when the column width will be small or zero)
|
|
76
|
+
if (args.columnWidth === 0 && strokeThickness === 0) {
|
|
77
|
+
strokePenCache = this.strokePenFillColoredCache;
|
|
72
78
|
}
|
|
73
|
-
var linesPen = (0, Pen2DCache_1.getScrtPenFromCache)(
|
|
79
|
+
var linesPen = (0, Pen2DCache_1.getScrtPenFromCache)(strokePenCache);
|
|
74
80
|
if (linesPen) {
|
|
75
81
|
args.SetLinesPen(linesPen);
|
|
76
82
|
}
|
|
83
|
+
var fillBrush = (0, BrushCache_1.getScrtBrushFromCache)(this.fillBrushCache);
|
|
84
|
+
if (fillBrush) {
|
|
85
|
+
args.SetFillBrush(fillBrush);
|
|
86
|
+
}
|
|
87
|
+
args.viewportWidth = viewRect.width;
|
|
88
|
+
args.viewportHeight = viewRect.height;
|
|
77
89
|
// Paletting per point
|
|
78
90
|
_super.prototype.applyStrokeFillPaletting.call(this, this.parentSeries.stroke, linesPen, this.parentSeries.fill, fillBrush, this.parentSeries.opacity);
|
|
79
91
|
args.SetPalettedColors(this.palettingState.palettedColors);
|
|
80
92
|
var isCategoryAxis = renderPassData.xCoordinateCalculator.isCategoryCoordinateCalculator;
|
|
81
|
-
var xValues =
|
|
82
|
-
var yValues =
|
|
93
|
+
var xValues = pointSeries.xValues;
|
|
94
|
+
var yValues = pointSeries.yValues;
|
|
83
95
|
args.count = yValues.size();
|
|
84
96
|
var nativeContext = renderContext.getNativeContext();
|
|
85
|
-
nativeContext.
|
|
86
|
-
nativeContext.PushState();
|
|
87
|
-
nativeContext.Translate(viewRect.x, viewRect.y);
|
|
88
|
-
nativeContext.SetClipRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);
|
|
89
|
-
this.nativeDrawingProvider.DrawPointsVec(nativeContext, isCategoryAxis ? dataSeries.getNativeIndexes() : xValues, yValues, renderPassData.xCoordinateCalculator.nativeCalculator, renderPassData.yCoordinateCalculator.nativeCalculator, args);
|
|
90
|
-
nativeContext.PopMatrix();
|
|
91
|
-
nativeContext.PopState();
|
|
97
|
+
this.nativeDrawingProvider.DrawPointsVec(nativeContext, isCategoryAxis ? pointSeries.indexes : xValues, yValues, renderPassData.xCoordinateCalculator.nativeCalculator, renderPassData.yCoordinateCalculator.nativeCalculator, args);
|
|
92
98
|
args.delete();
|
|
93
99
|
};
|
|
94
100
|
/**
|
|
@@ -103,16 +109,22 @@ var ColumnSeriesDrawingProvider = /** @class */ (function (_super) {
|
|
|
103
109
|
*/
|
|
104
110
|
ColumnSeriesDrawingProvider.prototype.onSeriesPropertyChange = function (propertyName) {
|
|
105
111
|
_super.prototype.onSeriesPropertyChange.call(this, propertyName);
|
|
112
|
+
var _a = this.parentSeries, stroke = _a.stroke, strokeThickness = _a.strokeThickness, opacity = _a.opacity, fill = _a.fill;
|
|
106
113
|
if (propertyName === constants_1.PROPERTY.STROKE ||
|
|
107
114
|
propertyName === constants_1.PROPERTY.STROKE_THICKNESS ||
|
|
108
115
|
propertyName === constants_1.PROPERTY.OPACITY) {
|
|
109
|
-
var _a = this.parentSeries, stroke = _a.stroke, strokeThickness = _a.strokeThickness, opacity = _a.opacity;
|
|
110
116
|
(0, Pen2DCache_1.createPenInCache)(this.strokePenCache, stroke, strokeThickness, opacity);
|
|
111
117
|
}
|
|
112
118
|
if (propertyName === constants_1.PROPERTY.FILL || propertyName === constants_1.PROPERTY.OPACITY) {
|
|
113
|
-
var _b = this.parentSeries, fill = _b.fill, opacity = _b.opacity;
|
|
114
119
|
(0, BrushCache_1.createBrushInCache)(this.fillBrushCache, fill, opacity);
|
|
115
120
|
}
|
|
121
|
+
if (strokeThickness === 0 &&
|
|
122
|
+
(propertyName === constants_1.PROPERTY.STROKE_THICKNESS ||
|
|
123
|
+
propertyName === constants_1.PROPERTY.STROKE ||
|
|
124
|
+
propertyName === constants_1.PROPERTY.OPACITY ||
|
|
125
|
+
propertyName === constants_1.PROPERTY.FILL)) {
|
|
126
|
+
(0, Pen2DCache_1.createPenInCache)(this.strokePenFillColoredCache, fill, strokeThickness, opacity);
|
|
127
|
+
}
|
|
116
128
|
};
|
|
117
129
|
return ColumnSeriesDrawingProvider;
|
|
118
130
|
}(BaseSeriesDrawingProvider_1.BaseSeriesDrawingProvider));
|