scichart 3.0.280 → 3.0.300
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Builder/chartBuilder.d.ts +7 -7
- package/Charting/ChartModifiers/ChartModifierBase.d.ts +1 -1
- package/Charting/ChartModifiers/CursorModifier.d.ts +0 -4
- package/Charting/ChartModifiers/CursorModifier.js +4 -6
- package/Charting/ChartModifiers/RolloverModifier.d.ts +2 -6
- package/Charting/ChartModifiers/RolloverModifier.js +17 -11
- package/Charting/LayoutManager/BaseCenteredAxisLayoutStrategy.d.ts +1 -1
- package/Charting/LayoutManager/CentralAxesLayoutManager.d.ts +1 -1
- package/Charting/Model/BaseDataSeries.d.ts +5 -1
- package/Charting/Model/BaseDataSeries.js +24 -14
- package/Charting/Model/ChartData/SeriesInfo.d.ts +1 -0
- package/Charting/Model/ChartData/SeriesInfo.js +1 -0
- package/Charting/Model/Filters/HlcCustomFilter.js +19 -7
- package/Charting/Model/Filters/OhlcCustomFilter.js +20 -8
- package/Charting/Model/Filters/XyCustomFilter.js +15 -5
- package/Charting/Model/Filters/XyRatioFilter.js +1 -0
- package/Charting/Model/Filters/XyyCustomFilter.js +17 -6
- package/Charting/Model/Filters/XyzCustomFilter.js +17 -6
- package/Charting/Services/SciChartRenderer.js +42 -2
- package/Charting/Visuals/Annotations/AdornerLayer.d.ts +1 -0
- package/Charting/Visuals/Annotations/AdornerLayer.js +6 -3
- package/Charting/Visuals/Annotations/AnnotationBase.js +4 -0
- package/Charting/Visuals/Axis/AxisBase2D.d.ts +1 -1
- package/Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D.js +1 -0
- package/Charting/Visuals/Axis/LogarithmicAxis.d.ts +2 -2
- package/Charting/Visuals/PointMarkers/SpritePointMarker.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/BaseBandRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/BaseHeatmapRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/BaseLineRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/BaseMountainRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/BandSeriesDataLabelProvider.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/ColumnSeriesDataLabelProvider.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/FastCandlestickRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/FastErrorBarsRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/FastOhlcRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +2 -0
- package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +1 -0
- package/Charting/Visuals/RenderableSeries/HitTest/HitTestInfo.d.ts +4 -0
- package/Charting/Visuals/RenderableSeries/HitTest/LineSeriesHitTestProvider.js +2 -0
- package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +1 -0
- package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.js +5 -2
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/StackedColumnRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/UniformContoursRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/SciChartDefaults.d.ts +7 -0
- package/Charting/Visuals/SciChartDefaults.js +7 -0
- package/Charting/Visuals/SciChartSurface.d.ts +7 -1
- package/Charting/Visuals/SciChartSurface.js +5 -0
- package/Charting/Visuals/licenseManager2D.js +10 -4
- package/Charting3D/Visuals/Axis/NumericAxis3D.d.ts +1 -1
- package/Charting3D/Visuals/SciChart3DRenderer.d.ts +1 -0
- package/Charting3D/Visuals/SciChart3DRenderer.js +29 -1
- package/Charting3D/Visuals/SciChart3DSurface.d.ts +5 -1
- package/Charting3D/Visuals/SciChart3DSurface.js +7 -2
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/README.md +12 -7
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.js +10 -10
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +16 -16
- package/_wasm/scichart3d.wasm +0 -0
- package/index.d.ts +960 -0
- package/index.js +1302 -2
- package/index.min.js +1 -0
- package/package.json +18 -4
- package/types/ExecuteOn.d.ts +9 -1
- package/types/ExecuteOn.js +9 -1
- package/types/MousePosition.d.ts +0 -1
- package/types/MousePosition.js +0 -1
- package/types/WatermarkPosition.d.ts +6 -0
- package/types/WatermarkPosition.js +10 -0
- package/types/licensingClasses.d.ts +8 -7
- package/types/licensingClasses.js +8 -7
- package/utils/ccall/appendDoubleVectorFromJsArray.js +1 -1
|
@@ -50,19 +50,19 @@ export declare const chartBuilder: {
|
|
|
50
50
|
/** @inheritdoc */
|
|
51
51
|
configureChart: (sciChartSurface: SciChartSurfaceBase, wasmContext: TSciChart, definition: string | TSurfaceDefinition) => void;
|
|
52
52
|
/** @inheritdoc */
|
|
53
|
-
buildSeries: (wasmContext: TSciChart, definition: import("./buildSeries").TSeriesDefinition | import("./buildSeries").TSeriesDefinition[], sharedData?: import("./buildDataSeries").TSharedDataDefinition) => import("
|
|
53
|
+
buildSeries: (wasmContext: TSciChart, definition: import("./buildSeries").TSeriesDefinition | import("./buildSeries").TSeriesDefinition[], sharedData?: import("./buildDataSeries").TSharedDataDefinition) => import("..").IRenderableSeries[];
|
|
54
54
|
/** @inheritdoc */
|
|
55
|
-
buildDataSeries: (wasmContext: TSciChart, seriesDefinition: import("./buildSeries").TSeriesDefinition, sharedData?: import("./buildDataSeries").TSharedDataDefinition) => import("
|
|
55
|
+
buildDataSeries: (wasmContext: TSciChart, seriesDefinition: import("./buildSeries").TSeriesDefinition, sharedData?: import("./buildDataSeries").TSharedDataDefinition) => import("..").IDataSeries;
|
|
56
56
|
/** @inheritdoc */
|
|
57
|
-
buildModifiers: (definition: import("./buildModifiers").TModifierDefinition | import("./buildModifiers").TModifierDefinition[]) => import("
|
|
57
|
+
buildModifiers: (definition: import("./buildModifiers").TModifierDefinition | import("./buildModifiers").TModifierDefinition[]) => import("..").ChartModifierBase2D[];
|
|
58
58
|
/** @inheritdoc */
|
|
59
|
-
buildAxes: (wasmContext: TSciChart, definition: import("./buildAxis").TAxisDefinition | import("./buildAxis").TAxisDefinition[]) => import("
|
|
59
|
+
buildAxes: (wasmContext: TSciChart, definition: import("./buildAxis").TAxisDefinition | import("./buildAxis").TAxisDefinition[]) => import("..").AxisBase2D[];
|
|
60
60
|
/** @inheritdoc */
|
|
61
61
|
buildAnnotations: (definition: import("./buildAnnotations").TAnnotationDefinition | import("./buildAnnotations").TAnnotationDefinition[]) => any[];
|
|
62
62
|
/** @inheritdoc */
|
|
63
|
-
registerType: <T extends object>(baseType: import("
|
|
63
|
+
registerType: <T extends object>(baseType: import("..").EBaseType, type: string, constructor: (options?: any) => T, overWrite?: boolean) => void;
|
|
64
64
|
/** @inheritdoc */
|
|
65
|
-
registerWasmType: <T_1 extends object>(baseType: import("
|
|
65
|
+
registerWasmType: <T_1 extends object>(baseType: import("..").EBaseType, type: string, constructor: (wasmContext: TSciChart | TSciChart3D, options?: any) => T_1, overWrite?: boolean) => void;
|
|
66
66
|
/** @inheritdoc */
|
|
67
|
-
registerFunction: <T_2 extends Function>(baseType: import("
|
|
67
|
+
registerFunction: <T_2 extends Function>(baseType: import("..").EBaseType, type: string, constructor: T_2, overWrite?: boolean) => void;
|
|
68
68
|
};
|
|
@@ -164,7 +164,7 @@ export declare abstract class ChartModifierBase<TSurfaceType extends SciChartSur
|
|
|
164
164
|
protected isAttachedProperty: boolean;
|
|
165
165
|
protected receiveHandledEventsProperty: boolean;
|
|
166
166
|
protected mousePoint: Point;
|
|
167
|
-
|
|
167
|
+
protected executeOnProperty: EExecuteOn;
|
|
168
168
|
private parentSurfaceProperty;
|
|
169
169
|
constructor(options?: {
|
|
170
170
|
id?: string;
|
|
@@ -207,10 +207,6 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
|
|
|
207
207
|
* @inheritDoc
|
|
208
208
|
*/
|
|
209
209
|
modifierMouseLeave(args: ModifierMouseArgs): void;
|
|
210
|
-
/**
|
|
211
|
-
* @inheritDoc
|
|
212
|
-
*/
|
|
213
|
-
modifierMouseEnter(args: ModifierMouseArgs): void;
|
|
214
210
|
/**
|
|
215
211
|
* @inheritDoc
|
|
216
212
|
*/
|
|
@@ -275,12 +275,6 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
275
275
|
this.mousePosition = MousePosition_1.EMousePosition.OutOfCanvas;
|
|
276
276
|
this.update();
|
|
277
277
|
};
|
|
278
|
-
/**
|
|
279
|
-
* @inheritDoc
|
|
280
|
-
*/
|
|
281
|
-
CursorModifier.prototype.modifierMouseEnter = function (args) {
|
|
282
|
-
_super.prototype.modifierMouseEnter.call(this, args);
|
|
283
|
-
};
|
|
284
278
|
/**
|
|
285
279
|
* @inheritDoc
|
|
286
280
|
*/
|
|
@@ -481,8 +475,12 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
481
475
|
crosshairStroke: this.crosshairStroke,
|
|
482
476
|
crosshairStrokeDashArray: this.crosshairStrokeDashArray,
|
|
483
477
|
crosshairStrokeThickness: this.crosshairStrokeThickness,
|
|
478
|
+
hitTestRadius: this.hitTestRadius,
|
|
479
|
+
placementDivId: this.placementDivId,
|
|
484
480
|
showAxisLabels: this.showAxisLabels,
|
|
485
481
|
showTooltip: this.showTooltip,
|
|
482
|
+
showXLine: this.showXLine,
|
|
483
|
+
showYLine: this.showYLine,
|
|
486
484
|
tooltipContainerBackground: this.tooltipContainerBackground,
|
|
487
485
|
tooltipDataTemplate: this.typeMap.get("tooltipDataTemplate"),
|
|
488
486
|
tooltipLegendOffsetX: this.tooltipLegendOffsetX,
|
|
@@ -125,12 +125,12 @@ export declare class RolloverModifier extends ChartModifierBase2D implements IIn
|
|
|
125
125
|
* If this is set greater than the default of zero, the toolip will only show values for points in this radius, rather than all points on the vertical line
|
|
126
126
|
*/
|
|
127
127
|
hitTestRadius: number;
|
|
128
|
+
protected showRolloverLineProperty: boolean;
|
|
129
|
+
protected showTooltipProperty: boolean;
|
|
128
130
|
private readonly rolloverLineAnnotation;
|
|
129
131
|
private readonly legendAnnotation;
|
|
130
132
|
private mousePosition;
|
|
131
133
|
private tooltipDataTemplateProperty?;
|
|
132
|
-
private showRolloverLineProperty;
|
|
133
|
-
private showTooltipProperty;
|
|
134
134
|
private allowTooltipOverlappingProperty;
|
|
135
135
|
private includedSeriesMap;
|
|
136
136
|
private placementDivIdProperty;
|
|
@@ -195,10 +195,6 @@ export declare class RolloverModifier extends ChartModifierBase2D implements IIn
|
|
|
195
195
|
* @inheritDoc
|
|
196
196
|
*/
|
|
197
197
|
modifierMouseLeave(args: ModifierMouseArgs): void;
|
|
198
|
-
/**
|
|
199
|
-
* @inheritDoc
|
|
200
|
-
*/
|
|
201
|
-
modifierMouseEnter(args: ModifierMouseArgs): void;
|
|
202
198
|
/**
|
|
203
199
|
* @inheritDoc
|
|
204
200
|
*/
|
|
@@ -23,6 +23,7 @@ var MousePosition_1 = require("../../types/MousePosition");
|
|
|
23
23
|
var SeriesType_1 = require("../../types/SeriesType");
|
|
24
24
|
var tooltip_1 = require("../../utils/tooltip");
|
|
25
25
|
var translate_1 = require("../../utils/translate");
|
|
26
|
+
var IThemeProvider_1 = require("../Themes/IThemeProvider");
|
|
26
27
|
var AnnotationBase_1 = require("../Visuals/Annotations/AnnotationBase");
|
|
27
28
|
var LineAnnotation_1 = require("../Visuals/Annotations/LineAnnotation");
|
|
28
29
|
var RolloverLegendSvgAnnotation_1 = require("../Visuals/Annotations/RolloverLegendSvgAnnotation");
|
|
@@ -75,9 +76,9 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
75
76
|
* If this is set greater than the default of zero, the toolip will only show values for points in this radius, rather than all points on the vertical line
|
|
76
77
|
*/
|
|
77
78
|
_this.hitTestRadius = 0;
|
|
78
|
-
_this.mousePosition = MousePosition_1.EMousePosition.OutOfCanvas;
|
|
79
79
|
_this.showRolloverLineProperty = true;
|
|
80
80
|
_this.showTooltipProperty = true;
|
|
81
|
+
_this.mousePosition = MousePosition_1.EMousePosition.OutOfCanvas;
|
|
81
82
|
_this.allowTooltipOverlappingProperty = false;
|
|
82
83
|
_this.includedSeriesMap = new Map();
|
|
83
84
|
_this.hitTestRenderableSeries = _this.hitTestRenderableSeries.bind(_this);
|
|
@@ -293,12 +294,6 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
293
294
|
this.mousePosition = MousePosition_1.EMousePosition.OutOfCanvas;
|
|
294
295
|
this.update();
|
|
295
296
|
};
|
|
296
|
-
/**
|
|
297
|
-
* @inheritDoc
|
|
298
|
-
*/
|
|
299
|
-
RolloverModifier.prototype.modifierMouseEnter = function (args) {
|
|
300
|
-
_super.prototype.modifierMouseEnter.call(this, args);
|
|
301
|
-
};
|
|
302
297
|
/**
|
|
303
298
|
* @inheritDoc
|
|
304
299
|
*/
|
|
@@ -377,6 +372,11 @@ var RolloverModifier = /** @class */ (function (_super) {
|
|
|
377
372
|
RolloverModifier.prototype.toJSON = function () {
|
|
378
373
|
var json = _super.prototype.toJSON.call(this);
|
|
379
374
|
var options = {
|
|
375
|
+
snapToDataPoint: this.snapToDataPoint,
|
|
376
|
+
placementDivId: this.placementDivId,
|
|
377
|
+
hitTestRadius: this.hitTestRadius,
|
|
378
|
+
allowTooltipOverlapping: this.allowTooltipOverlapping,
|
|
379
|
+
rolloverLineStrokeDashArray: this.rolloverLineStrokeDashArray,
|
|
380
380
|
rolloverLineStroke: this.rolloverLineStroke,
|
|
381
381
|
rolloverLineStrokeThickness: this.rolloverLineStrokeThickness,
|
|
382
382
|
showRolloverLine: this.showRolloverLine,
|
|
@@ -743,7 +743,7 @@ exports.calcTooltipPositions = calcTooltipPositions;
|
|
|
743
743
|
* @param rs RenderableSeries
|
|
744
744
|
*/
|
|
745
745
|
var createAnnotations = function (rs, placementDivId) {
|
|
746
|
-
var _a, _b, _c, _d
|
|
746
|
+
var _a, _b, _c, _d;
|
|
747
747
|
if (!rs.rolloverModifierProps.marker) {
|
|
748
748
|
rs.rolloverModifierProps.marker = new RolloverMarkerSvgAnnotation_1.RolloverMarkerSvgAnnotation(rs.rolloverModifierProps);
|
|
749
749
|
// Rollover tooltips for multiple Y-Axes are not supported for stacked series
|
|
@@ -754,7 +754,7 @@ var createAnnotations = function (rs, placementDivId) {
|
|
|
754
754
|
}
|
|
755
755
|
if (!rs.rolloverModifierProps.tooltip) {
|
|
756
756
|
rs.rolloverModifierProps.tooltipTitle = (_b = (_a = rs.rolloverModifierProps.tooltipTitle) !== null && _a !== void 0 ? _a : rs.getDataSeriesName()) !== null && _b !== void 0 ? _b : "";
|
|
757
|
-
rs.rolloverModifierProps.tooltipColor =
|
|
757
|
+
rs.rolloverModifierProps.tooltipColor = rs.rolloverModifierProps.tooltipColor;
|
|
758
758
|
rs.rolloverModifierProps.tooltip = new RolloverTooltipSvgAnnotation_1.RolloverTooltipSvgAnnotation(rs.rolloverModifierProps, {
|
|
759
759
|
seriesType: rs.type,
|
|
760
760
|
placementDivId: placementDivId
|
|
@@ -774,8 +774,8 @@ var createAnnotations = function (rs, placementDivId) {
|
|
|
774
774
|
}
|
|
775
775
|
if (!bandRs.rolloverModifierProps1.tooltip) {
|
|
776
776
|
bandRs.rolloverModifierProps1.tooltipTitle =
|
|
777
|
-
(
|
|
778
|
-
bandRs.rolloverModifierProps1.tooltipColor =
|
|
777
|
+
(_d = (_c = bandRs.rolloverModifierProps1.tooltipTitle) !== null && _c !== void 0 ? _c : bandRs.getDataSeriesName()) !== null && _d !== void 0 ? _d : "";
|
|
778
|
+
bandRs.rolloverModifierProps1.tooltipColor = bandRs.rolloverModifierProps1.tooltipColor;
|
|
779
779
|
bandRs.rolloverModifierProps1.tooltip = new RolloverTooltipSvgAnnotation_1.RolloverTooltipSvgAnnotation(bandRs.rolloverModifierProps1, {
|
|
780
780
|
placementDivId: placementDivId
|
|
781
781
|
});
|
|
@@ -794,6 +794,9 @@ var updateRolloverModifierProps = function (rolloverRSProps, rs, tooltipProps, s
|
|
|
794
794
|
rolloverRSProps.marker.isHidden = false;
|
|
795
795
|
rolloverRSProps.marker.x1 = tooltipProps.xValue;
|
|
796
796
|
rolloverRSProps.marker.y1 = tooltipProps.yValue;
|
|
797
|
+
if (rolloverRSProps.markerColor.startsWith(IThemeProvider_1.AUTO_COLOR)) {
|
|
798
|
+
rolloverRSProps.markerColor = tooltipProps.isY1 ? rs.strokeY1 : rs.stroke;
|
|
799
|
+
}
|
|
797
800
|
}
|
|
798
801
|
// Update tooltips
|
|
799
802
|
if (showTooltip) {
|
|
@@ -802,6 +805,9 @@ var updateRolloverModifierProps = function (rolloverRSProps, rs, tooltipProps, s
|
|
|
802
805
|
rolloverRSProps.tooltip.y1 = tooltipProps.yValue;
|
|
803
806
|
rolloverRSProps.tooltip.xCoordShift = tooltipProps.xCoordShift;
|
|
804
807
|
rolloverRSProps.tooltip.yCoordShift = tooltipProps.yCoordShift;
|
|
808
|
+
if (rolloverRSProps.tooltipColor.startsWith(IThemeProvider_1.AUTO_COLOR)) {
|
|
809
|
+
rolloverRSProps.tooltipColor = tooltipProps.isY1 ? rs.strokeY1 : rs.stroke;
|
|
810
|
+
}
|
|
805
811
|
}
|
|
806
812
|
else {
|
|
807
813
|
if (placementDivId) {
|
|
@@ -68,7 +68,7 @@ export declare abstract class BaseCenteredAxisLayoutStrategy extends BaseAxisLay
|
|
|
68
68
|
*/
|
|
69
69
|
constructor(options?: IInnerAxisLayoutStrategyOptions);
|
|
70
70
|
toJSON(): {
|
|
71
|
-
type: import("
|
|
71
|
+
type: import("../..").ELayoutStrategyType;
|
|
72
72
|
options: Required<Omit<IInnerAxisLayoutStrategyOptions, never>>;
|
|
73
73
|
};
|
|
74
74
|
/**
|
|
@@ -65,7 +65,7 @@ export declare class CentralAxesLayoutManager extends LayoutManager {
|
|
|
65
65
|
* @remarks The axisPosition obeys {@link coordinateMode} which defines whether it is a pixel, data-value or relative coordinate
|
|
66
66
|
*/
|
|
67
67
|
set verticalAxisPosition(value: number);
|
|
68
|
-
toJSON(): import("
|
|
68
|
+
toJSON(): import("../..").TLayoutManagerDefinition;
|
|
69
69
|
/**
|
|
70
70
|
* @summary Notifies subscribers that a property has changed and the chart requires redrawing
|
|
71
71
|
* @description SciChart provides fully reactive components, changing any property or changing data will cause the {@link SciChartSurface} to
|
|
@@ -162,7 +162,7 @@ export declare abstract class BaseDataSeries implements IDataSeries {
|
|
|
162
162
|
/** @inheritDoc */
|
|
163
163
|
get hasValues(): boolean;
|
|
164
164
|
/**
|
|
165
|
-
* Check if the series has an existing
|
|
165
|
+
* Check if the series has an existing metadataGenerator
|
|
166
166
|
*/
|
|
167
167
|
hasMetadataGenerator(): boolean;
|
|
168
168
|
/**
|
|
@@ -179,6 +179,10 @@ export declare abstract class BaseDataSeries implements IDataSeries {
|
|
|
179
179
|
* Gets the metadata array length
|
|
180
180
|
*/
|
|
181
181
|
getMetadataLength(): number;
|
|
182
|
+
/**
|
|
183
|
+
* Check if the series has an existing metadata
|
|
184
|
+
*/
|
|
185
|
+
get hasMetadata(): boolean;
|
|
182
186
|
/**
|
|
183
187
|
* Sets initial values for the data animation
|
|
184
188
|
* @param dataSeries The {@link BaseDataSeries} to be used for initial values
|
|
@@ -10,15 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
-
if (ar || !(i in from)) {
|
|
16
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
-
ar[i] = from[i];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
|
-
};
|
|
22
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
14
|
exports.getWindowedYRange = exports.getIndicesRange = exports.BaseDataSeries = void 0;
|
|
24
15
|
var classFactory_1 = require("../../Builder/classFactory");
|
|
@@ -271,7 +262,7 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
271
262
|
configurable: true
|
|
272
263
|
});
|
|
273
264
|
/**
|
|
274
|
-
* Check if the series has an existing
|
|
265
|
+
* Check if the series has an existing metadataGenerator
|
|
275
266
|
*/
|
|
276
267
|
BaseDataSeries.prototype.hasMetadataGenerator = function () {
|
|
277
268
|
return typeof this.metadataGeneratorProperty !== "undefined";
|
|
@@ -311,6 +302,16 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
311
302
|
}
|
|
312
303
|
return this.metadataProperty.length;
|
|
313
304
|
};
|
|
305
|
+
Object.defineProperty(BaseDataSeries.prototype, "hasMetadata", {
|
|
306
|
+
/**
|
|
307
|
+
* Check if the series has an existing metadata
|
|
308
|
+
*/
|
|
309
|
+
get: function () {
|
|
310
|
+
return this.metadataProperty !== undefined;
|
|
311
|
+
},
|
|
312
|
+
enumerable: false,
|
|
313
|
+
configurable: true
|
|
314
|
+
});
|
|
314
315
|
/**
|
|
315
316
|
* Sets initial values for the data animation
|
|
316
317
|
* @param dataSeries The {@link BaseDataSeries} to be used for initial values
|
|
@@ -408,7 +409,6 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
408
409
|
this.metadataProperty.push(metadata);
|
|
409
410
|
};
|
|
410
411
|
BaseDataSeries.prototype.appendMetadataRange = function (metadata, length) {
|
|
411
|
-
var _a;
|
|
412
412
|
var _this = this;
|
|
413
413
|
if (!metadata) {
|
|
414
414
|
if (!this.metadataGeneratorProperty) {
|
|
@@ -421,7 +421,15 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
this.fillMetadataIfUndefined();
|
|
424
|
-
|
|
424
|
+
var startIndex = this.metadataProperty.length;
|
|
425
|
+
// reserve space for new values
|
|
426
|
+
this.metadataProperty.length += length;
|
|
427
|
+
// merge new values into th collection
|
|
428
|
+
for (var i = 0; i < length; ++i) {
|
|
429
|
+
this.metadataProperty[startIndex + i] = metadata[i];
|
|
430
|
+
}
|
|
431
|
+
// Alternative approach
|
|
432
|
+
// this.metadataProperty = this.metadataProperty.concat(metadata);
|
|
425
433
|
};
|
|
426
434
|
BaseDataSeries.prototype.insertMetadata = function (startIndex, metadata) {
|
|
427
435
|
if (!metadata) {
|
|
@@ -436,7 +444,6 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
436
444
|
this.metadataProperty.splice(startIndex, 0, metadata);
|
|
437
445
|
};
|
|
438
446
|
BaseDataSeries.prototype.insertMetadataRange = function (startIndex, metadata) {
|
|
439
|
-
var _a;
|
|
440
447
|
var _this = this;
|
|
441
448
|
if (!metadata) {
|
|
442
449
|
if (!this.metadataGeneratorProperty) {
|
|
@@ -449,7 +456,10 @@ var BaseDataSeries = /** @class */ (function () {
|
|
|
449
456
|
}
|
|
450
457
|
}
|
|
451
458
|
this.fillMetadataIfUndefined();
|
|
452
|
-
|
|
459
|
+
// TODO probably this could be optimized
|
|
460
|
+
var previousValues = this.metadataProperty.slice(0, startIndex);
|
|
461
|
+
var nextValues = this.metadataProperty.slice(startIndex);
|
|
462
|
+
this.metadataProperty = previousValues.concat(metadata, nextValues);
|
|
453
463
|
};
|
|
454
464
|
BaseDataSeries.prototype.removeMetadataAt = function (index) {
|
|
455
465
|
if (!this.metadataProperty) {
|
|
@@ -24,6 +24,7 @@ export declare class SeriesInfo {
|
|
|
24
24
|
*/
|
|
25
25
|
isWithinDataBounds: boolean;
|
|
26
26
|
pointMetadata: unknown;
|
|
27
|
+
point2metadata: unknown;
|
|
27
28
|
constructor(renderableSeries: IRenderableSeries, hitTestInfo: HitTestInfo);
|
|
28
29
|
get isVisible(): boolean;
|
|
29
30
|
get formattedYValue(): string;
|
|
@@ -22,6 +22,7 @@ var SeriesInfo = /** @class */ (function () {
|
|
|
22
22
|
this.point2xCoordinate = hitTestInfo.point2xCoord;
|
|
23
23
|
this.point2yCoordinate = hitTestInfo.point2yCoord;
|
|
24
24
|
this.pointMetadata = hitTestInfo.metadata;
|
|
25
|
+
this.point2metadata = hitTestInfo.point2metadata;
|
|
25
26
|
if (renderableSeries.type === SeriesType_1.ESeriesType.ColumnSeries) {
|
|
26
27
|
this.fill = renderableSeries.fill;
|
|
27
28
|
}
|
|
@@ -107,13 +107,25 @@ var HlcCustomFilter = /** @class */ (function (_super) {
|
|
|
107
107
|
var highValues = [];
|
|
108
108
|
var lowValues = [];
|
|
109
109
|
var closeValues = [];
|
|
110
|
-
var metadata =
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
var metadata = undefined;
|
|
111
|
+
// leave metadata unset if if original series has no metadata
|
|
112
|
+
if (this.originalSeries.hasMetadata) {
|
|
113
|
+
metadata = [];
|
|
114
|
+
for (var i = startIndex; i < startIndex + count; i++) {
|
|
115
|
+
xValues.push(rawX.get(i));
|
|
116
|
+
highValues.push(this.highfilterFunction(i, rawHigh.get(i)));
|
|
117
|
+
lowValues.push(this.lowfilterFunction(i, rawLow.get(i)));
|
|
118
|
+
closeValues.push(this.closefilterFunction(i, rawClose.get(i)));
|
|
119
|
+
metadata.push(this.originalSeries.getMetadataAt(i));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
for (var i = startIndex; i < startIndex + count; i++) {
|
|
124
|
+
xValues.push(rawX.get(i));
|
|
125
|
+
highValues.push(this.highfilterFunction(i, rawHigh.get(i)));
|
|
126
|
+
lowValues.push(this.lowfilterFunction(i, rawLow.get(i)));
|
|
127
|
+
closeValues.push(this.closefilterFunction(i, rawClose.get(i)));
|
|
128
|
+
}
|
|
117
129
|
}
|
|
118
130
|
return { xValues: xValues, highValues: highValues, lowValues: lowValues, closeValues: closeValues, metadata: metadata };
|
|
119
131
|
};
|
|
@@ -124,14 +124,26 @@ var OhlcCustomFilter = /** @class */ (function (_super) {
|
|
|
124
124
|
var highValues = [];
|
|
125
125
|
var lowValues = [];
|
|
126
126
|
var closeValues = [];
|
|
127
|
-
var metadata =
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
127
|
+
var metadata = undefined;
|
|
128
|
+
if (this.originalSeries.hasMetadata) {
|
|
129
|
+
metadata = [];
|
|
130
|
+
for (var i = startIndex; i < startIndex + count; i++) {
|
|
131
|
+
xValues.push(rawX.get(i));
|
|
132
|
+
openValues.push(this.openfilterFunction(i, ohlcSeries.getNativeOpenValues().get(i)));
|
|
133
|
+
highValues.push(this.highfilterFunction(i, ohlcSeries.getNativeHighValues().get(i)));
|
|
134
|
+
lowValues.push(this.lowfilterFunction(i, ohlcSeries.getNativeLowValues().get(i)));
|
|
135
|
+
closeValues.push(this.closefilterFunction(i, ohlcSeries.getNativeCloseValues().get(i)));
|
|
136
|
+
metadata.push(this.originalSeries.getMetadataAt(i));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
for (var i = startIndex; i < startIndex + count; i++) {
|
|
141
|
+
xValues.push(rawX.get(i));
|
|
142
|
+
openValues.push(this.openfilterFunction(i, ohlcSeries.getNativeOpenValues().get(i)));
|
|
143
|
+
highValues.push(this.highfilterFunction(i, ohlcSeries.getNativeHighValues().get(i)));
|
|
144
|
+
lowValues.push(this.lowfilterFunction(i, ohlcSeries.getNativeLowValues().get(i)));
|
|
145
|
+
closeValues.push(this.closefilterFunction(i, ohlcSeries.getNativeCloseValues().get(i)));
|
|
146
|
+
}
|
|
135
147
|
}
|
|
136
148
|
return { xValues: xValues, openValues: openValues, highValues: highValues, lowValues: lowValues, closeValues: closeValues, metadata: metadata };
|
|
137
149
|
};
|
|
@@ -81,11 +81,21 @@ var XyCustomFilter = /** @class */ (function (_super) {
|
|
|
81
81
|
var rawY = this.getOriginalYValues();
|
|
82
82
|
var xValues = [];
|
|
83
83
|
var yValues = [];
|
|
84
|
-
var metadata =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
var metadata = undefined;
|
|
85
|
+
// leave metadata unset if if original series has no metadata
|
|
86
|
+
if (this.originalSeries.hasMetadata) {
|
|
87
|
+
metadata = [];
|
|
88
|
+
for (var i = startIndex; i < startIndex + count; i++) {
|
|
89
|
+
xValues.push(rawX.get(i));
|
|
90
|
+
yValues.push(this.filterFunction(i, rawY.get(i)));
|
|
91
|
+
metadata.push(this.originalSeries.getMetadataAt(i));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
for (var i = startIndex; i < startIndex + count; i++) {
|
|
96
|
+
xValues.push(rawX.get(i));
|
|
97
|
+
yValues.push(this.filterFunction(i, rawY.get(i)));
|
|
98
|
+
}
|
|
89
99
|
}
|
|
90
100
|
return { xValues: xValues, yValues: yValues, metadata: metadata };
|
|
91
101
|
};
|
|
@@ -102,6 +102,7 @@ var XyRatioFilter = /** @class */ (function (_super) {
|
|
|
102
102
|
var rawY = this.getOriginalYValues();
|
|
103
103
|
var xValues = [];
|
|
104
104
|
var yValues = [];
|
|
105
|
+
// TODO check if metadata is needed here
|
|
105
106
|
for (var i = startIndex; i < startIndex + count; i++) {
|
|
106
107
|
xValues.push(rawX.get(i));
|
|
107
108
|
yValues.push(rawY.get(i) / this.getDivisorYValues().get(i));
|
|
@@ -88,12 +88,23 @@ var XyyCustomFilter = /** @class */ (function (_super) {
|
|
|
88
88
|
var xValues = [];
|
|
89
89
|
var yValues = [];
|
|
90
90
|
var y1Values = [];
|
|
91
|
-
var metadata =
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
var metadata = undefined;
|
|
92
|
+
// leave metadata unset if if original series has no metadata
|
|
93
|
+
if (this.originalSeries.hasMetadata) {
|
|
94
|
+
metadata = [];
|
|
95
|
+
for (var i = startIndex; i < startIndex + count; i++) {
|
|
96
|
+
xValues.push(rawX.get(i));
|
|
97
|
+
yValues.push(this.filterFunction(i, rawY.get(i)));
|
|
98
|
+
y1Values.push(this.y1filterFunction(i, rawY1.get(i)));
|
|
99
|
+
metadata.push(this.originalSeries.getMetadataAt(i));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
for (var i = startIndex; i < startIndex + count; i++) {
|
|
104
|
+
xValues.push(rawX.get(i));
|
|
105
|
+
yValues.push(this.filterFunction(i, rawY.get(i)));
|
|
106
|
+
y1Values.push(this.y1filterFunction(i, rawY1.get(i)));
|
|
107
|
+
}
|
|
97
108
|
}
|
|
98
109
|
return { xValues: xValues, yValues: yValues, y1Values: y1Values, metadata: metadata };
|
|
99
110
|
};
|
|
@@ -84,12 +84,23 @@ var XyzCustomFilter = /** @class */ (function (_super) {
|
|
|
84
84
|
var xValues = [];
|
|
85
85
|
var yValues = [];
|
|
86
86
|
var zValues = [];
|
|
87
|
-
var metadata =
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
var metadata = undefined;
|
|
88
|
+
// leave metadata unset if if original series has no metadata
|
|
89
|
+
if (this.originalSeries.hasMetadata) {
|
|
90
|
+
metadata = [];
|
|
91
|
+
for (var i = startIndex; i < startIndex + count; i++) {
|
|
92
|
+
xValues.push(rawX.get(i));
|
|
93
|
+
yValues.push(this.filterFunction(i, rawY.get(i)));
|
|
94
|
+
zValues.push(this.zfilterFunction(i, rawZ.get(i)));
|
|
95
|
+
metadata.push(this.originalSeries.getMetadataAt(i));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
for (var i = startIndex; i < startIndex + count; i++) {
|
|
100
|
+
xValues.push(rawX.get(i));
|
|
101
|
+
yValues.push(this.filterFunction(i, rawY.get(i)));
|
|
102
|
+
zValues.push(this.zfilterFunction(i, rawZ.get(i)));
|
|
103
|
+
}
|
|
93
104
|
}
|
|
94
105
|
return { xValues: xValues, yValues: yValues, zValues: zValues, metadata: metadata };
|
|
95
106
|
};
|
|
@@ -25,6 +25,7 @@ var DpiHelper_1 = require("../Visuals/TextureManager/DpiHelper");
|
|
|
25
25
|
var RenderPassData_1 = require("./RenderPassData");
|
|
26
26
|
var RenderPassInfo_1 = require("./RenderPassInfo");
|
|
27
27
|
var SvgClippingMode_1 = require("../../types/SvgClippingMode");
|
|
28
|
+
var WatermarkPosition_1 = require("../../types/WatermarkPosition");
|
|
28
29
|
/**
|
|
29
30
|
* A class used internally in SciChart to perform layout, arrangement, data-preparation and rendering on the Cartesian 2D {@link SciChartSurface}
|
|
30
31
|
*/
|
|
@@ -425,11 +426,50 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
425
426
|
this.sciChartSurface.rendered.raiseEvent();
|
|
426
427
|
};
|
|
427
428
|
SciChartRenderer.prototype.updateWatermark = function (renderContext, seriesViewRect) {
|
|
428
|
-
var left = seriesViewRect.x + 5;
|
|
429
429
|
var chartHeight = this.sciChartSurface.isCopyCanvasSurface
|
|
430
430
|
? SciChartSurfaceBase_1.SciChartSurfaceBase.domMasterCanvas.height
|
|
431
431
|
: renderContext.viewportSize.height;
|
|
432
|
-
var
|
|
432
|
+
var left = seriesViewRect.x + 5;
|
|
433
|
+
var bottom = chartHeight - (seriesViewRect.top + seriesViewRect.height) + 10;
|
|
434
|
+
var wmWidth = Math.max(72, Math.min(0.25 * renderContext.viewportSize.width, 256));
|
|
435
|
+
var wmHeight = (42 * wmWidth) / 256;
|
|
436
|
+
if (this.sciChartSurface.watermarkRelativeToCanvas) {
|
|
437
|
+
switch (this.sciChartSurface.watermarkPosition) {
|
|
438
|
+
case WatermarkPosition_1.EWatermarkPosition.BottomRight:
|
|
439
|
+
left = renderContext.viewportSize.width - wmWidth - 5;
|
|
440
|
+
bottom = chartHeight - renderContext.viewportSize.height + 12;
|
|
441
|
+
break;
|
|
442
|
+
case WatermarkPosition_1.EWatermarkPosition.TopLeft:
|
|
443
|
+
bottom = chartHeight - (5 + wmHeight);
|
|
444
|
+
left = 5;
|
|
445
|
+
break;
|
|
446
|
+
case WatermarkPosition_1.EWatermarkPosition.TopRight:
|
|
447
|
+
left = renderContext.viewportSize.width - wmWidth - 5;
|
|
448
|
+
bottom = chartHeight - (5 + wmHeight);
|
|
449
|
+
break;
|
|
450
|
+
case WatermarkPosition_1.EWatermarkPosition.BottomLeft:
|
|
451
|
+
left = 5;
|
|
452
|
+
bottom = chartHeight - renderContext.viewportSize.height + 12;
|
|
453
|
+
break;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
else {
|
|
457
|
+
switch (this.sciChartSurface.watermarkPosition) {
|
|
458
|
+
case WatermarkPosition_1.EWatermarkPosition.BottomRight:
|
|
459
|
+
left = seriesViewRect.left + seriesViewRect.width - wmWidth - 5;
|
|
460
|
+
break;
|
|
461
|
+
case WatermarkPosition_1.EWatermarkPosition.TopLeft:
|
|
462
|
+
bottom = chartHeight - (seriesViewRect.top + 5 + wmHeight);
|
|
463
|
+
break;
|
|
464
|
+
case WatermarkPosition_1.EWatermarkPosition.TopRight:
|
|
465
|
+
left = seriesViewRect.left + seriesViewRect.width - wmWidth - 5;
|
|
466
|
+
bottom = chartHeight - (seriesViewRect.top + 5 + wmHeight);
|
|
467
|
+
break;
|
|
468
|
+
case WatermarkPosition_1.EWatermarkPosition.BottomLeft:
|
|
469
|
+
default:
|
|
470
|
+
break;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
433
473
|
this.sciChartSurface.updateWatermark(left, bottom);
|
|
434
474
|
};
|
|
435
475
|
SciChartRenderer.prototype.getViewportRect = function (viewportSize, seriesViewRect) {
|
|
@@ -9,5 +9,6 @@ export declare class AdornerLayer {
|
|
|
9
9
|
selectAnnotation(args: ModifierMouseArgs): boolean;
|
|
10
10
|
deselectAnnotation(annotation: IAnnotation): void;
|
|
11
11
|
get selectedAnnotation(): AnnotationBase;
|
|
12
|
+
set selectedAnnotation(value: AnnotationBase);
|
|
12
13
|
get isAnnotationSelected(): boolean;
|
|
13
14
|
}
|
|
@@ -9,14 +9,14 @@ var AdornerLayer = /** @class */ (function () {
|
|
|
9
9
|
var scs = this.parentSurface;
|
|
10
10
|
var selectedAnnotation;
|
|
11
11
|
var selectAnnotationHelper = function (annotations) {
|
|
12
|
-
annotations.
|
|
13
|
-
var anBase =
|
|
12
|
+
for (var i = annotations.length - 1; i >= 0; i--) {
|
|
13
|
+
var anBase = annotations[i];
|
|
14
14
|
/** Allow all annotations to be clicked. Only select if editable */
|
|
15
15
|
var isAnnotationSelected = anBase.click(args, !selectedAnnotation && anBase.isEditable);
|
|
16
16
|
if (isAnnotationSelected) {
|
|
17
17
|
selectedAnnotation = anBase;
|
|
18
18
|
}
|
|
19
|
-
}
|
|
19
|
+
}
|
|
20
20
|
};
|
|
21
21
|
selectAnnotationHelper(scs.annotations.asArray());
|
|
22
22
|
selectAnnotationHelper(scs.modifierAnnotations.asArray());
|
|
@@ -31,6 +31,9 @@ var AdornerLayer = /** @class */ (function () {
|
|
|
31
31
|
get: function () {
|
|
32
32
|
return this.selectedAnnotationProperty;
|
|
33
33
|
},
|
|
34
|
+
set: function (value) {
|
|
35
|
+
this.selectedAnnotationProperty = value;
|
|
36
|
+
},
|
|
34
37
|
enumerable: false,
|
|
35
38
|
configurable: true
|
|
36
39
|
});
|
|
@@ -505,6 +505,9 @@ var AnnotationBase = /** @class */ (function () {
|
|
|
505
505
|
AnnotationBase.prototype.onAttach = function (scs) {
|
|
506
506
|
this.svgAdornerRootProperty = scs.domSvgAdornerLayer;
|
|
507
507
|
// Override in derived classes to be notified of attached
|
|
508
|
+
if (this.isSelected) {
|
|
509
|
+
this.parentSurface.adornerLayer.selectedAnnotation = this;
|
|
510
|
+
}
|
|
508
511
|
};
|
|
509
512
|
/** @inheritDoc */
|
|
510
513
|
AnnotationBase.prototype.onDetach = function () {
|
|
@@ -514,6 +517,7 @@ var AnnotationBase = /** @class */ (function () {
|
|
|
514
517
|
}
|
|
515
518
|
this.selectedChanged.unsubscribeAll();
|
|
516
519
|
this.deleteAdorner();
|
|
520
|
+
this.svgAdornerRootProperty = undefined;
|
|
517
521
|
};
|
|
518
522
|
Object.defineProperty(AnnotationBase.prototype, "dragPoints", {
|
|
519
523
|
/** Get the dragging points that should be enabled for this annotation */
|
|
@@ -437,7 +437,7 @@ export declare abstract class AxisBase2D extends AxisCore implements IThemeable
|
|
|
437
437
|
/**
|
|
438
438
|
* @inheritDoc
|
|
439
439
|
*/
|
|
440
|
-
animateVisibleRange(visibleRange: NumberRange, durationMs: number, easingFunction?: TEasingFn, onCompleted?: () => void): import("
|
|
440
|
+
animateVisibleRange(visibleRange: NumberRange, durationMs: number, easingFunction?: TEasingFn, onCompleted?: () => void): import("../../..").IGenericAnimation;
|
|
441
441
|
/**
|
|
442
442
|
* @inheritDoc
|
|
443
443
|
*/
|