scichart 2.0.2195 → 2.1.2261
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 +30 -3
- package/Charting/ChartModifiers/RolloverModifier.js +46 -80
- 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 +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 +127 -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/CategoryAxisBase.d.ts +51 -0
- package/Charting/Visuals/Axis/CategoryAxisBase.js +85 -20
- 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/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/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 +131 -22
- 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 +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 +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 +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/SciChartPieSurface/SciChartPieSurface.d.ts +1 -0
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +7 -2
- 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 +24 -21
- 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.d.ts +2 -2
- package/Charting/Visuals/sciChartInitCommon.js +22 -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 +95 -95
- 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 +144 -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/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
|
@@ -148,11 +148,16 @@ var LabelProviderBase2D = /** @class */ (function (_super) {
|
|
|
148
148
|
var cachedLabel = void 0;
|
|
149
149
|
if (cachedLabelText) {
|
|
150
150
|
cachedLabel = LabelCache_1.labelCache.getLabel(cachedLabelText, this.styleId);
|
|
151
|
-
|
|
151
|
+
if (cachedLabel) {
|
|
152
|
+
labels.push(cachedLabelText);
|
|
153
|
+
}
|
|
152
154
|
}
|
|
153
|
-
|
|
154
|
-
var text =
|
|
155
|
-
|
|
155
|
+
if (!cachedLabel) {
|
|
156
|
+
var text = cachedLabelText;
|
|
157
|
+
if (!cachedLabelText) {
|
|
158
|
+
text = this.formatLabel(tick);
|
|
159
|
+
this.tickToText.set(tick, text);
|
|
160
|
+
}
|
|
156
161
|
var texture = this.getCachedLabelTexture(text, axis.axisRenderer.textureManager, axis.dpiAdjustedLabelStyle);
|
|
157
162
|
if (texture.textureWidth !== null) {
|
|
158
163
|
cachedLabel = new LabelInfo(tick, text, texture.bitmapTexture, texture.textureHeight, texture.textureWidth);
|
|
@@ -117,7 +117,8 @@ var SmartDateLabelProvider = /** @class */ (function (_super) {
|
|
|
117
117
|
};
|
|
118
118
|
SmartDateLabelProvider.prototype.formatTradeChartLabel = function (tradeChartLabelFormat, value, prevValue, prevPrevValue) {
|
|
119
119
|
if (tradeChartLabelFormat === ETradeChartLabelFormat.Minutes) {
|
|
120
|
-
var newDate =
|
|
120
|
+
var newDate = prevValue === undefined ||
|
|
121
|
+
(0, date_1.formatUnixDateToHumanStringMMMDD)(value) !== (0, date_1.formatUnixDateToHumanStringMMMDD)(prevValue);
|
|
121
122
|
if (newDate) {
|
|
122
123
|
return (0, date_1.formatUnixDateToHumanStringMMMDD)(value);
|
|
123
124
|
}
|
|
@@ -126,7 +127,8 @@ var SmartDateLabelProvider = /** @class */ (function (_super) {
|
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
else if (tradeChartLabelFormat === ETradeChartLabelFormat.Days) {
|
|
129
|
-
var newMonth =
|
|
130
|
+
var newMonth = prevValue === undefined ||
|
|
131
|
+
(0, date_1.formatUnixDateToHumanStringMMM)(value) !== (0, date_1.formatUnixDateToHumanStringMMM)(prevValue);
|
|
130
132
|
if (newMonth) {
|
|
131
133
|
return (0, date_1.formatUnixDateToHumanStringMMM)(value);
|
|
132
134
|
}
|
|
@@ -135,12 +137,13 @@ var SmartDateLabelProvider = /** @class */ (function (_super) {
|
|
|
135
137
|
}
|
|
136
138
|
}
|
|
137
139
|
else if (tradeChartLabelFormat === ETradeChartLabelFormat.Months) {
|
|
138
|
-
var newYear =
|
|
140
|
+
var newYear = prevValue === undefined ||
|
|
141
|
+
(0, date_1.formatUnixDateToHumanStringYYYY)(value) !== (0, date_1.formatUnixDateToHumanStringYYYY)(prevValue);
|
|
139
142
|
if (newYear) {
|
|
140
143
|
return (0, date_1.formatUnixDateToHumanStringYYYY)(value);
|
|
141
144
|
}
|
|
142
145
|
// If previous label was year, display month label
|
|
143
|
-
var prevPrevNewYear =
|
|
146
|
+
var prevPrevNewYear = prevPrevValue === undefined ||
|
|
144
147
|
(0, date_1.formatUnixDateToHumanStringYYYY)(prevValue) !== (0, date_1.formatUnixDateToHumanStringYYYY)(prevPrevValue);
|
|
145
148
|
var newMonth = prevPrevNewYear || (0, date_1.formatUnixDateToHumanStringMMM)(value) !== (0, date_1.formatUnixDateToHumanStringMMM)(prevValue);
|
|
146
149
|
if (newMonth) {
|
|
@@ -58,8 +58,8 @@ var NumericAxis = /** @class */ (function (_super) {
|
|
|
58
58
|
var size = this.axisLength;
|
|
59
59
|
var shouldFlip = this.isXAxis !== this.flippedCoordinatesProperty;
|
|
60
60
|
return shouldFlip
|
|
61
|
-
? new FlippedNumericCoordinateCalculator_1.FlippedNumericCoordinateCalculator(this.webAssemblyContext2D, size, min, max, offset)
|
|
62
|
-
: new NumericCoordinateCalculator_1.NumericCoordinateCalculator(this.webAssemblyContext2D, size, min, max, offset);
|
|
61
|
+
? new FlippedNumericCoordinateCalculator_1.FlippedNumericCoordinateCalculator(this.webAssemblyContext2D, size, min, max, offset, this.allowFastMath)
|
|
62
|
+
: new NumericCoordinateCalculator_1.NumericCoordinateCalculator(this.webAssemblyContext2D, size, min, max, offset, this.allowFastMath);
|
|
63
63
|
};
|
|
64
64
|
return NumericAxis;
|
|
65
65
|
}(AxisBase2D_1.AxisBase2D));
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PROPERTY = void 0;
|
|
4
4
|
var PROPERTY;
|
|
5
5
|
(function (PROPERTY) {
|
|
6
|
+
PROPERTY["ALLOW_FAST_MATH"] = "ALLOW_FAST_MATH";
|
|
6
7
|
PROPERTY["AUTO_RANGE"] = "AUTO_RANGE";
|
|
7
8
|
PROPERTY["AUTO_TICKS"] = "AUTO_TICKS";
|
|
8
9
|
PROPERTY["AXIS_ALIGNMENT"] = "AXIS_ALIGNMENT";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EAnimationType } from "../../../../types/AnimationType";
|
|
2
|
-
import {
|
|
2
|
+
import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
|
|
3
3
|
import { SeriesAnimation, IBaseAnimationOptions } from "./SeriesAnimation";
|
|
4
4
|
export interface IFadeAnimationOptions extends IBaseAnimationOptions {
|
|
5
5
|
}
|
|
@@ -8,5 +8,5 @@ export declare class FadeAnimation extends SeriesAnimation {
|
|
|
8
8
|
readonly type = EAnimationType.Fade;
|
|
9
9
|
constructor(options?: IFadeAnimationOptions);
|
|
10
10
|
/** @inheritDoc */
|
|
11
|
-
calculateAnimationValues(wasmContext: TSciChart, originalValues:
|
|
11
|
+
calculateAnimationValues(wasmContext: TSciChart, originalValues: SCRTDoubleVector, animationValues: SCRTDoubleVector, progress: number, noZeroLine?: boolean): void;
|
|
12
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EAnimationType } from "../../../../types/AnimationType";
|
|
2
|
-
import {
|
|
2
|
+
import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
|
|
3
3
|
import { SeriesAnimation, IBaseAnimationOptions } from "./SeriesAnimation";
|
|
4
4
|
export interface IScaleAnimationOptions extends IBaseAnimationOptions {
|
|
5
5
|
zeroLine?: number;
|
|
@@ -13,7 +13,7 @@ export declare class ScaleAnimation extends SeriesAnimation {
|
|
|
13
13
|
zeroLine: number;
|
|
14
14
|
constructor(options?: IScaleAnimationOptions);
|
|
15
15
|
/** @inheritDoc */
|
|
16
|
-
calculateAnimationValues(wasmContext: TSciChart, originalValues:
|
|
16
|
+
calculateAnimationValues(wasmContext: TSciChart, originalValues: SCRTDoubleVector, animationValues: SCRTDoubleVector, progress: number, noZeroLine?: boolean): void;
|
|
17
17
|
toJSON(): {
|
|
18
18
|
type: EAnimationType;
|
|
19
19
|
options: Required<Omit<IBaseAnimationOptions, never>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IAnimation } from "../../../../Core/Animations/AnimationFiniteStateMachine";
|
|
2
2
|
import { TEasingFn } from "../../../../Core/Animations/EasingFunctions";
|
|
3
3
|
import { EAnimationType } from "../../../../types/AnimationType";
|
|
4
|
-
import {
|
|
4
|
+
import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
|
|
5
5
|
import { IDataSeries } from "../../../Model/IDataSeries";
|
|
6
6
|
import { IRenderableSeries } from "../IRenderableSeries";
|
|
7
7
|
import { BaseAnimationStyle } from "./BaseAnimationStyle";
|
|
@@ -65,7 +65,7 @@ export declare abstract class SeriesAnimation implements IAnimation {
|
|
|
65
65
|
* @param progress Current animation progress
|
|
66
66
|
* @param noZeroLine Sets zeroLine = 0, is used for XyzDataSeries
|
|
67
67
|
*/
|
|
68
|
-
calculateAnimationValues(wasmContext: TSciChart, originalValues:
|
|
68
|
+
calculateAnimationValues(wasmContext: TSciChart, originalValues: SCRTDoubleVector, animationValues: SCRTDoubleVector, progress: number, noZeroLine?: boolean): void;
|
|
69
69
|
/**
|
|
70
70
|
* Runs for data animation to update animation vectors
|
|
71
71
|
* @param wasmContext
|
|
@@ -74,7 +74,7 @@ export declare abstract class SeriesAnimation implements IAnimation {
|
|
|
74
74
|
* @param interpolatedValues The vector which will be updated with interpolated values
|
|
75
75
|
* @param progress Current animation progress
|
|
76
76
|
*/
|
|
77
|
-
calculateDataSeriesAnimationValues(wasmContext: TSciChart, initialValues:
|
|
77
|
+
calculateDataSeriesAnimationValues(wasmContext: TSciChart, initialValues: SCRTDoubleVector, finalValues: SCRTDoubleVector, interpolatedValues: SCRTDoubleVector, progress: number): void;
|
|
78
78
|
/**
|
|
79
79
|
* Returns {@link BaseAnimationStyle} object which is being used to create initial styles
|
|
80
80
|
* @param renderableSeries The renderable series
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EAnimationType } from "../../../../types/AnimationType";
|
|
2
|
-
import {
|
|
2
|
+
import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
|
|
3
3
|
import { SeriesAnimation, IBaseAnimationOptions } from "./SeriesAnimation";
|
|
4
4
|
export interface ISweepAnimationOptions extends IBaseAnimationOptions {
|
|
5
5
|
}
|
|
@@ -8,5 +8,5 @@ export declare class SweepAnimation extends SeriesAnimation {
|
|
|
8
8
|
readonly type = EAnimationType.Sweep;
|
|
9
9
|
constructor(options?: ISweepAnimationOptions);
|
|
10
10
|
/** @inheritDoc */
|
|
11
|
-
calculateAnimationValues(wasmContext: TSciChart, originalValues:
|
|
11
|
+
calculateAnimationValues(wasmContext: TSciChart, originalValues: SCRTDoubleVector, animationValues: SCRTDoubleVector, progress: number, noZeroLine?: boolean): void;
|
|
12
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EAnimationType } from "../../../../types/AnimationType";
|
|
2
|
-
import {
|
|
2
|
+
import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
|
|
3
3
|
import { SeriesAnimation, IBaseAnimationOptions } from "./SeriesAnimation";
|
|
4
4
|
export interface IWaveAnimationOptions extends IBaseAnimationOptions {
|
|
5
5
|
pointDurationFraction?: number;
|
|
@@ -18,7 +18,7 @@ export declare class WaveAnimation extends SeriesAnimation {
|
|
|
18
18
|
zeroLine: number;
|
|
19
19
|
constructor(options?: IWaveAnimationOptions);
|
|
20
20
|
/** @inheritDoc */
|
|
21
|
-
calculateAnimationValues(wasmContext: TSciChart, originalValues:
|
|
21
|
+
calculateAnimationValues(wasmContext: TSciChart, originalValues: SCRTDoubleVector, animationValues: SCRTDoubleVector, progress: number, noZeroLine?: boolean): void;
|
|
22
22
|
toJSON(): {
|
|
23
23
|
type: EAnimationType;
|
|
24
24
|
options: Required<Omit<IBaseAnimationOptions, never>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnimationFiniteStateMachine, IAnimation, SeriesAnimationFiniteStateMachine } from "../../../../Core/Animations/AnimationFiniteStateMachine";
|
|
2
|
-
import {
|
|
2
|
+
import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
|
|
3
3
|
import { BaseDataSeries } from "../../../Model/BaseDataSeries";
|
|
4
4
|
import { XyyDataSeries } from "../../../Model/XyyDataSeries";
|
|
5
5
|
import { CrossPointMarker } from "../../PointMarkers/CrossPointMarker";
|
|
@@ -17,9 +17,9 @@ export declare const animationHelpers: {
|
|
|
17
17
|
createPointMarker: (wasmContext: TSciChart, pointMarkerStyle: BasePointMarkerStyle) => SpritePointMarker | CrossPointMarker | EllipsePointMarker | XPointMarker | SquarePointMarker | TrianglePointMarker;
|
|
18
18
|
interpolateNumber: (from: number, to: number, progress: number) => number;
|
|
19
19
|
interpolateColor: (from: number, to: number, progress: number) => number;
|
|
20
|
-
copyVector: (sourceVector:
|
|
21
|
-
setSplineAnimationVectors: (wasmContext: TSciChart, animation: SeriesAnimation, ds: BaseDataSeries, animationDS: BaseDataSeries, xSplineValues:
|
|
22
|
-
setSplineBandAnimationVectors: (wasmContext: TSciChart, animation: SeriesAnimation, ds: XyyDataSeries, animationDS: XyyDataSeries, xSplineValues:
|
|
23
|
-
updateSplineAnimationProperties: (wasmContext: TSciChart, animation: SeriesAnimation, progress: number, dataSeries: BaseDataSeries, xSplineValues:
|
|
24
|
-
updateSplineBandAnimationProperties: (wasmContext: TSciChart, animation: SeriesAnimation, progress: number, dataSeries: XyyDataSeries, xSplineValues:
|
|
20
|
+
copyVector: (sourceVector: SCRTDoubleVector, targetVector: SCRTDoubleVector) => void;
|
|
21
|
+
setSplineAnimationVectors: (wasmContext: TSciChart, animation: SeriesAnimation, ds: BaseDataSeries, animationDS: BaseDataSeries, xSplineValues: SCRTDoubleVector, ySplineValues: SCRTDoubleVector, isCategoryAxis: boolean, interpolationPoints: number) => void;
|
|
22
|
+
setSplineBandAnimationVectors: (wasmContext: TSciChart, animation: SeriesAnimation, ds: XyyDataSeries, animationDS: XyyDataSeries, xSplineValues: SCRTDoubleVector, ySplineValues: SCRTDoubleVector, y1SplineValues: SCRTDoubleVector, isCategoryAxis: boolean, interpolationPoints: number) => void;
|
|
23
|
+
updateSplineAnimationProperties: (wasmContext: TSciChart, animation: SeriesAnimation, progress: number, dataSeries: BaseDataSeries, xSplineValues: SCRTDoubleVector, ySplineValues: SCRTDoubleVector) => void;
|
|
24
|
+
updateSplineBandAnimationProperties: (wasmContext: TSciChart, animation: SeriesAnimation, progress: number, dataSeries: XyyDataSeries, xSplineValues: SCRTDoubleVector, ySplineValues: SCRTDoubleVector, y1SplineValues: SCRTDoubleVector) => void;
|
|
25
25
|
};
|
|
@@ -147,7 +147,7 @@ var setSplineAnimationVectors = function (wasmContext, animation, ds, animationD
|
|
|
147
147
|
// set final animation values for the spline
|
|
148
148
|
var dataSeries = animation.dataSeries;
|
|
149
149
|
var xValues = isCategoryAxis ? dataSeries.getNativeIndexes() : dataSeries.getNativeXValues();
|
|
150
|
-
wasmContext.SCRTSplineHelperCubicSpline(xValues, dataSeries.getNativeYValues(), ds.xFinalAnimationValues, ds.yFinalAnimationValues, xValues.size(), interpolationPoints, dataSeries.containsNaN);
|
|
150
|
+
wasmContext.SCRTSplineHelperCubicSpline(xValues, dataSeries.getNativeYValues(), ds.xFinalAnimationValues, ds.yFinalAnimationValues, xValues.size(), interpolationPoints, dataSeries.dataDistributionCalculator.containsNaN);
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
var setSplineBandAnimationVectors = function (wasmContext, animation, ds, animationDS, xSplineValues, ySplineValues, y1SplineValues, isCategoryAxis, interpolationPoints) {
|
|
@@ -162,7 +162,7 @@ var setSplineBandAnimationVectors = function (wasmContext, animation, ds, animat
|
|
|
162
162
|
exports.animationHelpers.copyVector(y1SplineValues, ds.y1InitialAnimationValues);
|
|
163
163
|
// set final animation values for the spline
|
|
164
164
|
var xValues = isCategoryAxis ? animationDS.getNativeIndexes() : animationDS.getNativeXValues();
|
|
165
|
-
wasmContext.SCRTSplineHelperCubicSpline(xValues, animationDS.getNativeY1Values(), ds.xFinalAnimationValues, ds.y1FinalAnimationValues, xValues.size(), interpolationPoints, animationDS.containsNaN);
|
|
165
|
+
wasmContext.SCRTSplineHelperCubicSpline(xValues, animationDS.getNativeY1Values(), ds.xFinalAnimationValues, ds.y1FinalAnimationValues, xValues.size(), interpolationPoints, animationDS.dataDistributionCalculator.containsNaN);
|
|
166
166
|
ds.validateAnimationVectors();
|
|
167
167
|
}
|
|
168
168
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SCRTDoubleVector, TSciChart } from "../../../types/TSciChart";
|
|
2
|
+
import { IXyyPointSeries } from "../../Model/PointSeries/IPointSeries";
|
|
3
|
+
import { XyyPointSeriesResampled } from "../../Model/PointSeries/XyyPointSeriesResampled";
|
|
4
|
+
import { ResamplingParams } from "../../Numerics/Resamplers/ResamplingParams";
|
|
2
5
|
import { IThemeProvider } from "../../Themes/IThemeProvider";
|
|
3
6
|
import { BaseRenderableSeries } from "./BaseRenderableSeries";
|
|
4
7
|
import { IHitTestProvider } from "./HitTest/IHitTestProvider";
|
|
@@ -32,11 +35,13 @@ export interface IBaseBandRenderableSeriesOptions extends IBaseRenderableSeriesO
|
|
|
32
35
|
strokeY1DashArray?: number[];
|
|
33
36
|
}
|
|
34
37
|
export declare abstract class BaseBandRenderableSeries extends BaseRenderableSeries {
|
|
38
|
+
protected pointSeries: XyyPointSeriesResampled;
|
|
35
39
|
private fillY1Property;
|
|
36
40
|
private strokeY1Property;
|
|
37
41
|
private fillProperty;
|
|
38
42
|
private strokeDashArrayProperty;
|
|
39
43
|
private strokeY1DashArrayProperty;
|
|
44
|
+
private xyyTempPointSeries;
|
|
40
45
|
constructor(webAssemblyContext: TSciChart, options?: IBaseBandRenderableSeriesOptions);
|
|
41
46
|
/**
|
|
42
47
|
* @inheritDoc
|
|
@@ -91,10 +96,12 @@ export declare abstract class BaseBandRenderableSeries extends BaseRenderableSer
|
|
|
91
96
|
/**
|
|
92
97
|
* Returns the {@link XyyDataSeries.getNativeY1Values} for the associated {@link dataSeries}
|
|
93
98
|
*/
|
|
94
|
-
getNativeY1Values():
|
|
99
|
+
getNativeY1Values(): SCRTDoubleVector;
|
|
95
100
|
/** @inheritDoc */
|
|
96
101
|
delete(): void;
|
|
97
102
|
/** @inheritDoc */
|
|
103
|
+
toPointSeries(rp?: ResamplingParams): IXyyPointSeries;
|
|
104
|
+
/** @inheritDoc */
|
|
98
105
|
toJSON(excludeData?: boolean): import("../../../Builder/buildSeries").TSeriesDefinition;
|
|
99
106
|
/** @inheritDoc */
|
|
100
107
|
protected newHitTestProvider(): IHitTestProvider;
|
|
@@ -16,6 +16,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.BaseBandRenderableSeries = void 0;
|
|
19
|
+
var XyyPointSeriesResampled_1 = require("../../Model/PointSeries/XyyPointSeriesResampled");
|
|
20
|
+
var XyyPointSeriesWrapped_1 = require("../../Model/PointSeries/XyyPointSeriesWrapped");
|
|
19
21
|
var SciChartSurfaceBase_1 = require("../SciChartSurfaceBase");
|
|
20
22
|
var BaseRenderableSeries_1 = require("./BaseRenderableSeries");
|
|
21
23
|
var constants_1 = require("./constants");
|
|
@@ -35,7 +37,7 @@ var BaseBandRenderableSeries = /** @class */ (function (_super) {
|
|
|
35
37
|
_this.strokeDashArrayProperty = options === null || options === void 0 ? void 0 : options.strokeDashArray;
|
|
36
38
|
_this.drawingProviders.push(new BandSeriesDrawingProvider_1.BandSeriesDrawingProvider(webAssemblyContext, _this));
|
|
37
39
|
_this.drawingProviders.push(new PointMarkerDrawingProvider_1.PointMarkerDrawingProvider(webAssemblyContext, _this));
|
|
38
|
-
_this.drawingProviders.push(new PointMarkerDrawingProvider_1.PointMarkerDrawingProvider(webAssemblyContext, _this, function (
|
|
40
|
+
_this.drawingProviders.push(new PointMarkerDrawingProvider_1.PointMarkerDrawingProvider(webAssemblyContext, _this, function (ps) { return ps.y1Values; }, function (rs) { return rs.y1SplineValues; }));
|
|
39
41
|
if (options === null || options === void 0 ? void 0 : options.animation) {
|
|
40
42
|
_this.animationQueue.push(options.animation);
|
|
41
43
|
}
|
|
@@ -162,6 +164,48 @@ var BaseBandRenderableSeries = /** @class */ (function (_super) {
|
|
|
162
164
|
_super.prototype.delete.call(this);
|
|
163
165
|
};
|
|
164
166
|
/** @inheritDoc */
|
|
167
|
+
BaseBandRenderableSeries.prototype.toPointSeries = function (rp) {
|
|
168
|
+
if (rp) {
|
|
169
|
+
if (!this.xyyTempPointSeries) {
|
|
170
|
+
this.xyyTempPointSeries = new XyyPointSeriesResampled_1.XyyPointSeriesResampled(this.webAssemblyContext, rp.xVisibleRange);
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
this.xyyTempPointSeries.xRange = rp.xVisibleRange;
|
|
174
|
+
}
|
|
175
|
+
if (!this.pointSeries) {
|
|
176
|
+
this.pointSeries = new XyyPointSeriesResampled_1.XyyPointSeriesResampled(this.webAssemblyContext, rp.xVisibleRange);
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
this.pointSeries.xRange = rp.xVisibleRange;
|
|
180
|
+
}
|
|
181
|
+
var ps = this.pointSeries;
|
|
182
|
+
var ds = this.dataSeries;
|
|
183
|
+
var xValues = ds.getNativeXValues();
|
|
184
|
+
var yValues = ds.getNativeYValues();
|
|
185
|
+
var y1Values = ds.getNativeY1Values();
|
|
186
|
+
this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext, rp, xValues, yValues, this.xyyTempPointSeries.intIndexes, this.xyyTempPointSeries.xValues, this.xyyTempPointSeries.yValues, false);
|
|
187
|
+
var xySize = this.xyyTempPointSeries.intIndexes.size();
|
|
188
|
+
this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext, rp, xValues, y1Values, this.xyyTempPointSeries.intIndexes, this.xyyTempPointSeries.xValues, this.xyyTempPointSeries.y1Values);
|
|
189
|
+
// Because intIndexes vector is not cleared indexes for rpLow are appended at the end of rpHigh indexes
|
|
190
|
+
var xy1Size = this.xyyTempPointSeries.intIndexes.size() - xySize;
|
|
191
|
+
// We merge indexes excluding duplicates for Y and Y1 into one vector
|
|
192
|
+
var mergedSize = this.resamplerHelper.mergeIndexes(this.xyyTempPointSeries.intIndexes, xySize, xy1Size, ps.intIndexes);
|
|
193
|
+
// Clear the intIndexes as long as we do not need them any more
|
|
194
|
+
this.xyyTempPointSeries.intIndexes.clear();
|
|
195
|
+
// Get values by indexes for Y and Y1 values
|
|
196
|
+
this.resamplerHelper.copyValuesByIndexes(ps.intIndexes, xValues, yValues, y1Values, mergedSize, rp.isCategoryAxis, ps.xValues, ps.yValues, ps.y1Values);
|
|
197
|
+
if (rp.isCategoryAxis) {
|
|
198
|
+
ps.updateIndexes();
|
|
199
|
+
}
|
|
200
|
+
ps.clearIntIndexes();
|
|
201
|
+
// ps.debugOutputForUnitTests();
|
|
202
|
+
return ps;
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
return new XyyPointSeriesWrapped_1.XyyPointSeriesWrapped(this.dataSeries);
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
/** @inheritDoc */
|
|
165
209
|
BaseBandRenderableSeries.prototype.toJSON = function (excludeData) {
|
|
166
210
|
if (excludeData === void 0) { excludeData = false; }
|
|
167
211
|
var json = _super.prototype.toJSON.call(this, excludeData);
|
|
@@ -25,6 +25,7 @@ export declare abstract class BaseLineRenderableSeries extends BaseRenderableSer
|
|
|
25
25
|
* Accepts an array of values, e.g. [2,2] will have a line of length 2 and a gap of length 2.
|
|
26
26
|
*/
|
|
27
27
|
set strokeDashArray(strokeDashArray: number[]);
|
|
28
|
+
/** @inheritDoc */
|
|
28
29
|
toJSON(excludeData?: boolean): import("../../../Builder/buildSeries").TSeriesDefinition;
|
|
29
30
|
/**
|
|
30
31
|
* @inheritDoc
|
|
@@ -62,6 +62,7 @@ var BaseLineRenderableSeries = /** @class */ (function (_super) {
|
|
|
62
62
|
enumerable: false,
|
|
63
63
|
configurable: true
|
|
64
64
|
});
|
|
65
|
+
/** @inheritDoc */
|
|
65
66
|
BaseLineRenderableSeries.prototype.toJSON = function (excludeData) {
|
|
66
67
|
if (excludeData === void 0) { excludeData = false; }
|
|
67
68
|
var json = _super.prototype.toJSON.call(this, excludeData);
|
|
@@ -70,6 +70,7 @@ export declare abstract class BaseMountainRenderableSeries extends BaseRenderabl
|
|
|
70
70
|
* Accepts an array of values, e.g. [2,2] will have a line of length 2 and a gap of length 2.
|
|
71
71
|
*/
|
|
72
72
|
set strokeDashArray(strokeDashArray: number[]);
|
|
73
|
+
/** @inheritDoc */
|
|
73
74
|
toJSON(excludeData?: boolean): import("../../../Builder/buildSeries").TSeriesDefinition;
|
|
74
75
|
/**
|
|
75
76
|
* @inheritDoc
|
|
@@ -128,6 +128,7 @@ var BaseMountainRenderableSeries = /** @class */ (function (_super) {
|
|
|
128
128
|
enumerable: false,
|
|
129
129
|
configurable: true
|
|
130
130
|
});
|
|
131
|
+
/** @inheritDoc */
|
|
131
132
|
BaseMountainRenderableSeries.prototype.toJSON = function (excludeData) {
|
|
132
133
|
if (excludeData === void 0) { excludeData = false; }
|
|
133
134
|
var json = _super.prototype.toJSON.call(this, excludeData);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { NumberRange } from "../../../Core/NumberRange";
|
|
2
|
-
import {
|
|
2
|
+
import { SCRTDoubleVector, TSciChart } from "../../../types/TSciChart";
|
|
3
|
+
import { IOhlcPointSeries } from "../../Model/PointSeries/IPointSeries";
|
|
4
|
+
import { OhlcPointSeriesResampled } from "../../Model/PointSeries/OhlcPointSeriesResampled";
|
|
5
|
+
import { ResamplingParams } from "../../Numerics/Resamplers/ResamplingParams";
|
|
3
6
|
import { IThemeProvider } from "../../Themes/IThemeProvider";
|
|
4
7
|
import { BaseRenderableSeries } from "./BaseRenderableSeries";
|
|
5
8
|
import { IHitTestProvider } from "./HitTest/IHitTestProvider";
|
|
@@ -10,9 +13,11 @@ export interface IBaseOhlcRenderableSeriesOptions extends IBaseRenderableSeriesO
|
|
|
10
13
|
dataPointWidth?: number;
|
|
11
14
|
}
|
|
12
15
|
export declare abstract class BaseOhlcRenderableSeries extends BaseRenderableSeries {
|
|
16
|
+
protected pointSeries: OhlcPointSeriesResampled;
|
|
13
17
|
private strokeUpProperty;
|
|
14
18
|
private strokeDownProperty;
|
|
15
19
|
private dataPointWidthProperty;
|
|
20
|
+
private xyyTempPointSeries;
|
|
16
21
|
constructor(webAssemblyContext: TSciChart, options?: IBaseOhlcRenderableSeriesOptions);
|
|
17
22
|
/** @inheritDoc */
|
|
18
23
|
applyTheme(themeProvider: IThemeProvider): void;
|
|
@@ -49,19 +54,21 @@ export declare abstract class BaseOhlcRenderableSeries extends BaseRenderableSer
|
|
|
49
54
|
/**
|
|
50
55
|
* Returns the {@link IDataSeries.getNativeOpenValues} for the associated {@link dataSeries}
|
|
51
56
|
*/
|
|
52
|
-
getNativeOpenValues():
|
|
57
|
+
getNativeOpenValues(): SCRTDoubleVector;
|
|
53
58
|
/**
|
|
54
59
|
* Returns the {@link IDataSeries.getNativeHighValues} for the associated {@link dataSeries}
|
|
55
60
|
*/
|
|
56
|
-
getNativeHighValues():
|
|
61
|
+
getNativeHighValues(): SCRTDoubleVector;
|
|
57
62
|
/**
|
|
58
63
|
* Returns the {@link IDataSeries.getNativeLowValues} for the associated {@link dataSeries}
|
|
59
64
|
*/
|
|
60
|
-
getNativeLowValues():
|
|
65
|
+
getNativeLowValues(): SCRTDoubleVector;
|
|
61
66
|
/**
|
|
62
67
|
* Returns the {@link IDataSeries.getNativeCloseValues} for the associated {@link dataSeries}
|
|
63
68
|
*/
|
|
64
|
-
getNativeCloseValues():
|
|
69
|
+
getNativeCloseValues(): SCRTDoubleVector;
|
|
70
|
+
/** @inheritDoc */
|
|
71
|
+
toPointSeries(rp?: ResamplingParams): IOhlcPointSeries;
|
|
65
72
|
/** @inheritDoc */
|
|
66
73
|
protected newHitTestProvider(): IHitTestProvider;
|
|
67
74
|
}
|
|
@@ -16,8 +16,13 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.BaseOhlcRenderableSeries = void 0;
|
|
19
|
+
var Deleter_1 = require("../../../Core/Deleter");
|
|
19
20
|
var NumberRange_1 = require("../../../Core/NumberRange");
|
|
20
21
|
var IDataSeries_1 = require("../../Model/IDataSeries");
|
|
22
|
+
var OhlcPointSeriesResampled_1 = require("../../Model/PointSeries/OhlcPointSeriesResampled");
|
|
23
|
+
var OhlcPointSeriesWrapped_1 = require("../../Model/PointSeries/OhlcPointSeriesWrapped");
|
|
24
|
+
var XyyPointSeriesResampled_1 = require("../../Model/PointSeries/XyyPointSeriesResampled");
|
|
25
|
+
var ResamplingMode_1 = require("../../Numerics/Resamplers/ResamplingMode");
|
|
21
26
|
var SciChartSurfaceBase_1 = require("../SciChartSurfaceBase");
|
|
22
27
|
var BaseRenderableSeries_1 = require("./BaseRenderableSeries");
|
|
23
28
|
var constants_1 = require("./constants");
|
|
@@ -123,6 +128,9 @@ var BaseOhlcRenderableSeries = /** @class */ (function (_super) {
|
|
|
123
128
|
/** @inheritDoc */
|
|
124
129
|
BaseOhlcRenderableSeries.prototype.delete = function () {
|
|
125
130
|
_super.prototype.delete.call(this);
|
|
131
|
+
this.resamplerHelper = (0, Deleter_1.deleteSafe)(this.resamplerHelper);
|
|
132
|
+
this.xyyTempPointSeries = (0, Deleter_1.deleteSafe)(this.xyyTempPointSeries);
|
|
133
|
+
this.pointSeries = (0, Deleter_1.deleteSafe)(this.pointSeries);
|
|
126
134
|
};
|
|
127
135
|
/**
|
|
128
136
|
* Returns the {@link IDataSeries.getNativeOpenValues} for the associated {@link dataSeries}
|
|
@@ -149,6 +157,111 @@ var BaseOhlcRenderableSeries = /** @class */ (function (_super) {
|
|
|
149
157
|
return this.dataSeries.getNativeYValues();
|
|
150
158
|
};
|
|
151
159
|
/** @inheritDoc */
|
|
160
|
+
BaseOhlcRenderableSeries.prototype.toPointSeries = function (rp) {
|
|
161
|
+
if (rp) {
|
|
162
|
+
if (!this.xyyTempPointSeries) {
|
|
163
|
+
this.xyyTempPointSeries = new XyyPointSeriesResampled_1.XyyPointSeriesResampled(this.webAssemblyContext, rp.xVisibleRange);
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
this.xyyTempPointSeries.xRange = rp.xVisibleRange;
|
|
167
|
+
}
|
|
168
|
+
if (!this.pointSeries) {
|
|
169
|
+
this.pointSeries = new OhlcPointSeriesResampled_1.OhlcPointSeriesResampled(this.webAssemblyContext, rp.xVisibleRange);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
this.pointSeries.xRange = rp.xVisibleRange;
|
|
173
|
+
}
|
|
174
|
+
var ps = this.pointSeries;
|
|
175
|
+
var ds = this.dataSeries;
|
|
176
|
+
var xValues = ds.getNativeXValues();
|
|
177
|
+
var openValues = ds.getNativeOpenValues();
|
|
178
|
+
var highValues = ds.getNativeHighValues();
|
|
179
|
+
var lowValues = ds.getNativeLowValues();
|
|
180
|
+
var closeValues = ds.getNativeCloseValues();
|
|
181
|
+
var originalIndexes = ds.getNativeIndexes();
|
|
182
|
+
// 1) calc ps.highValues
|
|
183
|
+
var rpHigh = rp.clone({
|
|
184
|
+
resamplingMode: rp.resamplingMode === ResamplingMode_1.EResamplingMode.None ? ResamplingMode_1.EResamplingMode.None : ResamplingMode_1.EResamplingMode.Max
|
|
185
|
+
});
|
|
186
|
+
this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext, rpHigh, xValues, highValues, this.xyyTempPointSeries.intIndexes, // don't care
|
|
187
|
+
this.xyyTempPointSeries.xValues, // don't care
|
|
188
|
+
ps.highValues);
|
|
189
|
+
// console.log("high count ", ps.highValues.size());
|
|
190
|
+
this.xyyTempPointSeries.clearIntIndexes();
|
|
191
|
+
// 2) calc ps.lowValues
|
|
192
|
+
var rpLow = rp.clone({
|
|
193
|
+
resamplingMode: rp.resamplingMode === ResamplingMode_1.EResamplingMode.None ? ResamplingMode_1.EResamplingMode.None : ResamplingMode_1.EResamplingMode.Min
|
|
194
|
+
});
|
|
195
|
+
this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext, rpLow, xValues, lowValues, this.xyyTempPointSeries.intIndexes, // don't care
|
|
196
|
+
this.xyyTempPointSeries.xValues, ps.lowValues);
|
|
197
|
+
// console.log("low count ", ps.lowValues.size());
|
|
198
|
+
// We don't want the indexes for high/low
|
|
199
|
+
this.xyyTempPointSeries.clearIntIndexes();
|
|
200
|
+
this.xyyTempPointSeries.y1Values.clear();
|
|
201
|
+
// 3) Get batch indexes
|
|
202
|
+
// Resample indexes to get start and end of batch
|
|
203
|
+
var rpOpenClose = rp.clone({
|
|
204
|
+
resamplingMode: rp.resamplingMode === ResamplingMode_1.EResamplingMode.None ? ResamplingMode_1.EResamplingMode.None : ResamplingMode_1.EResamplingMode.Min
|
|
205
|
+
});
|
|
206
|
+
this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext, rpOpenClose, xValues, originalIndexes, ps.intIndexes, this.xyyTempPointSeries.xValues, // don't care
|
|
207
|
+
this.xyyTempPointSeries.y1Values // don't care
|
|
208
|
+
);
|
|
209
|
+
var openCloseSize = ps.intIndexes.size();
|
|
210
|
+
this.xyyTempPointSeries.y1Values.clear();
|
|
211
|
+
// 4) calc ps.openValues, ps.closeValues
|
|
212
|
+
// console.log("open/close count ", openCloseSize);
|
|
213
|
+
// indexes 0, 1, 2, 3, 4, 5, 6, 7
|
|
214
|
+
// opens 3, 4, 7, 8, 3, 5, 9, 6
|
|
215
|
+
// closes 8, 3, 5, 9, 6, 3
|
|
216
|
+
// batch 0, 3, 6
|
|
217
|
+
// batch 0 - open 3 (index 0), close 8 (index 2)
|
|
218
|
+
var lastIndexOfFirstBatch = ps.intIndexes.get(3) - ps.intIndexes.get(2) - 1;
|
|
219
|
+
// console.log(
|
|
220
|
+
// "indexes ",
|
|
221
|
+
// ps.intIndexes.get(0),
|
|
222
|
+
// ps.intIndexes.get(1),
|
|
223
|
+
// ps.intIndexes.get(2),
|
|
224
|
+
// ps.intIndexes.get(3),
|
|
225
|
+
// ps.intIndexes.get(4),
|
|
226
|
+
// ps.intIndexes.get(5),
|
|
227
|
+
// ps.intIndexes.get(6)
|
|
228
|
+
// );
|
|
229
|
+
// console.log(
|
|
230
|
+
// "x values ",
|
|
231
|
+
// xValues.get(0),
|
|
232
|
+
// xValues.get(1),
|
|
233
|
+
// xValues.get(2),
|
|
234
|
+
// xValues.get(3),
|
|
235
|
+
// xValues.get(4),
|
|
236
|
+
// xValues.get(5),
|
|
237
|
+
// xValues.get(6)
|
|
238
|
+
// );
|
|
239
|
+
// console.log("Max index", rp.indexesRange.max);
|
|
240
|
+
// const batchWidth = rp.xVisibleRange.diff / rp.viewportRect.width;
|
|
241
|
+
// console.log(
|
|
242
|
+
// "Batch width ",
|
|
243
|
+
// batchWidth,
|
|
244
|
+
// Math.floor(Math.log2(batchWidth)),
|
|
245
|
+
// Math.pow(2, Math.floor(Math.log2(batchWidth)))
|
|
246
|
+
// );
|
|
247
|
+
// console.log("X Spacing ", rp.xVisibleRange.diff / rp.indexesRange.max);
|
|
248
|
+
// console.log("original points / resampled points ", xValues.size() / openCloseSize);
|
|
249
|
+
// console.log("lastIndexOfFirstBatch ", lastIndexOfFirstBatch);
|
|
250
|
+
// Get values by indexes for Open values
|
|
251
|
+
this.resamplerHelper.copyValuesByIndexes(ps.intIndexes, xValues, openValues, closeValues, openCloseSize, rp.isCategoryAxis, ps.xValues, ps.openValues, ps.closeValues, lastIndexOfFirstBatch);
|
|
252
|
+
// Last close value is handled in c++;
|
|
253
|
+
// 5) update indexes for category axis
|
|
254
|
+
if (rp.isCategoryAxis)
|
|
255
|
+
ps.updateIndexes();
|
|
256
|
+
ps.clearIntIndexes();
|
|
257
|
+
// ps.debugOutputForUnitTests();
|
|
258
|
+
return ps;
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
return new OhlcPointSeriesWrapped_1.OhlcPointSeriesWrapped(this.dataSeries);
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
/** @inheritDoc */
|
|
152
265
|
BaseOhlcRenderableSeries.prototype.newHitTestProvider = function () {
|
|
153
266
|
return new OhlcSeriesHitTestProvider_1.OhlcSeriesHitTestProvider(this, this.webAssemblyContext);
|
|
154
267
|
};
|