scichart 2.0.2194 → 2.1.0-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Charting/ChartModifiers/CursorModifier.d.ts +9 -0
- package/Charting/ChartModifiers/CursorModifier.js +10 -0
- package/Charting/ChartModifiers/DataPointSelectionModifier.js +0 -1
- package/Charting/ChartModifiers/RolloverModifier.d.ts +25 -0
- package/Charting/ChartModifiers/RolloverModifier.js +8 -0
- package/Charting/Drawing/BrushCache.d.ts +8 -2
- package/Charting/Drawing/BrushCache.js +16 -8
- package/Charting/Drawing/WebGlRenderContext2D.d.ts +1 -0
- package/Charting/Drawing/WebGlRenderContext2D.js +4 -1
- package/Charting/LayoutManager/BaseAxisLayoutStrategy.d.ts +2 -0
- package/Charting/LayoutManager/BaseAxisLayoutStrategy.js +33 -0
- package/Charting/LayoutManager/BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +18 -2
- package/Charting/LayoutManager/LeftAlignedOuterVerticallyStackedAxisLayoutStrategy.js +19 -2
- package/Charting/LayoutManager/RightAlignedOuterVerticallyStackedAxisLayoutStrategy.js +18 -2
- package/Charting/LayoutManager/TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +18 -2
- 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 +47 -44
- 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 +26 -26
- package/Charting/Model/XyyDataSeries.d.ts +5 -5
- package/Charting/Model/XyyDataSeries.js +30 -27
- package/Charting/Model/XyzDataSeries.d.ts +5 -5
- package/Charting/Model/XyzDataSeries.js +30 -27
- package/Charting/Numerics/CoordinateCalculators/CategoryCoordinateCalculator.d.ts +2 -2
- package/Charting/Numerics/CoordinateCalculators/FlippedCategoryCoordinateCalculator.d.ts +2 -2
- package/Charting/Numerics/CoordinateCalculators/FlippedNumericCoordinateCalculator.d.ts +2 -1
- package/Charting/Numerics/CoordinateCalculators/FlippedNumericCoordinateCalculator.js +6 -2
- package/Charting/Numerics/CoordinateCalculators/NumericCoordinateCalculator.d.ts +2 -1
- package/Charting/Numerics/CoordinateCalculators/NumericCoordinateCalculator.js +6 -2
- package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.d.ts +54 -0
- package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +232 -0
- package/Charting/Numerics/Resamplers/ResamplingMode.d.ts +37 -0
- package/Charting/Numerics/Resamplers/ResamplingMode.js +41 -0
- package/Charting/Numerics/Resamplers/ResamplingParams.d.ts +39 -0
- package/Charting/Numerics/Resamplers/ResamplingParams.js +52 -0
- package/Charting/Services/RenderPassData.d.ts +6 -1
- package/Charting/Services/RenderPassData.js +5 -1
- package/Charting/Services/RenderPassInfo.d.ts +18 -0
- package/Charting/Services/RenderPassInfo.js +14 -0
- package/Charting/Services/SciChartRenderer.d.ts +14 -1
- package/Charting/Services/SciChartRenderer.js +124 -31
- package/Charting/Visuals/Annotations/AnnotationBase.d.ts +1 -1
- package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +1 -0
- package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +6 -0
- package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.d.ts +5 -0
- package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +12 -1
- package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +6 -8
- package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +12 -9
- package/Charting/Visuals/Annotations/SvgAnnotationBase.js +7 -2
- package/Charting/Visuals/Axis/AxisBase2D.d.ts +23 -0
- package/Charting/Visuals/Axis/AxisBase2D.js +71 -24
- 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 +37 -10
- package/Charting/Visuals/Axis/IAxisCoreOptions.d.ts +5 -0
- package/Charting/Visuals/Axis/LabelProvider/LabelCache.js +2 -2
- package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +9 -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/RenderableSeries/Animations/FadeAnimation.d.ts +2 -2
- package/Charting/Visuals/RenderableSeries/Animations/ScaleAnimation.d.ts +2 -2
- package/Charting/Visuals/RenderableSeries/Animations/SeriesAnimation.d.ts +3 -3
- package/Charting/Visuals/RenderableSeries/Animations/SweepAnimation.d.ts +2 -2
- package/Charting/Visuals/RenderableSeries/Animations/WaveAnimation.d.ts +2 -2
- package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.d.ts +6 -6
- package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.js +2 -2
- package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +9 -2
- package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.js +45 -1
- package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.js +1 -0
- package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.js +1 -0
- package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +12 -5
- package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +59 -0
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +40 -5
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +116 -11
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +36 -4
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +51 -3
- package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.d.ts +38 -4
- package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +54 -3
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +8 -14
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +4 -3
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +5 -11
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +4 -11
- package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.d.ts +2 -1
- package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +17 -21
- package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +16 -15
- package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.js +9 -15
- package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.d.ts +4 -3
- package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +16 -21
- package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformContoursDrawingProvider.js +2 -9
- package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +0 -7
- package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +6 -2
- package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +5 -0
- package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.js +1 -0
- package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.d.ts +1 -0
- package/Charting/Visuals/RenderableSeries/FastLineRenderableSeries.js +6 -0
- package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +2 -2
- package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/ColumnSeriesHitTestProvider.js +2 -2
- package/Charting/Visuals/RenderableSeries/HitTest/LineSeriesHitTestProvider.js +2 -2
- package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.js +2 -2
- package/Charting/Visuals/RenderableSeries/HitTest/ScatterSeriesHitTestProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/StackedColumnSeriesHitTestProvider.js +2 -2
- package/Charting/Visuals/RenderableSeries/HitTest/StackedMountainSeriesHitTestProvider.js +2 -2
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +6 -6
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +1 -1
- package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +12 -1
- package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +38 -2
- package/Charting/Visuals/RenderableSeries/ISpline.d.ts +3 -3
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.d.ts +4 -4
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +5 -5
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +3 -3
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +3 -3
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.d.ts +3 -3
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +3 -3
- package/Charting/Visuals/RenderableSeries/StackedColumnCollection.js +0 -6
- package/Charting/Visuals/RenderableSeries/StackedMountainCollection.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/StackedMountainCollection.js +1 -7
- package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.d.ts +5 -0
- package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.js +6 -0
- package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.d.ts +5 -0
- package/Charting/Visuals/RenderableSeries/UniformHeatmapRenderableSeries.js +6 -0
- package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.d.ts +5 -3
- package/Charting/Visuals/RenderableSeries/XyScatterRenderableSeries.js +6 -3
- package/Charting/Visuals/RenderableSeries/constants.d.ts +3 -0
- package/Charting/Visuals/RenderableSeries/constants.js +3 -0
- package/Charting/Visuals/SciChartDefaults.d.ts +9 -1
- package/Charting/Visuals/SciChartDefaults.js +9 -1
- package/Charting/Visuals/SciChartSurface.d.ts +4 -4
- package/Charting/Visuals/SciChartSurface.js +18 -11
- package/Charting/Visuals/SciChartSurfaceBase.d.ts +3 -2
- package/Charting/Visuals/SciChartSurfaceBase.js +4 -4
- package/Charting/Visuals/createMaster.d.ts +1 -1
- package/Charting/Visuals/createMaster.js +11 -6
- package/Charting/Visuals/createSingle.d.ts +1 -1
- package/Charting/Visuals/createSingle.js +2 -2
- package/Charting/Visuals/licenseManager2D.js +22 -21
- package/Charting/Visuals/licenseManager2dState.d.ts +4 -0
- package/Charting/Visuals/licenseManager2dState.js +12 -0
- package/Charting/Visuals/sciChartInitCommon.d.ts +2 -2
- package/Charting/Visuals/sciChartInitCommon.js +18 -12
- package/Charting3D/Model/DataSeries/XyzDataSeries3D.d.ts +7 -7
- package/Charting3D/Model/DataSeries/XyzDataSeries3D.js +3 -3
- package/Charting3D/Visuals/SciChart3DSurface.d.ts +2 -2
- package/Charting3D/Visuals/SciChart3DSurface.js +3 -3
- package/Charting3D/Visuals/createMaster3d.d.ts +1 -1
- package/Charting3D/Visuals/createMaster3d.js +11 -6
- package/Charting3D/Visuals/createSingle3d.d.ts +1 -1
- package/Charting3D/Visuals/createSingle3d.js +2 -2
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/Core/NumberRange.d.ts +1 -0
- package/Core/NumberRange.js +8 -0
- package/Core/OneTimePerformanceWarning.d.ts +6 -0
- package/Core/OneTimePerformanceWarning.js +19 -0
- package/Core/storage/localStorageApi.d.ts +9 -0
- package/Core/storage/localStorageApi.js +32 -0
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.js +12 -12
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +96 -96
- package/_wasm/scichart3d.wasm +0 -0
- package/constants/performanceWarnings.d.ts +5 -0
- package/constants/performanceWarnings.js +8 -0
- package/package.json +1 -1
- package/types/NumberArray.d.ts +1 -0
- package/types/NumberArray.js +5 -1
- package/types/SearchMode.d.ts +21 -0
- package/types/SearchMode.js +25 -0
- package/types/TSciChart.d.ts +143 -40
- package/types/TSciChart3D.d.ts +66 -28
- package/types/TStackedAxisLength.d.ts +4 -0
- package/types/TStackedAxisLength.js +4 -0
- package/utils/array.d.ts +7 -0
- package/utils/array.js +19 -1
- package/utils/calcAverage.d.ts +2 -2
- package/utils/ccall/appendDoubleVectorFromJsArray.d.ts +19 -0
- package/utils/ccall/appendDoubleVectorFromJsArray.js +91 -0
- package/utils/hash.d.ts +7 -0
- package/utils/hash.js +35 -0
- package/utils/ccall/fillDoubleVectorFromJsArray.d.ts +0 -3
- package/utils/ccall/fillDoubleVectorFromJsArray.js +0 -33
|
@@ -26,9 +26,11 @@ var Deleter_1 = require("../../Core/Deleter");
|
|
|
26
26
|
var EventHandler_1 = require("../../Core/EventHandler");
|
|
27
27
|
var NumberRange_1 = require("../../Core/NumberRange");
|
|
28
28
|
var BaseType_1 = require("../../types/BaseType");
|
|
29
|
-
var
|
|
29
|
+
var SearchMode_1 = require("../../types/SearchMode");
|
|
30
|
+
var guid_1 = require("../../utils/guid");
|
|
30
31
|
var isRealNumber_1 = require("../../utils/isRealNumber");
|
|
31
32
|
var animationHelpers_1 = require("../Visuals/RenderableSeries/Animations/animationHelpers");
|
|
33
|
+
var DataDistributionCalculator_1 = require("./DataDistributionCalculator/DataDistributionCalculator");
|
|
32
34
|
var IDataSeries_1 = require("./IDataSeries");
|
|
33
35
|
var IPointMetadata_1 = require("./IPointMetadata");
|
|
34
36
|
/**
|
|
@@ -49,28 +51,34 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
49
51
|
* @param options the {@link IBaseDataSeriesOptions} which can be passed to config the DataSeries at construct time
|
|
50
52
|
*/
|
|
51
53
|
function BaseDataSeries(webAssemblyContext, options) {
|
|
52
|
-
var _a, _b, _c;
|
|
54
|
+
var _a, _b, _c, _d, _e;
|
|
53
55
|
/** @inheritDoc */
|
|
54
56
|
this.dataChanged = new EventHandler_1.EventHandler();
|
|
57
|
+
/** @inheritDoc */
|
|
58
|
+
this.dataDistributionCalculator = new DataDistributionCalculator_1.DataDistributionCalculator();
|
|
55
59
|
this.minXSpacing = 0;
|
|
56
|
-
this.isSortedProperty =
|
|
57
|
-
this.containsNaNProperty =
|
|
60
|
+
this.isSortedProperty = undefined;
|
|
61
|
+
this.containsNaNProperty = undefined;
|
|
62
|
+
this.isEvenlySpacedProperty = false;
|
|
58
63
|
this.metadataGeneratorProperty = undefined;
|
|
64
|
+
this.changeCountProperty = 0;
|
|
59
65
|
this.webAssemblyContext = webAssemblyContext;
|
|
60
|
-
this.
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
64
|
-
this.
|
|
65
|
-
this.
|
|
66
|
-
this.
|
|
67
|
-
this.
|
|
66
|
+
this.id = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : (0, guid_1.generateGuid)();
|
|
67
|
+
this.xValues = new webAssemblyContext.SCRTDoubleVector();
|
|
68
|
+
this.yValues = new webAssemblyContext.SCRTDoubleVector();
|
|
69
|
+
this.indexes = new webAssemblyContext.SCRTDoubleVector();
|
|
70
|
+
this.xInitialAnimationValues = new webAssemblyContext.SCRTDoubleVector();
|
|
71
|
+
this.yInitialAnimationValues = new webAssemblyContext.SCRTDoubleVector();
|
|
72
|
+
this.xFinalAnimationValues = new webAssemblyContext.SCRTDoubleVector();
|
|
73
|
+
this.yFinalAnimationValues = new webAssemblyContext.SCRTDoubleVector();
|
|
74
|
+
this.dataSeriesNameProperty = (_b = options === null || options === void 0 ? void 0 : options.dataSeriesName) !== null && _b !== void 0 ? _b : this.dataSeriesNameProperty;
|
|
68
75
|
this.isSorted = (options === null || options === void 0 ? void 0 : options.dataIsSortedInX) !== undefined ? options === null || options === void 0 ? void 0 : options.dataIsSortedInX : this.isSortedProperty;
|
|
69
|
-
this.containsNaN = (
|
|
76
|
+
this.containsNaN = (_c = options === null || options === void 0 ? void 0 : options.containsNaN) !== null && _c !== void 0 ? _c : this.containsNaNProperty;
|
|
77
|
+
this.isEvenlySpaced = (_d = options === null || options === void 0 ? void 0 : options.dataEvenlySpacedInX) !== null && _d !== void 0 ? _d : this.isEvenlySpacedProperty;
|
|
70
78
|
if (options === null || options === void 0 ? void 0 : options.metadata) {
|
|
71
79
|
if ("type" in options.metadata) {
|
|
72
80
|
this.metadataGeneratorProperty = (0, classFactory_1.createType)(BaseType_1.EBaseType.MetadataGenerator, options.metadata.type, webAssemblyContext, options.metadata.data);
|
|
73
|
-
options.metadata = (
|
|
81
|
+
options.metadata = (_e = this.metadataGeneratorProperty) === null || _e === void 0 ? void 0 : _e.getMetadata();
|
|
74
82
|
}
|
|
75
83
|
else if (!Array.isArray(options === null || options === void 0 ? void 0 : options.metadata)) {
|
|
76
84
|
this.metadataGeneratorProperty = new IPointMetadata_1.TemplateMetadataGenerator(options === null || options === void 0 ? void 0 : options.metadata);
|
|
@@ -78,6 +86,12 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
78
86
|
}
|
|
79
87
|
}
|
|
80
88
|
}
|
|
89
|
+
/** @inheritDoc */
|
|
90
|
+
BaseDataSeries.prototype.clear = function () {
|
|
91
|
+
var _a;
|
|
92
|
+
(_a = this.indexes) === null || _a === void 0 ? void 0 : _a.clear();
|
|
93
|
+
this.dataDistributionCalculator.clear(this.isSorted, this.containsNaN);
|
|
94
|
+
};
|
|
81
95
|
Object.defineProperty(BaseDataSeries.prototype, "containsNaN", {
|
|
82
96
|
/** @inheritDoc */
|
|
83
97
|
get: function () {
|
|
@@ -86,6 +100,9 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
86
100
|
/** @inheritDoc */
|
|
87
101
|
set: function (containsNaN) {
|
|
88
102
|
this.containsNaNProperty = containsNaN;
|
|
103
|
+
if (containsNaN !== undefined) {
|
|
104
|
+
this.dataDistributionCalculator.setContainsNaN(containsNaN);
|
|
105
|
+
}
|
|
89
106
|
this.notifyDataChanged(IDataSeries_1.EDataChangeType.Property, undefined, undefined, "containsNaN");
|
|
90
107
|
},
|
|
91
108
|
enumerable: false,
|
|
@@ -99,11 +116,27 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
99
116
|
/** @inheritDoc */
|
|
100
117
|
set: function (isSorted) {
|
|
101
118
|
this.isSortedProperty = isSorted;
|
|
119
|
+
if (isSorted !== undefined) {
|
|
120
|
+
this.dataDistributionCalculator.setIsSortedAscending(isSorted);
|
|
121
|
+
}
|
|
102
122
|
this.notifyDataChanged(IDataSeries_1.EDataChangeType.Property, undefined, undefined, "isSorted");
|
|
103
123
|
},
|
|
104
124
|
enumerable: false,
|
|
105
125
|
configurable: true
|
|
106
126
|
});
|
|
127
|
+
Object.defineProperty(BaseDataSeries.prototype, "isEvenlySpaced", {
|
|
128
|
+
/** @inheritDoc */
|
|
129
|
+
get: function () {
|
|
130
|
+
return this.isEvenlySpacedProperty;
|
|
131
|
+
},
|
|
132
|
+
/** @inheritDoc */
|
|
133
|
+
set: function (isSorted) {
|
|
134
|
+
this.isEvenlySpacedProperty = isSorted;
|
|
135
|
+
this.notifyDataChanged(IDataSeries_1.EDataChangeType.Property, undefined, undefined, "isEvenlySpaced");
|
|
136
|
+
},
|
|
137
|
+
enumerable: false,
|
|
138
|
+
configurable: true
|
|
139
|
+
});
|
|
107
140
|
Object.defineProperty(BaseDataSeries.prototype, "dataSeriesName", {
|
|
108
141
|
/** @inheritDoc */
|
|
109
142
|
get: function () {
|
|
@@ -135,9 +168,7 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
135
168
|
}
|
|
136
169
|
var indexes = this.indexes;
|
|
137
170
|
if (indexes.size() < this.count()) {
|
|
138
|
-
|
|
139
|
-
var indexValues = Array.from(Array(newIndexesLength), function (_, i) { return i + indexes.size(); });
|
|
140
|
-
(0, fillDoubleVectorFromJsArray_1.fillDoubleVectorFromJsArray)(this.webAssemblyContext, this.indexes, indexValues);
|
|
171
|
+
this.webAssemblyContext.SCRTFillVectorSequential(this.indexes, this.count());
|
|
141
172
|
}
|
|
142
173
|
return this.indexes;
|
|
143
174
|
};
|
|
@@ -165,6 +196,7 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
165
196
|
* Call to notify subscribers of {@link dataChanged} that the data has changed and {@link SciChartSurface} needs redrawing
|
|
166
197
|
*/
|
|
167
198
|
BaseDataSeries.prototype.notifyDataChanged = function (changeType, index, count, name) {
|
|
199
|
+
this.changeCountProperty++;
|
|
168
200
|
this.dataChanged.raiseEvent({ changeType: changeType, index: index, count: count });
|
|
169
201
|
};
|
|
170
202
|
Object.defineProperty(BaseDataSeries.prototype, "xRange", {
|
|
@@ -187,14 +219,18 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
187
219
|
else if (this.count() > 1) {
|
|
188
220
|
var min = xValues.get(0);
|
|
189
221
|
var max = xValues.get(this.count() - 1);
|
|
190
|
-
if (!this.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
max = xValues.get(i);
|
|
222
|
+
if (!this.dataDistributionCalculator.isSortedAscending) {
|
|
223
|
+
var minMax = void 0;
|
|
224
|
+
try {
|
|
225
|
+
minMax = this.webAssemblyContext.NumberUtil.MinMax(this.getNativeXValues());
|
|
226
|
+
if (!(0, isRealNumber_1.isRealNumber)(minMax.minD) || !(0, isRealNumber_1.isRealNumber)(minMax.maxD)) {
|
|
227
|
+
return new NumberRange_1.NumberRange(0, 0);
|
|
197
228
|
}
|
|
229
|
+
min = minMax.minD;
|
|
230
|
+
max = minMax.maxD;
|
|
231
|
+
}
|
|
232
|
+
finally {
|
|
233
|
+
(0, Deleter_1.deleteSafe)(minMax);
|
|
198
234
|
}
|
|
199
235
|
}
|
|
200
236
|
if (min === max) {
|
|
@@ -207,7 +243,7 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
207
243
|
}
|
|
208
244
|
return new NumberRange_1.NumberRange(min, max);
|
|
209
245
|
}
|
|
210
|
-
return new NumberRange_1.NumberRange();
|
|
246
|
+
return new NumberRange_1.NumberRange(0, 0);
|
|
211
247
|
};
|
|
212
248
|
/** @inheritDoc */
|
|
213
249
|
BaseDataSeries.prototype.getWindowedYRange = function (xRange, getPositiveRange, isXCategoryAxis, dataSeriesValueType) {
|
|
@@ -215,11 +251,16 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
215
251
|
if (dataSeriesValueType === void 0) { dataSeriesValueType = IDataSeries_1.EDataSeriesValueType.Default; }
|
|
216
252
|
var xValues = this.getXValues(dataSeriesValueType);
|
|
217
253
|
var yValues = this.getYValues(dataSeriesValueType);
|
|
218
|
-
return (0, exports.getWindowedYRange)(this.webAssemblyContext, xValues, yValues, xRange, getPositiveRange, isXCategoryAxis, this.
|
|
254
|
+
return (0, exports.getWindowedYRange)(this.webAssemblyContext, xValues, yValues, xRange, getPositiveRange, isXCategoryAxis, this.dataDistributionCalculator.isSortedAscending);
|
|
219
255
|
};
|
|
220
|
-
|
|
256
|
+
/** @inheritDoc */
|
|
257
|
+
BaseDataSeries.prototype.getIndicesRange = function (xRange, isCategoryData, downSearchMode, upSearchMode) {
|
|
258
|
+
if (isCategoryData === void 0) { isCategoryData = false; }
|
|
259
|
+
if (downSearchMode === void 0) { downSearchMode = SearchMode_1.ESearchMode.RoundDown; }
|
|
260
|
+
if (upSearchMode === void 0) { upSearchMode = SearchMode_1.ESearchMode.RoundUp; }
|
|
221
261
|
// TODO SearchMode downSearchMode = SearchMode.RoundDown, SearchMode upSearchMode = SearchMode.RoundUp
|
|
222
|
-
|
|
262
|
+
var vector = isCategoryData ? this.getNativeIndexes() : this.xValues;
|
|
263
|
+
return getIndicesRange(this.webAssemblyContext, vector, xRange, this.dataDistributionCalculator.isSortedAscending);
|
|
223
264
|
};
|
|
224
265
|
Object.defineProperty(BaseDataSeries.prototype, "hasValues", {
|
|
225
266
|
/** @inheritDoc */
|
|
@@ -329,6 +370,14 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
329
370
|
metadata: this.metadataGeneratorProperty ? this.metadataGeneratorProperty.toJSON() : this.metadataProperty }, this.dataIds);
|
|
330
371
|
return options;
|
|
331
372
|
};
|
|
373
|
+
Object.defineProperty(BaseDataSeries.prototype, "changeCount", {
|
|
374
|
+
/** @inheritDoc */
|
|
375
|
+
get: function () {
|
|
376
|
+
return this.changeCountProperty;
|
|
377
|
+
},
|
|
378
|
+
enumerable: false,
|
|
379
|
+
configurable: true
|
|
380
|
+
});
|
|
332
381
|
BaseDataSeries.prototype.validateIndex = function (index, message) {
|
|
333
382
|
if (Math.round(index) !== index) {
|
|
334
383
|
throw Error("Index must be an integer");
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { TSeriesDataDefinition } from "../../Builder/buildDataSeries";
|
|
2
2
|
import { EventHandler } from "../../Core/EventHandler";
|
|
3
3
|
import { NumberRange } from "../../Core/NumberRange";
|
|
4
|
-
import {
|
|
4
|
+
import { ESearchMode } from "../../types/SearchMode";
|
|
5
|
+
import { FloatVector, SCRTDoubleVector, TSciChart } from "../../types/TSciChart";
|
|
5
6
|
import { IColorMapParams } from "../Visuals/RenderableSeries/HeatmapColorMap";
|
|
7
|
+
import { IDataDistributionCalculator } from "./DataDistributionCalculator/IDataDistributionCalculator";
|
|
6
8
|
import { EDataChangeType, EDataSeriesType, IDataChangeArgs, IDataSeries } from "./IDataSeries";
|
|
7
9
|
import { IMetadataGenerator, IPointMetadata } from "./IPointMetadata";
|
|
8
10
|
/**
|
|
9
|
-
* Options to pass to the {@link
|
|
11
|
+
* Options to pass to the {@link BaseHeatmapDataSeries} constructor
|
|
10
12
|
*/
|
|
11
13
|
export interface IBaseHeatmapSeriesOptions {
|
|
14
|
+
/**
|
|
15
|
+
* A unique Id for the {@link IDataSeries}
|
|
16
|
+
*/
|
|
17
|
+
id?: string;
|
|
12
18
|
/**
|
|
13
19
|
* The DataSeries name, used in legends, tooltips to identify the chart series
|
|
14
20
|
*/
|
|
@@ -45,14 +51,13 @@ export interface IHeatmapSeries extends IDataSeries {
|
|
|
45
51
|
* See {@link UniformHeatmapRenderableSeries} to see the class for rendering a 2D JavaScript Heatmap Chart.
|
|
46
52
|
*/
|
|
47
53
|
export declare abstract class BaseHeatmapDataSeries implements IHeatmapSeries {
|
|
48
|
-
/**
|
|
49
|
-
* @inheritDoc
|
|
50
|
-
*/
|
|
54
|
+
/** @inheritDoc */
|
|
51
55
|
abstract type: EDataSeriesType;
|
|
52
|
-
/**
|
|
53
|
-
* @inheritDoc
|
|
54
|
-
*/
|
|
56
|
+
/** @inheritDoc */
|
|
55
57
|
readonly dataChanged: EventHandler<IDataChangeArgs>;
|
|
58
|
+
/** @inheritDoc */
|
|
59
|
+
readonly id: string;
|
|
60
|
+
/** @inheritDoc */
|
|
56
61
|
minXSpacing: number;
|
|
57
62
|
/**
|
|
58
63
|
* Gets the width of the 2-dimensional array of {@link getZValues | Z-Values} where array is ranked [width][height]
|
|
@@ -87,6 +92,7 @@ export declare abstract class BaseHeatmapDataSeries implements IHeatmapSeries {
|
|
|
87
92
|
private lastZMin;
|
|
88
93
|
private lastZMax;
|
|
89
94
|
private metadataGeneratorProperty;
|
|
95
|
+
private changeCountProperty;
|
|
90
96
|
/**
|
|
91
97
|
* Creates an instance of {@link BaseHeatmapDataSeries}
|
|
92
98
|
* @param webAssemblyContext the {@link TSciChart | SciChart WebAssembly Context} containing native methods
|
|
@@ -94,22 +100,20 @@ export declare abstract class BaseHeatmapDataSeries implements IHeatmapSeries {
|
|
|
94
100
|
* @param options the {@link IBaseHeatmapSeriesOptions} which can be passed to configure the DataSeries at construct time
|
|
95
101
|
*/
|
|
96
102
|
protected constructor(webAssemblyContext: TSciChart, options: IBaseHeatmapSeriesOptions);
|
|
97
|
-
/**
|
|
98
|
-
* @inheritDoc
|
|
99
|
-
*/
|
|
103
|
+
/** @inheritDoc */
|
|
100
104
|
get isSorted(): boolean;
|
|
101
|
-
/**
|
|
102
|
-
* @inheritDoc
|
|
103
|
-
*/
|
|
105
|
+
/** @inheritDoc */
|
|
104
106
|
set isSorted(value: boolean);
|
|
105
|
-
/**
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
/** @inheritDoc */
|
|
108
|
+
get isEvenlySpaced(): boolean;
|
|
109
|
+
/** @inheritDoc */
|
|
110
|
+
set isEvenlySpaced(value: boolean);
|
|
111
|
+
/** @inheritDoc */
|
|
108
112
|
get containsNaN(): boolean;
|
|
109
|
-
/**
|
|
110
|
-
* @inheritDoc
|
|
111
|
-
*/
|
|
113
|
+
/** @inheritDoc */
|
|
112
114
|
set containsNaN(value: boolean);
|
|
115
|
+
/** @inheritDoc */
|
|
116
|
+
get dataDistributionCalculator(): IDataDistributionCalculator;
|
|
113
117
|
/**
|
|
114
118
|
* Returns true if the Heatmap DataSeries has data changes.
|
|
115
119
|
* This flag is set to true when notifyDataChanged is called, and reset to false after
|
|
@@ -225,15 +229,15 @@ export declare abstract class BaseHeatmapDataSeries implements IHeatmapSeries {
|
|
|
225
229
|
/**
|
|
226
230
|
* @inheritDoc
|
|
227
231
|
*/
|
|
228
|
-
getNativeIndexes():
|
|
232
|
+
getNativeIndexes(): SCRTDoubleVector;
|
|
229
233
|
/**
|
|
230
234
|
* @inheritDoc
|
|
231
235
|
*/
|
|
232
|
-
getNativeXValues():
|
|
236
|
+
getNativeXValues(): SCRTDoubleVector;
|
|
233
237
|
/**
|
|
234
238
|
* @inheritDoc
|
|
235
239
|
*/
|
|
236
|
-
getNativeYValues():
|
|
240
|
+
getNativeYValues(): SCRTDoubleVector;
|
|
237
241
|
/**
|
|
238
242
|
* @inheritDoc
|
|
239
243
|
*/
|
|
@@ -278,6 +282,10 @@ export declare abstract class BaseHeatmapDataSeries implements IHeatmapSeries {
|
|
|
278
282
|
* Gets the range in the Y-direction for this DataSeries
|
|
279
283
|
*/
|
|
280
284
|
abstract getYRange(): NumberRange;
|
|
285
|
+
/** @inheritDoc */
|
|
286
|
+
getIndicesRange(visibleRange: NumberRange, isCategoryData: boolean, downSearchMode?: ESearchMode, upSearchMode?: ESearchMode): NumberRange;
|
|
287
|
+
/** @inheritDoc */
|
|
288
|
+
get changeCount(): number;
|
|
281
289
|
/**
|
|
282
290
|
* Computes the range in the Z-direction for this DataSeries
|
|
283
291
|
* @remarks
|
|
@@ -7,6 +7,7 @@ var EventHandler_1 = require("../../Core/EventHandler");
|
|
|
7
7
|
var Guard_1 = require("../../Core/Guard");
|
|
8
8
|
var NumberRange_1 = require("../../Core/NumberRange");
|
|
9
9
|
var BaseType_1 = require("../../types/BaseType");
|
|
10
|
+
var guid_1 = require("../../utils/guid");
|
|
10
11
|
var isRealNumber_1 = require("../../utils/isRealNumber");
|
|
11
12
|
var IDataSeries_1 = require("./IDataSeries");
|
|
12
13
|
var IPointMetadata_1 = require("./IPointMetadata");
|
|
@@ -28,11 +29,10 @@ var BaseHeatmapDataSeries = /** @class */ (function () {
|
|
|
28
29
|
* @param options the {@link IBaseHeatmapSeriesOptions} which can be passed to configure the DataSeries at construct time
|
|
29
30
|
*/
|
|
30
31
|
function BaseHeatmapDataSeries(webAssemblyContext, options) {
|
|
31
|
-
var _a;
|
|
32
|
-
/**
|
|
33
|
-
* @inheritDoc
|
|
34
|
-
*/
|
|
32
|
+
var _a, _b;
|
|
33
|
+
/** @inheritDoc */
|
|
35
34
|
this.dataChanged = new EventHandler_1.EventHandler();
|
|
35
|
+
/** @inheritDoc */
|
|
36
36
|
this.minXSpacing = 0;
|
|
37
37
|
/**
|
|
38
38
|
* Gets the width of the 2-dimensional array of {@link getZValues | Z-Values} where array is ranked [width][height]
|
|
@@ -50,12 +50,14 @@ var BaseHeatmapDataSeries = /** @class */ (function () {
|
|
|
50
50
|
this.lastZMin = -1;
|
|
51
51
|
this.lastZMax = -1;
|
|
52
52
|
this.metadataGeneratorProperty = undefined;
|
|
53
|
+
this.changeCountProperty = 0;
|
|
53
54
|
this.webAssemblyContext = webAssemblyContext;
|
|
55
|
+
this.id = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : (0, guid_1.generateGuid)();
|
|
54
56
|
this.normalizedVector = new this.webAssemblyContext.FloatVector();
|
|
55
57
|
if (options === null || options === void 0 ? void 0 : options.metadata) {
|
|
56
58
|
if ("type" in options.metadata) {
|
|
57
59
|
this.metadataGeneratorProperty = (0, classFactory_1.createType)(BaseType_1.EBaseType.MetadataGenerator, options.metadata.type, webAssemblyContext, options.metadata.data);
|
|
58
|
-
options.metadata = (
|
|
60
|
+
options.metadata = (_b = this.metadataGeneratorProperty) === null || _b === void 0 ? void 0 : _b.getMetadata();
|
|
59
61
|
}
|
|
60
62
|
else if (!Array.isArray(options === null || options === void 0 ? void 0 : options.metadata)) {
|
|
61
63
|
this.metadataGeneratorProperty = new IPointMetadata_1.TemplateMetadataGenerator(options === null || options === void 0 ? void 0 : options.metadata);
|
|
@@ -66,33 +68,45 @@ var BaseHeatmapDataSeries = /** @class */ (function () {
|
|
|
66
68
|
this.setZValues(options === null || options === void 0 ? void 0 : options.zValues, options === null || options === void 0 ? void 0 : options.metadata);
|
|
67
69
|
}
|
|
68
70
|
Object.defineProperty(BaseHeatmapDataSeries.prototype, "isSorted", {
|
|
69
|
-
/**
|
|
70
|
-
* @inheritDoc
|
|
71
|
-
*/
|
|
71
|
+
/** @inheritDoc */
|
|
72
72
|
get: function () {
|
|
73
73
|
return true;
|
|
74
74
|
},
|
|
75
|
-
/**
|
|
76
|
-
* @inheritDoc
|
|
77
|
-
*/
|
|
75
|
+
/** @inheritDoc */
|
|
78
76
|
set: function (value) {
|
|
79
77
|
throw new Error("setting isSorted on a heatmap series is not supported");
|
|
80
78
|
},
|
|
81
79
|
enumerable: false,
|
|
82
80
|
configurable: true
|
|
83
81
|
});
|
|
82
|
+
Object.defineProperty(BaseHeatmapDataSeries.prototype, "isEvenlySpaced", {
|
|
83
|
+
/** @inheritDoc */
|
|
84
|
+
get: function () {
|
|
85
|
+
return true;
|
|
86
|
+
},
|
|
87
|
+
/** @inheritDoc */
|
|
88
|
+
set: function (value) {
|
|
89
|
+
throw new Error("setting isEvenlySpaced on a heatmap series is not supported");
|
|
90
|
+
},
|
|
91
|
+
enumerable: false,
|
|
92
|
+
configurable: true
|
|
93
|
+
});
|
|
84
94
|
Object.defineProperty(BaseHeatmapDataSeries.prototype, "containsNaN", {
|
|
85
|
-
/**
|
|
86
|
-
* @inheritDoc
|
|
87
|
-
*/
|
|
95
|
+
/** @inheritDoc */
|
|
88
96
|
get: function () {
|
|
89
97
|
return false;
|
|
90
98
|
},
|
|
91
|
-
/**
|
|
92
|
-
* @inheritDoc
|
|
93
|
-
*/
|
|
99
|
+
/** @inheritDoc */
|
|
94
100
|
set: function (value) {
|
|
95
|
-
throw new Error("setting containsNaN
|
|
101
|
+
throw new Error("setting containsNaN is not supported on BaseHeatmapDataSeries");
|
|
102
|
+
},
|
|
103
|
+
enumerable: false,
|
|
104
|
+
configurable: true
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(BaseHeatmapDataSeries.prototype, "dataDistributionCalculator", {
|
|
107
|
+
/** @inheritDoc */
|
|
108
|
+
get: function () {
|
|
109
|
+
throw new Error("dataDistributionCalculator is not supported on BaseHeatmapDataSeries");
|
|
96
110
|
},
|
|
97
111
|
enumerable: false,
|
|
98
112
|
configurable: true
|
|
@@ -378,6 +392,7 @@ var BaseHeatmapDataSeries = /** @class */ (function () {
|
|
|
378
392
|
* This will trigger a redraw on a parent SciChartSurface
|
|
379
393
|
*/
|
|
380
394
|
BaseHeatmapDataSeries.prototype.notifyDataChanged = function (changeType, xIndex, yIndex, name) {
|
|
395
|
+
this.changeCountProperty++;
|
|
381
396
|
this.hasDataChangesProperty = true;
|
|
382
397
|
this.dataChanged.raiseEvent({ changeType: changeType, index: xIndex, yIndex: yIndex, name: name });
|
|
383
398
|
};
|
|
@@ -472,6 +487,18 @@ var BaseHeatmapDataSeries = /** @class */ (function () {
|
|
|
472
487
|
};
|
|
473
488
|
return options;
|
|
474
489
|
};
|
|
490
|
+
/** @inheritDoc */
|
|
491
|
+
BaseHeatmapDataSeries.prototype.getIndicesRange = function (visibleRange, isCategoryData, downSearchMode, upSearchMode) {
|
|
492
|
+
throw Error("getIndicesRange() method is not supported for BaseHeatmapDataSeries");
|
|
493
|
+
};
|
|
494
|
+
Object.defineProperty(BaseHeatmapDataSeries.prototype, "changeCount", {
|
|
495
|
+
/** @inheritDoc */
|
|
496
|
+
get: function () {
|
|
497
|
+
return this.changeCountProperty;
|
|
498
|
+
},
|
|
499
|
+
enumerable: false,
|
|
500
|
+
configurable: true
|
|
501
|
+
});
|
|
475
502
|
/**
|
|
476
503
|
* Computes the range in the Z-direction for this DataSeries
|
|
477
504
|
* @remarks
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NumberArray } from "../../../types/NumberArray";
|
|
2
|
+
import { SCRTDoubleVector } from "../../../types/TSciChart";
|
|
3
|
+
import { IDataDistributionCalculator } from "./IDataDistributionCalculator";
|
|
4
|
+
export declare class DataDistributionCalculator implements IDataDistributionCalculator {
|
|
5
|
+
private containsNanProperty;
|
|
6
|
+
private isSortedAscendingProperty;
|
|
7
|
+
/** @inheritDoc */
|
|
8
|
+
get containsNaN(): boolean;
|
|
9
|
+
/** @inheritDoc */
|
|
10
|
+
get isSortedAscending(): boolean;
|
|
11
|
+
/** @inheritDoc */
|
|
12
|
+
onAppend(isSorted: boolean, containsNaN: boolean, currentXValues: SCRTDoubleVector, newXValues: NumberArray, newYValues: NumberArray): void;
|
|
13
|
+
/** @inheritDoc */
|
|
14
|
+
onInsert(isSorted: boolean, containsNaN: boolean, currentXValues: SCRTDoubleVector, newXValues: NumberArray, newYValues: NumberArray, indexWhereInserted: number): void;
|
|
15
|
+
/** @inheritDoc */
|
|
16
|
+
onUpdate(isSorted: boolean, containsNaN: boolean, currentXValues: SCRTDoubleVector, newXValues: NumberArray, newYValues: NumberArray, indexWhereUpdated: number): void;
|
|
17
|
+
/** @inheritDoc */
|
|
18
|
+
clear(isSorted: boolean, containsNaN: boolean): void;
|
|
19
|
+
/** @inheritDoc */
|
|
20
|
+
setIsSortedAscending(value: boolean): void;
|
|
21
|
+
/** @inheritDoc */
|
|
22
|
+
setContainsNaN(value: boolean): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataDistributionCalculator = void 0;
|
|
4
|
+
var performanceWarnings_1 = require("../../../constants/performanceWarnings");
|
|
5
|
+
var array_1 = require("../../../utils/array");
|
|
6
|
+
var DataDistributionCalculator = /** @class */ (function () {
|
|
7
|
+
function DataDistributionCalculator() {
|
|
8
|
+
this.containsNanProperty = false;
|
|
9
|
+
this.isSortedAscendingProperty = true;
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(DataDistributionCalculator.prototype, "containsNaN", {
|
|
12
|
+
/** @inheritDoc */
|
|
13
|
+
get: function () {
|
|
14
|
+
return this.containsNanProperty;
|
|
15
|
+
},
|
|
16
|
+
enumerable: false,
|
|
17
|
+
configurable: true
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(DataDistributionCalculator.prototype, "isSortedAscending", {
|
|
20
|
+
/** @inheritDoc */
|
|
21
|
+
get: function () {
|
|
22
|
+
return this.isSortedAscendingProperty;
|
|
23
|
+
},
|
|
24
|
+
enumerable: false,
|
|
25
|
+
configurable: true
|
|
26
|
+
});
|
|
27
|
+
/** @inheritDoc */
|
|
28
|
+
DataDistributionCalculator.prototype.onAppend = function (isSorted, containsNaN, currentXValues, newXValues, newYValues) {
|
|
29
|
+
if (containsNaN !== undefined) {
|
|
30
|
+
this.containsNanProperty = containsNaN;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
if (this.containsNanProperty === false) {
|
|
34
|
+
this.containsNanProperty = newYValues.some(function (y) { return isNaN(y); });
|
|
35
|
+
if (this.containsNanProperty === false)
|
|
36
|
+
performanceWarnings_1.performanceWarnings.dataDistributionFlagNaN.warn();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (isSorted !== undefined) {
|
|
40
|
+
this.isSortedAscendingProperty = isSorted;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
if (this.isSortedAscendingProperty === true) {
|
|
44
|
+
var newSectionSortedAsc = (0, array_1.isArraySorted)(newXValues);
|
|
45
|
+
var oldSectionLength = currentXValues.size();
|
|
46
|
+
var newSectionAfterOldSection = oldSectionLength === 0 || currentXValues.get(oldSectionLength - 1) < newXValues[0];
|
|
47
|
+
this.isSortedAscendingProperty = newSectionSortedAsc && newSectionAfterOldSection;
|
|
48
|
+
if (this.isSortedAscendingProperty === true)
|
|
49
|
+
performanceWarnings_1.performanceWarnings.dataDistributionFlagSortedAscending.warn();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
/** @inheritDoc */
|
|
54
|
+
DataDistributionCalculator.prototype.onInsert = function (isSorted, containsNaN, currentXValues, newXValues, newYValues, indexWhereInserted) {
|
|
55
|
+
if (containsNaN !== undefined) {
|
|
56
|
+
this.containsNanProperty = containsNaN;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
if (this.containsNanProperty === false) {
|
|
60
|
+
this.containsNanProperty = newYValues.some(function (y) { return isNaN(y); });
|
|
61
|
+
if (this.containsNanProperty === false)
|
|
62
|
+
performanceWarnings_1.performanceWarnings.dataDistributionFlagNaN.warn();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (isSorted !== undefined) {
|
|
66
|
+
this.isSortedAscendingProperty = isSorted;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
if (this.isSortedAscendingProperty === true && newXValues) {
|
|
70
|
+
var newSectionSortedAsc = (0, array_1.isArraySorted)(newXValues);
|
|
71
|
+
var valueOnTheLeftAscending = indexWhereInserted === 0 || currentXValues.get(indexWhereInserted - 1) < newXValues[0];
|
|
72
|
+
var valueOnTheRightAscending = indexWhereInserted >= currentXValues.size() ||
|
|
73
|
+
newXValues[newXValues.length - 1] < currentXValues.get(indexWhereInserted);
|
|
74
|
+
this.isSortedAscendingProperty =
|
|
75
|
+
newSectionSortedAsc && valueOnTheLeftAscending && valueOnTheRightAscending;
|
|
76
|
+
if (this.isSortedAscendingProperty === true)
|
|
77
|
+
performanceWarnings_1.performanceWarnings.dataDistributionFlagSortedAscending.warn();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
/** @inheritDoc */
|
|
82
|
+
DataDistributionCalculator.prototype.onUpdate = function (isSorted, containsNaN, currentXValues, newXValues, newYValues, indexWhereUpdated) {
|
|
83
|
+
if (containsNaN !== undefined) {
|
|
84
|
+
this.containsNanProperty = containsNaN;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
if (this.containsNanProperty === false) {
|
|
88
|
+
this.containsNanProperty = newYValues.some(function (y) { return isNaN(y); });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (isSorted !== undefined) {
|
|
92
|
+
this.isSortedAscendingProperty = isSorted;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
if (this.isSortedAscendingProperty === true && newXValues) {
|
|
96
|
+
var newSectionSortedAsc = (0, array_1.isArraySorted)(newXValues);
|
|
97
|
+
var valueOnTheLeftAscending = indexWhereUpdated === 0 || currentXValues.get(indexWhereUpdated - 1) < newXValues[0];
|
|
98
|
+
var oldSectionLength = currentXValues.size();
|
|
99
|
+
var rightIndex = indexWhereUpdated + newXValues.length;
|
|
100
|
+
var valueOnTheRightAscending = rightIndex >= oldSectionLength ||
|
|
101
|
+
newXValues[newXValues.length - 1] < currentXValues.get(rightIndex);
|
|
102
|
+
this.isSortedAscendingProperty =
|
|
103
|
+
newSectionSortedAsc && valueOnTheLeftAscending && valueOnTheRightAscending;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
/** @inheritDoc */
|
|
108
|
+
DataDistributionCalculator.prototype.clear = function (isSorted, containsNaN) {
|
|
109
|
+
this.isSortedAscendingProperty = isSorted !== null && isSorted !== void 0 ? isSorted : true;
|
|
110
|
+
this.containsNanProperty = containsNaN !== null && containsNaN !== void 0 ? containsNaN : false;
|
|
111
|
+
};
|
|
112
|
+
/** @inheritDoc */
|
|
113
|
+
DataDistributionCalculator.prototype.setIsSortedAscending = function (value) {
|
|
114
|
+
this.isSortedAscendingProperty = value;
|
|
115
|
+
};
|
|
116
|
+
/** @inheritDoc */
|
|
117
|
+
DataDistributionCalculator.prototype.setContainsNaN = function (value) {
|
|
118
|
+
this.containsNanProperty = value;
|
|
119
|
+
};
|
|
120
|
+
return DataDistributionCalculator;
|
|
121
|
+
}());
|
|
122
|
+
exports.DataDistributionCalculator = DataDistributionCalculator;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { NumberArray } from "../../../types/NumberArray";
|
|
2
|
+
import { SCRTDoubleVector } from "../../../types/TSciChart";
|
|
3
|
+
export interface IDataDistributionCalculator {
|
|
4
|
+
/**
|
|
5
|
+
* isSortedAscending Data Distribution flag
|
|
6
|
+
*/
|
|
7
|
+
readonly isSortedAscending: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* containsNaN Data Distribution flag
|
|
10
|
+
*/
|
|
11
|
+
readonly containsNaN: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Called when X Values are appended. Should update the Data Distribution flags
|
|
14
|
+
* @param isSorted
|
|
15
|
+
* @param containsNaN
|
|
16
|
+
* @param currentXValues
|
|
17
|
+
* @param newXValues
|
|
18
|
+
* @param newYValues
|
|
19
|
+
*/
|
|
20
|
+
onAppend(isSorted: boolean, containsNaN: boolean, currentXValues: SCRTDoubleVector, newXValues: NumberArray, newYValues: NumberArray): void;
|
|
21
|
+
/**
|
|
22
|
+
* Called when new values are inserted. Should update the Data Distribution flags
|
|
23
|
+
* @param isSorted
|
|
24
|
+
* @param containsNaN
|
|
25
|
+
* @param currentXValues
|
|
26
|
+
* @param newXValues
|
|
27
|
+
* @param newYValues
|
|
28
|
+
* @param indexWhereInserted
|
|
29
|
+
*/
|
|
30
|
+
onInsert(isSorted: boolean, containsNaN: boolean, currentXValues: SCRTDoubleVector, newXValues: NumberArray, newYValues: NumberArray, indexWhereInserted: number): void;
|
|
31
|
+
/**
|
|
32
|
+
* Called when yValues are updated. Should update the Data Distribution flags
|
|
33
|
+
* @param isSorted
|
|
34
|
+
* @param containsNaN
|
|
35
|
+
* @param currentXValues
|
|
36
|
+
* @param newXValues
|
|
37
|
+
* @param newYValues
|
|
38
|
+
* @param indexWhereUpdated
|
|
39
|
+
*/
|
|
40
|
+
onUpdate(isSorted: boolean, containsNaN: boolean, currentXValues: SCRTDoubleVector, newXValues: NumberArray, newYValues: NumberArray, indexWhereUpdated: number): void;
|
|
41
|
+
/**
|
|
42
|
+
* Clears the DataDistributionCalculator flags
|
|
43
|
+
* @param isSorted
|
|
44
|
+
* @param containsNaN
|
|
45
|
+
*/
|
|
46
|
+
clear(isSorted: boolean, containsNaN: boolean): void;
|
|
47
|
+
/**
|
|
48
|
+
* Called to update isSortedAscending flag manually, for example when {@link IDataSeries.isSorted} property changes
|
|
49
|
+
* @param value
|
|
50
|
+
*/
|
|
51
|
+
setIsSortedAscending(value: boolean): void;
|
|
52
|
+
/**
|
|
53
|
+
* Called to update containsNaN flag manually, for example when {@link IDataSeries.containsNaN} property changes
|
|
54
|
+
* @param value
|
|
55
|
+
*/
|
|
56
|
+
setContainsNaN(value: boolean): void;
|
|
57
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SCRTDoubleVector } from "../../../types/TSciChart";
|
|
2
2
|
import { BaseDataSeries } from "../BaseDataSeries";
|
|
3
3
|
import { IDataChangeArgs } from "../IDataSeries";
|
|
4
4
|
import { IOhlcDataSeriesOptions, OhlcDataSeries } from "../OhlcDataSeries";
|
|
@@ -7,7 +7,7 @@ export interface IOhlcFilterOptions extends IOhlcDataSeriesOptions {
|
|
|
7
7
|
export declare abstract class OhlcFilterBase extends OhlcDataSeries {
|
|
8
8
|
readonly originalSeries: BaseDataSeries;
|
|
9
9
|
constructor(originalSeries: BaseDataSeries, options?: IOhlcFilterOptions);
|
|
10
|
-
getOriginalXValues():
|
|
10
|
+
getOriginalXValues(): SCRTDoubleVector;
|
|
11
11
|
getOriginalCount(): number;
|
|
12
12
|
protected abstract filterAll(): void;
|
|
13
13
|
protected onOriginalPropertyChanged(name: string): void;
|