scichart 3.2.464 → 3.2.476

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.
Files changed (62) hide show
  1. package/Builder/buildDataSeries.d.ts +7 -3
  2. package/Builder/buildDataSeries.js +87 -112
  3. package/Builder/buildSeries.js +52 -1
  4. package/Builder/chartBuilder.d.ts +1 -1
  5. package/Charting/ChartModifiers/RolloverModifier.js +4 -3
  6. package/Charting/ChartModifiers/SeriesSelectionModifier.d.ts +2 -0
  7. package/Charting/ChartModifiers/SeriesSelectionModifier.js +21 -0
  8. package/Charting/LayoutManager/SciChartVerticalGroup.d.ts +1 -0
  9. package/Charting/LayoutManager/SciChartVerticalGroup.js +18 -0
  10. package/Charting/LayoutManager/SynchronizedLayoutManager.d.ts +1 -1
  11. package/Charting/Model/BaseDataSeries.d.ts +3 -1
  12. package/Charting/Model/BaseDataSeries.js +15 -8
  13. package/Charting/Model/BaseHeatmapDataSeries.d.ts +3 -1
  14. package/Charting/Model/BaseHeatmapDataSeries.js +17 -10
  15. package/Charting/Model/Filters/HlcScaleOffsetFilter.d.ts +13 -1
  16. package/Charting/Model/Filters/OhlcScaleOffsetFilter.d.ts +13 -1
  17. package/Charting/Model/Filters/XyLinearTrendFilter.d.ts +14 -2
  18. package/Charting/Model/Filters/XyMovingAverageFilter.d.ts +13 -2
  19. package/Charting/Model/Filters/XyRatioFilter.d.ts +13 -1
  20. package/Charting/Model/Filters/XyScaleOffsetFilter.d.ts +14 -2
  21. package/Charting/Model/Filters/XyyScaleOffsetFilter.d.ts +14 -1
  22. package/Charting/Model/Filters/XyzScaleOffsetFilter.d.ts +14 -1
  23. package/Charting/Model/HlcDataSeries.d.ts +1 -1
  24. package/Charting/Model/HlcDataSeries.js +17 -16
  25. package/Charting/Model/IDataSeries.d.ts +2 -1
  26. package/Charting/Model/NonUniformHeatmapDataSeries.d.ts +1 -5
  27. package/Charting/Model/NonUniformHeatmapDataSeries.js +8 -18
  28. package/Charting/Model/OhlcDataSeries.d.ts +1 -1
  29. package/Charting/Model/OhlcDataSeries.js +20 -19
  30. package/Charting/Model/UniformHeatmapDataSeries.d.ts +1 -5
  31. package/Charting/Model/UniformHeatmapDataSeries.js +9 -10
  32. package/Charting/Model/XyDataSeries.d.ts +1 -1
  33. package/Charting/Model/XyDataSeries.js +11 -10
  34. package/Charting/Model/XyTextDataSeries.d.ts +1 -1
  35. package/Charting/Model/XyTextDataSeries.js +19 -9
  36. package/Charting/Model/XyyDataSeries.d.ts +1 -1
  37. package/Charting/Model/XyyDataSeries.js +14 -13
  38. package/Charting/Model/XyzDataSeries.d.ts +1 -1
  39. package/Charting/Model/XyzDataSeries.js +14 -13
  40. package/Charting/Visuals/Axis/AxisTitleRenderer.js +6 -0
  41. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +27 -17
  42. package/Charting/Visuals/RenderableSeries/BaseStackedRenderableSeries.js +1 -1
  43. package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.d.ts +7 -0
  44. package/Charting/Visuals/RenderableSeries/DataLabels/ContoursDataLabelProvider.js +21 -3
  45. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.d.ts +7 -0
  46. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +21 -3
  47. package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.js +15 -6
  48. package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.d.ts +7 -0
  49. package/Charting/Visuals/RenderableSeries/DataLabels/HeatMapDataLabelProvider.js +21 -3
  50. package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.d.ts +7 -0
  51. package/Charting/Visuals/RenderableSeries/DataLabels/TextDataLabelProvider.js +21 -3
  52. package/Charting/Visuals/SciChartSurface.js +4 -0
  53. package/Core/BuildStamp.d.ts +1 -1
  54. package/Core/BuildStamp.js +2 -2
  55. package/_wasm/scichart.browser.js +1 -1
  56. package/_wasm/scichart2d.wasm +0 -0
  57. package/_wasm/scichart3d.wasm +0 -0
  58. package/index.d.ts +1 -0
  59. package/index.dev.js +436 -278
  60. package/index.min.js +1 -1
  61. package/package.json +1 -1
  62. package/utils/parseColor.js +1 -5
@@ -7,7 +7,7 @@ import { IXyScaleOffsetFilterOptions } from "../Charting/Model/Filters/XyScaleOf
7
7
  import { IXyyScaleOffsetFilterOptions } from "../Charting/Model/Filters/XyyScaleOffsetFilter";
8
8
  import { IXyzScaleOffsetFilterOptions } from "../Charting/Model/Filters/XyzScaleOffsetFilter";
9
9
  import { IHlcDataSeriesOptions } from "../Charting/Model/HlcDataSeries";
10
- import { IDataSeries } from "../Charting/Model/IDataSeries";
10
+ import { EDataSeriesType, IDataSeries } from "../Charting/Model/IDataSeries";
11
11
  import { INonUniformHeatmapSeriesOptions } from "../Charting/Model/NonUniformHeatmapDataSeries";
12
12
  import { IOhlcDataSeriesOptions } from "../Charting/Model/OhlcDataSeries";
13
13
  import { IUniformHeatmapSeriesOptions } from "../Charting/Model/UniformHeatmapDataSeries";
