@operato/scene-scichart 7.2.6 → 7.2.7

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 (34) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/db.sqlite +0 -0
  3. package/dist/charts/ox-scichart-multiple copy.d.ts +53 -0
  4. package/dist/charts/ox-scichart-multiple copy.js +411 -0
  5. package/dist/charts/ox-scichart-multiple copy.js.map +1 -0
  6. package/dist/charts/ox-scichart-multiple.d.ts +9 -8
  7. package/dist/charts/ox-scichart-multiple.js +209 -85
  8. package/dist/charts/ox-scichart-multiple.js.map +1 -1
  9. package/dist/charts/scichart-builder copy.d.ts +22 -0
  10. package/dist/charts/scichart-builder copy.js +420 -0
  11. package/dist/charts/scichart-builder copy.js.map +1 -0
  12. package/dist/charts/scichart-builder.d.ts +2 -0
  13. package/dist/charts/scichart-builder.js +44 -30
  14. package/dist/charts/scichart-builder.js.map +1 -1
  15. package/dist/charts/scichart-overview-builder.d.ts +13 -0
  16. package/dist/charts/scichart-overview-builder.js +219 -0
  17. package/dist/charts/scichart-overview-builder.js.map +1 -0
  18. package/dist/templates/scichart-multiple-timeseries.d.ts +1 -1
  19. package/dist/templates/scichart-multiple-timeseries.js +1 -1
  20. package/dist/templates/scichart-multiple-timeseries.js.map +1 -1
  21. package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +20 -10
  22. package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +15 -0
  23. package/logs/{application-2024-08-02-17.log → application-2024-08-04-01.log} +8 -8
  24. package/logs/application-2024-08-04-04.log +420 -0
  25. package/logs/application-2024-08-04-18.log +2 -0
  26. package/logs/{application-2024-08-02-18.log → application-2024-08-04-19.log} +8 -8
  27. package/logs/connections-2024-08-04-01.log +50 -0
  28. package/logs/connections-2024-08-04-04.log +200 -0
  29. package/logs/connections-2024-08-04-19.log +50 -0
  30. package/package.json +2 -2
  31. package/src/charts/ox-scichart-multiple.ts +256 -99
  32. package/src/charts/scichart-builder.ts +47 -30
  33. package/src/templates/scichart-multiple-timeseries.ts +1 -1
  34. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,420 @@
