scichart 3.2.528 → 3.2.538
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.js +0 -1
- package/Charting/ChartModifiers/DataPointSelectionModifier.js +2 -5
- package/Charting/ChartModifiers/RolloverModifier.d.ts +5 -0
- package/Charting/ChartModifiers/RolloverModifier.js +18 -18
- package/Charting/ChartModifiers/VerticalSliceModifier.js +8 -5
- package/Charting/Model/BaseDataSeries.d.ts +3 -2
- package/Charting/Model/BaseDataSeries.js +8 -4
- package/Charting/Model/HlcDataSeries.d.ts +2 -1
- package/Charting/Model/HlcDataSeries.js +4 -2
- package/Charting/Model/IDataSeries.d.ts +2 -1
- package/Charting/Model/IPaletteProvider.d.ts +24 -0
- package/Charting/Model/IPaletteProvider.js +23 -7
- package/Charting/Model/OhlcDataSeries.d.ts +2 -1
- package/Charting/Model/OhlcDataSeries.js +4 -2
- package/Charting/Model/XyyDataSeries.d.ts +2 -1
- package/Charting/Model/XyyDataSeries.js +4 -2
- package/Charting/Visuals/Annotations/AnnotationBase.js +3 -3
- package/Charting/Visuals/Legend/SciChartLegend.js +4 -4
- package/Charting/Visuals/Legend/SciChartLegendBase.js +3 -4
- package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.d.ts +3 -0
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +15 -4
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +55 -8
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.d.ts +7 -0
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +22 -3
- package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +2 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +0 -6
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +18 -13
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +10 -2
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +83 -23
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +4 -2
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +1 -0
- package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +22 -16
- package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +16 -12
- package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +17 -11
- package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.js +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.js +78 -0
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +4 -0
- package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +6 -1
- package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +3 -0
- package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +5 -2
- package/Charting/Visuals/RenderableSeries/RenderDataTransforms/BaseRenderDataTransform.d.ts +30 -0
- package/Charting/Visuals/RenderableSeries/RenderDataTransforms/BaseRenderDataTransform.js +63 -0
- package/Charting/Visuals/RenderableSeries/RenderDataTransforms/SplineRenderDataTransform.d.ts +10 -0
- package/Charting/Visuals/RenderableSeries/RenderDataTransforms/SplineRenderDataTransform.js +53 -0
- package/Charting/Visuals/RenderableSeries/RenderDataTransforms/XyySplineRenderDataTransform.d.ts +10 -0
- package/Charting/Visuals/RenderableSeries/RenderDataTransforms/XyySplineRenderDataTransform.js +55 -0
- package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.js +2 -0
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.d.ts +13 -8
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +63 -46
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +12 -13
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +60 -52
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.d.ts +12 -7
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +54 -43
- package/Charting/Visuals/RenderableSeries/constants.d.ts +2 -1
- package/Charting/Visuals/RenderableSeries/constants.js +1 -0
- package/Charting/Visuals/createMaster.d.ts +12 -2
- package/Charting/Visuals/createMaster.js +14 -2
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/Core/ObservableArray.d.ts +11 -9
- package/Core/ObservableArray.js +44 -21
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.wasm +0 -0
- package/index.d.ts +9 -0
- package/index.dev.js +754 -303
- package/index.js +27 -13
- package/index.min.js +1 -1
- package/package.json +1 -1
- package/types/TSciChart.d.ts +4 -0
- package/types/YRangeMode.d.ts +10 -0
- package/types/YRangeMode.js +14 -0
- package/utils/debug.d.ts +2 -0
- package/utils/debug.js +17 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { TSeriesDefinition } from "../../../Builder/buildSeries";
|
|
2
2
|
import { SeriesAnimationFiniteStateMachine } from "../../../Core/Animations/AnimationFiniteStateMachine";
|
|
3
|
+
import { DeletableEntity } from "../../../Core/DeletableEntity";
|
|
3
4
|
import { EventHandler } from "../../../Core/EventHandler";
|
|
4
5
|
import { NumberRange } from "../../../Core/NumberRange";
|
|
5
6
|
import { ESeriesType } from "../../../types/SeriesType";
|
|
6
7
|
import { SCRTDoubleVector, TSciChart } from "../../../types/TSciChart";
|
|
7
8
|
import { ELineDrawMode, WebGlRenderContext2D } from "../../Drawing/WebGlRenderContext2D";
|
|
8
9
|
import { SeriesInfo } from "../../Model/ChartData/SeriesInfo";
|
|
9
|
-
import { IDataSeries } from "../../Model/IDataSeries";
|
|
10
|
+
import { IDataChangeArgs, IDataSeries } from "../../Model/IDataSeries";
|
|
10
11
|
import { IPaletteProvider } from "../../Model/IPaletteProvider";
|
|
11
12
|
import { IPointSeries } from "../../Model/PointSeries/IPointSeries";
|
|
12
13
|
import { XyPointSeriesResampled } from "../../Model/PointSeries/XyPointSeriesResampled";
|
|
@@ -21,19 +22,20 @@ import { IPointMarker } from "../PointMarkers/IPointMarker";
|
|
|
21
22
|
import { SciChartSurface } from "../SciChartSurface";
|
|
22
23
|
import { TDpiChangedEventArgs } from "../TextureManager/DpiHelper";
|
|
23
24
|
import { SeriesAnimation } from "./Animations/SeriesAnimation";
|
|
25
|
+
import { BaseDataLabelProvider } from "./DataLabels/BaseDataLabelProvider";
|
|
24
26
|
import { TPalettingState } from "./DrawingProviders/BaseSeriesDrawingProvider";
|
|
25
27
|
import { ISeriesDrawingProvider } from "./DrawingProviders/ISeriesDrawingProvider";
|
|
26
28
|
import { HitTestInfo } from "./HitTest/HitTestInfo";
|
|
27
29
|
import { IHitTestProvider } from "./HitTest/IHitTestProvider";
|
|
28
30
|
import { IBaseRenderableSeriesOptions } from "./IBaseRenderableSeriesOptions";
|
|
29
31
|
import { IRenderableSeries } from "./IRenderableSeries";
|
|
32
|
+
import { IRenderDataTransform } from "./RenderDataTransforms/BaseRenderDataTransform";
|
|
30
33
|
import { RolloverModifierRenderableSeriesProps } from "./RolloverModifier/RolloverModifierRenderableSeriesProps";
|
|
31
34
|
import { SeriesHoveredArgs } from "./SeriesHoveredArgs";
|
|
32
35
|
import { SeriesSelectedArgs } from "./SeriesSelectedArgs";
|
|
33
36
|
import { SeriesVisibleChangedArgs } from "./SeriesVisibleChangedArgs";
|
|
34
37
|
import { ShaderEffect } from "./ShaderEffect";
|
|
35
|
-
import {
|
|
36
|
-
import { DeletableEntity } from "../../../Core/DeletableEntity";
|
|
38
|
+
import { EYRangeMode } from "../../../types/YRangeMode";
|
|
37
39
|
/**
|
|
38
40
|
* @summary Defines the base class to a Render Series (or Chart Type) in SciChart's High Performance Real-time
|
|
39
41
|
* {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}
|
|
@@ -71,6 +73,7 @@ export declare abstract class BaseRenderableSeries extends DeletableEntity imple
|
|
|
71
73
|
protected animationQueue: SeriesAnimation[];
|
|
72
74
|
protected paletteProviderProperty: IPaletteProvider;
|
|
73
75
|
protected dataLabelProviderProperty: BaseDataLabelProvider;
|
|
76
|
+
protected renderDataTransformProperty: IRenderDataTransform;
|
|
74
77
|
protected typeMap: Map<string, string>;
|
|
75
78
|
protected resamplerHelper: ExtremeResamplerHelper;
|
|
76
79
|
protected pointSeries: XyPointSeriesResampled;
|
|
@@ -92,6 +95,7 @@ export declare abstract class BaseRenderableSeries extends DeletableEntity imple
|
|
|
92
95
|
private resamplingModeProperty;
|
|
93
96
|
private resamplingPrecisionProperty;
|
|
94
97
|
private clipToYRangeProperty;
|
|
98
|
+
private yRangeModeProperty;
|
|
95
99
|
/**
|
|
96
100
|
* Creates an instance of the {@link BaseRenderableSeries}
|
|
97
101
|
* @param webAssemblyContext The {@link TSciChart | SciChart WebAssembly Context} containing
|
|
@@ -194,6 +198,9 @@ export declare abstract class BaseRenderableSeries extends DeletableEntity imple
|
|
|
194
198
|
get clipToYRange(): boolean;
|
|
195
199
|
set clipToYRange(value: boolean);
|
|
196
200
|
/** @inheritDoc */
|
|
201
|
+
get yRangeMode(): EYRangeMode;
|
|
202
|
+
set yRangeMode(value: EYRangeMode);
|
|
203
|
+
/** @inheritDoc */
|
|
197
204
|
get isSpline(): boolean;
|
|
198
205
|
/** @inheritDoc */
|
|
199
206
|
draw(renderContext: WebGlRenderContext2D, renderPassData: RenderPassData): void;
|
|
@@ -281,6 +288,10 @@ export declare abstract class BaseRenderableSeries extends DeletableEntity imple
|
|
|
281
288
|
/** @inheritDoc */
|
|
282
289
|
set dataLabelProvider(provider: BaseDataLabelProvider);
|
|
283
290
|
/** @inheritDoc */
|
|
291
|
+
get renderDataTransform(): IRenderDataTransform;
|
|
292
|
+
/** @inheritDoc */
|
|
293
|
+
set renderDataTransform(transform: IRenderDataTransform);
|
|
294
|
+
/** @inheritDoc */
|
|
284
295
|
resolveAutoColors(index: number, maxSeries: number, theme: IThemeProvider): void;
|
|
285
296
|
/** @inheritDoc */
|
|
286
297
|
adjustAutoColor(propertyName: string, color: string): string;
|
|
@@ -316,7 +327,7 @@ export declare abstract class BaseRenderableSeries extends DeletableEntity imple
|
|
|
316
327
|
* Is being called when the data for the underlying DataSeries changes
|
|
317
328
|
* @protected
|
|
318
329
|
*/
|
|
319
|
-
protected dataSeriesDataChanged(): void;
|
|
330
|
+
protected dataSeriesDataChanged(args: IDataChangeArgs): void;
|
|
320
331
|
protected valueChanged(oldValue: any, newValue: any): boolean;
|
|
321
332
|
protected setPaletteProvider(paletteProvider: IPaletteProvider): void;
|
|
322
333
|
private invalidateParent;
|
|
@@ -18,10 +18,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.getDelta = exports.getDataPointWidth = exports.BaseRenderableSeries = void 0;
|
|
19
19
|
var classFactory_1 = require("../../../Builder/classFactory");
|
|
20
20
|
var AnimationFiniteStateMachine_1 = require("../../../Core/Animations/AnimationFiniteStateMachine");
|
|
21
|
+
var DeletableEntity_1 = require("../../../Core/DeletableEntity");
|
|
21
22
|
var Deleter_1 = require("../../../Core/Deleter");
|
|
22
23
|
var EventHandler_1 = require("../../../Core/EventHandler");
|
|
24
|
+
var Rect_1 = require("../../../Core/Rect");
|
|
23
25
|
var AnimationType_1 = require("../../../types/AnimationType");
|
|
24
26
|
var BaseType_1 = require("../../../types/BaseType");
|
|
27
|
+
var DataLabelProviderType_1 = require("../../../types/DataLabelProviderType");
|
|
25
28
|
var PaletteProviderType_1 = require("../../../types/PaletteProviderType");
|
|
26
29
|
var PointMarkerType_1 = require("../../../types/PointMarkerType");
|
|
27
30
|
var SeriesType_1 = require("../../../types/SeriesType");
|
|
@@ -32,6 +35,7 @@ var HlcSeriesInfo_1 = require("../../Model/ChartData/HlcSeriesInfo");
|
|
|
32
35
|
var OhlcSeriesInfo_1 = require("../../Model/ChartData/OhlcSeriesInfo");
|
|
33
36
|
var XySeriesInfo_1 = require("../../Model/ChartData/XySeriesInfo");
|
|
34
37
|
var XyySeriesInfo_1 = require("../../Model/ChartData/XyySeriesInfo");
|
|
38
|
+
var XyzSeriesInfo_1 = require("../../Model/ChartData/XyzSeriesInfo");
|
|
35
39
|
var IDataSeries_1 = require("../../Model/IDataSeries");
|
|
36
40
|
var IPaletteProvider_1 = require("../../Model/IPaletteProvider");
|
|
37
41
|
var XyPointSeriesResampled_1 = require("../../Model/PointSeries/XyPointSeriesResampled");
|
|
@@ -49,10 +53,7 @@ var RolloverModifierRenderableSeriesProps_1 = require("./RolloverModifier/Rollov
|
|
|
49
53
|
var SeriesHoveredArgs_1 = require("./SeriesHoveredArgs");
|
|
50
54
|
var SeriesSelectedArgs_1 = require("./SeriesSelectedArgs");
|
|
51
55
|
var SeriesVisibleChangedArgs_1 = require("./SeriesVisibleChangedArgs");
|
|
52
|
-
var
|
|
53
|
-
var Rect_1 = require("../../../Core/Rect");
|
|
54
|
-
var DeletableEntity_1 = require("../../../Core/DeletableEntity");
|
|
55
|
-
var XyzSeriesInfo_1 = require("../../Model/ChartData/XyzSeriesInfo");
|
|
56
|
+
var YRangeMode_1 = require("../../../types/YRangeMode");
|
|
56
57
|
/**
|
|
57
58
|
* @summary Defines the base class to a Render Series (or Chart Type) in SciChart's High Performance Real-time
|
|
58
59
|
* {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}
|
|
@@ -73,7 +74,7 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
73
74
|
*/
|
|
74
75
|
function BaseRenderableSeries(webAssemblyContext, options) {
|
|
75
76
|
var _this = this;
|
|
76
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
77
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
77
78
|
_this = _super.call(this) || this;
|
|
78
79
|
/** @inheritDoc */
|
|
79
80
|
_this.rolloverModifierProps = new RolloverModifierRenderableSeriesProps_1.RolloverModifierRenderableSeriesProps(_this);
|
|
@@ -101,6 +102,7 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
101
102
|
_this.resamplingModeProperty = ResamplingMode_1.EResamplingMode.Auto;
|
|
102
103
|
_this.resamplingPrecisionProperty = 0;
|
|
103
104
|
_this.clipToYRangeProperty = false;
|
|
105
|
+
_this.yRangeModeProperty = YRangeMode_1.EYRangeMode.Drawn;
|
|
104
106
|
_this.isStacked = false;
|
|
105
107
|
_this.webAssemblyContext = webAssemblyContext;
|
|
106
108
|
_this.id = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : (0, guid_1.generateGuid)();
|
|
@@ -158,6 +160,7 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
158
160
|
_this.isSelected = (_q = options === null || options === void 0 ? void 0 : options.isSelected) !== null && _q !== void 0 ? _q : false;
|
|
159
161
|
_this.isHovered = (_r = options === null || options === void 0 ? void 0 : options.isHovered) !== null && _r !== void 0 ? _r : false;
|
|
160
162
|
_this.clipToYRangeProperty = (_s = options === null || options === void 0 ? void 0 : options.clipToYRange) !== null && _s !== void 0 ? _s : _this.clipToYRangeProperty;
|
|
163
|
+
_this.yRangeModeProperty = (_t = options === null || options === void 0 ? void 0 : options.yRangeMode) !== null && _t !== void 0 ? _t : _this.yRangeModeProperty;
|
|
161
164
|
if (options === null || options === void 0 ? void 0 : options.onIsVisibleChanged) {
|
|
162
165
|
if (typeof options.onIsVisibleChanged === "string") {
|
|
163
166
|
_this.typeMap.set("onIsVisibleChanged", options.onIsVisibleChanged);
|
|
@@ -583,6 +586,20 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
583
586
|
enumerable: false,
|
|
584
587
|
configurable: true
|
|
585
588
|
});
|
|
589
|
+
Object.defineProperty(BaseRenderableSeries.prototype, "yRangeMode", {
|
|
590
|
+
/** @inheritDoc */
|
|
591
|
+
get: function () {
|
|
592
|
+
return this.yRangeModeProperty;
|
|
593
|
+
},
|
|
594
|
+
set: function (value) {
|
|
595
|
+
if (this.yRangeModeProperty !== value) {
|
|
596
|
+
this.yRangeModeProperty = value;
|
|
597
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.YRANGEMODE);
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
enumerable: false,
|
|
601
|
+
configurable: true
|
|
602
|
+
});
|
|
586
603
|
Object.defineProperty(BaseRenderableSeries.prototype, "isSpline", {
|
|
587
604
|
/** @inheritDoc */
|
|
588
605
|
get: function () {
|
|
@@ -593,6 +610,7 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
593
610
|
});
|
|
594
611
|
/** @inheritDoc */
|
|
595
612
|
BaseRenderableSeries.prototype.draw = function (renderContext, renderPassData) {
|
|
613
|
+
var _this = this;
|
|
596
614
|
var _a, _b;
|
|
597
615
|
this.currentRenderPassData = renderPassData;
|
|
598
616
|
(_a = this.hitTestProvider) === null || _a === void 0 ? void 0 : _a.update(renderPassData);
|
|
@@ -613,7 +631,15 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
613
631
|
nativeContext.SetClipRect(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
|
|
614
632
|
}
|
|
615
633
|
}
|
|
616
|
-
this.drawingProviders.forEach(function (dp) {
|
|
634
|
+
this.drawingProviders.forEach(function (dp) {
|
|
635
|
+
if (_this.renderDataTransform && _this.renderDataTransform.drawingProviders.includes(dp)) {
|
|
636
|
+
var transformedRPD = _this.renderDataTransform.runTransform(renderPassData);
|
|
637
|
+
dp.draw(renderContext, transformedRPD);
|
|
638
|
+
}
|
|
639
|
+
else {
|
|
640
|
+
dp.draw(renderContext, renderPassData);
|
|
641
|
+
}
|
|
642
|
+
});
|
|
617
643
|
}
|
|
618
644
|
finally {
|
|
619
645
|
if (this.clipToYRange) {
|
|
@@ -638,6 +664,7 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
638
664
|
this.resamplerHelper = (0, Deleter_1.deleteSafe)(this.resamplerHelper);
|
|
639
665
|
this.pointSeries = (0, Deleter_1.deleteSafe)(this.pointSeries);
|
|
640
666
|
this.dataLabelProviderProperty = (0, Deleter_1.deleteSafe)(this.dataLabelProvider);
|
|
667
|
+
this.renderDataTransformProperty = (0, Deleter_1.deleteSafe)(this.renderDataTransform);
|
|
641
668
|
};
|
|
642
669
|
/** @inheritDoc */
|
|
643
670
|
BaseRenderableSeries.prototype.getXRange = function () {
|
|
@@ -649,7 +676,7 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
649
676
|
var dataSeriesValueType = this.isRunningDataAnimation
|
|
650
677
|
? IDataSeries_1.EDataSeriesValueType.FinalAnimationValues
|
|
651
678
|
: IDataSeries_1.EDataSeriesValueType.Default;
|
|
652
|
-
return this.dataSeries.getWindowedYRange(xVisibleRange, true, isXCategoryAxis, dataSeriesValueType);
|
|
679
|
+
return this.dataSeries.getWindowedYRange(xVisibleRange, true, isXCategoryAxis, dataSeriesValueType, this.yRangeMode);
|
|
653
680
|
};
|
|
654
681
|
/** @inheritDoc */
|
|
655
682
|
BaseRenderableSeries.prototype.notifyPropertyChanged = function (propertyName) {
|
|
@@ -799,6 +826,7 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
799
826
|
resamplingMode: this.resamplingMode,
|
|
800
827
|
resamplingPrecision: this.resamplingPrecision,
|
|
801
828
|
clipToYRange: this.clipToYRange,
|
|
829
|
+
yRangeMode: this.yRangeMode,
|
|
802
830
|
// @ts-ignore
|
|
803
831
|
dataLabelProvider: (_c = this.dataLabelProvider) === null || _c === void 0 ? void 0 : _c.toJSON()
|
|
804
832
|
// onSelectedChanged: this.onSelectedChanged
|
|
@@ -983,6 +1011,22 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
983
1011
|
enumerable: false,
|
|
984
1012
|
configurable: true
|
|
985
1013
|
});
|
|
1014
|
+
Object.defineProperty(BaseRenderableSeries.prototype, "renderDataTransform", {
|
|
1015
|
+
/** @inheritDoc */
|
|
1016
|
+
get: function () {
|
|
1017
|
+
return this.renderDataTransformProperty;
|
|
1018
|
+
},
|
|
1019
|
+
/** @inheritDoc */
|
|
1020
|
+
set: function (transform) {
|
|
1021
|
+
if (transform.parentSeries !== this) {
|
|
1022
|
+
throw new Error("renderDataTransform can only be added to the series it was created with");
|
|
1023
|
+
}
|
|
1024
|
+
this.renderDataTransformProperty = transform;
|
|
1025
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.SERIES_TEXT_PROVIDER);
|
|
1026
|
+
},
|
|
1027
|
+
enumerable: false,
|
|
1028
|
+
configurable: true
|
|
1029
|
+
});
|
|
986
1030
|
/** @inheritDoc */
|
|
987
1031
|
BaseRenderableSeries.prototype.resolveAutoColors = function (index, maxSeries, theme) {
|
|
988
1032
|
if (this.strokeProperty.startsWith(IThemeProvider_1.AUTO_COLOR)) {
|
|
@@ -1063,7 +1107,10 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
1063
1107
|
* Is being called when the data for the underlying DataSeries changes
|
|
1064
1108
|
* @protected
|
|
1065
1109
|
*/
|
|
1066
|
-
BaseRenderableSeries.prototype.dataSeriesDataChanged = function () {
|
|
1110
|
+
BaseRenderableSeries.prototype.dataSeriesDataChanged = function (args) {
|
|
1111
|
+
if (this.renderDataTransform) {
|
|
1112
|
+
this.renderDataTransform.onDataChange(args);
|
|
1113
|
+
}
|
|
1067
1114
|
this.invalidateParent();
|
|
1068
1115
|
};
|
|
1069
1116
|
BaseRenderableSeries.prototype.valueChanged = function (oldValue, newValue) {
|
|
@@ -5,6 +5,7 @@ import { NumberRange } from "../../../Core/NumberRange";
|
|
|
5
5
|
import { ObservableArray } from "../../../Core/ObservableArray";
|
|
6
6
|
import { ESeriesType } from "../../../types/SeriesType";
|
|
7
7
|
import { SCRTDoubleVector, TSciChart } from "../../../types/TSciChart";
|
|
8
|
+
import { EYRangeMode } from "../../../types/YRangeMode";
|
|
8
9
|
import { ELineDrawMode, WebGlRenderContext2D } from "../../Drawing/WebGlRenderContext2D";
|
|
9
10
|
import { SeriesInfo } from "../../Model/ChartData/SeriesInfo";
|
|
10
11
|
import { IDataSeries } from "../../Model/IDataSeries";
|
|
@@ -53,6 +54,8 @@ export interface IBaseStackedCollectionOptions {
|
|
|
53
54
|
* Sets 100% mode. When true, the stacked group becomes a 100% stacked chart
|
|
54
55
|
*/
|
|
55
56
|
isOneHundredPercent?: boolean;
|
|
57
|
+
/** Determines whether the y range for this series should consider only the visible data (the default), or include the drawn points just outside the visible range */
|
|
58
|
+
yRangeMode?: EYRangeMode;
|
|
56
59
|
}
|
|
57
60
|
/**
|
|
58
61
|
* A base class for stacked collections, which are used to create stacked mountain or column chart types.
|
|
@@ -93,6 +96,7 @@ export declare abstract class BaseStackedCollection<T extends BaseStackedRendera
|
|
|
93
96
|
private yAxisIdProperty;
|
|
94
97
|
private isOneHundredPercentProperty;
|
|
95
98
|
private animationQueue;
|
|
99
|
+
private yRangeModeProperty;
|
|
96
100
|
/**
|
|
97
101
|
* Creates an instance of the {@link BaseStackedCollection}
|
|
98
102
|
* @param webAssemblyContext The {@link TSciChart | SciChart WebAssembly Context} containing
|
|
@@ -144,6 +148,9 @@ export declare abstract class BaseStackedCollection<T extends BaseStackedRendera
|
|
|
144
148
|
* Gets or sets 100% mode. When true, the stacked group becomes a 100% stacked chart
|
|
145
149
|
*/
|
|
146
150
|
set isOneHundredPercent(value: boolean);
|
|
151
|
+
/** @inheritDoc */
|
|
152
|
+
get yRangeMode(): EYRangeMode;
|
|
153
|
+
set yRangeMode(value: EYRangeMode);
|
|
147
154
|
/**
|
|
148
155
|
* dataSeries property is not supported for BaseStackedCollection
|
|
149
156
|
*/
|
|
@@ -21,6 +21,8 @@ var DeletableEntity_1 = require("../../../Core/DeletableEntity");
|
|
|
21
21
|
var Deleter_1 = require("../../../Core/Deleter");
|
|
22
22
|
var NumberRange_1 = require("../../../Core/NumberRange");
|
|
23
23
|
var ObservableArray_1 = require("../../../Core/ObservableArray");
|
|
24
|
+
var SearchMode_1 = require("../../../types/SearchMode");
|
|
25
|
+
var YRangeMode_1 = require("../../../types/YRangeMode");
|
|
24
26
|
var guid_1 = require("../../../utils/guid");
|
|
25
27
|
var MemoryUsageHelper_1 = require("../../../utils/MemoryUsageHelper");
|
|
26
28
|
var BaseDataSeries_1 = require("../../Model/BaseDataSeries");
|
|
@@ -41,7 +43,7 @@ var BaseStackedCollection = /** @class */ (function (_super) {
|
|
|
41
43
|
*/
|
|
42
44
|
function BaseStackedCollection(webAssemblyContext, options) {
|
|
43
45
|
var _this = this;
|
|
44
|
-
var _a, _b, _c, _d;
|
|
46
|
+
var _a, _b, _c, _d, _e;
|
|
45
47
|
_this = _super.call(this) || this;
|
|
46
48
|
/** @inheritDoc */
|
|
47
49
|
_this.id = (0, guid_1.generateGuid)();
|
|
@@ -60,11 +62,13 @@ var BaseStackedCollection = /** @class */ (function (_super) {
|
|
|
60
62
|
_this.yAxisIdProperty = AxisCore_1.AxisCore.DEFAULT_AXIS_ID;
|
|
61
63
|
_this.isOneHundredPercentProperty = false;
|
|
62
64
|
_this.animationQueue = [];
|
|
65
|
+
_this.yRangeModeProperty = YRangeMode_1.EYRangeMode.Drawn;
|
|
63
66
|
_this.webAssemblyContext = webAssemblyContext;
|
|
64
67
|
_this.isVisibleProperty = (_a = options === null || options === void 0 ? void 0 : options.isVisible) !== null && _a !== void 0 ? _a : _this.isVisibleProperty;
|
|
65
68
|
_this.xAxisIdProperty = (_b = options === null || options === void 0 ? void 0 : options.xAxisId) !== null && _b !== void 0 ? _b : _this.xAxisIdProperty;
|
|
66
69
|
_this.yAxisIdProperty = (_c = options === null || options === void 0 ? void 0 : options.yAxisId) !== null && _c !== void 0 ? _c : _this.yAxisIdProperty;
|
|
67
70
|
_this.isOneHundredPercentProperty = (_d = options === null || options === void 0 ? void 0 : options.isOneHundredPercent) !== null && _d !== void 0 ? _d : _this.isOneHundredPercentProperty;
|
|
71
|
+
_this.yRangeModeProperty = (_e = options === null || options === void 0 ? void 0 : options.yRangeMode) !== null && _e !== void 0 ? _e : _this.yRangeModeProperty;
|
|
68
72
|
_this.updateAnimationProperties = _this.updateAnimationProperties.bind(_this);
|
|
69
73
|
_this.notifyPropertyChanged = _this.notifyPropertyChanged.bind(_this);
|
|
70
74
|
_this.getParentSurface = _this.getParentSurface.bind(_this);
|
|
@@ -221,6 +225,20 @@ var BaseStackedCollection = /** @class */ (function (_super) {
|
|
|
221
225
|
enumerable: false,
|
|
222
226
|
configurable: true
|
|
223
227
|
});
|
|
228
|
+
Object.defineProperty(BaseStackedCollection.prototype, "yRangeMode", {
|
|
229
|
+
/** @inheritDoc */
|
|
230
|
+
get: function () {
|
|
231
|
+
return this.yRangeModeProperty;
|
|
232
|
+
},
|
|
233
|
+
set: function (value) {
|
|
234
|
+
if (this.yRangeModeProperty !== value) {
|
|
235
|
+
this.yRangeModeProperty = value;
|
|
236
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.YRANGEMODE);
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
enumerable: false,
|
|
240
|
+
configurable: true
|
|
241
|
+
});
|
|
224
242
|
Object.defineProperty(BaseStackedCollection.prototype, "dataSeries", {
|
|
225
243
|
// PROPERTIES END
|
|
226
244
|
// Un-Supported PROPERTIES
|
|
@@ -517,7 +535,7 @@ var BaseStackedCollection = /** @class */ (function (_super) {
|
|
|
517
535
|
this.getVisibleSeries().forEach(function (rs) {
|
|
518
536
|
if (rs.accumulatedValues.size() === _this.getNativeXValues().size()) {
|
|
519
537
|
// TODO: calc isSorted flag
|
|
520
|
-
var range = (0, BaseDataSeries_1.getWindowedYRange)(_this.webAssemblyContext, _this.getNativeXValues(), rs.accumulatedValues, xVisibleRange, true, isXCategoryAxis, true);
|
|
538
|
+
var range = (0, BaseDataSeries_1.getWindowedYRange)(_this.webAssemblyContext, _this.getNativeXValues(), rs.accumulatedValues, xVisibleRange, true, isXCategoryAxis, true, _this.yRangeMode === YRangeMode_1.EYRangeMode.Visible ? SearchMode_1.ESearchMode.RoundUp : SearchMode_1.ESearchMode.RoundDown, _this.yRangeMode === YRangeMode_1.EYRangeMode.Visible ? SearchMode_1.ESearchMode.RoundDown : SearchMode_1.ESearchMode.RoundUp);
|
|
521
539
|
if (range) {
|
|
522
540
|
maxRange = maxRange ? maxRange.union(range) : range;
|
|
523
541
|
}
|
|
@@ -652,7 +670,8 @@ var BaseStackedCollection = /** @class */ (function (_super) {
|
|
|
652
670
|
isVisible: this.isVisible,
|
|
653
671
|
isOneHundredPercent: this.isOneHundredPercent,
|
|
654
672
|
xAxisId: this.xAxisId,
|
|
655
|
-
yAxisId: this.yAxisId
|
|
673
|
+
yAxisId: this.yAxisId,
|
|
674
|
+
yRangeMode: this.yRangeMode
|
|
656
675
|
};
|
|
657
676
|
// @ts-ignore
|
|
658
677
|
return { type: this.type, series: series, options: options };
|
|
@@ -336,7 +336,8 @@ var BaseStackedRenderableSeries = /** @class */ (function (_super) {
|
|
|
336
336
|
* instead set on the {@link StackedColumnCollection} or {@link StackedMountainCollection}
|
|
337
337
|
*/
|
|
338
338
|
get: function () {
|
|
339
|
-
|
|
339
|
+
var _a;
|
|
340
|
+
return (_a = this.parentCollection) === null || _a === void 0 ? void 0 : _a.yAxisId;
|
|
340
341
|
},
|
|
341
342
|
/**
|
|
342
343
|
* yAxisId property is not supported for BaseStackedRenderableSeries,
|
|
@@ -336,12 +336,6 @@ var DataLabelProvider = /** @class */ (function (_super) {
|
|
|
336
336
|
if (!yValues || yValues.size() === 0)
|
|
337
337
|
return;
|
|
338
338
|
this.state = new DataLabelState_1.DataLabelState(renderContext, renderPassData, this.style, this.color, yValues, this.parentSeries);
|
|
339
|
-
// console.log(
|
|
340
|
-
// "gen ",
|
|
341
|
-
// yValues.size(),
|
|
342
|
-
// renderPassData.pointSeries.xRange,
|
|
343
|
-
// renderPassData.pointSeries.indexes.size()
|
|
344
|
-
// );
|
|
345
339
|
var _c = this.parentSeries.dataSeries, fifoCapacity = _c.fifoCapacity, fifoSweeping = _c.fifoSweeping, fifoSweepingGap = _c.fifoSweepingGap, fifoStartIndex = _c.fifoStartIndex;
|
|
346
340
|
var bounds = (0, NativeObject_1.getTextBounds)(this.webAssemblyContext);
|
|
347
341
|
if (!this.shouldGenerate(this.state))
|
|
@@ -17,7 +17,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.BandSeriesDrawingProvider = void 0;
|
|
19
19
|
var Deleter_1 = require("../../../../Core/Deleter");
|
|
20
|
-
var SeriesType_1 = require("../../../../types/SeriesType");
|
|
21
20
|
var BrushCache_1 = require("../../../Drawing/BrushCache");
|
|
22
21
|
var Pen2DCache_1 = require("../../../Drawing/Pen2DCache");
|
|
23
22
|
var WebGlRenderContext2D_1 = require("../../../Drawing/WebGlRenderContext2D");
|
|
@@ -115,24 +114,26 @@ var BandSeriesDrawingProvider = /** @class */ (function (_super) {
|
|
|
115
114
|
var xDrawValues = isCategoryAxis ? pointSeries.indexes : xValues;
|
|
116
115
|
var yDrawValues = this.ySelector(pointSeries);
|
|
117
116
|
var y1DrawValues = this.y1Selector(pointSeries);
|
|
118
|
-
|
|
119
|
-
if (isSplineBandSeries) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
var _c = this.getStartAndCount(
|
|
117
|
+
// const isSplineBandSeries = this.parentSeries.type === ESeriesType.SplineBandSeries && xValues.size() > 1;
|
|
118
|
+
// if (isSplineBandSeries) {
|
|
119
|
+
// const splineBandSeries = this.parentSeries as SplineBandRenderableSeries;
|
|
120
|
+
// if (!this.parentSeries.isRunningAnimation) {
|
|
121
|
+
// splineBandSeries.updateSplineValues();
|
|
122
|
+
// }
|
|
123
|
+
// xDrawValues = splineBandSeries.xSplineValues;
|
|
124
|
+
// yDrawValues = splineBandSeries.ySplineValues;
|
|
125
|
+
// y1DrawValues = splineBandSeries.y1SplineValues;
|
|
126
|
+
// }
|
|
127
|
+
var _c = this.getStartAndCount(
|
|
128
|
+
//isSplineBandSeries ? undefined : renderPassData,
|
|
129
|
+
renderPassData, xDrawValues), startIndex = _c.startIndex, count = _c.count;
|
|
129
130
|
this.args.count = count;
|
|
130
131
|
this.args.startIndex = startIndex;
|
|
131
132
|
if (fifoCapacity > 0 && fifoSweeping && fifoCapacity === this.parentSeries.dataSeries.count()) {
|
|
132
133
|
this.args.count = fifoStartIndex;
|
|
133
134
|
}
|
|
134
135
|
// Paletting per point
|
|
135
|
-
_super.prototype.applyStrokeFillPaletting.call(this, undefined, undefined, undefined, undefined, this.parentSeries.opacity, true);
|
|
136
|
+
_super.prototype.applyStrokeFillPaletting.call(this, undefined, undefined, undefined, undefined, this.parentSeries.opacity, true, true, renderPassData);
|
|
136
137
|
var paletteTexture = (_a = this.palettingState.paletteTextureCache) === null || _a === void 0 ? void 0 : _a.value;
|
|
137
138
|
if (paletteTexture) {
|
|
138
139
|
this.args.SetPalette(paletteTexture);
|
|
@@ -166,18 +167,22 @@ var BandSeriesDrawingProvider = /** @class */ (function (_super) {
|
|
|
166
167
|
propertyName === constants_1.PROPERTY.STROKE_THICKNESS ||
|
|
167
168
|
propertyName === constants_1.PROPERTY.OPACITY ||
|
|
168
169
|
propertyName === constants_1.PROPERTY.STROKE_DASH_ARRAY) {
|
|
170
|
+
this.palettingState.requiresUpdate = true;
|
|
169
171
|
(0, Pen2DCache_1.createPenInCache)(this.linesPenCache, stroke, strokeThickness, opacity, strokeDashArray);
|
|
170
172
|
}
|
|
171
173
|
if (propertyName === constants_1.PROPERTY.STROKE_Y1 ||
|
|
172
174
|
propertyName === constants_1.PROPERTY.STROKE_THICKNESS ||
|
|
173
175
|
propertyName === constants_1.PROPERTY.OPACITY ||
|
|
174
176
|
propertyName === constants_1.PROPERTY.STROKE_Y1_DASH_ARRAY) {
|
|
177
|
+
this.palettingState.requiresUpdate = true;
|
|
175
178
|
(0, Pen2DCache_1.createPenInCache)(this.strokePenY1Cache, strokeY1, strokeThickness, opacity, strokeY1DashArray);
|
|
176
179
|
}
|
|
177
180
|
if (propertyName === constants_1.PROPERTY.FILL || propertyName === constants_1.PROPERTY.OPACITY) {
|
|
181
|
+
this.palettingState.requiresUpdate = true;
|
|
178
182
|
(0, BrushCache_1.createBrushInCache)(this.fillBrushCache, fill, opacity);
|
|
179
183
|
}
|
|
180
184
|
if (propertyName === constants_1.PROPERTY.FILL_Y1 || propertyName === constants_1.PROPERTY.OPACITY) {
|
|
185
|
+
this.palettingState.requiresUpdate = true;
|
|
181
186
|
(0, BrushCache_1.createBrushInCache)(this.fillBrushY1Cache, fillY1, opacity);
|
|
182
187
|
}
|
|
183
188
|
};
|
|
@@ -3,6 +3,7 @@ import { IDeletable } from "../../../../Core/IDeletable";
|
|
|
3
3
|
import { SCRTBrush, SCRTDoubleVector, TSciChart, UIntVector } from "../../../../types/TSciChart";
|
|
4
4
|
import { PaletteCache } from "../../../Drawing/PaletteCache";
|
|
5
5
|
import { WebGlRenderContext2D } from "../../../Drawing/WebGlRenderContext2D";
|
|
6
|
+
import { IPaletteProvider } from "../../../Model/IPaletteProvider";
|
|
6
7
|
import { IPointMetadata } from "../../../Model/IPointMetadata";
|
|
7
8
|
import { IPointSeries } from "../../../Model/PointSeries/IPointSeries";
|
|
8
9
|
import { RenderPassData } from "../../../Services/RenderPassData";
|
|
@@ -31,6 +32,11 @@ export declare type TPalettingState = {
|
|
|
31
32
|
originalPenColor?: number;
|
|
32
33
|
originalPenGradient?: boolean;
|
|
33
34
|
originalBrushColor?: number;
|
|
35
|
+
lastStartIndex?: number;
|
|
36
|
+
lastCount?: number;
|
|
37
|
+
lastResamplingHash?: number;
|
|
38
|
+
paletteStartIndex?: number;
|
|
39
|
+
requiresUpdate: boolean;
|
|
34
40
|
};
|
|
35
41
|
/**
|
|
36
42
|
* Used internally - a drawing provider performs drawing for a specific chart-type or series using
|
|
@@ -75,10 +81,11 @@ export declare abstract class BaseSeriesDrawingProvider<T extends IRenderableSer
|
|
|
75
81
|
* Helper function to apply color-paletting to a {@link UIntVector} - where each element in the vector
|
|
76
82
|
* is an ARGB color that defines stroke of the series
|
|
77
83
|
* @param strokePen the current pen, as type {@link SCRTPen}
|
|
84
|
+
* @param renderPassData optional renderPassData. If not supplied, the current renderPassData for the parent series will be used
|
|
78
85
|
* @returns the new {@link UIntVector} with ARGB colors
|
|
79
86
|
*/
|
|
80
|
-
applyStrokePaletting(strokePen: ISCRTPen): void;
|
|
81
|
-
applyStrokeFillPaletting(stroke: string, strokePen: ISCRTPen | undefined, fill: string, fillBrush: ISCRTBrush | undefined, opacity: number, usePalette?: boolean, resetPenBrushColors?: boolean): void;
|
|
87
|
+
applyStrokePaletting(strokePen: ISCRTPen, renderPassData?: RenderPassData): void;
|
|
88
|
+
applyStrokeFillPaletting(stroke: string, strokePen: ISCRTPen | undefined, fill: string, fillBrush: ISCRTBrush | undefined, opacity: number, usePalette?: boolean, resetPenBrushColors?: boolean, renderPassData?: RenderPassData): void;
|
|
82
89
|
/**
|
|
83
90
|
* Creates a native {@link SCRTBrush} Solid Color Brush from html color code string passed in
|
|
84
91
|
* @param htmlColorCode The HTML Color code
|
|
@@ -110,6 +117,7 @@ export declare abstract class BaseSeriesDrawingProvider<T extends IRenderableSer
|
|
|
110
117
|
*/
|
|
111
118
|
onDetachSeries(): void;
|
|
112
119
|
protected seriesHasDataChanges(): void;
|
|
120
|
+
protected shouldUpdatePalette(renderPassData: RenderPassData, paletteProvider: IPaletteProvider, startIndex: number, count: number): void;
|
|
113
121
|
protected overridePaletteProviderColors(rs: IRenderableSeries, xValue: number, yValue: number, index: number, opacity?: number, metadata?: IPointMetadata): {
|
|
114
122
|
stroke: number | undefined;
|
|
115
123
|
fill: number | undefined;
|