scichart 3.0.284 → 3.0.301
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/ChartModifierBase.d.ts +3 -2
- package/Charting/ChartModifiers/ChartModifierBase.js +2 -1
- package/Charting/ChartModifiers/ChartModifierBase2D.d.ts +6 -0
- package/Charting/ChartModifiers/ChartModifierBase2D.js +9 -6
- package/Charting/ChartModifiers/CursorModifier.d.ts +0 -4
- package/Charting/ChartModifiers/CursorModifier.js +4 -6
- package/Charting/ChartModifiers/CustomChartModifier2D.d.ts +16 -0
- package/Charting/ChartModifiers/CustomChartModifier2D.js +40 -0
- package/Charting/ChartModifiers/LegendModifier.d.ts +1 -1
- package/Charting/ChartModifiers/RolloverModifier.d.ts +2 -6
- package/Charting/ChartModifiers/RolloverModifier.js +17 -11
- package/Charting/ChartModifiers/YAxisDragModifier.d.ts +3 -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/LabelProvider/LabelProviderBase2D.js +1 -0
- 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/SciChartDefaults.d.ts +7 -0
- package/Charting/Visuals/SciChartDefaults.js +7 -0
- package/Charting/Visuals/SciChartSurface.d.ts +5 -0
- package/Charting/Visuals/SciChartSurface.js +5 -0
- package/Charting/Visuals/licenseManager2D.js +10 -4
- package/Charting3D/ChartModifiers/ChartModifierBase3D.d.ts +18 -0
- package/Charting3D/ChartModifiers/ChartModifierBase3D.js +8 -1
- package/Charting3D/ChartModifiers/CustomChartModifier3D.d.ts +16 -0
- package/Charting3D/ChartModifiers/CustomChartModifier3D.js +40 -0
- package/Charting3D/ChartModifiers/MouseWheelZoomModifier3D.d.ts +7 -5
- package/Charting3D/ChartModifiers/MouseWheelZoomModifier3D.js +9 -4
- package/Charting3D/ChartModifiers/OrbitModifier3D.d.ts +11 -5
- package/Charting3D/ChartModifiers/OrbitModifier3D.js +7 -5
- package/Charting3D/ChartModifiers/ResetCamera3DModifier.d.ts +11 -8
- package/Charting3D/ChartModifiers/ResetCamera3DModifier.js +16 -8
- package/Charting3D/Visuals/SciChart3DRenderer.d.ts +1 -0
- package/Charting3D/Visuals/SciChart3DRenderer.js +29 -1
- package/Charting3D/Visuals/SciChart3DSurface.d.ts +3 -0
- package/Charting3D/Visuals/SciChart3DSurface.js +7 -2
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/README.md +7 -8
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.js +16 -16
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +10 -10
- package/_wasm/scichart3d.wasm +0 -0
- package/index.d.ts +5 -0
- package/index.js +21 -13
- package/index.min.js +1 -1
- package/package.json +18 -4
- package/types/ChartModifierType.d.ts +2 -1
- package/types/ChartModifierType.js +1 -0
- 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
|
@@ -164,10 +164,11 @@ 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
|
-
constructor(options?: {
|
|
169
|
+
protected constructor(options?: {
|
|
170
170
|
id?: string;
|
|
171
|
+
executeOn?: EExecuteOn;
|
|
171
172
|
});
|
|
172
173
|
/** @inheritDoc */
|
|
173
174
|
applyTheme(themeProvider: IThemeProvider): void;
|
|
@@ -17,10 +17,11 @@ var EModifierType;
|
|
|
17
17
|
*/
|
|
18
18
|
var ChartModifierBase = /** @class */ (function () {
|
|
19
19
|
function ChartModifierBase(options) {
|
|
20
|
-
var _a;
|
|
20
|
+
var _a, _b;
|
|
21
21
|
this.isEnabledProperty = true;
|
|
22
22
|
this.executeOnProperty = ExecuteOn_1.EExecuteOn.MouseLeftButton;
|
|
23
23
|
this.id = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : (0, guid_1.generateGuid)();
|
|
24
|
+
this.executeOnProperty = (_b = options === null || options === void 0 ? void 0 : options.executeOn) !== null && _b !== void 0 ? _b : this.executeOn;
|
|
24
25
|
}
|
|
25
26
|
/** @inheritDoc */
|
|
26
27
|
ChartModifierBase.prototype.applyTheme = function (themeProvider) {
|
|
@@ -45,6 +45,9 @@ export interface IChartModifierBaseOptions {
|
|
|
45
45
|
* to SciChart - High Performance Realtime {@link https://www.scichart.com/javascript-chart-features | 2D JavaScript Charts}
|
|
46
46
|
*/
|
|
47
47
|
export declare abstract class ChartModifierBase2D extends ChartModifierBase<SciChartSurface> {
|
|
48
|
+
/**
|
|
49
|
+
* The type of chartmodifier. See {@link EChart2DModifierType} for available options
|
|
50
|
+
*/
|
|
48
51
|
abstract readonly type: EChart2DModifierType | string;
|
|
49
52
|
xyDirection: EXyDirection;
|
|
50
53
|
protected changedPropertiesList: string[];
|
|
@@ -74,6 +77,9 @@ export declare abstract class ChartModifierBase2D extends ChartModifierBase<SciC
|
|
|
74
77
|
* @remarks This function allows mocking in tests
|
|
75
78
|
*/
|
|
76
79
|
getAllSeries(): IRenderableSeries[];
|
|
80
|
+
/**
|
|
81
|
+
* @inheritDoc
|
|
82
|
+
*/
|
|
77
83
|
toJSON(): {
|
|
78
84
|
type: string;
|
|
79
85
|
options: Required<Omit<IChartModifierBaseOptions, never>>;
|
|
@@ -33,7 +33,7 @@ var ChartModifierBase2D = /** @class */ (function (_super) {
|
|
|
33
33
|
*/
|
|
34
34
|
function ChartModifierBase2D(options) {
|
|
35
35
|
var _this = this;
|
|
36
|
-
var _a, _b, _c, _d
|
|
36
|
+
var _a, _b, _c, _d;
|
|
37
37
|
_this = _super.call(this, options) || this;
|
|
38
38
|
_this.xyDirection = XyDirection_1.EXyDirection.XyDirection;
|
|
39
39
|
_this.changedPropertiesList = [];
|
|
@@ -41,11 +41,10 @@ var ChartModifierBase2D = /** @class */ (function (_super) {
|
|
|
41
41
|
_this.yAxisIdProperty = AxisCore_1.AxisCore.DEFAULT_AXIS_ID;
|
|
42
42
|
// used to track if registered types were used for function properties, so they can be serialized
|
|
43
43
|
_this.typeMap = new Map();
|
|
44
|
-
_this.
|
|
45
|
-
_this.
|
|
46
|
-
_this.
|
|
47
|
-
_this.
|
|
48
|
-
_this.yAxisIdProperty = (_e = options === null || options === void 0 ? void 0 : options.yAxisId) !== null && _e !== void 0 ? _e : _this.yAxisIdProperty;
|
|
44
|
+
_this.xyDirection = (_a = options === null || options === void 0 ? void 0 : options.xyDirection) !== null && _a !== void 0 ? _a : _this.xyDirection;
|
|
45
|
+
_this.modifierGroup = (_b = options === null || options === void 0 ? void 0 : options.modifierGroup) !== null && _b !== void 0 ? _b : _this.modifierGroup;
|
|
46
|
+
_this.xAxisIdProperty = (_c = options === null || options === void 0 ? void 0 : options.xAxisId) !== null && _c !== void 0 ? _c : _this.xAxisIdProperty;
|
|
47
|
+
_this.yAxisIdProperty = (_d = options === null || options === void 0 ? void 0 : options.yAxisId) !== null && _d !== void 0 ? _d : _this.yAxisIdProperty;
|
|
49
48
|
return _this;
|
|
50
49
|
}
|
|
51
50
|
Object.defineProperty(ChartModifierBase2D.prototype, "modifierType", {
|
|
@@ -92,6 +91,9 @@ var ChartModifierBase2D = /** @class */ (function (_super) {
|
|
|
92
91
|
ChartModifierBase2D.prototype.getAllSeries = function () {
|
|
93
92
|
return this.parentSurface.renderableSeries.asArray();
|
|
94
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* @inheritDoc
|
|
96
|
+
*/
|
|
95
97
|
ChartModifierBase2D.prototype.toJSON = function () {
|
|
96
98
|
var options = {
|
|
97
99
|
id: this.id,
|
|
@@ -110,6 +112,7 @@ var ChartModifierBase2D = /** @class */ (function (_super) {
|
|
|
110
112
|
if (!this.changedPropertiesList.includes(propertyName)) {
|
|
111
113
|
this.changedPropertiesList.push(propertyName);
|
|
112
114
|
}
|
|
115
|
+
_super.prototype.notifyPropertyChanged.call(this, propertyName);
|
|
113
116
|
};
|
|
114
117
|
/**
|
|
115
118
|
* Grows the Axis by a fraction around the mouse point
|
|
@@ -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,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EChart2DModifierType } from "../../types/ChartModifierType";
|
|
2
|
+
import { ChartModifierBase2D, IChartModifierBaseOptions } from "./ChartModifierBase2D";
|
|
3
|
+
/**
|
|
4
|
+
* Base class for custom Chart Modifiers (allows custom zooming, panning, interaction behaviour) on 2D Charts
|
|
5
|
+
*/
|
|
6
|
+
export declare class CustomChartModifier2D extends ChartModifierBase2D {
|
|
7
|
+
/**
|
|
8
|
+
* @inheritDoc
|
|
9
|
+
*/
|
|
10
|
+
readonly type: EChart2DModifierType;
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
* @param options
|
|
14
|
+
*/
|
|
15
|
+
constructor(options?: IChartModifierBaseOptions);
|
|
16
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.CustomChartModifier2D = void 0;
|
|
19
|
+
var ChartModifierType_1 = require("../../types/ChartModifierType");
|
|
20
|
+
var ChartModifierBase2D_1 = require("./ChartModifierBase2D");
|
|
21
|
+
/**
|
|
22
|
+
* Base class for custom Chart Modifiers (allows custom zooming, panning, interaction behaviour) on 2D Charts
|
|
23
|
+
*/
|
|
24
|
+
var CustomChartModifier2D = /** @class */ (function (_super) {
|
|
25
|
+
__extends(CustomChartModifier2D, _super);
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
* @param options
|
|
29
|
+
*/
|
|
30
|
+
function CustomChartModifier2D(options) {
|
|
31
|
+
var _this = _super.call(this, options) || this;
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
_this.type = ChartModifierType_1.EChart2DModifierType.Custom;
|
|
36
|
+
return _this;
|
|
37
|
+
}
|
|
38
|
+
return CustomChartModifier2D;
|
|
39
|
+
}(ChartModifierBase2D_1.ChartModifierBase2D));
|
|
40
|
+
exports.CustomChartModifier2D = CustomChartModifier2D;
|
|
@@ -105,7 +105,7 @@ export declare class LegendModifier extends ChartModifierBase2D implements IIncl
|
|
|
105
105
|
getIncludedRenderableSeries(): IRenderableSeries[];
|
|
106
106
|
/** @inheritDoc */
|
|
107
107
|
toJSON(): {
|
|
108
|
-
type: string;
|
|
108
|
+
type: string; /** @inheritDoc */
|
|
109
109
|
options: Required<Omit<IChartModifierBaseOptions, never>>;
|
|
110
110
|
};
|
|
111
111
|
/** @inheritDoc */
|
|
@@ -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) {
|
|
@@ -72,7 +72,9 @@ export declare class YAxisDragModifier extends ChartModifierBase2D implements II
|
|
|
72
72
|
*/
|
|
73
73
|
modifierMouseUp(args: ModifierMouseArgs): void;
|
|
74
74
|
toJSON(): {
|
|
75
|
-
type: string;
|
|
75
|
+
type: string; /**
|
|
76
|
+
* @inheritDoc
|
|
77
|
+
*/
|
|
76
78
|
options: Required<Omit<IChartModifierBaseOptions, never>>;
|
|
77
79
|
};
|
|
78
80
|
protected updateCursor(mousePoint: Point): void;
|
|
@@ -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
|
};
|