1
+ import { TinyColor } from '@ctrl/tinycolor';
2
+ import { SciChartSurface, SciChartJSLightTheme, SciChartJSDarkv2Theme, XyDataSeries, FastLineRenderableSeries, SplineLineRenderableSeries, FastColumnRenderableSeries, StackedColumnRenderableSeries, StackedMountainRenderableSeries, StackedColumnCollection, StackedMountainCollection, NumericAxis, DateTimeNumericAxis, EAutoRange, EAxisAlignment, EExecuteOn, ECoordinateMode, EHorizontalAnchorPoint, EVerticalAnchorPoint, NumberRange, MouseWheelZoomModifier, RubberBandXyZoomModifier, ZoomPanModifier, ZoomExtentsModifier, RolloverModifier, NumericLabelProvider, SmartDateLabelProvider, EllipsePointMarker, SquarePointMarker, TrianglePointMarker, CrossPointMarker, XPointMarker, WaveAnimation, LegendModifier, ELegendPlacement, EXyDirection, XAxisDragModifier, YAxisDragModifier, TextAnnotation, LineAnnotation, BoxAnnotation, HorizontalLineAnnotation, VerticalLineAnnotation, OverviewRangeSelectionModifier, ENumericFormat } from 'scichart';
3
+ SciChartSurface.UseCommunityLicense();
4
+ SciChartSurface.configure({
5
+ dataUrl: `/node_modules/scichart/_wasm/scichart2d.data`,
6
+ wasmUrl: `/node_modules/scichart/_wasm/scichart2d.wasm`
7
+ });
8
+ const DEFAULT_COLOR = '#FF6600';
9
+ const DEFAULT_STROKE = '#000000';
10
+ const POINT_MARKER_SIZE = 10;
11
+ const STROKE_THICKNESS = 2;
12
+ const ANIMATION_DURATION = 1000;
13
+ function getLocalTimeOffset() {
14
+ const now = new Date();
15
+ return now.getTimezoneOffset() * -60;
16
+ }
17
+ function getBaseColorFromTheme(theme) {
18
+ return new TinyColor(theme == 'dark' ? '#fff' : '#000');
19
+ }
20
+ function getThemeFromBrowser() {
21
+ return window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
22
+ }
23
+ export function convertColor(color, defaultColor) {
24
+ const tinyColor = new TinyColor(color);
25
+ return tinyColor.toHex8String() || defaultColor;
26
+ }
27
+ export function calculatePrecision(format = '') {
28
+ const formatString = format.toString();
29
+ if (formatString.indexOf('.') !== -1) {
30
+ return formatString.split('.')[1].length;
31
+ }
32
+ return 0;
33
+ }
34
+ function createPointMarker(wasmContext, dataset, color = DEFAULT_COLOR) {
35
+ const { pointStyle, pointRadius = POINT_MARKER_SIZE } = dataset || {};
36
+ if (!pointStyle) {
37
+ return;
38
+ }
39
+ const pointMarkerOptions = {
40
+ width: pointRadius,
41
+ height: pointRadius,
42
+ strokeThickness: STROKE_THICKNESS,
43
+ fill: color,
44
+ stroke: DEFAULT_STROKE
45
+ };
46
+ switch (pointStyle) {
47
+ case 'triangle':
48
+ return new TrianglePointMarker(wasmContext, pointMarkerOptions);
49
+ case 'rect':
50
+ return new SquarePointMarker(wasmContext, pointMarkerOptions);
51
+ case 'cross':
52
+ return new CrossPointMarker(wasmContext, pointMarkerOptions);
53
+ case 'crossRot':
54
+ return new XPointMarker(wasmContext, pointMarkerOptions);
55
+ default:
56
+ return new EllipsePointMarker(wasmContext, pointMarkerOptions);
57
+ }
58
+ }
59
+ function createAxis(wasmContext, axis, index, isXAxis, fontColor, fontFamily, fontSize, precision, options) {
60
+ const { axisTitle, ticks } = axis;
61
+ const { autoMax, autoMin, min, max, stepSize, beginAtZero, color = fontColor, textStrokeColor = fontColor, display = false } = ticks || {};
62
+ const axisOptions = {
63
+ axisTitle,
64
+ autoRange: autoMin || autoMax ? EAutoRange.Always : EAutoRange.Once,
65
+ axisAlignment: isXAxis ? EAxisAlignment.Bottom : index === 0 ? EAxisAlignment.Left : EAxisAlignment.Right,
66
+ visibleRange: min !== undefined && max !== undefined ? new NumberRange(min, max) : undefined,
67
+ majorDelta: stepSize,
68
+ growBy: beginAtZero ? new NumberRange(0.1, 0.1) : undefined,
69
+ labelStyle: {
70
+ fontFamily,
71
+ fontSize,
72
+ color
73
+ },
74
+ axisTitleStyle: {
75
+ fontFamily,
76
+ fontSize,
77
+ color: textStrokeColor
78
+ },
79
+ ...options,
80
+ drawLabels: display
81
+ };
82
+ const labelProvider = isXAxis
83
+ ? new SmartDateLabelProvider({
84
+ showWiderDateOnFirstLabel: true,
85
+ showYearOnWiderDate: false,
86
+ dateOffset: getLocalTimeOffset()
87
+ })
88
+ : new NumericLabelProvider();
89
+ if (isXAxis) {
90
+ labelProvider.cursorNumericFormat = ENumericFormat.Date_HHMMSS;
91
+ }
92
+ else {
93
+ labelProvider.numericFormat = ENumericFormat.Decimal;
94
+ labelProvider.precision = precision || calculatePrecision(stepSize || 0.1);
95
+ labelProvider.cursorNumericFormat = ENumericFormat.NoFormat;
96
+ }
97
+ return isXAxis
98
+ ? new DateTimeNumericAxis(wasmContext, {
99
+ ...axisOptions,
100
+ labelProvider
101
+ })
102
+ : new NumericAxis(wasmContext, {
103
+ ...axisOptions,
104
+ id: index !== 0 ? `yAxis${index}` : undefined,
105
+ labelProvider
106
+ });
107
+ }
108
+ function createSeries(wasmContext, dataset, index, stacked, animation, yAxisId) {
109
+ const dataSeries = new XyDataSeries(wasmContext, {
110
+ dataSeriesName: dataset.label,
111
+ containsNaN: false
112
+ });
113
+ const stackGroupId = dataset.stack || `__stack${index}__`;
114
+ const color = convertColor(dataset.backgroundColor, DEFAULT_COLOR);
115
+ const strokeColor = convertColor(dataset.color, DEFAULT_COLOR);
116
+ const borderWidth = dataset.borderWidth || STROKE_THICKNESS;
117
+ const pointMarker = createPointMarker(wasmContext, dataset, strokeColor);
118
+ let series;
119
+ if (dataset.type === 'bar') {
120
+ series = stacked
121
+ ? new StackedColumnRenderableSeries(wasmContext, {
122
+ dataSeries,
123
+ strokeThickness: borderWidth,
124
+ fill: color,
125
+ stackedGroupId: stackGroupId
126
+ })
127
+ : new FastColumnRenderableSeries(wasmContext, {
128
+ dataSeries,
129
+ strokeThickness: borderWidth,
130
+ fill: color,
131
+ animation: animation ? new WaveAnimation({ duration: ANIMATION_DURATION, fadeEffect: true }) : undefined,
132
+ yAxisId
133
+ });
134
+ }
135
+ else {
136
+ series = stacked
137
+ ? new StackedMountainRenderableSeries(wasmContext, {
138
+ dataSeries,
139
+ strokeThickness: borderWidth,
140
+ stroke: strokeColor,
141
+ fill: color
142
+ })
143
+ : dataset.lineTension && dataset.lineTension > 0
144
+ ? new SplineLineRenderableSeries(wasmContext, {
145
+ dataSeries,
146
+ strokeThickness: borderWidth,
147
+ stroke: strokeColor,
148
+ pointMarker,
149
+ animation: animation ? new WaveAnimation({ duration: ANIMATION_DURATION, fadeEffect: true }) : undefined,
150
+ yAxisId
151
+ })
152
+ : new FastLineRenderableSeries(wasmContext, {
153
+ dataSeries,
154
+ strokeThickness: borderWidth,
155
+ stroke: strokeColor,
156
+ pointMarker,
157
+ animation: animation ? new WaveAnimation({ duration: ANIMATION_DURATION, fadeEffect: true }) : undefined,
158
+ yAxisId
159
+ });
160
+ }
161
+ return { series, dataSeries };
162
+ }
163
+ export async function buildSciChart(config, container, { fontSize = 14, fontFamily = 'Roboto', fontColor }, { grouped, precision }) {
164
+ if (!config)
165
+ return;
166
+ const { type: chartType, options, data: fromData } = config;
167
+ const { datasets = [] } = fromData || {};
168
+ var { theme, tooltip = true, animation = true, legend = {
169
+ display: true,
170
+ position: 'top'
171
+ }, scales: fromScales, xGridLine = false, yGridLine = false, y2ndGridLine = false, stacked = false, multiAxis = false, annotations = [] } = options || {};
172
+ var baseColor = getBaseColorFromTheme(theme);
173
+ if (theme === 'auto') {
174
+ theme = getThemeFromBrowser();
175
+ }
176
+ fontColor = fontColor || baseColor.clone().toString();
177
+ const { xAxes = [], yAxes = [] } = fromScales || {};
178
+ const chart = await SciChartSurface.create(container, {
179
+ theme: theme == 'dark' ? new SciChartJSDarkv2Theme() : new SciChartJSLightTheme()
180
+ });
181
+ const { sciChartSurface, wasmContext } = chart;
182
+ xAxes.forEach((axis, index) => {
183
+ const xAxis = createAxis(wasmContext, axis, index, true, fontColor, fontFamily, fontSize, undefined, {
184
+ drawMajorTickLines: true,
185
+ drawMinorTickLines: true,
186
+ drawMajorGridLines: xGridLine,
187
+ drawMinorGridLines: xGridLine
188
+ });
189
+ sciChartSurface.xAxes.add(xAxis);
190
+ });
191
+ (multiAxis ? yAxes : [yAxes[0]]).forEach((axis, index) => {
192
+ const yAxis = createAxis(wasmContext, axis, index, false, fontColor, fontFamily, fontSize, precision, {
193
+ drawMajorTickLines: true,
194
+ drawMinorTickLines: true,
195
+ drawMajorGridLines: index == 0 ? yGridLine : y2ndGridLine,
196
+ drawMinorGridLines: index == 0 ? yGridLine : y2ndGridLine
197
+ });
198
+ sciChartSurface.yAxes.add(yAxis);
199
+ });
200
+ const dataSeriesArray = datasets.map((dataset, index) => {
201
+ const yAxisId = dataset.yAxisID == 'right' && multiAxis ? 'yAxis1' : undefined;
202
+ const { series, dataSeries } = createSeries(wasmContext, dataset, index, !!stacked, !!animation, yAxisId);
203
+ sciChartSurface.renderableSeries.add(series);
204
+ if (tooltip) {
205
+ const rolloverModifier = new RolloverModifier({
206
+ showTooltip: true,
207
+ showAxisLabel: true /* show x-axis label for cursor */,
208
+ modifierGroup: grouped,
209
+ tooltipDataTemplate: (seriesInfo) => {
210
+ const valuesWithLabels = [];
211
+ const xySeriesInfo = seriesInfo;
212
+ valuesWithLabels.push(xySeriesInfo.formattedYValue);
213
+ return valuesWithLabels;
214
+ }
215
+ });
216
+ sciChartSurface.chartModifiers.add(rolloverModifier);
217
+ }
218
+ return dataSeries;
219
+ });
220
+ if (stacked) {
221
+ const stackedColumnCollection = new StackedColumnCollection(wasmContext);
222
+ const stackedMountainCollection = new StackedMountainCollection(wasmContext);
223
+ sciChartSurface.renderableSeries.asArray().forEach((series) => {
224
+ if (series instanceof StackedColumnRenderableSeries) {
225
+ stackedColumnCollection.add(series);
226
+ }
227
+ else if (series instanceof StackedMountainRenderableSeries) {
228
+ stackedMountainCollection.add(series);
229
+ }
230
+ });
231
+ if (stackedColumnCollection.size() > 0) {
232
+ sciChartSurface.renderableSeries.add(stackedColumnCollection);
233
+ }
234
+ if (stackedMountainCollection.size() > 0) {
235
+ sciChartSurface.renderableSeries.add(stackedMountainCollection);
236
+ }
237
+ }
238
+ if (annotations) {
239
+ annotations.forEach(annotation => {
240
+ let sciAnnotation;
241
+ let horizontalAnchorPoint = annotation.horizontalAnchorPoint == 'Right'
242
+ ? EHorizontalAnchorPoint.Right
243
+ : annotation.horizontalAnchorPoint == 'Left'
244
+ ? EHorizontalAnchorPoint.Left
245
+ : EHorizontalAnchorPoint.Center;
246
+ let verticalAnchorPoint = annotation.verticalAnchorPoint == 'Top'
247
+ ? EVerticalAnchorPoint.Top
248
+ : annotation.verticalAnchorPoint == 'Bottom'
249
+ ? EVerticalAnchorPoint.Bottom
250
+ : EVerticalAnchorPoint.Center;
251
+ switch (annotation.type) {
252
+ case 'text':
253
+ sciAnnotation = new TextAnnotation({
254
+ x1: annotation.x1,
255
+ y1: annotation.y1,
256
+ text: annotation.text,
257
+ horizontalAnchorPoint,
258
+ verticalAnchorPoint,
259
+ fontSize: annotation.fontSize,
260
+ fontFamily: annotation.fontFamily,
261
+ textColor: convertColor(annotation.stroke, fontColor),
262
+ xCoordinateMode: (annotation.xCoordinateMode || ECoordinateMode.DataValue),
263
+ yCoordinateMode: (annotation.yCoordinateMode || ECoordinateMode.DataValue)
264
+ });
265
+ break;
266
+ case 'line':
267
+ sciAnnotation = new LineAnnotation({
268
+ x1: annotation.x1,
269
+ y1: annotation.y1,
270
+ x2: annotation.x2,
271
+ y2: annotation.y2,
272
+ stroke: convertColor(annotation.stroke, '#FF0000'),
273
+ strokeThickness: annotation.strokeThickness,
274
+ xCoordinateMode: (annotation.xCoordinateMode || ECoordinateMode.DataValue),
275
+ yCoordinateMode: (annotation.yCoordinateMode || ECoordinateMode.DataValue)
276
+ });
277
+ break;
278
+ case 'box':
279
+ sciAnnotation = new BoxAnnotation({
280
+ x1: annotation.x1,
281
+ y1: annotation.y1,
282
+ x2: annotation.x2,
283
+ y2: annotation.y2,
284
+ fill: convertColor(annotation.fill, '#FF0000'),
285
+ stroke: convertColor(annotation.stroke, '#FF0000'),
286
+ strokeThickness: annotation.strokeThickness,
287
+ xCoordinateMode: (annotation.xCoordinateMode || ECoordinateMode.DataValue),
288
+ yCoordinateMode: (annotation.yCoordinateMode || ECoordinateMode.DataValue)
289
+ });
290
+ break;
291
+ case 'horizontalLine':
292
+ sciAnnotation = new HorizontalLineAnnotation({
293
+ y1: annotation.y1,
294
+ stroke: convertColor(annotation.stroke, '#FF0000'),
295
+ strokeThickness: annotation.strokeThickness,
296
+ xCoordinateMode: (annotation.xCoordinateMode || ECoordinateMode.DataValue),
297
+ yCoordinateMode: (annotation.yCoordinateMode || ECoordinateMode.DataValue)
298
+ });
299
+ break;
300
+ case 'verticalLine':
301
+ sciAnnotation = new VerticalLineAnnotation({
302
+ x1: annotation.x1,
303
+ stroke: convertColor(annotation.stroke, '#FF0000'),
304
+ strokeThickness: annotation.strokeThickness,
305
+ xCoordinateMode: (annotation.xCoordinateMode || ECoordinateMode.DataValue),
306
+ yCoordinateMode: (annotation.yCoordinateMode || ECoordinateMode.DataValue)
307
+ });
308
+ break;
309
+ default:
310
+ break;
311
+ }
312
+ if (sciAnnotation) {
313
+ sciChartSurface.annotations.add(sciAnnotation);
314
+ }
315
+ });
316
+ }
317
+ sciChartSurface.chartModifiers.add(new RubberBandXyZoomModifier({ executeOn: EExecuteOn.MouseRightButton, modifierGroup: grouped }),
318
+ // new ZoomPanModifier({ xyDirection: EXyDirection.XDirection }),
319
+ new ZoomPanModifier({ xyDirection: EXyDirection.XDirection }), new MouseWheelZoomModifier({ xyDirection: EXyDirection.XDirection }), new ZoomExtentsModifier(), new XAxisDragModifier(), new YAxisDragModifier());
320
+ if (legend === null || legend === void 0 ? void 0 : legend.display) {
321
+ const legendModifier = new LegendModifier({
322
+ showCheckboxes: true,
323
+ showSeriesMarkers: true,
324
+ showLegend: true,
325
+ placement: legend.position == 'top'
326
+ ? ELegendPlacement.TopLeft
327
+ : legend.position == 'left'
328
+ ? ELegendPlacement.BottomLeft
329
+ : legend.position == 'bottom'
330
+ ? ELegendPlacement.BottomRight
331
+ : ELegendPlacement.TopRight
332
+ });
333
+ sciChartSurface.chartModifiers.add(legendModifier);
334
+ }
335
+ return { chart, dataSeries: dataSeriesArray };
336
+ }
337
+ export async function buildSciChartOverview(config, container, { fontSize = 14, fontFamily = 'Roboto', fontColor }, axisSynchroniser) {
338
+ if (!config)
339
+ return;
340
+ const { type: chartType, options, data: fromData } = config;
341
+ const { datasets = [] } = fromData || {};
342
+ var { theme, scales: fromScales } = options || {};
343
+ var baseColor = getBaseColorFromTheme(theme);
344
+ if (theme === 'auto') {
345
+ theme = getThemeFromBrowser();
346
+ }
347
+ fontColor = fontColor || baseColor.clone().toString();
348
+ const { xAxes = [], yAxes = [] } = fromScales || {};
349
+ const chart = await SciChartSurface.create(container, {
350
+ theme: theme == 'dark' ? new SciChartJSDarkv2Theme() : new SciChartJSLightTheme()
351
+ });
352
+ const { sciChartSurface, wasmContext } = chart;
353
+ xAxes.forEach((axis, index) => {
354
+ const xAxis = createAxis(wasmContext, axis, index, true, fontColor, fontFamily, fontSize, undefined, {
355
+ drawMajorTickLines: false,
356
+ drawMinorTickLines: false,
357
+ drawMajorGridLines: false,
358
+ drawMinorGridLines: false
359
+ });
360
+ sciChartSurface.xAxes.add(xAxis);
361
+ });
362
+ const dataSeriesArray = datasets.map((dataset, index) => {
363
+ const yAxisId = `yAxis${index}`;
364
+ const dataSeries = new XyDataSeries(wasmContext, {
365
+ dataSeriesName: dataset.label,
366
+ containsNaN: false
367
+ });
368
+ const yAxis = new NumericAxis(wasmContext, {
369
+ id: yAxisId,
370
+ autoRange: EAutoRange.Always,
371
+ drawLabels: false,
372
+ drawMajorTickLines: false,
373
+ drawMinorTickLines: false,
374
+ drawMajorGridLines: false,
375
+ drawMinorGridLines: false
376
+ });
377
+ sciChartSurface.yAxes.add(yAxis);
378
+ const series = new FastLineRenderableSeries(wasmContext, {
379
+ dataSeries,
380
+ strokeThickness: 1,
381
+ stroke: convertColor(dataset.color, DEFAULT_COLOR),
382
+ yAxisId: yAxisId
383
+ });
384
+ sciChartSurface.renderableSeries.add(series);
385
+ return dataSeries;
386
+ });
387
+ if (dataSeriesArray.length == 0) {
388
+ getDefaultYAxis(wasmContext, sciChartSurface);
389
+ }
390
+ const rangeSelectionModifier = new OverviewRangeSelectionModifier();
391
+ rangeSelectionModifier.onSelectedAreaChanged = (selectedRange) => {
392
+ if (!selectedRange.equals(axisSynchroniser.visibleRange)) {
393
+ axisSynchroniser.publishChange({ visibleRange: selectedRange });
394
+ }
395
+ };
396
+ rangeSelectionModifier.selectedArea = axisSynchroniser.visibleRange;
397
+ sciChartSurface.chartModifiers.add(rangeSelectionModifier);
398
+ axisSynchroniser.visibleRangeChanged.subscribe(({ visibleRange }) => {
399
+ const xAxis = sciChartSurface.xAxes.get(0);
400
+ const updatedSelectedRange = visibleRange.clip(xAxis.visibleRange);
401
+ const shouldUpdateSelectedRange = !updatedSelectedRange.equals(rangeSelectionModifier.selectedArea);
402
+ if (shouldUpdateSelectedRange) {
403
+ rangeSelectionModifier.selectedArea = updatedSelectedRange;
404
+ }
405
+ });
406
+ return { chart, dataSeries: dataSeriesArray };
407
+ }
408
+ function getDefaultYAxis(wasmContext, sciChartSurface) {
409
+ const yAxis = new NumericAxis(wasmContext, {
410
+ id: 'DefaultAxisId',
411
+ autoRange: EAutoRange.Always,
412
+ drawLabels: false,
413
+ drawMajorTickLines: false,
414
+ drawMinorTickLines: false,
415
+ drawMajorGridLines: false,
416
+ drawMinorGridLines: false
417
+ });
418
+ sciChartSurface.yAxes.add(yAxis);
419
+ }
420
+ //# sourceMappingURL=scichart-builder%20copy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scichart-builder copy.js","sourceRoot":"","sources":["../../src/charts/scichart-builder copy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE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AC,CAAA;IAEF,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,CAAA;AAC/C,CAAC;AAED,SAAS,eAAe,CAAC,WAAgB,EAAE,eAAoB;IAC7D,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,WAAW,EAAE;QACzC,EAAE,EAAE,eAAe;QACnB,SAAS,EAAE,UAAU,CAAC,MAAM;QAC5B,UAAU,EAAE,KAAK;QACjB,kBAAkB,EAAE,KAAK;QACzB,kBAAkB,EAAE,KAAK;QACzB,kBAAkB,EAAE,KAAK;QACzB,kBAAkB,EAAE,KAAK;KAC1B,CAAC,CAAA;IAEF,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;AAClC,CAAC","sourcesContent":["import { TinyColor } from '@ctrl/tinycolor'\nimport {\n SciChartSurface,\n SciChartJSLightTheme,\n SciChartJSDarkv2Theme,\n XyDataSeries,\n FastLineRenderableSeries,\n SplineLineRenderableSeries,\n FastColumnRenderableSeries,\n StackedColumnRenderableSeries,\n StackedMountainRenderableSeries,\n StackedColumnCollection,\n StackedMountainCollection,\n NumericAxis,\n DateTimeNumericAxis,\n EAutoRange,\n EAxisAlignment,\n EExecuteOn,\n ECoordinateMode,\n EHorizontalAnchorPoint,\n EVerticalAnchorPoint,\n NumberRange,\n MouseWheelZoomModifier,\n RubberBandXyZoomModifier,\n ZoomPanModifier,\n ZoomExtentsModifier,\n RolloverModifier,\n NumericLabelProvider,\n SmartDateLabelProvider,\n EllipsePointMarker,\n SquarePointMarker,\n TrianglePointMarker,\n CrossPointMarker,\n XPointMarker,\n WaveAnimation,\n LegendModifier,\n ELegendPlacement,\n EXyDirection,\n XAxisDragModifier,\n YAxisDragModifier,\n TextAnnotation,\n LineAnnotation,\n BoxAnnotation,\n HorizontalLineAnnotation,\n VerticalLineAnnotation,\n OverviewRangeSelectionModifier,\n ENumericFormat,\n XySeriesInfo\n} from 'scichart'\nimport { AxisSynchroniser } from './axis-synchronizer'\n\nSciChartSurface.UseCommunityLicense()\n\nSciChartSurface.configure({\n dataUrl: `/node_modules/scichart/_wasm/scichart2d.data`,\n wasmUrl: `/node_modules/scichart/_wasm/scichart2d.wasm`\n})\n\nconst DEFAULT_COLOR = '#FF6600'\nconst DEFAULT_STROKE = '#000000'\nconst POINT_MARKER_SIZE = 10\nconst STROKE_THICKNESS = 2\nconst ANIMATION_DURATION = 1000\n\nfunction getLocalTimeOffset() {\n const now = new Date()\n return now.getTimezoneOffset() * -60\n}\n\nfunction getBaseColorFromTheme(theme?: 'light' | 'dark' | 'auto') {\n return new TinyColor(theme == 'dark' ? '#fff' : '#000')\n}\n\nfunction getThemeFromBrowser() {\n return window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'\n}\n\nexport function convertColor(color: string | string[] | undefined, defaultColor?: string) {\n const tinyColor = new TinyColor(color as string)\n return tinyColor.toHex8String() || defaultColor\n}\n\nexport function calculatePrecision(format: string | number = '') {\n const formatString = format.toString()\n\n if (formatString.indexOf('.') !== -1) {\n return formatString.split('.')[1].length\n }\n\n return 0\n}\n\nfunction createPointMarker(wasmContext: any, dataset: any, color: string = DEFAULT_COLOR) {\n const { pointStyle, pointRadius = POINT_MARKER_SIZE } = dataset || {}\n\n if (!pointStyle) {\n return\n }\n\n const pointMarkerOptions = {\n width: pointRadius,\n height: pointRadius,\n strokeThickness: STROKE_THICKNESS,\n fill: color,\n stroke: DEFAULT_STROKE\n }\n\n switch (pointStyle) {\n case 'triangle':\n return new TrianglePointMarker(wasmContext, pointMarkerOptions)\n case 'rect':\n return new SquarePointMarker(wasmContext, pointMarkerOptions)\n case 'cross':\n return new CrossPointMarker(wasmContext, pointMarkerOptions)\n case 'crossRot':\n return new XPointMarker(wasmContext, pointMarkerOptions)\n default:\n return new EllipsePointMarker(wasmContext, pointMarkerOptions)\n }\n}\n\nfunction createAxis(\n wasmContext: any,\n axis: any,\n index: number,\n isXAxis: boolean,\n fontColor: string,\n fontFamily?: string,\n fontSize?: number,\n precision?: number,\n options?: any\n) {\n const { axisTitle, ticks } = axis\n const {\n autoMax,\n autoMin,\n min,\n max,\n stepSize,\n beginAtZero,\n color = fontColor,\n textStrokeColor = fontColor,\n display = false\n } = ticks || {}\n\n const axisOptions = {\n axisTitle,\n autoRange: autoMin || autoMax ? EAutoRange.Always : EAutoRange.Once,\n axisAlignment: isXAxis ? EAxisAlignment.Bottom : index === 0 ? EAxisAlignment.Left : EAxisAlignment.Right,\n visibleRange: min !== undefined && max !== undefined ? new NumberRange(min, max) : undefined,\n majorDelta: stepSize,\n growBy: beginAtZero ? new NumberRange(0.1, 0.1) : undefined,\n labelStyle: {\n fontFamily,\n fontSize,\n color\n },\n axisTitleStyle: {\n fontFamily,\n fontSize,\n color: textStrokeColor\n },\n ...options,\n drawLabels: display\n }\n\n const labelProvider = isXAxis\n ? new SmartDateLabelProvider({\n showWiderDateOnFirstLabel: true,\n showYearOnWiderDate: false,\n dateOffset: getLocalTimeOffset()\n })\n : new NumericLabelProvider()\n\n if (isXAxis) {\n labelProvider!.cursorNumericFormat = ENumericFormat.Date_HHMMSS\n } else {\n labelProvider!.numericFormat = ENumericFormat.Decimal\n labelProvider!.precision = precision || calculatePrecision(stepSize || 0.1)\n labelProvider!.cursorNumericFormat = ENumericFormat.NoFormat\n }\n\n return isXAxis\n ? new DateTimeNumericAxis(wasmContext, {\n ...axisOptions,\n labelProvider\n })\n : new NumericAxis(wasmContext, {\n ...axisOptions,\n id: index !== 0 ? `yAxis${index}` : undefined,\n labelProvider\n })\n}\n\nfunction createSeries(\n wasmContext: any,\n dataset: any,\n index: number,\n stacked: boolean,\n animation: boolean,\n yAxisId: string | undefined\n) {\n const dataSeries = new XyDataSeries(wasmContext, {\n dataSeriesName: dataset.label,\n containsNaN: false\n })\n\n const stackGroupId = dataset.stack || `__stack${index}__`\n const color = convertColor(dataset.backgroundColor, DEFAULT_COLOR)\n const strokeColor = convertColor(dataset.color, DEFAULT_COLOR)\n const borderWidth = dataset.borderWidth || STROKE_THICKNESS\n const pointMarker = createPointMarker(wasmContext, dataset, strokeColor)\n\n let series\n if (dataset.type === 'bar') {\n series = stacked\n ? new StackedColumnRenderableSeries(wasmContext, {\n dataSeries,\n strokeThickness: borderWidth,\n fill: color,\n stackedGroupId: stackGroupId\n })\n : new FastColumnRenderableSeries(wasmContext, {\n dataSeries,\n strokeThickness: borderWidth,\n fill: color,\n animation: animation ? new WaveAnimation({ duration: ANIMATION_DURATION, fadeEffect: true }) : undefined,\n yAxisId\n })\n } else {\n series = stacked\n ? new StackedMountainRenderableSeries(wasmContext, {\n dataSeries,\n strokeThickness: borderWidth,\n stroke: strokeColor,\n fill: color\n })\n : dataset.lineTension && dataset.lineTension > 0\n ? new SplineLineRenderableSeries(wasmContext, {\n dataSeries,\n strokeThickness: borderWidth,\n stroke: strokeColor,\n pointMarker,\n animation: animation ? new WaveAnimation({ duration: ANIMATION_DURATION, fadeEffect: true }) : undefined,\n yAxisId\n })\n : new FastLineRenderableSeries(wasmContext, {\n dataSeries,\n strokeThickness: borderWidth,\n stroke: strokeColor,\n pointMarker,\n animation: animation ? new WaveAnimation({ duration: ANIMATION_DURATION, fadeEffect: true }) : undefined,\n yAxisId\n })\n }\n\n return { series, dataSeries }\n}\n\nexport async function buildSciChart(\n config: OperatoChart.ChartConfig | undefined | null,\n container: any,\n { fontSize = 14, fontFamily = 'Roboto', fontColor }: { fontSize?: number; fontFamily?: string; fontColor?: string },\n { grouped, precision }: { grouped?: string; precision?: number }\n): Promise<{ chart: any; dataSeries: any[] } | undefined> {\n if (!config) return\n\n const { type: chartType, options, data: fromData } = config\n const { datasets = [] } = fromData || {}\n var {\n theme,\n tooltip = true,\n animation = true,\n legend = {\n display: true,\n position: 'top'\n },\n scales: fromScales,\n xGridLine = false,\n yGridLine = false,\n y2ndGridLine = false,\n stacked = false,\n multiAxis = false,\n annotations = []\n } = options || {}\n\n var baseColor = getBaseColorFromTheme(theme)\n\n if (theme === 'auto') {\n theme = getThemeFromBrowser()\n }\n\n fontColor = fontColor || baseColor.clone().toString()\n\n const { xAxes = [], yAxes = [] } = fromScales || {}\n\n const chart = await SciChartSurface.create(container, {\n theme: theme == 'dark' ? new SciChartJSDarkv2Theme() : new SciChartJSLightTheme()\n })\n const { sciChartSurface, wasmContext } = chart\n\n xAxes.forEach((axis, index) => {\n const xAxis = createAxis(wasmContext, axis, index, true, fontColor, fontFamily, fontSize, undefined, {\n drawMajorTickLines: true,\n drawMinorTickLines: true,\n drawMajorGridLines: xGridLine,\n drawMinorGridLines: xGridLine\n })\n sciChartSurface.xAxes.add(xAxis)\n })\n ;(multiAxis ? yAxes : [yAxes[0]]).forEach((axis, index) => {\n const yAxis = createAxis(wasmContext, axis, index, false, fontColor, fontFamily, fontSize, precision, {\n drawMajorTickLines: true,\n drawMinorTickLines: true,\n drawMajorGridLines: index == 0 ? yGridLine : y2ndGridLine,\n drawMinorGridLines: index == 0 ? yGridLine : y2ndGridLine\n })\n sciChartSurface.yAxes.add(yAxis)\n })\n\n const dataSeriesArray = datasets.map((dataset, index) => {\n const yAxisId = dataset.yAxisID == 'right' && multiAxis ? 'yAxis1' : undefined\n const { series, dataSeries } = createSeries(wasmContext, dataset, index, !!stacked, !!animation, yAxisId)\n\n sciChartSurface.renderableSeries.add(series)\n\n if (tooltip) {\n const rolloverModifier = new RolloverModifier({\n showTooltip: true,\n showAxisLabel: true /* show x-axis label for cursor */,\n modifierGroup: grouped,\n tooltipDataTemplate: (seriesInfo: XySeriesInfo): string[] => {\n const valuesWithLabels: string[] = []\n const xySeriesInfo = seriesInfo as XySeriesInfo\n valuesWithLabels.push(xySeriesInfo.formattedYValue)\n return valuesWithLabels\n }\n })\n\n sciChartSurface.chartModifiers.add(rolloverModifier)\n }\n\n return dataSeries\n })\n\n if (stacked) {\n const stackedColumnCollection = new StackedColumnCollection(wasmContext)\n const stackedMountainCollection = new StackedMountainCollection(wasmContext)\n\n sciChartSurface.renderableSeries.asArray().forEach((series: any) => {\n if (series instanceof StackedColumnRenderableSeries) {\n stackedColumnCollection.add(series)\n } else if (series instanceof StackedMountainRenderableSeries) {\n stackedMountainCollection.add(series)\n }\n })\n\n if (stackedColumnCollection.size() > 0) {\n sciChartSurface.renderableSeries.add(stackedColumnCollection)\n }\n\n if (stackedMountainCollection.size() > 0) {\n sciChartSurface.renderableSeries.add(stackedMountainCollection)\n }\n }\n\n if (annotations) {\n annotations.forEach(annotation => {\n let sciAnnotation\n let horizontalAnchorPoint: EHorizontalAnchorPoint =\n annotation.horizontalAnchorPoint == 'Right'\n ? EHorizontalAnchorPoint.Right\n : annotation.horizontalAnchorPoint == 'Left'\n ? EHorizontalAnchorPoint.Left\n : EHorizontalAnchorPoint.Center\n let verticalAnchorPoint: EVerticalAnchorPoint =\n annotation.verticalAnchorPoint == 'Top'\n ? EVerticalAnchorPoint.Top\n : annotation.verticalAnchorPoint == 'Bottom'\n ? EVerticalAnchorPoint.Bottom\n : EVerticalAnchorPoint.Center\n\n switch (annotation.type) {\n case 'text':\n sciAnnotation = new TextAnnotation({\n x1: annotation.x1,\n y1: annotation.y1,\n text: annotation.text,\n horizontalAnchorPoint,\n verticalAnchorPoint,\n fontSize: annotation.fontSize,\n fontFamily: annotation.fontFamily,\n textColor: convertColor(annotation.stroke, fontColor),\n xCoordinateMode: (annotation.xCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode,\n yCoordinateMode: (annotation.yCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode\n })\n break\n case 'line':\n sciAnnotation = new LineAnnotation({\n x1: annotation.x1,\n y1: annotation.y1,\n x2: annotation.x2,\n y2: annotation.y2,\n stroke: convertColor(annotation.stroke, '#FF0000'),\n strokeThickness: annotation.strokeThickness,\n xCoordinateMode: (annotation.xCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode,\n yCoordinateMode: (annotation.yCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode\n })\n break\n case 'box':\n sciAnnotation = new BoxAnnotation({\n x1: annotation.x1,\n y1: annotation.y1,\n x2: annotation.x2,\n y2: annotation.y2,\n fill: convertColor(annotation.fill, '#FF0000'),\n stroke: convertColor(annotation.stroke, '#FF0000'),\n strokeThickness: annotation.strokeThickness,\n xCoordinateMode: (annotation.xCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode,\n yCoordinateMode: (annotation.yCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode\n })\n break\n case 'horizontalLine':\n sciAnnotation = new HorizontalLineAnnotation({\n y1: annotation.y1,\n stroke: convertColor(annotation.stroke, '#FF0000'),\n strokeThickness: annotation.strokeThickness,\n xCoordinateMode: (annotation.xCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode,\n yCoordinateMode: (annotation.yCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode\n })\n break\n case 'verticalLine':\n sciAnnotation = new VerticalLineAnnotation({\n x1: annotation.x1,\n stroke: convertColor(annotation.stroke, '#FF0000'),\n strokeThickness: annotation.strokeThickness,\n xCoordinateMode: (annotation.xCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode,\n yCoordinateMode: (annotation.yCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode\n })\n break\n default:\n break\n }\n if (sciAnnotation) {\n sciChartSurface.annotations.add(sciAnnotation)\n }\n })\n }\n\n sciChartSurface.chartModifiers.add(\n new RubberBandXyZoomModifier({ executeOn: EExecuteOn.MouseRightButton, modifierGroup: grouped }),\n // new ZoomPanModifier({ xyDirection: EXyDirection.XDirection }),\n new ZoomPanModifier({ xyDirection: EXyDirection.XDirection }),\n new MouseWheelZoomModifier({ xyDirection: EXyDirection.XDirection }),\n new ZoomExtentsModifier(),\n new XAxisDragModifier(),\n new YAxisDragModifier()\n )\n\n if (legend?.display) {\n const legendModifier = new LegendModifier({\n showCheckboxes: true,\n showSeriesMarkers: true,\n showLegend: true,\n placement:\n legend.position == 'top'\n ? ELegendPlacement.TopLeft\n : legend.position == 'left'\n ? ELegendPlacement.BottomLeft\n : legend.position == 'bottom'\n ? ELegendPlacement.BottomRight\n : ELegendPlacement.TopRight\n })\n\n sciChartSurface.chartModifiers.add(legendModifier)\n }\n\n return { chart, dataSeries: dataSeriesArray }\n}\n\nexport async function buildSciChartOverview(\n config: OperatoChart.ChartConfig | undefined | null,\n container: any,\n { fontSize = 14, fontFamily = 'Roboto', fontColor }: { fontSize?: number; fontFamily?: string; fontColor?: string },\n axisSynchroniser: AxisSynchroniser\n): Promise<{ chart: any; dataSeries: any[] } | undefined> {\n if (!config) return\n\n const { type: chartType, options, data: fromData } = config\n const { datasets = [] } = fromData || {}\n var { theme, scales: fromScales } = options || {}\n\n var baseColor = getBaseColorFromTheme(theme)\n\n if (theme === 'auto') {\n theme = getThemeFromBrowser()\n }\n\n fontColor = fontColor || baseColor.clone().toString()\n\n const { xAxes = [], yAxes = [] } = fromScales || {}\n\n const chart = await SciChartSurface.create(container, {\n theme: theme == 'dark' ? new SciChartJSDarkv2Theme() : new SciChartJSLightTheme()\n })\n const { sciChartSurface, wasmContext } = chart\n\n xAxes.forEach((axis, index) => {\n const xAxis = createAxis(wasmContext, axis, index, true, fontColor, fontFamily, fontSize, undefined, {\n drawMajorTickLines: false,\n drawMinorTickLines: false,\n drawMajorGridLines: false,\n drawMinorGridLines: false\n })\n sciChartSurface.xAxes.add(xAxis)\n })\n\n const dataSeriesArray = datasets.map((dataset, index) => {\n const yAxisId = `yAxis${index}`\n const dataSeries = new XyDataSeries(wasmContext, {\n dataSeriesName: dataset.label,\n containsNaN: false\n })\n\n const yAxis = new NumericAxis(wasmContext, {\n id: yAxisId,\n autoRange: EAutoRange.Always,\n drawLabels: false,\n drawMajorTickLines: false,\n drawMinorTickLines: false,\n drawMajorGridLines: false,\n drawMinorGridLines: false\n })\n\n sciChartSurface.yAxes.add(yAxis)\n\n const series = new FastLineRenderableSeries(wasmContext, {\n dataSeries,\n strokeThickness: 1,\n stroke: convertColor(dataset.color, DEFAULT_COLOR),\n yAxisId: yAxisId\n })\n\n sciChartSurface.renderableSeries.add(series)\n\n return dataSeries\n })\n\n if (dataSeriesArray.length == 0) {\n getDefaultYAxis(wasmContext, sciChartSurface)\n }\n\n const rangeSelectionModifier = new OverviewRangeSelectionModifier()\n rangeSelectionModifier.onSelectedAreaChanged = (selectedRange?: NumberRange) => {\n if (!selectedRange!.equals(axisSynchroniser.visibleRange)) {\n axisSynchroniser.publishChange({ visibleRange: selectedRange! })\n }\n }\n\n rangeSelectionModifier.selectedArea = axisSynchroniser.visibleRange\n sciChartSurface.chartModifiers.add(rangeSelectionModifier)\n\n axisSynchroniser.visibleRangeChanged.subscribe(({ visibleRange }: any) => {\n const xAxis = sciChartSurface.xAxes.get(0)\n const updatedSelectedRange = visibleRange.clip(xAxis.visibleRange)\n const shouldUpdateSelectedRange = !updatedSelectedRange.equals(rangeSelectionModifier.selectedArea)\n if (shouldUpdateSelectedRange) {\n rangeSelectionModifier.selectedArea = updatedSelectedRange\n }\n })\n\n return { chart, dataSeries: dataSeriesArray }\n}\n\nfunction getDefaultYAxis(wasmContext: any, sciChartSurface: any): void {\n const yAxis = new NumericAxis(wasmContext, {\n id: 'DefaultAxisId',\n autoRange: EAutoRange.Always,\n drawLabels: false,\n drawMajorTickLines: false,\n drawMinorTickLines: false,\n drawMajorGridLines: false,\n drawMinorGridLines: false\n })\n\n sciChartSurface.yAxes.add(yAxis)\n}\n"]}
@@ -1,4 +1,6 @@
1
1
  import { AxisSynchroniser } from './axis-synchronizer';