@@ -17,7 +17,6 @@ import { IXyyDataSeriesOptions } from "../Charting/Model/XyyDataSeries";
17
17
  import { IXyzDataSeriesOptions } from "../Charting/Model/XyzDataSeries";
18
18
  import { EDataFilterType } from "../types/DataFilterType";
19
19
  import { TSciChart } from "../types/TSciChart";
20
- import { TSeriesDefinition } from "./buildSeries";
21
20
  /**
22
21
  * Shared data that can be used in {@link ISciChart2DDefinition}
23
22
  * or directly in {@link chartBuilder.buildSeries} or {@link chartBuilder.buildDataSeries}
@@ -135,12 +134,17 @@ export declare type TXyTextSeriesData = {
135
134
  };
136
135
  /** Definition of series data, which can take various shapes */
137
136
  export declare type TSeriesDataDefinition = TXySeriesData | TXyySeriesData | TXyzSeriesData | THlcSeriesData | TOhlcSeriesData | TXyTextSeriesData | IUniformHeatmapSeriesOptions | INonUniformHeatmapSeriesOptions;
137
+ export declare type TDataSeriesDefinition = {
138
+ type: EDataSeriesType;
139
+ options: TSeriesDataDefinition;
140
+ };
138
141
  /**
139
142
  * Build a data series from a definition that can be pure data.
140
143
  * @param wasmContext A {@link TSciChart | SciChart 2D WebAssembly Context} or {@link TSciChart | SciChart 3D WebAssembly Context}
141
144
  * @param definition A {@link TSeriesDefinition}
142
145
  * @param sharedData Optional {@link TSharedDataDefinition} to define shared data which can be referenced by the data series
146
+ * @param originalDataSeries Optional {@Link IDataSeries} to define original data for filter
143
147
  * @returns An {@link IDataSeries}
144
148
  */
145
- export declare const buildDataSeries: (wasmContext: TSciChart, seriesDefinition: TSeriesDefinition, sharedData?: TSharedDataDefinition) => IDataSeries;
149
+ export declare const buildDataSeries: (wasmContext: TSciChart, dataSeriesDefinition: TDataSeriesDefinition, sharedData?: TSharedDataDefinition, originalDataSeries?: IDataSeries) => IDataSeries;
146
150
  export {};
