scichart 2.0.0-alpha.1930 → 2.0.0-alpha.1991
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Builder/buildAxis.d.ts +3 -3
- package/Builder/buildDataSeries.d.ts +44 -4
- package/Builder/buildDataSeries.js +66 -0
- package/Builder/buildSeries.d.ts +7 -5
- package/Builder/buildSeries.js +3 -4
- package/Builder/buildSurface.d.ts +14 -6
- package/Builder/buildSurface.js +13 -8
- package/Builder/chartBuilder.d.ts +14 -8
- package/Builder/chartBuilder.js +6 -6
- package/Charting/ChartModifiers/ChartModifierBase.d.ts +37 -81
- package/Charting/ChartModifiers/ChartModifierBase.js +28 -73
- package/Charting/ChartModifiers/ChartModifierBase2D.d.ts +5 -1
- package/Charting/ChartModifiers/ChartModifierBase2D.js +6 -17
- package/Charting/ChartModifiers/CursorModifier.d.ts +4 -2
- package/Charting/ChartModifiers/CursorModifier.js +1 -1
- package/Charting/ChartModifiers/DataPointSelectionModifier.d.ts +3 -1
- package/Charting/ChartModifiers/DataPointSelectionModifier.js +62 -27
- package/Charting/ChartModifiers/LegendModifier.d.ts +5 -1
- package/Charting/ChartModifiers/LegendModifier.js +2 -1
- package/Charting/ChartModifiers/MouseWheelZoomModifier.d.ts +1 -1
- package/Charting/ChartModifiers/PinchZoomModifier.d.ts +1 -1
- package/Charting/ChartModifiers/RolloverModifier.d.ts +1 -1
- package/Charting/ChartModifiers/RolloverModifier.js +44 -58
- package/Charting/ChartModifiers/RubberBandXyZoomModifier.d.ts +1 -1
- package/Charting/ChartModifiers/SeriesSelectionModifier.d.ts +15 -7
- package/Charting/ChartModifiers/SeriesSelectionModifier.js +10 -10
- package/Charting/ChartModifiers/XAxisDragModifier.d.ts +1 -1
- package/Charting/ChartModifiers/YAxisDragModifier.d.ts +1 -1
- package/Charting/ChartModifiers/ZoomExtentsModifier.d.ts +14 -1
- package/Charting/ChartModifiers/ZoomExtentsModifier.js +16 -4
- package/Charting/Drawing/BrushCache.js +6 -8
- package/Charting/Drawing/Pen2DCache.d.ts +4 -6
- package/Charting/Drawing/Pen2DCache.js +14 -11
- package/Charting/Drawing/WebGlPen.d.ts +2 -1
- package/Charting/Drawing/WebGlPen.js +3 -2
- package/Charting/LayoutManager/BottomAlignedOuterAxisLayoutStrategy.js +1 -1
- package/Charting/LayoutManager/BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +3 -2
- package/Charting/LayoutManager/LeftAlignedOuterAxisLayoutStrategy.js +1 -1
- package/Charting/LayoutManager/LeftAlignedOuterVerticallyStackedAxisLayoutStrategy.js +3 -2
- package/Charting/LayoutManager/RightAlignedOuterAxisLayoutStrategy.js +1 -1
- package/Charting/LayoutManager/RightAlignedOuterVerticallyStackedAxisLayoutStrategy.js +3 -2
- package/Charting/LayoutManager/TopAlignedOuterAxisLayoutStrategy.js +1 -1
- package/Charting/LayoutManager/TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +3 -2
- package/Charting/Model/BaseDataSeries.d.ts +64 -52
- package/Charting/Model/BaseDataSeries.js +158 -84
- package/Charting/Model/BaseHeatmapDataSeries.d.ts +2 -2
- package/Charting/Model/DataPointSelectionPaletteProvider.d.ts +22 -10
- package/Charting/Model/DataPointSelectionPaletteProvider.js +35 -5
- package/Charting/Model/Filters/OhlcScaleOffsetFilter.d.ts +106 -0
- package/Charting/Model/Filters/OhlcScaleOffsetFilter.js +21 -0
- package/Charting/Model/Filters/XyLinearTrendFilter.d.ts +112 -1
- package/Charting/Model/Filters/XyLinearTrendFilter.js +21 -0
- package/Charting/Model/Filters/XyMovingAverageFilter.d.ts +110 -1
- package/Charting/Model/Filters/XyMovingAverageFilter.js +21 -0
- package/Charting/Model/Filters/XyRatioFilter.d.ts +111 -2
- package/Charting/Model/Filters/XyRatioFilter.js +34 -3
- package/Charting/Model/Filters/XyScaleOffsetFilter.d.ts +112 -1
- package/Charting/Model/Filters/XyScaleOffsetFilter.js +21 -0
- package/Charting/Model/Filters/XyyScaleOffsetFilter.d.ts +116 -0
- package/Charting/Model/Filters/XyyScaleOffsetFilter.js +21 -0
- package/Charting/Model/Filters/XyzScaleOffsetFilter.d.ts +116 -0
- package/Charting/Model/Filters/XyzScaleOffsetFilter.js +21 -0
- package/Charting/Model/IDataSeries.d.ts +18 -3
- package/Charting/Model/IDataSeries.js +12 -1
- package/Charting/Model/IPaletteProvider.d.ts +8 -8
- package/Charting/Model/OhlcDataSeries.d.ts +39 -10
- package/Charting/Model/OhlcDataSeries.js +106 -19
- package/Charting/Model/UniformHeatmapDataSeries.d.ts +2 -2
- package/Charting/Model/XyyDataSeries.d.ts +21 -12
- package/Charting/Model/XyyDataSeries.js +70 -16
- package/Charting/Model/XyzDataSeries.d.ts +20 -5
- package/Charting/Model/XyzDataSeries.js +63 -7
- package/Charting/Numerics/TickProviders/LogarithmicTickProvider.d.ts +24 -0
- package/Charting/Numerics/TickProviders/LogarithmicTickProvider.js +26 -4
- package/Charting/Services/SciChartRenderer.js +4 -2
- package/Charting/Visuals/Annotations/AnnotationBase.d.ts +7 -21
- package/Charting/Visuals/Annotations/AnnotationBase.js +28 -42
- package/Charting/Visuals/Annotations/AxisMarkerAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/AxisMarkerAnnotation.js +2 -4
- package/Charting/Visuals/Annotations/BoxAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/BoxAnnotation.js +3 -2
- package/Charting/Visuals/Annotations/CustomAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/CustomAnnotation.js +2 -2
- package/Charting/Visuals/Annotations/HorizontalLineAnnotation.js +0 -3
- package/Charting/Visuals/Annotations/IAnnotation.d.ts +4 -0
- package/Charting/Visuals/Annotations/LineAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/LineAnnotation.js +2 -4
- package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.js +3 -2
- package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +1 -1
- package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +1 -1
- package/Charting/Visuals/Annotations/SvgAnnotationBase.js +3 -2
- package/Charting/Visuals/Annotations/TextAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/TextAnnotation.js +1 -1
- package/Charting/Visuals/Annotations/VerticalLineAnnotation.js +0 -3
- package/Charting/Visuals/Annotations/annotationHelpers.d.ts +21 -0
- package/Charting/Visuals/Annotations/annotationHelpers.js +19 -0
- package/Charting/Visuals/Axis/AxisBase2D.d.ts +21 -0
- package/Charting/Visuals/Axis/AxisBase2D.js +81 -14
- package/Charting/Visuals/Axis/AxisCore.d.ts +5 -5
- package/Charting/Visuals/Axis/AxisCore.js +50 -55
- package/Charting/Visuals/Axis/AxisRenderer.js +1 -1
- package/Charting/Visuals/Axis/IAxisCoreOptions.d.ts +13 -0
- package/Charting/Visuals/Axis/LabelProvider/LabelProvider.d.ts +1 -1
- package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.d.ts +3 -2
- package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +13 -0
- package/Charting/Visuals/Axis/LabelProvider/TextLabelProvider.d.ts +1 -1
- package/Charting/Visuals/Axis/LogarithmicAxis.d.ts +53 -0
- package/Charting/Visuals/Axis/LogarithmicAxis.js +107 -3
- package/Charting/Visuals/Axis/constants.d.ts +2 -1
- package/Charting/Visuals/Axis/constants.js +1 -0
- package/Charting/Visuals/Legend/SciChartLegend.js +1 -1
- package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +11 -0
- package/Charting/Visuals/Legend/SciChartLegendBase.js +45 -16
- package/Charting/Visuals/PointMarkers/IPointMarker.d.ts +4 -0
- package/Charting/Visuals/RenderableSeries/Animations/BaseAnimation.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.d.ts +9 -2
- package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.js +65 -4
- package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +0 -11
- package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +0 -29
- package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.js +1 -1
- package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +0 -37
- package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +0 -120
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +4 -24
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +65 -91
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +26 -2
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +55 -3
- package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +3 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +7 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +66 -64
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.d.ts +7 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +12 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.d.ts +2 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +6 -6
- package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.d.ts +6 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +12 -0
- package/Charting/Visuals/RenderableSeries/FastBandRenderableSeries.d.ts +0 -6
- package/Charting/Visuals/RenderableSeries/FastBandRenderableSeries.js +0 -42
- package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +0 -17
- package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +0 -71
- package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.js +1 -1
- package/Charting/Visuals/RenderableSeries/FastOhlcRenderableSeries.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.d.ts +4 -0
- package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +7 -0
- package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +2 -1
- package/Charting/Visuals/RenderableSeries/HitTest/ColumnSeriesHitTestProvider.d.ts +4 -0
- package/Charting/Visuals/RenderableSeries/HitTest/ColumnSeriesHitTestProvider.js +7 -0
- package/Charting/Visuals/RenderableSeries/HitTest/IHitTestProvider.d.ts +13 -0
- package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.d.ts +4 -0
- package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.js +7 -0
- package/Charting/Visuals/RenderableSeries/HitTest/StackedColumnSeriesHitTestProvider.d.ts +4 -0
- package/Charting/Visuals/RenderableSeries/HitTest/StackedColumnSeriesHitTestProvider.js +7 -0
- package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +17 -5
- package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +2 -2
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.d.ts +3 -0
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +10 -32
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +4 -0
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +11 -21
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.d.ts +3 -0
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +10 -21
- package/Charting/Visuals/RenderableSeries/StackedColumnCollection.d.ts +18 -5
- package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +16 -35
- package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.js +4 -5
- package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +2 -5
- package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +2 -35
- package/Charting/Visuals/RenderableSeries/StackedMountainRenderableSeries.js +3 -1
- package/Charting/Visuals/SciChartOverview.d.ts +1 -1
- package/Charting/Visuals/SciChartOverview.js +1 -1
- package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.d.ts +3 -1
- package/Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment.js +9 -8
- package/Charting/Visuals/SciChartSurface.d.ts +20 -3
- package/Charting/Visuals/SciChartSurface.js +36 -8
- package/Charting/Visuals/SciChartSurfaceBase.d.ts +3 -3
- package/Charting/Visuals/SciChartSurfaceBase.js +2 -6
- package/Charting/Visuals/TextureManager/DpiHelper.d.ts +1 -1
- package/Charting/Visuals/TextureManager/DpiHelper.js +5 -3
- package/Charting/Visuals/TextureManager/TextureManager.d.ts +7 -1
- package/Charting/Visuals/TextureManager/TextureManager.js +14 -7
- package/Charting/Visuals/licenseManager2D.js +35 -28
- package/Charting/Visuals/loader.d.ts +3 -0
- package/Charting/Visuals/loader.js +3 -0
- package/Charting3D/Visuals/Primitives/BaseSceneEntity3D.d.ts +21 -45
- package/Charting3D/Visuals/Primitives/BaseSceneEntity3D.js +15 -36
- package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.d.ts +35 -73
- package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +25 -66
- package/Charting3D/Visuals/SciChart3DRenderer.js +1 -1
- package/Charting3D/Visuals/SciChart3DSurface.d.ts +13 -1
- package/Charting3D/Visuals/SciChart3DSurface.js +13 -1
- package/Core/ObservableArray.d.ts +8 -1
- package/Core/ObservableArray.js +7 -0
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.js +95 -95
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +1 -1
- package/_wasm/scichart3d.wasm +0 -0
- package/package.json +1 -1
- package/types/AnchorPoint.d.ts +0 -3
- package/types/AnchorPoint.js +0 -3
- package/types/BaseType.d.ts +3 -1
- package/types/BaseType.js +2 -0
- package/types/DataFilterType.d.ts +9 -0
- package/types/DataFilterType.js +13 -0
- package/types/HelperTypes.d.ts +5 -0
- package/types/HelperTypes.js +2 -0
- package/types/SeriesType.d.ts +17 -17
- package/types/SeriesType.js +17 -17
- package/utils/font.d.ts +8 -0
- package/utils/font.js +15 -0
- package/utils/imageUtil.d.ts +6 -0
- package/utils/imageUtil.js +11 -1
|
@@ -28,7 +28,7 @@ var TopAlignedOuterAxisLayoutStrategy = /** @class */ (function (_super) {
|
|
|
28
28
|
}
|
|
29
29
|
TopAlignedOuterAxisLayoutStrategy.prototype.measureAxes = function (sciChartSurface, chartLayoutState, axes) {
|
|
30
30
|
var _a, _b;
|
|
31
|
-
var requiredSize = (_b = (_a = sciChartSurface.
|
|
31
|
+
var requiredSize = (_b = (_a = sciChartSurface.adjustedPadding) === null || _a === void 0 ? void 0 : _a.top) !== null && _b !== void 0 ? _b : 0;
|
|
32
32
|
requiredSize += sciChartSurface.topViewportBorder + sciChartSurface.topCanvasBorder;
|
|
33
33
|
axes.forEach(function (axis) {
|
|
34
34
|
axis.measure();
|
|
@@ -39,8 +39,8 @@ var TopAlignedOuterHorizontallyStackedAxisLayoutStrategy = /** @class */ (functi
|
|
|
39
39
|
var firstStackedAxis = axes[0];
|
|
40
40
|
var lastStackedAxis = axes[axes.length - 1];
|
|
41
41
|
AxisLayoutHelpers_1.updateLeftAndRightChartLayoutState(chartLayoutState, firstStackedAxis === null || firstStackedAxis === void 0 ? void 0 : firstStackedAxis.axisLayoutState.additionalLeftSize, lastStackedAxis === null || lastStackedAxis === void 0 ? void 0 : lastStackedAxis.axisLayoutState.additionalRightSize);
|
|
42
|
-
var topViewportBorder = sciChartSurface.topViewportBorder, topCanvasBorder = sciChartSurface.topCanvasBorder,
|
|
43
|
-
requiredSize += (_a = topViewportBorder + topCanvasBorder + (
|
|
42
|
+
var topViewportBorder = sciChartSurface.topViewportBorder, topCanvasBorder = sciChartSurface.topCanvasBorder, adjustedPadding = sciChartSurface.adjustedPadding;
|
|
43
|
+
requiredSize += (_a = topViewportBorder + topCanvasBorder + (adjustedPadding === null || adjustedPadding === void 0 ? void 0 : adjustedPadding.top)) !== null && _a !== void 0 ? _a : 0;
|
|
44
44
|
chartLayoutState.topOuterAreaSize = Math.max(chartLayoutState.topOuterAreaSize, requiredSize);
|
|
45
45
|
};
|
|
46
46
|
TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.prototype.layoutAxes = function (left, top, right, bottom, axes) {
|
|
@@ -57,6 +57,7 @@ var TopAlignedOuterHorizontallyStackedAxisLayoutStrategy = /** @class */ (functi
|
|
|
57
57
|
leftOffset += additionalLeftSize;
|
|
58
58
|
axis.offset = leftOffset - left;
|
|
59
59
|
axis.axisLength = rightOffset - leftOffset;
|
|
60
|
+
axis.isStackedAxis = true;
|
|
60
61
|
axis.isPrimaryAxis = true;
|
|
61
62
|
axis.viewRect = Rect_1.Rect.createWithCoords(leftOffset, topOffset, rightOffset, bottomOffset);
|
|
62
63
|
leftOffset = rightOffset + additionalRightSize;
|
|
@@ -2,7 +2,8 @@ import { TSeriesDataDefinition } from "../../Builder/buildDataSeries";
|
|
|
2
2
|
import { EventHandler } from "../../Core/EventHandler";
|
|
3
3
|
import { NumberRange } from "../../Core/NumberRange";
|
|
4
4
|
import { DoubleVector, TSciChart } from "../../types/TSciChart";
|
|
5
|
-
import {
|
|
5
|
+
import { BaseAnimation } from "../Visuals/RenderableSeries/Animations/BaseAnimation";
|
|
6
|
+
import { EDataChangeType, EDataSeriesType, EDataSeriesValueType, IDataChangeArgs, IDataSeries } from "./IDataSeries";
|
|
6
7
|
import { IMetadataGenerator, IPointMetadata } from "./IPointMetadata";
|
|
7
8
|
/**
|
|
8
9
|
* Options to pass to the {@link BaseDataSeries} constructor
|
|
@@ -45,13 +46,9 @@ export interface IBaseDataSeriesOptions {
|
|
|
45
46
|
* See derived types of {@link IRenderableSeries} to find out what 2D JavaScript Chart types are available.
|
|
46
47
|
*/
|
|
47
48
|
export declare abstract class BaseDataSeries implements IDataSeries {
|
|
48
|
-
/**
|
|
49
|
-
* @inheritDoc
|
|
50
|
-
*/
|
|
49
|
+
/** @inheritDoc */
|
|
51
50
|
abstract readonly type: EDataSeriesType;
|
|
52
|
-
/**
|
|
53
|
-
* @inheritDoc
|
|
54
|
-
*/
|
|
51
|
+
/** @inheritDoc */
|
|
55
52
|
readonly dataChanged: EventHandler<IDataChangeArgs>;
|
|
56
53
|
minXSpacing: number;
|
|
57
54
|
/**
|
|
@@ -62,6 +59,22 @@ export declare abstract class BaseDataSeries implements IDataSeries {
|
|
|
62
59
|
* The {@link TSciChart | SciChart WebAssembly Context} containing native methods and access to our WebGL2 Engine
|
|
63
60
|
*/
|
|
64
61
|
readonly webAssemblyContext: TSciChart;
|
|
62
|
+
/**
|
|
63
|
+
* X vector with initial animation values
|
|
64
|
+
*/
|
|
65
|
+
xInitialAnimationValues: DoubleVector;
|
|
66
|
+
/**
|
|
67
|
+
* Y vector with initial animation values
|
|
68
|
+
*/
|
|
69
|
+
yInitialAnimationValues: DoubleVector;
|
|
70
|
+
/**
|
|
71
|
+
* X vector with final animation values
|
|
72
|
+
*/
|
|
73
|
+
xFinalAnimationValues: DoubleVector;
|
|
74
|
+
/**
|
|
75
|
+
* Y vector with final animation values
|
|
76
|
+
*/
|
|
77
|
+
yFinalAnimationValues: DoubleVector;
|
|
65
78
|
protected xValues: DoubleVector;
|
|
66
79
|
protected yValues: DoubleVector;
|
|
67
80
|
protected indexes: DoubleVector;
|
|
@@ -78,71 +91,47 @@ export declare abstract class BaseDataSeries implements IDataSeries {
|
|
|
78
91
|
* @param options the {@link IBaseDataSeriesOptions} which can be passed to config the DataSeries at construct time
|
|
79
92
|
*/
|
|
80
93
|
protected constructor(webAssemblyContext: TSciChart, options?: IBaseDataSeriesOptions);
|
|
81
|
-
/**
|
|
82
|
-
* @inheritDoc
|
|
83
|
-
*/
|
|
94
|
+
/** @inheritDoc */
|
|
84
95
|
get containsNaN(): boolean;
|
|
85
|
-
/**
|
|
86
|
-
* @inheritDoc
|
|
87
|
-
*/
|
|
96
|
+
/** @inheritDoc */
|
|
88
97
|
set containsNaN(containsNaN: boolean);
|
|
89
|
-
/**
|
|
90
|
-
* @inheritDoc
|
|
91
|
-
*/
|
|
98
|
+
/** @inheritDoc */
|
|
92
99
|
get isSorted(): boolean;
|
|
93
|
-
/**
|
|
94
|
-
* @inheritDoc
|
|
95
|
-
*/
|
|
100
|
+
/** @inheritDoc */
|
|
96
101
|
set isSorted(isSorted: boolean);
|
|
97
|
-
/**
|
|
98
|
-
* @inheritDoc
|
|
99
|
-
*/
|
|
102
|
+
/** @inheritDoc */
|
|
100
103
|
get dataSeriesName(): string;
|
|
101
|
-
/**
|
|
102
|
-
* @inheritDoc
|
|
103
|
-
*/
|
|
104
|
+
/** @inheritDoc */
|
|
104
105
|
set dataSeriesName(dataSeriesName: string);
|
|
105
|
-
/**
|
|
106
|
-
* @inheritDoc
|
|
107
|
-
*/
|
|
106
|
+
/** @inheritDoc */
|
|
108
107
|
count(): number;
|
|
109
|
-
/**
|
|
110
|
-
* @inheritDoc
|
|
111
|
-
*/
|
|
108
|
+
/** @inheritDoc */
|
|
112
109
|
getIsDeleted(): boolean;
|
|
113
|
-
/**
|
|
114
|
-
* @inheritDoc
|
|
115
|
-
*/
|
|
110
|
+
/** @inheritDoc */
|
|
116
111
|
getNativeIndexes(): DoubleVector;
|
|
117
|
-
/**
|
|
118
|
-
* @inheritDoc
|
|
119
|
-
*/
|
|
112
|
+
/** @inheritDoc */
|
|
120
113
|
getNativeXValues(): DoubleVector;
|
|
121
|
-
/**
|
|
122
|
-
* @inheritDoc
|
|
123
|
-
*/
|
|
114
|
+
/** @inheritDoc */
|
|
124
115
|
getNativeYValues(): DoubleVector;
|
|
125
|
-
/**
|
|
126
|
-
* @inheritDoc
|
|
127
|
-
*/
|
|
116
|
+
/** @inheritDoc */
|
|
128
117
|
delete(): void;
|
|
129
118
|
/**
|
|
130
119
|
* Call to notify subscribers of {@link dataChanged} that the data has changed and {@link SciChartSurface} needs redrawing
|
|
131
120
|
*/
|
|
132
121
|
notifyDataChanged(changeType: EDataChangeType, index: number, count: number, name?: string): void;
|
|
133
|
-
/**
|
|
134
|
-
* @inheritDoc
|
|
135
|
-
*/
|
|
122
|
+
/** @inheritDoc */
|
|
136
123
|
get xRange(): NumberRange;
|
|
137
|
-
/**
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
getWindowedYRange(xRange: NumberRange, getPositiveRange: boolean, isXCategoryAxis?: boolean): NumberRange;
|
|
124
|
+
/** @inheritDoc */
|
|
125
|
+
getXRange(dataSeriesValueType?: EDataSeriesValueType): NumberRange;
|
|
126
|
+
/** @inheritDoc */
|
|
127
|
+
getWindowedYRange(xRange: NumberRange, getPositiveRange: boolean, isXCategoryAxis?: boolean, dataSeriesValueType?: EDataSeriesValueType): NumberRange;
|
|
141
128
|
getIndicesRange(xRange: NumberRange): NumberRange;
|
|
129
|
+
/** @inheritDoc */
|
|
130
|
+
get hasValues(): boolean;
|
|
142
131
|
/**
|
|
143
|
-
*
|
|
132
|
+
* Check if the series has an existing metadaGenerator
|
|
144
133
|
*/
|
|
145
|
-
|
|
134
|
+
hasMetadataGenerator(): boolean;
|
|
146
135
|
/**
|
|
147
136
|
* Sets a function that will be used to generate metadata for values when they are appended/inserted, if no explicit metadata is supplied.
|
|
148
137
|
* @param generator
|
|
@@ -157,6 +146,27 @@ export declare abstract class BaseDataSeries implements IDataSeries {
|
|
|
157
146
|
* Gets the metadata array length
|
|
158
147
|
*/
|
|
159
148
|
getMetadataLength(): number;
|
|
149
|
+
/**
|
|
150
|
+
* Sets initial values for the data animation
|
|
151
|
+
* @param dataSeries The {@link BaseDataSeries} to be used for initial values
|
|
152
|
+
*/
|
|
153
|
+
setInitialAnimationVectors(dataSeries?: BaseDataSeries): void;
|
|
154
|
+
/**
|
|
155
|
+
* Sets final values for the data animation
|
|
156
|
+
* @param dataSeries The {@link BaseDataSeries} to be used for final values
|
|
157
|
+
*/
|
|
158
|
+
setFinalAnimationVectors(dataSeries?: BaseDataSeries): void;
|
|
159
|
+
/**
|
|
160
|
+
* Validates the length of the animation vectors
|
|
161
|
+
*/
|
|
162
|
+
validateAnimationVectors(): void;
|
|
163
|
+
/**
|
|
164
|
+
* Updates the {@link BaseDataSeries} values for the animation
|
|
165
|
+
* @param progress The animation progress from 0 to 1
|
|
166
|
+
* @param animation The animation
|
|
167
|
+
*/
|
|
168
|
+
updateAnimationProperties(progress: number, animation: BaseAnimation): void;
|
|
169
|
+
/** @inheritDoc */
|
|
160
170
|
toJSON(excludeData?: boolean): TSeriesDataDefinition;
|
|
161
171
|
protected validateIndex(index: number, message?: string): void;
|
|
162
172
|
protected setMetadataAt(index: number, metadata: IPointMetadata): void;
|
|
@@ -167,6 +177,8 @@ export declare abstract class BaseDataSeries implements IDataSeries {
|
|
|
167
177
|
protected removeMetadataAt(index: number): void;
|
|
168
178
|
protected removeMetadataRange(startIndex: number, count: number): void;
|
|
169
179
|
protected setMetadata(value: IPointMetadata[]): void;
|
|
180
|
+
protected getXValues(dataSeriesValueType: EDataSeriesValueType): DoubleVector;
|
|
170
181
|
private fillMetadataIfUndefined;
|
|
182
|
+
private getYValues;
|
|
171
183
|
}
|
|
172
184
|
export declare const getWindowedYRange: (webAssemblyContext: TSciChart, xValues: DoubleVector, yValues: DoubleVector, xRange: NumberRange, getPositiveRange: boolean, isXCategoryAxis: boolean, isSorted: boolean) => NumberRange;
|
|
@@ -26,6 +26,7 @@ var NumberRange_1 = require("../../Core/NumberRange");
|
|
|
26
26
|
var BaseType_1 = require("../../types/BaseType");
|
|
27
27
|
var fillDoubleVectorFromJsArray_1 = require("../../utils/ccall/fillDoubleVectorFromJsArray");
|
|
28
28
|
var isRealNumber_1 = require("../../utils/isRealNumber");
|
|
29
|
+
var animationHelpers_1 = require("../Visuals/RenderableSeries/Animations/animationHelpers");
|
|
29
30
|
var IDataSeries_1 = require("./IDataSeries");
|
|
30
31
|
var IPointMetadata_1 = require("./IPointMetadata");
|
|
31
32
|
/**
|
|
@@ -47,9 +48,7 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
47
48
|
*/
|
|
48
49
|
function BaseDataSeries(webAssemblyContext, options) {
|
|
49
50
|
var _a, _b, _c;
|
|
50
|
-
/**
|
|
51
|
-
* @inheritDoc
|
|
52
|
-
*/
|
|
51
|
+
/** @inheritDoc */
|
|
53
52
|
this.dataChanged = new EventHandler_1.EventHandler();
|
|
54
53
|
this.minXSpacing = 0;
|
|
55
54
|
this.isSortedProperty = true;
|
|
@@ -59,6 +58,10 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
59
58
|
this.xValues = new webAssemblyContext.DoubleVector();
|
|
60
59
|
this.yValues = new webAssemblyContext.DoubleVector();
|
|
61
60
|
this.indexes = new webAssemblyContext.DoubleVector();
|
|
61
|
+
this.xInitialAnimationValues = new webAssemblyContext.DoubleVector();
|
|
62
|
+
this.yInitialAnimationValues = new webAssemblyContext.DoubleVector();
|
|
63
|
+
this.xFinalAnimationValues = new webAssemblyContext.DoubleVector();
|
|
64
|
+
this.yFinalAnimationValues = new webAssemblyContext.DoubleVector();
|
|
62
65
|
this.dataSeriesNameProperty = (_a = options === null || options === void 0 ? void 0 : options.dataSeriesName) !== null && _a !== void 0 ? _a : this.dataSeriesNameProperty;
|
|
63
66
|
this.isSorted = (options === null || options === void 0 ? void 0 : options.dataIsSortedInX) !== undefined ? options === null || options === void 0 ? void 0 : options.dataIsSortedInX : this.isSortedProperty;
|
|
64
67
|
this.containsNaN = (_b = options === null || options === void 0 ? void 0 : options.containsNaN) !== null && _b !== void 0 ? _b : this.containsNaNProperty;
|
|
@@ -74,15 +77,11 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
74
77
|
}
|
|
75
78
|
}
|
|
76
79
|
Object.defineProperty(BaseDataSeries.prototype, "containsNaN", {
|
|
77
|
-
/**
|
|
78
|
-
* @inheritDoc
|
|
79
|
-
*/
|
|
80
|
+
/** @inheritDoc */
|
|
80
81
|
get: function () {
|
|
81
82
|
return this.containsNaNProperty;
|
|
82
83
|
},
|
|
83
|
-
/**
|
|
84
|
-
* @inheritDoc
|
|
85
|
-
*/
|
|
84
|
+
/** @inheritDoc */
|
|
86
85
|
set: function (containsNaN) {
|
|
87
86
|
this.containsNaNProperty = containsNaN;
|
|
88
87
|
this.notifyDataChanged(IDataSeries_1.EDataChangeType.Property, undefined, undefined, "containsNaN");
|
|
@@ -91,15 +90,11 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
91
90
|
configurable: true
|
|
92
91
|
});
|
|
93
92
|
Object.defineProperty(BaseDataSeries.prototype, "isSorted", {
|
|
94
|
-
/**
|
|
95
|
-
* @inheritDoc
|
|
96
|
-
*/
|
|
93
|
+
/** @inheritDoc */
|
|
97
94
|
get: function () {
|
|
98
95
|
return this.isSortedProperty;
|
|
99
96
|
},
|
|
100
|
-
/**
|
|
101
|
-
* @inheritDoc
|
|
102
|
-
*/
|
|
97
|
+
/** @inheritDoc */
|
|
103
98
|
set: function (isSorted) {
|
|
104
99
|
this.isSortedProperty = isSorted;
|
|
105
100
|
this.notifyDataChanged(IDataSeries_1.EDataChangeType.Property, undefined, undefined, "isSorted");
|
|
@@ -108,15 +103,11 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
108
103
|
configurable: true
|
|
109
104
|
});
|
|
110
105
|
Object.defineProperty(BaseDataSeries.prototype, "dataSeriesName", {
|
|
111
|
-
/**
|
|
112
|
-
* @inheritDoc
|
|
113
|
-
*/
|
|
106
|
+
/** @inheritDoc */
|
|
114
107
|
get: function () {
|
|
115
108
|
return this.dataSeriesNameProperty;
|
|
116
109
|
},
|
|
117
|
-
/**
|
|
118
|
-
* @inheritDoc
|
|
119
|
-
*/
|
|
110
|
+
/** @inheritDoc */
|
|
120
111
|
set: function (dataSeriesName) {
|
|
121
112
|
this.dataSeriesNameProperty = dataSeriesName;
|
|
122
113
|
this.notifyDataChanged(IDataSeries_1.EDataChangeType.Property, undefined, undefined, "dataSeriesName");
|
|
@@ -124,24 +115,18 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
124
115
|
enumerable: false,
|
|
125
116
|
configurable: true
|
|
126
117
|
});
|
|
127
|
-
/**
|
|
128
|
-
* @inheritDoc
|
|
129
|
-
*/
|
|
118
|
+
/** @inheritDoc */
|
|
130
119
|
BaseDataSeries.prototype.count = function () {
|
|
131
120
|
if (this.xValues) {
|
|
132
121
|
return this.xValues.size();
|
|
133
122
|
}
|
|
134
123
|
return 0;
|
|
135
124
|
};
|
|
136
|
-
/**
|
|
137
|
-
* @inheritDoc
|
|
138
|
-
*/
|
|
125
|
+
/** @inheritDoc */
|
|
139
126
|
BaseDataSeries.prototype.getIsDeleted = function () {
|
|
140
127
|
return this.isDeleted;
|
|
141
128
|
};
|
|
142
|
-
/**
|
|
143
|
-
* @inheritDoc
|
|
144
|
-
*/
|
|
129
|
+
/** @inheritDoc */
|
|
145
130
|
BaseDataSeries.prototype.getNativeIndexes = function () {
|
|
146
131
|
if (!this.indexes) {
|
|
147
132
|
return undefined;
|
|
@@ -154,25 +139,23 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
154
139
|
}
|
|
155
140
|
return this.indexes;
|
|
156
141
|
};
|
|
157
|
-
/**
|
|
158
|
-
* @inheritDoc
|
|
159
|
-
*/
|
|
142
|
+
/** @inheritDoc */
|
|
160
143
|
BaseDataSeries.prototype.getNativeXValues = function () {
|
|
161
144
|
return this.xValues;
|
|
162
145
|
};
|
|
163
|
-
/**
|
|
164
|
-
* @inheritDoc
|
|
165
|
-
*/
|
|
146
|
+
/** @inheritDoc */
|
|
166
147
|
BaseDataSeries.prototype.getNativeYValues = function () {
|
|
167
148
|
return this.yValues;
|
|
168
149
|
};
|
|
169
|
-
/**
|
|
170
|
-
* @inheritDoc
|
|
171
|
-
*/
|
|
150
|
+
/** @inheritDoc */
|
|
172
151
|
BaseDataSeries.prototype.delete = function () {
|
|
173
152
|
this.xValues = Deleter_1.deleteSafe(this.xValues);
|
|
174
153
|
this.yValues = Deleter_1.deleteSafe(this.yValues);
|
|
175
154
|
this.indexes = Deleter_1.deleteSafe(this.indexes);
|
|
155
|
+
this.xInitialAnimationValues = Deleter_1.deleteSafe(this.xInitialAnimationValues);
|
|
156
|
+
this.yInitialAnimationValues = Deleter_1.deleteSafe(this.yInitialAnimationValues);
|
|
157
|
+
this.xFinalAnimationValues = Deleter_1.deleteSafe(this.xFinalAnimationValues);
|
|
158
|
+
this.yFinalAnimationValues = Deleter_1.deleteSafe(this.yFinalAnimationValues);
|
|
176
159
|
this.setMetadata(undefined);
|
|
177
160
|
this.isDeleted = true;
|
|
178
161
|
};
|
|
@@ -183,75 +166,86 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
183
166
|
this.dataChanged.raiseEvent({ changeType: changeType, index: index, count: count });
|
|
184
167
|
};
|
|
185
168
|
Object.defineProperty(BaseDataSeries.prototype, "xRange", {
|
|
186
|
-
/**
|
|
187
|
-
* @inheritDoc
|
|
188
|
-
*/
|
|
169
|
+
/** @inheritDoc */
|
|
189
170
|
get: function () {
|
|
190
|
-
|
|
191
|
-
var temp;
|
|
192
|
-
if (this.count() === 1) {
|
|
193
|
-
var min = nativeValues.get(0) - 1;
|
|
194
|
-
var max = nativeValues.get(0) + 1;
|
|
195
|
-
return new NumberRange_1.NumberRange(min, max);
|
|
196
|
-
}
|
|
197
|
-
else if (this.count() > 1) {
|
|
198
|
-
var min = nativeValues.get(0);
|
|
199
|
-
var max = nativeValues.get(this.count() - 1);
|
|
200
|
-
if (!this.isSorted) {
|
|
201
|
-
for (var i = 0; i < this.count(); i++) {
|
|
202
|
-
if (nativeValues.get(i) < min) {
|
|
203
|
-
min = nativeValues.get(i);
|
|
204
|
-
}
|
|
205
|
-
if (nativeValues.get(i) > max) {
|
|
206
|
-
max = nativeValues.get(i);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
if (min === max) {
|
|
211
|
-
return new NumberRange_1.NumberRange(min - 1, max + 1);
|
|
212
|
-
}
|
|
213
|
-
else if (min > max) {
|
|
214
|
-
temp = min;
|
|
215
|
-
min = max;
|
|
216
|
-
max = temp;
|
|
217
|
-
}
|
|
218
|
-
return new NumberRange_1.NumberRange(min, max);
|
|
219
|
-
}
|
|
220
|
-
return new NumberRange_1.NumberRange();
|
|
171
|
+
return this.getXRange();
|
|
221
172
|
},
|
|
222
173
|
enumerable: false,
|
|
223
174
|
configurable: true
|
|
224
175
|
});
|
|
225
|
-
/**
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
176
|
+
/** @inheritDoc */
|
|
177
|
+
BaseDataSeries.prototype.getXRange = function (dataSeriesValueType) {
|
|
178
|
+
var xValues = this.getXValues(dataSeriesValueType);
|
|
179
|
+
var temp;
|
|
180
|
+
if (this.count() === 1) {
|
|
181
|
+
var min = xValues.get(0) - 1;
|
|
182
|
+
var max = xValues.get(0) + 1;
|
|
183
|
+
return new NumberRange_1.NumberRange(min, max);
|
|
184
|
+
}
|
|
185
|
+
else if (this.count() > 1) {
|
|
186
|
+
var min = xValues.get(0);
|
|
187
|
+
var max = xValues.get(this.count() - 1);
|
|
188
|
+
if (!this.isSorted) {
|
|
189
|
+
for (var i = 0; i < this.count(); i++) {
|
|
190
|
+
if (xValues.get(i) < min) {
|
|
191
|
+
min = xValues.get(i);
|
|
192
|
+
}
|
|
193
|
+
if (xValues.get(i) > max) {
|
|
194
|
+
max = xValues.get(i);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
if (min === max) {
|
|
199
|
+
return new NumberRange_1.NumberRange(min - 1, max + 1);
|
|
200
|
+
}
|
|
201
|
+
else if (min > max) {
|
|
202
|
+
temp = min;
|
|
203
|
+
min = max;
|
|
204
|
+
max = temp;
|
|
205
|
+
}
|
|
206
|
+
return new NumberRange_1.NumberRange(min, max);
|
|
207
|
+
}
|
|
208
|
+
return new NumberRange_1.NumberRange();
|
|
209
|
+
};
|
|
210
|
+
/** @inheritDoc */
|
|
211
|
+
BaseDataSeries.prototype.getWindowedYRange = function (xRange, getPositiveRange, isXCategoryAxis, dataSeriesValueType) {
|
|
229
212
|
if (isXCategoryAxis === void 0) { isXCategoryAxis = false; }
|
|
230
|
-
|
|
213
|
+
if (dataSeriesValueType === void 0) { dataSeriesValueType = IDataSeries_1.EDataSeriesValueType.Default; }
|
|
214
|
+
var xValues = this.getXValues(dataSeriesValueType);
|
|
215
|
+
var yValues = this.getYValues(dataSeriesValueType);
|
|
216
|
+
return exports.getWindowedYRange(this.webAssemblyContext, xValues, yValues, xRange, getPositiveRange, isXCategoryAxis, this.isSorted);
|
|
231
217
|
};
|
|
232
218
|
BaseDataSeries.prototype.getIndicesRange = function (xRange) {
|
|
233
219
|
// TODO SearchMode downSearchMode = SearchMode.RoundDown, SearchMode upSearchMode = SearchMode.RoundUp
|
|
234
220
|
return getIndicesRange(this.webAssemblyContext, this.xValues, xRange, this.isSorted);
|
|
235
221
|
};
|
|
236
222
|
Object.defineProperty(BaseDataSeries.prototype, "hasValues", {
|
|
237
|
-
/**
|
|
238
|
-
* @inheritDoc
|
|
239
|
-
*/
|
|
223
|
+
/** @inheritDoc */
|
|
240
224
|
get: function () {
|
|
241
225
|
return this.count() > 0;
|
|
242
226
|
},
|
|
243
227
|
enumerable: false,
|
|
244
228
|
configurable: true
|
|
245
229
|
});
|
|
230
|
+
/**
|
|
231
|
+
* Check if the series has an existing metadaGenerator
|
|
232
|
+
*/
|
|
233
|
+
BaseDataSeries.prototype.hasMetadataGenerator = function () {
|
|
234
|
+
return typeof this.metadataGeneratorProperty !== "undefined";
|
|
235
|
+
};
|
|
246
236
|
/**
|
|
247
237
|
* Sets a function that will be used to generate metadata for values when they are appended/inserted, if no explicit metadata is supplied.
|
|
248
238
|
* @param generator
|
|
249
239
|
*/
|
|
250
240
|
BaseDataSeries.prototype.setMetadataGenerator = function (generator) {
|
|
251
|
-
var
|
|
241
|
+
var _this = this;
|
|
242
|
+
var newGenerator = !this.hasMetadataGenerator();
|
|
252
243
|
this.metadataGeneratorProperty = generator;
|
|
253
|
-
if (
|
|
254
|
-
|
|
244
|
+
if (newGenerator && !this.metadataProperty) {
|
|
245
|
+
var metadata = Array(this.xValues.size())
|
|
246
|
+
.fill(1)
|
|
247
|
+
.map(function (x) { return _this.metadataGeneratorProperty.getSingleMetadata(); });
|
|
248
|
+
this.metadataProperty = metadata;
|
|
255
249
|
}
|
|
256
250
|
};
|
|
257
251
|
/**
|
|
@@ -274,6 +268,58 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
274
268
|
}
|
|
275
269
|
return this.metadataProperty.length;
|
|
276
270
|
};
|
|
271
|
+
/**
|
|
272
|
+
* Sets initial values for the data animation
|
|
273
|
+
* @param dataSeries The {@link BaseDataSeries} to be used for initial values
|
|
274
|
+
*/
|
|
275
|
+
BaseDataSeries.prototype.setInitialAnimationVectors = function (dataSeries) {
|
|
276
|
+
if (!dataSeries) {
|
|
277
|
+
this.xInitialAnimationValues.resize(0, 0);
|
|
278
|
+
this.yInitialAnimationValues.resize(0, 0);
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
animationHelpers_1.animationHelpers.copyVector(dataSeries.getNativeXValues(), this.xInitialAnimationValues);
|
|
282
|
+
animationHelpers_1.animationHelpers.copyVector(dataSeries.getNativeYValues(), this.yInitialAnimationValues);
|
|
283
|
+
};
|
|
284
|
+
/**
|
|
285
|
+
* Sets final values for the data animation
|
|
286
|
+
* @param dataSeries The {@link BaseDataSeries} to be used for final values
|
|
287
|
+
*/
|
|
288
|
+
BaseDataSeries.prototype.setFinalAnimationVectors = function (dataSeries) {
|
|
289
|
+
if (!dataSeries) {
|
|
290
|
+
this.xFinalAnimationValues.resize(0, 0);
|
|
291
|
+
this.yFinalAnimationValues.resize(0, 0);
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
animationHelpers_1.animationHelpers.copyVector(dataSeries.getNativeXValues(), this.xFinalAnimationValues);
|
|
295
|
+
animationHelpers_1.animationHelpers.copyVector(dataSeries.getNativeYValues(), this.yFinalAnimationValues);
|
|
296
|
+
};
|
|
297
|
+
/**
|
|
298
|
+
* Validates the length of the animation vectors
|
|
299
|
+
*/
|
|
300
|
+
BaseDataSeries.prototype.validateAnimationVectors = function () {
|
|
301
|
+
var size = this.xInitialAnimationValues.size();
|
|
302
|
+
if (size !== this.yInitialAnimationValues.size() ||
|
|
303
|
+
size !== this.xFinalAnimationValues.size() ||
|
|
304
|
+
size !== this.yFinalAnimationValues.size()) {
|
|
305
|
+
throw Error("initialAnimationValues and finalAnimationValues must have the same length");
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
/**
|
|
309
|
+
* Updates the {@link BaseDataSeries} values for the animation
|
|
310
|
+
* @param progress The animation progress from 0 to 1
|
|
311
|
+
* @param animation The animation
|
|
312
|
+
*/
|
|
313
|
+
BaseDataSeries.prototype.updateAnimationProperties = function (progress, animation) {
|
|
314
|
+
if (animation.isOnStartAnimation) {
|
|
315
|
+
animation.calculateAnimationValues(this.webAssemblyContext, this.yFinalAnimationValues, this.getNativeYValues(), progress);
|
|
316
|
+
}
|
|
317
|
+
else if (animation.isDataSeriesAnimation) {
|
|
318
|
+
animation.calculateDataSeriesAnimationValues(this.webAssemblyContext, this.xInitialAnimationValues, this.xFinalAnimationValues, this.getNativeXValues(), progress);
|
|
319
|
+
animation.calculateDataSeriesAnimationValues(this.webAssemblyContext, this.yInitialAnimationValues, this.yFinalAnimationValues, this.getNativeYValues(), progress);
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
/** @inheritDoc */
|
|
277
323
|
BaseDataSeries.prototype.toJSON = function (excludeData) {
|
|
278
324
|
if (excludeData === void 0) { excludeData = false; }
|
|
279
325
|
var options = __assign({ containsNaN: this.containsNaN, dataIsSortedInX: this.isSorted, dataSeriesName: this.dataSeriesName,
|
|
@@ -369,12 +415,40 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
369
415
|
BaseDataSeries.prototype.setMetadata = function (value) {
|
|
370
416
|
this.metadataProperty = value;
|
|
371
417
|
};
|
|
418
|
+
BaseDataSeries.prototype.getXValues = function (dataSeriesValueType) {
|
|
419
|
+
var xValues;
|
|
420
|
+
switch (dataSeriesValueType) {
|
|
421
|
+
case IDataSeries_1.EDataSeriesValueType.FinalAnimationValues:
|
|
422
|
+
xValues = this.xFinalAnimationValues;
|
|
423
|
+
break;
|
|
424
|
+
case IDataSeries_1.EDataSeriesValueType.InitialAnimationValues:
|
|
425
|
+
xValues = this.xInitialAnimationValues;
|
|
426
|
+
break;
|
|
427
|
+
default:
|
|
428
|
+
xValues = this.xValues;
|
|
429
|
+
}
|
|
430
|
+
return xValues;
|
|
431
|
+
};
|
|
372
432
|
BaseDataSeries.prototype.fillMetadataIfUndefined = function () {
|
|
373
433
|
if (this.metadataProperty === undefined) {
|
|
374
434
|
var length_1 = this.count();
|
|
375
435
|
this.metadataProperty = Array(length_1).fill(undefined);
|
|
376
436
|
}
|
|
377
437
|
};
|
|
438
|
+
BaseDataSeries.prototype.getYValues = function (dataSeriesValueType) {
|
|
439
|
+
var yValues;
|
|
440
|
+
switch (dataSeriesValueType) {
|
|
441
|
+
case IDataSeries_1.EDataSeriesValueType.FinalAnimationValues:
|
|
442
|
+
yValues = this.yFinalAnimationValues;
|
|
443
|
+
break;
|
|
444
|
+
case IDataSeries_1.EDataSeriesValueType.InitialAnimationValues:
|
|
445
|
+
yValues = this.yInitialAnimationValues;
|
|
446
|
+
break;
|
|
447
|
+
default:
|
|
448
|
+
yValues = this.yValues;
|
|
449
|
+
}
|
|
450
|
+
return yValues;
|
|
451
|
+
};
|
|
378
452
|
return BaseDataSeries;
|
|
379
453
|
}());
|
|
380
454
|
exports.BaseDataSeries = BaseDataSeries;
|