2
+ export declare const DEFAULT_COLOR = "#FF6600";
3
+ export declare function convertColor(color: string | string[] | undefined, defaultColor?: string): string | undefined;
2
4
  export declare function calculatePrecision(format?: string | number): number;
3
5
  export declare function buildSciChart(config: OperatoChart.ChartConfig | undefined | null, container: any, { fontSize, fontFamily, fontColor }: {
4
6
  fontSize?: number;
@@ -5,7 +5,7 @@ SciChartSurface.configure({
5
5
  dataUrl: `/node_modules/scichart/_wasm/scichart2d.data`,
6
6
  wasmUrl: `/node_modules/scichart/_wasm/scichart2d.wasm`
7
7
  });
8
- const DEFAULT_COLOR = '#FF6600';
8
+ export const DEFAULT_COLOR = '#FF6600';
9
9
  const DEFAULT_STROKE = '#000000';
10
10
  const POINT_MARKER_SIZE = 10;
11
11
  const STROKE_THICKNESS = 2;
@@ -20,7 +20,7 @@ function getBaseColorFromTheme(theme) {
20
20
  function getThemeFromBrowser() {
21
21
  return window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
22
22
  }
23
- function convertColor(color, defaultColor) {
23
+ export function convertColor(color, defaultColor) {
24
24
  const tinyColor = new TinyColor(color);
25
25
  return tinyColor.toHex8String() || defaultColor;
26
26
  }
@@ -339,7 +339,7 @@ export async function buildSciChartOverview(config, container, { fontSize = 14,
339
339
  return;
340
340
  const { type: chartType, options, data: fromData } = config;
341
341
  const { datasets = [] } = fromData || {};
342
- var { theme, animation, scales: fromScales, stacked, multiAxis } = options || {};
342
+ var { theme, scales: fromScales } = options || {};
343
343
  var baseColor = getBaseColorFromTheme(theme);
344
344
  if (theme === 'auto') {
345
345
  theme = getThemeFromBrowser();
@@ -359,31 +359,32 @@ export async function buildSciChartOverview(config, container, { fontSize = 14,
359
359
  });
360
360
  sciChartSurface.xAxes.add(xAxis);
361
361
  });
362
- const dataSeriesArray = datasets.map((dataset, index) => {
363
- const yAxisId = `yAxis${index}`;
364
- const dataSeries = new XyDataSeries(wasmContext, {
365
- dataSeriesName: dataset.label,
366
- containsNaN: false
367
- });
368
- const yAxis = new NumericAxis(wasmContext, {
369
- id: yAxisId,
370
- autoRange: EAutoRange.Always,
371
- drawLabels: false,
372
- drawMajorTickLines: false,
373
- drawMinorTickLines: false,
374
- drawMajorGridLines: false,
375
- drawMinorGridLines: false
376
- });
377
- sciChartSurface.yAxes.add(yAxis);
378
- const series = new FastLineRenderableSeries(wasmContext, {
379
- dataSeries,
380
- strokeThickness: 1,
381
- stroke: convertColor(dataset.color, DEFAULT_COLOR),
382
- yAxisId: yAxisId
383
- });
384
- sciChartSurface.renderableSeries.add(series);
385
- return dataSeries;
386
- });
362
+ getDefaultYAxis(wasmContext, sciChartSurface);
363
+ // const dataSeriesArray = datasets.map((dataset, index) => {
364
+ // const yAxisId = `yAxis${index}`
365
+ // const dataSeries = new XyDataSeries(wasmContext, {
366
+ // dataSeriesName: dataset.label,
367
+ // containsNaN: false
368
+ // })
369
+ // const yAxis = new NumericAxis(wasmContext, {
370
+ // id: yAxisId,
371
+ // autoRange: EAutoRange.Always,
372
+ // drawLabels: false,
373
+ // drawMajorTickLines: false,
374
+ // drawMinorTickLines: false,
375
+ // drawMajorGridLines: false,
376
+ // drawMinorGridLines: false
377
+ // })
378
+ // sciChartSurface.yAxes.add(yAxis)
379
+ // const series = new FastLineRenderableSeries(wasmContext, {
380
+ // dataSeries,
381
+ // strokeThickness: 1,
382
+ // stroke: convertColor(dataset.color, DEFAULT_COLOR),
383
+ // yAxisId: yAxisId
384
+ // })
385
+ // sciChartSurface.renderableSeries.add(series)
386
+ // return dataSeries
387
+ // })
387
388
  const rangeSelectionModifier = new OverviewRangeSelectionModifier();
388
389
  rangeSelectionModifier.onSelectedAreaChanged = (selectedRange) => {
389
390
  if (!selectedRange.equals(axisSynchroniser.visibleRange)) {
@@ -393,12 +394,25 @@ export async function buildSciChartOverview(config, container, { fontSize = 14,
393
394
  rangeSelectionModifier.selectedArea = axisSynchroniser.visibleRange;
394
395
  sciChartSurface.chartModifiers.add(rangeSelectionModifier);
395
396
  axisSynchroniser.visibleRangeChanged.subscribe(({ visibleRange }) => {
396
- const updatedSelectedRange = visibleRange.clip(sciChartSurface.xAxes.get(0).visibleRange);
397
+ const xAxis = sciChartSurface.xAxes.get(0);
398
+ const updatedSelectedRange = visibleRange.clip(xAxis.visibleRange);
397
399
  const shouldUpdateSelectedRange = !updatedSelectedRange.equals(rangeSelectionModifier.selectedArea);
398
400
  if (shouldUpdateSelectedRange) {
399
401
  rangeSelectionModifier.selectedArea = updatedSelectedRange;
400
402
  }
401
403
  });
402
- return { chart, dataSeries: dataSeriesArray };
404
+ return { chart, dataSeries: [] };
405
+ }
406
+ function getDefaultYAxis(wasmContext, sciChartSurface) {
407
+ const yAxis = new NumericAxis(wasmContext, {
408
+ id: 'DefaultAxisId',
409
+ autoRange: EAutoRange.Always,
410
+ drawLabels: false,
411
+ drawMajorTickLines: false,
412
+ drawMinorTickLines: false,
413
+ drawMajorGridLines: false,
414
+ drawMinorGridLines: false
415
+ });
416
+ sciChartSurface.yAxes.add(yAxis);
403
417
  }
404
418
  //# sourceMappingURL=scichart-builder.js.map