@@ -21,6 +21,7 @@ var XyScaleOffsetFilter_1 = require("../Charting/Model/Filters/XyScaleOffsetFilt
21
21
  var XyyScaleOffsetFilter_1 = require("../Charting/Model/Filters/XyyScaleOffsetFilter");
22
22
  var XyzScaleOffsetFilter_1 = require("../Charting/Model/Filters/XyzScaleOffsetFilter");
23
23
  var HlcDataSeries_1 = require("../Charting/Model/HlcDataSeries");
24
+ var IDataSeries_1 = require("../Charting/Model/IDataSeries");
24
25
  var NonUniformHeatmapDataSeries_1 = require("../Charting/Model/NonUniformHeatmapDataSeries");
25
26
  var OhlcDataSeries_1 = require("../Charting/Model/OhlcDataSeries");
26
27
  var UniformHeatmapDataSeries_1 = require("../Charting/Model/UniformHeatmapDataSeries");
@@ -29,133 +30,33 @@ var XyTextDataSeries_1 = require("../Charting/Model/XyTextDataSeries");
29
30
  var XyyDataSeries_1 = require("../Charting/Model/XyyDataSeries");
30
31
  var XyzDataSeries_1 = require("../Charting/Model/XyzDataSeries");
31
32
  var DataFilterType_1 = require("../types/DataFilterType");
32
- var SeriesType_1 = require("../types/SeriesType");
33
33
  var chartBuilder_1 = require("./chartBuilder");
34
- function hasOwnProperty(obj, prop) {
35
- return obj.hasOwnProperty(prop);
36
- }
37
34
  /**
38
35
  * Build a data series from a definition that can be pure data.
39
36
  * @param wasmContext A {@link TSciChart | SciChart 2D WebAssembly Context} or {@link TSciChart | SciChart 3D WebAssembly Context}
40
37
  * @param definition A {@link TSeriesDefinition}
41
38
  * @param sharedData Optional {@link TSharedDataDefinition} to define shared data which can be referenced by the data series
39
+ * @param originalDataSeries Optional {@Link IDataSeries} to define original data for filter
42
40
  * @returns An {@link IDataSeries}
43
41
  */
44
- var buildDataSeries = function (wasmContext, seriesDefinition, sharedData) {
45
- if (typeof seriesDefinition === "string") {
46
- seriesDefinition = JSON.parse(seriesDefinition, chartBuilder_1.chartReviver);
42
+ var buildDataSeries = function (wasmContext, dataSeriesDefinition, sharedData, originalDataSeries) {
43
+ if (!dataSeriesDefinition) {
44
+ return undefined;
45
+ }
46
+ if (typeof dataSeriesDefinition === "string") {
47
+ dataSeriesDefinition = JSON.parse(dataSeriesDefinition, chartBuilder_1.chartReviver);
47
48
  }
48
49
  if (typeof sharedData === "string") {
49
50
  sharedData = JSON.parse(sharedData, chartBuilder_1.chartReviver);
50
51
  }
51
52
  var dataSeries;
52
53
  var filterDef;
53
- if (hasOwnProperty(seriesDefinition, "xyData")) {
54
- var data = seriesDefinition.xyData;
55
- if (sharedData && data.xDataId) {
56
- var xValues = sharedData[data.xDataId];
57
- var yValues = sharedData[data.yDataId];
58
- dataSeries = new XyDataSeries_1.XyDataSeries(wasmContext, __assign({ xValues: xValues, yValues: yValues }, data));
59
- }
60
- else {
61
- dataSeries = new XyDataSeries_1.XyDataSeries(wasmContext, data);
62
- }
63
- if (hasOwnProperty(data, "filter")) {
64
- filterDef = data.filter;
65
- }
66
- }
67
- else if (hasOwnProperty(seriesDefinition, "xyyData")) {
68
- var data = seriesDefinition.xyyData;
69
- if (sharedData && data.xDataId) {
70
- var xValues = sharedData[data.xDataId];
71
- var yValues = sharedData[data.yDataId];
72
- var y1Values = sharedData[data.y1DataId];
73
- dataSeries = new XyyDataSeries_1.XyyDataSeries(wasmContext, __assign({ xValues: xValues, yValues: yValues, y1Values: y1Values }, data));
74
- }
75
- else {
76
- dataSeries = new XyyDataSeries_1.XyyDataSeries(wasmContext, data);
77
- }
78
- if (hasOwnProperty(data, "filter")) {
79
- filterDef = data.filter;
80
- }
81
- }
82
- else if (hasOwnProperty(seriesDefinition, "xyzData")) {
83
- var data = seriesDefinition.xyzData;
84
- if (sharedData && data.xDataId) {
85
- var xValues = sharedData[data.xDataId];
86
- var yValues = sharedData[data.yDataId];
87
- var zValues = sharedData[data.zDataId];
88
- dataSeries = new XyzDataSeries_1.XyzDataSeries(wasmContext, __assign({ xValues: xValues, yValues: yValues, zValues: zValues }, data));
89
- }
90
- else {
91
- dataSeries = new XyzDataSeries_1.XyzDataSeries(wasmContext, data);
92
- }
93
- if (hasOwnProperty(data, "filter")) {
94
- filterDef = data.filter;
95
- }
96
- }
97
- else if (hasOwnProperty(seriesDefinition, "xyTextData")) {
98
- var data = seriesDefinition.xyTextData;
99
- if (sharedData && data.xDataId) {
100
- var xValues = sharedData[data.xDataId];
101
- var yValues = sharedData[data.yDataId];
102
- dataSeries = new XyTextDataSeries_1.XyTextDataSeries(wasmContext, __assign({ xValues: xValues, yValues: yValues }, data));
103
- }
104
- else {
105
- dataSeries = new XyTextDataSeries_1.XyTextDataSeries(wasmContext, data);
106
- }
107
- if (hasOwnProperty(data, "filter")) {
108
- filterDef = data.filter;
109
- }
110
- }
111
- else if (hasOwnProperty(seriesDefinition, "hlcData")) {
112
- var data = seriesDefinition.hlcData;
113
- if (sharedData && data.xDataId) {
114
- var xValues = sharedData[data.xDataId];
115
- var highValues = sharedData[data.highDataId];
116
- var lowValues = sharedData[data.lowDataId];
117
- var yValues = sharedData[data.closeDataId];
118
- dataSeries = new HlcDataSeries_1.HlcDataSeries(wasmContext, __assign({ xValues: xValues, highValues: highValues, lowValues: lowValues, yValues: yValues }, data));
119
- }
120
- else {
121
- dataSeries = new HlcDataSeries_1.HlcDataSeries(wasmContext, data);
122
- }
123
- if (hasOwnProperty(data, "filter")) {
124
- filterDef = data.filter;
125
- }
126
- }
127
- else if (hasOwnProperty(seriesDefinition, "ohlcData")) {
128
- var data = seriesDefinition.ohlcData;
129
- if (sharedData && data.xDataId) {
130
- var xValues = sharedData[data.xDataId];
131
- var openValues = sharedData[data.openDataId];
132
- var highValues = sharedData[data.highDataId];
133
- var lowValues = sharedData[data.lowDataId];
134
- var closeValues = sharedData[data.closeDataId];
135
- dataSeries = new OhlcDataSeries_1.OhlcDataSeries(wasmContext, __assign({ xValues: xValues, openValues: openValues, highValues: highValues, lowValues: lowValues, closeValues: closeValues }, data));
136
- }
137
- else {
138
- dataSeries = new OhlcDataSeries_1.OhlcDataSeries(wasmContext, data);
139
- }
140
- if (hasOwnProperty(data, "filter")) {
141
- filterDef = data.filter;
142
- }
143
- }
144
- else if (hasOwnProperty(seriesDefinition, "heatmapData") &&
145
- (seriesDefinition.type === SeriesType_1.ESeriesType.UniformHeatmapSeries ||
146
- seriesDefinition.type === SeriesType_1.ESeriesType.UniformContoursSeries)) {
147
- dataSeries = new UniformHeatmapDataSeries_1.UniformHeatmapDataSeries(wasmContext, seriesDefinition.heatmapData);
148
- }
149
- else if (hasOwnProperty(seriesDefinition, "heatmapData") &&
150
- seriesDefinition.type === SeriesType_1.ESeriesType.NonUniformHeatmapSeries) {
151
- dataSeries = new NonUniformHeatmapDataSeries_1.NonUniformHeatmapDataSeries(wasmContext, seriesDefinition.heatmapData);
152
- }
153
- if (filterDef) {
154
- if ("dataSeries" in seriesDefinition.options) {
155
- dataSeries = seriesDefinition.options.dataSeries;
156
- }
54
+ dataSeries = createDataSeries(wasmContext, dataSeriesDefinition, sharedData);
55
+ if (filterDef &&
56
+ dataSeriesDefinition.type !== IDataSeries_1.EDataSeriesType.HeatmapUniform &&
57
+ dataSeriesDefinition.type !== IDataSeries_1.EDataSeriesType.HeatmapNonUniform) {
157
58
  if (dataSeries) {
158
- var filter = buildFilter(dataSeries, filterDef);
59
+ var filter = buildFilter((originalDataSeries !== null && originalDataSeries !== void 0 ? originalDataSeries : dataSeries), filterDef);
159
60
  if (filter) {
160
61
  dataSeries = filter;
161
62
  }
@@ -201,3 +102,77 @@ var buildFilter = function (dataSeries, definition) {
201
102
  return undefined;
202
103
  }
203
104
  };
105
+ var createDataSeries = function (wasmContext, dataSeriesDefinition, sharedData) {
106
+ var rawOptions = __assign({}, dataSeriesDefinition.options);
107
+ switch (dataSeriesDefinition.type) {
108
+ case IDataSeries_1.EDataSeriesType.Xy: {
109
+ var data = rawOptions;
110
+ if (sharedData && data.xDataId) {
111
+ data.xValues = sharedData[data.xDataId];
112
+ data.yValues = sharedData[data.yDataId];
113
+ }
114
+ return new XyDataSeries_1.XyDataSeries(wasmContext, data);
115
+ }
116
+ case IDataSeries_1.EDataSeriesType.Xyy: {
117
+ var data = rawOptions;
118
+ if (sharedData && data.xDataId) {
119
+ data.xValues = sharedData[data.xDataId];
120
+ data.yValues = sharedData[data.yDataId];
121
+ data.y1Values = sharedData[data.y1DataId];
122
+ }
123
+ return new XyyDataSeries_1.XyyDataSeries(wasmContext, data);
124
+ }
125
+ case IDataSeries_1.EDataSeriesType.Xyz: {
126
+ var data = rawOptions;
127
+ if (sharedData && data.xDataId) {
128
+ data.xValues = sharedData[data.xDataId];
129
+ data.yValues = sharedData[data.yDataId];
130
+ data.zValues = sharedData[data.zDataId];
131
+ }
132
+ return new XyzDataSeries_1.XyzDataSeries(wasmContext, data);
133
+ }
134
+ case IDataSeries_1.EDataSeriesType.XyText: {
135
+ var data = rawOptions;
136
+ if (sharedData && data.xDataId) {
137
+ data.xValues = sharedData[data.xDataId];
138
+ data.yValues = sharedData[data.yDataId];
139
+ }
140
+ return new XyTextDataSeries_1.XyTextDataSeries(wasmContext, data);
141
+ }
142
+ case IDataSeries_1.EDataSeriesType.Hlc: {
143
+ var data = rawOptions;
144
+ if (sharedData && data.xDataId) {
145
+ data.xValues = sharedData[data.xDataId];
146
+ data.highValues = sharedData[data.highDataId];
147
+ data.lowValues = sharedData[data.lowDataId];
148
+ data.yValues = sharedData[data.closeDataId];
149
+ }
150
+ return new HlcDataSeries_1.HlcDataSeries(wasmContext, data);
151
+ }
152
+ case IDataSeries_1.EDataSeriesType.Ohlc: {
153
+ var data = rawOptions;
154
+ if (sharedData && data.xDataId) {
155
+ data.xValues = sharedData[data.xDataId];
156
+ data.openValues = sharedData[data.openDataId];
157
+ data.highValues = sharedData[data.highDataId];
158
+ data.lowValues = sharedData[data.lowDataId];
159
+ data.closeValues = sharedData[data.closeDataId];
160
+ }
161
+ return new OhlcDataSeries_1.OhlcDataSeries(wasmContext, data);
162
+ }
163
+ case IDataSeries_1.EDataSeriesType.HeatmapUniform: {
164
+ var data = rawOptions;
165
+ return new UniformHeatmapDataSeries_1.UniformHeatmapDataSeries(wasmContext, data);
166
+ }
167
+ case IDataSeries_1.EDataSeriesType.HeatmapNonUniform: {
168
+ var data = rawOptions;
169
+ return new NonUniformHeatmapDataSeries_1.NonUniformHeatmapDataSeries(wasmContext, data);
170
+ }
171
+ default: {
172
+ var handleInvalidDataSeriesType = function (type) {
173
+ throw new Error("Invalid Data Series Type value: \"".concat(type, "\"!"));
174
+ };
175
+ return handleInvalidDataSeriesType(dataSeriesDefinition.type);
176
+ }
177
+ }
178
+ };
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildSeries = void 0;
4
4
  var DataPointSelectionPaletteProvider_1 = require("../Charting/Model/DataPointSelectionPaletteProvider");
5
+ var IDataSeries_1 = require("../Charting/Model/IDataSeries");
5
6
  var IPointMetadata_1 = require("../Charting/Model/IPointMetadata");
6
7
  var PaletteFactory_1 = require("../Charting/Model/PaletteFactory");
7
8
  var CrossPointMarker_1 = require("../Charting/Visuals/PointMarkers/CrossPointMarker");
@@ -83,6 +84,41 @@ var classFactory_1 = require("./classFactory");
83
84
  // Default palette provider is not required as it is created automatically if none is provided.
84
85
  (0, classFactory_1.registerWasmType)(BaseType_1.EBaseType.PaletteProvider, PaletteProviderType_1.EPaletteProviderType.Gradient, function (wasmContext, gradientBrush) { return PaletteFactory_1.PaletteFactory.createGradient(wasmContext, gradientBrush); }, true);
85
86
  (0, classFactory_1.registerType)(BaseType_1.EBaseType.PaletteProvider, PaletteProviderType_1.EPaletteProviderType.DataPointSelection, function (selectedStyle) { return new DataPointSelectionPaletteProvider_1.DataPointSelectionPaletteProvider(selectedStyle); }, true);
87
+ function hasOwnProperty(obj, prop) {
88
+ return obj.hasOwnProperty(prop);
89
+ }
90
+ var getDataSeriesDefinition = function (seriesDefinition) {
91
+ if (hasOwnProperty(seriesDefinition, "xyData")) {
92
+ return { type: IDataSeries_1.EDataSeriesType.Xy, options: seriesDefinition.xyData };
93
+ }
94
+ else if (hasOwnProperty(seriesDefinition, "xyyData")) {
95
+ return { type: IDataSeries_1.EDataSeriesType.Xyy, options: seriesDefinition.xyyData };
96
+ }
97
+ else if (hasOwnProperty(seriesDefinition, "xyzData")) {
98
+ return { type: IDataSeries_1.EDataSeriesType.Xyz, options: seriesDefinition.xyzData };
99
+ }
100
+ else if (hasOwnProperty(seriesDefinition, "xyTextData")) {
101
+ return { type: IDataSeries_1.EDataSeriesType.XyText, options: seriesDefinition.xyTextData };
102
+ }
103
+ else if (hasOwnProperty(seriesDefinition, "hlcData")) {
104
+ return { type: IDataSeries_1.EDataSeriesType.Hlc, options: seriesDefinition.hlcData };
105
+ }
106
+ else if (hasOwnProperty(seriesDefinition, "ohlcData")) {
107
+ return { type: IDataSeries_1.EDataSeriesType.Ohlc, options: seriesDefinition.ohlcData };
108
+ }
109
+ else if (hasOwnProperty(seriesDefinition, "heatmapData") &&
110
+ (seriesDefinition.type === SeriesType_1.ESeriesType.UniformHeatmapSeries ||
111
+ seriesDefinition.type === SeriesType_1.ESeriesType.UniformContoursSeries)) {
112
+ return { type: IDataSeries_1.EDataSeriesType.HeatmapUniform, options: seriesDefinition.heatmapData };
113
+ }
114
+ else if (hasOwnProperty(seriesDefinition, "heatmapData") &&
115
+ seriesDefinition.type === SeriesType_1.ESeriesType.NonUniformHeatmapSeries) {
116
+ return { type: IDataSeries_1.EDataSeriesType.HeatmapNonUniform, options: seriesDefinition.heatmapData };
117
+ }
118
+ else {
119
+ return undefined;
120
+ }
121
+ };
86
122
  /**
87
123
  * Build one or more renderable series from a definition that can be pure data.
88
124
  * @param wasmContext A {@link TSciChart | SciChart 2D WebAssembly Context} or {@link TSciChart | SciChart 3D WebAssembly Context}
@@ -172,7 +208,7 @@ var buildSeries = function (wasmContext, definition, sharedData) {
172
208
  series = col;
173
209
  }
174
210
  if (series) {
175
- var dataSeries = (0, buildDataSeries_1.buildDataSeries)(wasmContext, seriesDef, sharedData);
211
+ var dataSeries = getDataSeriesFromRenderableSeriesDefinition(wasmContext, seriesDef, sharedData);
176
212
  if (dataSeries) {
177
213
  series.dataSeries = dataSeries;
178
214
  }
@@ -184,3 +220,18 @@ var buildSeries = function (wasmContext, definition, sharedData) {
184
220
  return result;
185
221
  };
186
222
  exports.buildSeries = buildSeries;
223
+ var getDataSeriesFromRenderableSeriesDefinition = function (wasmContext, renderableSeriesDefinition, sharedData) {
224
+ var dataSeriesDefinition = getDataSeriesDefinition(renderableSeriesDefinition);
225
+ if (!dataSeriesDefinition) {
226
+ return undefined;
227
+ }
228
+ if (renderableSeriesDefinition.options &&
229
+ "dataSeries" in renderableSeriesDefinition.options &&
230
+ renderableSeriesDefinition.options.dataSeries &&
231
+ dataSeriesDefinition.options &&
232
+ "filter" in dataSeriesDefinition.options &&
233
+ dataSeriesDefinition.options.filter) {
234
+ return (0, buildDataSeries_1.buildDataSeries)(wasmContext, dataSeriesDefinition, sharedData, renderableSeriesDefinition.options.dataSeries);
235
+ }
236
+ return (0, buildDataSeries_1.buildDataSeries)(wasmContext, dataSeriesDefinition, sharedData);
237
+ };
@@ -52,7 +52,7 @@ export declare const chartBuilder: {
52
52
  /** @inheritdoc */
53
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("..").IDataSeries;
55
+ buildDataSeries: (wasmContext: TSciChart, dataSeriesDefinition: import("./buildDataSeries").TDataSeriesDefinition, sharedData?: import("./buildDataSeries").TSharedDataDefinition, originalDataSeries?: import("..").IDataSeries) => import("..").IDataSeries;
56
56
  /** @inheritdoc */
57
57
  buildModifiers: (definition: import("./buildModifiers").TModifierDefinition | import("./buildModifiers").TModifierDefinition[]) => import("..").ChartModifierBase2D[];
58
58
  /** @inheritdoc */
@@ -96,7 +96,6 @@ var RolloverModifier = /** @class */ (function (_super) {
96
96
  if (options === null || options === void 0 ? void 0 : options.tooltipLegendTemplate) {
97
97
  if (typeof options.tooltipLegendTemplate === "string") {
98
98
  _this.typeMap.set("tooltipLegendTemplate", options.tooltipLegendTemplate);
99
- // @ts-ignore
100
99
  options.tooltipLegendTemplate = (0, classFactory_1.getFunction)(BaseType_1.EBaseType.OptionFunction, options.tooltipLegendTemplate);
101
100
  }
102
101
  }
@@ -107,8 +106,7 @@ var RolloverModifier = /** @class */ (function (_super) {
107
106
  if (options === null || options === void 0 ? void 0 : options.tooltipDataTemplate) {
108
107
  if (typeof options.tooltipDataTemplate === "string") {
109
108
  _this.typeMap.set("tooltipDataTemplate", options.tooltipDataTemplate);
110
- // @ts-ignore
111
- options.tooltipDataTemplate = (0, classFactory_1.getFunction)(BaseType_1.EBaseType.OptionFunction, options.tooltipDataTemplate.type);
109
+ options.tooltipDataTemplate = (0, classFactory_1.getFunction)(BaseType_1.EBaseType.OptionFunction, options.tooltipDataTemplate);
112
110
  }
113
111
  }
114
112
  _this.tooltipDataTemplateProperty =
@@ -535,6 +533,9 @@ var RolloverModifier = /** @class */ (function (_super) {
535
533
  var _this = this;
536
534
  var rsList = this.getIncludedRenderableSeries();
537
535
  rsList.forEach(function (rs) {
536
+ if (!rs.rolloverModifierProps.marker) {
537
+ _this.addSeriesAnnotationsToParentSurface(rs);
538
+ }
538
539
  rs.rolloverModifierProps.marker.suspendInvalidate();
539
540
  rs.rolloverModifierProps.tooltip.suspendInvalidate();
540
541
  rs.rolloverModifierProps.marker.isHidden = true;
@@ -116,6 +116,8 @@ export declare class SeriesSelectionModifier extends ChartModifierBase2D {
116
116
  * @inheritDoc
117
117
  */
118
118
  modifierMouseMove(args: ModifierMouseArgs): void;
119
+ modifierMouseLeave(args: ModifierMouseArgs): void;
120
+ modifierPointerCancel(args: ModifierMouseArgs): void;
119
121
  /**
120
122
  * @inheritDoc
121
123
  */
@@ -200,6 +200,10 @@ var SeriesSelectionModifier = /** @class */ (function (_super) {
200
200
  nearestHitTestInfo_1.associatedSeries.isHovered = true;
201
201
  this.hoveredSeries.push(nearestHitTestInfo_1.associatedSeries);
202
202
  }
203
+ else {
204
+ // No series hit-tested, set all as un-hovered
205
+ allSeries.forEach(function (s) { return (s.isHovered = false); });
206
+ }
203
207
  // 2. Series which were not hovered, set isHovered = false;
204
208
  hitTestInfos
205
209
  .filter(function (ht) { return ht !== nearestHitTestInfo_1; })
@@ -223,6 +227,23 @@ var SeriesSelectionModifier = /** @class */ (function (_super) {
223
227
  this.preventReentrancy = false;
224
228
  }
225
229
  };
230
+ SeriesSelectionModifier.prototype.modifierMouseLeave = function (args) {
231
+ var _a;
232
+ this.preventReentrancy = true;
233
+ // Pointer left the chart, set all as un-hovered
234
+ var allSeries = this.getAllSeries();
235
+ // Raise the hoverChanged event if something has changed
236
+ var prevHovered = __spreadArray([], this.hoveredSeries, true);
237
+ var nearestHitTestInfo = undefined;
238
+ if (prevHovered.length > 0) {
239
+ allSeries.forEach(function (s) { return (s.isHovered = false); });
240
+ (_a = this.hoverChanged) === null || _a === void 0 ? void 0 : _a.raiseEvent(new HoveredChangedArgs_1.HoveredChangedArgs(this, this.hoveredSeries, allSeries, nearestHitTestInfo));
241
+ }
242
+ this.preventReentrancy = false;
243
+ };
244
+ SeriesSelectionModifier.prototype.modifierPointerCancel = function (args) {
245
+ this.modifierMouseLeave(args);
246
+ };
226
247
  /**
227
248
  * @inheritDoc
228
249
  */
@@ -6,6 +6,7 @@ export declare class SciChartVerticalGroup {
6
6
  private leftOuterLayoutSizes;
7
7
  private rightOuterLayoutSizes;
8
8
  addSurfaceToGroup(sciChartSurface: SciChartSurface): void;
9
+ removeSurface(sciChartSurface: SciChartSurface): void;
9
10
  synchronizeAxisSizes(): void;
10
11
  onLeftSizeChanged(key: string, value: number): void;
11
12
  onRightSizeChanged(key: string, value: number): void;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SciChartVerticalGroup = void 0;
4
4
  var Size_1 = require("../../types/Size");
5
+ var LayoutManager_1 = require("./LayoutManager");
5
6
  var SynchronizedLayoutManager_1 = require("./SynchronizedLayoutManager");
6
7
  var SciChartVerticalGroup = /** @class */ (function () {
7
8
  function SciChartVerticalGroup() {
@@ -19,6 +20,23 @@ var SciChartVerticalGroup = /** @class */ (function () {
19
20
  sciChartSurface.layoutManager.layoutChart(new Size_1.Size(width, height));
20
21
  this.synchronizeAxisSizes();
21
22
  };
23
+ SciChartVerticalGroup.prototype.removeSurface = function (sciChartSurface) {
24
+ var synchronizedLayoutManager = sciChartSurface.layoutManager;
25
+ var indexToRemove = this.layoutManagers.findIndex(function (manager) { return manager === synchronizedLayoutManager; });
26
+ if (indexToRemove < 0) {
27
+ throw new Error("Surface ".concat(sciChartSurface.id, " not found in Vertical Group!"));
28
+ }
29
+ this.layoutManagers.splice(indexToRemove, 1);
30
+ var defaultLayoutManager = new LayoutManager_1.LayoutManager();
31
+ sciChartSurface.layoutManager = defaultLayoutManager;
32
+ var _a = sciChartSurface.domCanvas2D, width = _a.width, height = _a.height;
33
+ sciChartSurface.layoutManager.layoutChart(new Size_1.Size(width, height));
34
+ this.onLeftSizeChanged(synchronizedLayoutManager.id, 0);
35
+ this.onRightSizeChanged(synchronizedLayoutManager.id, 0);
36
+ delete this.leftOuterLayoutSizes[synchronizedLayoutManager.id];
37
+ delete this.rightOuterLayoutSizes[synchronizedLayoutManager.id];
38
+ this.synchronizeAxisSizes();
39
+ };
22
40
  SciChartVerticalGroup.prototype.synchronizeAxisSizes = function () {
23
41
  this.layoutManagers.forEach(function (lm) {
24
42
  lm.trySynchronizeLayouts();
@@ -9,7 +9,7 @@ import { SciChartVerticalGroup } from "./SciChartVerticalGroup";
9
9
  export declare class SynchronizedLayoutManager extends LayoutManager {
10
10
  type: ELayoutManagerType;
11
11
  readonly id: string;
12
- private verticalGroup;
12
+ verticalGroup: SciChartVerticalGroup;
13
13
  private lastLeftOuterAreaSize;
14
14
  private lastRightOuterAreaSize;
15
15
  constructor(verticalGroup: SciChartVerticalGroup, options?: ILayoutManagerOptions);
@@ -1,3 +1,4 @@
1
+ import { TDataSeriesDefinition } from "../../Builder/buildDataSeries";
1
2
  import { DeletableEntity } from "../../Core/DeletableEntity";
2
3
  import { EventHandler } from "../../Core/EventHandler";
3
4
  import { NumberRange } from "../../Core/NumberRange";
@@ -266,9 +267,10 @@ export declare abstract class BaseDataSeries extends DeletableEntity implements
266
267
  */
267
268
  updateAnimationProperties(progress: number, animation: SeriesAnimation): void;
268
269
  /** @inheritDoc */
269
- toJSON(excludeData?: boolean): any;
270
+ toJSON(excludeData?: boolean): TDataSeriesDefinition;
270
271
  /** @inheritDoc */
271
272
  get changeCount(): number;
273
+ protected getOptions(excludeData?: boolean): IBaseDataSeriesOptions;
272
274
  protected validateIndex(index: number, message?: string): void;
273
275
  protected setMetadataAt(index: number, metadata: IPointMetadata): void;
274
276
  protected appendMetadata(metadata: IPointMetadata): void;
@@ -480,14 +480,8 @@ var BaseDataSeries = /** @class */ (function (_super) {
480
480
  /** @inheritDoc */
481
481
  BaseDataSeries.prototype.toJSON = function (excludeData) {
482
482
  if (excludeData === void 0) { excludeData = false; }
483
- var options = __assign({ id: this.id, containsNaN: this.containsNaN, isSorted: this.isSorted, dataIsSortedInX: this.isSorted, dataEvenlySpacedInX: this.isEvenlySpaced, dataSeriesName: this.dataSeriesName, fifoCapacity: this.fifoCapacity, fifoSweeping: this.fifoSweeping, fifoSweepingGap: this.fifoSweepingGap, fifoStartIndex: this.fifoSweeping ? this.fifoStartIndex : 0, capacity: this.capacity, metadata: undefined,
484
- // values must be serialized in derived classes
485
- xValues: undefined, yValues: undefined }, this.dataIds);
486
- // @ts-ignore
487
- options.metadata = this.metadataGeneratorProperty
488
- ? this.metadataGeneratorProperty.toJSON()
489
- : this.metadataProperty;
490
- return options;
483
+ var options = this.getOptions(excludeData);
484
+ return { type: this.type, options: options };
491
485
  };
492
486
  Object.defineProperty(BaseDataSeries.prototype, "changeCount", {
493
487
  /** @inheritDoc */
@@ -497,6 +491,19 @@ var BaseDataSeries = /** @class */ (function (_super) {
497
491
  enumerable: false,
498
492
  configurable: true
499
493
  });
494
+ BaseDataSeries.prototype.getOptions = function (excludeData) {
495
+ if (excludeData === void 0) { excludeData = false; }
496
+ var options = __assign({ id: this.id, containsNaN: this.containsNaN, isSorted: this.isSorted, dataIsSortedInX: this.isSorted, dataEvenlySpacedInX: this.isEvenlySpaced, dataSeriesName: this.dataSeriesName, fifoCapacity: this.fifoCapacity, fifoSweeping: this.fifoSweeping, fifoSweepingGap: this.fifoSweepingGap, fifoStartIndex: this.fifoSweeping ? this.fifoStartIndex : 0, capacity: this.capacity, metadata: undefined,
497
+ // values must be serialized in derived classes
498
+ xValues: undefined, yValues: undefined }, this.dataIds);
499
+ // @ts-ignore
500
+ options.metadata = this.metadataGeneratorProperty
501
+ ? this.metadataGeneratorProperty.toJSON()
502
+ : excludeData
503
+ ? undefined
504
+ : this.metadataProperty;
505
+ return options;
506
+ };
500
507
  BaseDataSeries.prototype.validateIndex = function (index, message) {
501
508
  if (Math.round(index) !== index) {
502
509
  throw Error("Index must be an integer");
@@ -1,3 +1,4 @@
1
+ import { TDataSeriesDefinition } from "../../Builder/buildDataSeries";
1
2
  import { EventHandler } from "../../Core/EventHandler";
2
3
  import { NumberRange } from "../../Core/NumberRange";
3
4
  import { ESearchMode } from "../../types/SearchMode";
@@ -287,7 +288,7 @@ export declare abstract class BaseHeatmapDataSeries implements IHeatmapSeries {
287
288
  * Gets the metadata matrix width
288
289
  */
289
290
  getMetadataWidth(): number;
290
- toJSON(excludeData?: boolean): any;
291
+ toJSON(excludeData?: boolean): TDataSeriesDefinition;
291
292
  /**
292
293
  * Gets the range in the X-direction for this DataSeries
293
294
  */
@@ -300,6 +301,7 @@ export declare abstract class BaseHeatmapDataSeries implements IHeatmapSeries {
300
301
  getIndicesRange(visibleRange: NumberRange, isCategoryData: boolean, downSearchMode?: ESearchMode, upSearchMode?: ESearchMode): NumberRange;
301
302
  /** @inheritDoc */
302
303
  get changeCount(): number;
304
+ protected getOptions(excludeData?: boolean): IBaseHeatmapSeriesOptions;
303
305
  /**
304
306
  * Computes the range in the Z-direction for this DataSeries
305
307
  * @remarks
@@ -496,16 +496,8 @@ var BaseHeatmapDataSeries = /** @class */ (function () {
496
496
  };
497
497
  BaseHeatmapDataSeries.prototype.toJSON = function (excludeData) {
498
498
  if (excludeData === void 0) { excludeData = false; }
499
- var options = {
500
- id: this.id,
501
- containsNaN: this.hasNaNs,
502
- dataSeriesName: this.dataSeriesName,
503
- zValues: excludeData ? undefined : this.zValuesProperty,
504
- metadata: this.metadataGeneratorProperty
505
- ? this.metadataGeneratorProperty.toJSON()
506
- : this.metadataProperty
507
- };
508
- return options;
499
+ var options = this.getOptions(excludeData);
500
+ return { type: this.type, options: options };
509
501
  };
510
502
  /** @inheritDoc */
511
503
  BaseHeatmapDataSeries.prototype.getIndicesRange = function (visibleRange, isCategoryData, downSearchMode, upSearchMode) {
@@ -519,6 +511,21 @@ var BaseHeatmapDataSeries = /** @class */ (function () {
519
511
  enumerable: false,
520
512
  configurable: true
521
513
  });
514
+ BaseHeatmapDataSeries.prototype.getOptions = function (excludeData) {
515
+ if (excludeData === void 0) { excludeData = false; }
516
+ var options = {
517
+ id: this.id,
518
+ containsNaN: this.hasNaNs,
519
+ dataSeriesName: this.dataSeriesName,
520
+ zValues: excludeData ? undefined : this.zValuesProperty,
521
+ metadata: this.metadataGeneratorProperty
522
+ ? this.metadataGeneratorProperty.toJSON()
523
+ : excludeData
524
+ ? undefined
525
+ : this.metadataProperty
526
+ };
527
+ return options;
528
+ };
522
529
  /**
523
530
  * Computes the range in the Z-direction for this DataSeries
524
531
  * @remarks
@@ -1,4 +1,6 @@
1
+ import { EDataFilterType } from "../../../types/DataFilterType";
1
2
  import { BaseDataSeries } from "../BaseDataSeries";
3
+ import { EDataSeriesType } from "../IDataSeries";
2
4
  import { HlcCustomFilter } from "./HlcCustomFilter";
3
5
  import { IHlcFilterOptions } from "./HlcFilterBase";
4
6
  export interface IHlcScaleOffsetFilterOptions extends IHlcFilterOptions {
@@ -13,6 +15,16 @@ export declare class HlcScaleOffsetFilter extends HlcCustomFilter {
13
15
  get offset(): number;
14
16
  set offset(value: number);
15
17
  constructor(originalSeries: BaseDataSeries, options?: IHlcScaleOffsetFilterOptions);
16
- toJSON(excludeData?: boolean): any;
18
+ toJSON(excludeData?: boolean): {
19
+ filter: {
20
+ type: EDataFilterType;
21
+ options: {
22
+ scale: number;
23
+ offset: number;
24
+ };
25
+ };
26
+ type: EDataSeriesType;
27
+ options: import("../../..").TSeriesDataDefinition;
28
+ };
17
29
  protected defaultFunction(index: number, y: number): number;
18
30
  }
@@ -1,4 +1,6 @@
1
+ import { EDataFilterType } from "../../../types/DataFilterType";
1
2
  import { BaseDataSeries } from "../BaseDataSeries";
3
+ import { EDataSeriesType } from "../IDataSeries";
2
4
  import { OhlcCustomFilter } from "./OhlcCustomFilter";
3
5
  import { IOhlcFilterOptions } from "./OhlcFilterBase";
4
6
  export interface IOhlcScaleOffsetFilterOptions extends IOhlcFilterOptions {
@@ -13,6 +15,16 @@ export declare class OhlcScaleOffsetFilter extends OhlcCustomFilter {
13
15
  get offset(): number;
14
16
  set offset(value: number);
15
17
  constructor(originalSeries: BaseDataSeries, options?: IOhlcScaleOffsetFilterOptions);
16
- toJSON(excludeData?: boolean): any;
18
+ toJSON(excludeData?: boolean): {
19
+ filter: {
20
+ type: EDataFilterType;
21
+ options: {
22
+ scale: number;
23
+ offset: number;
24
+ };
25
+ };
26
+ type: EDataSeriesType;
27
+ options: import("../../..").TSeriesDataDefinition;
28
+ };
17
29
  protected defaultFunction(index: number, y: number): number;
18
30
  }