@operato/scene-scichart 7.1.0 → 7.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/cache/translations/system/en.json +1 -0
  3. package/cache/translations/system/ko.json +1 -0
  4. package/db.sqlite +0 -0
  5. package/dist/charts/ox-scichart-multiple.d.ts +3 -0
  6. package/dist/charts/ox-scichart-multiple.js +45 -19
  7. package/dist/charts/ox-scichart-multiple.js.map +1 -1
  8. package/dist/charts/ox-scichart.d.ts +3 -0
  9. package/dist/charts/ox-scichart.js +1 -0
  10. package/dist/charts/ox-scichart.js.map +1 -1
  11. package/dist/charts/scichart-builder.js +20 -9
  12. package/dist/charts/scichart-builder.js.map +1 -1
  13. package/dist/scichart-multiple-timeseries.d.ts +0 -3
  14. package/dist/scichart-multiple-timeseries.js +0 -7
  15. package/dist/scichart-multiple-timeseries.js.map +1 -1
  16. package/dist/scichart-timeseries.d.ts +2 -4
  17. package/dist/scichart-timeseries.js +4 -7
  18. package/dist/scichart-timeseries.js.map +1 -1
  19. package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +9 -9
  20. package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +20 -0
  21. package/logs/{application-2024-07-28-03.log → application-2024-07-29-14.log} +8 -8
  22. package/logs/application-2024-07-29-16.log +105 -0
  23. package/logs/application-2024-07-31-09.log +105 -0
  24. package/logs/connections-2024-07-29-01.log +50 -0
  25. package/logs/connections-2024-07-29-14.log +50 -0
  26. package/logs/connections-2024-07-29-16.log +50 -0
  27. package/logs/connections-2024-07-31-09.log +50 -0
  28. package/package.json +2 -2
  29. package/src/charts/ox-scichart-multiple.ts +54 -26
  30. package/src/charts/ox-scichart.ts +2 -0
  31. package/src/charts/scichart-builder.ts +29 -18
  32. package/src/scichart-multiple-timeseries.ts +0 -10
  33. package/src/scichart-timeseries.ts +4 -10
  34. package/tsconfig.tsbuildinfo +1 -1
  35. package/logs/application-2024-07-28-17.log +0 -420
  36. package/logs/application-2024-07-28-18.log +0 -210
@@ -234,7 +234,7 @@ function createSeries(
234
234
  export async function buildSciChart(
235
235
  config: OperatoChart.ChartConfig | undefined | null,
236
236
  container: any,
237
- { fontSize, fontFamily, fontColor }: { fontSize?: number; fontFamily?: string; fontColor?: string },
237
+ { fontSize = 14, fontFamily = 'Roboto', fontColor }: { fontSize?: number; fontFamily?: string; fontColor?: string },
238
238
  grouped?: string
239
239
  ): Promise<{ chart: any; dataSeries: any[] } | undefined> {
240
240
  if (!config) return
@@ -243,16 +243,19 @@ export async function buildSciChart(
243
243
  const { datasets = [] } = fromData || {}
244
244
  var {
245
245
  theme,
246
- tooltip,
247
- animation,
248
- legend,
246
+ tooltip = true,
247
+ animation = true,
248
+ legend = {
249
+ display: true,
250
+ position: 'top'
251
+ },
249
252
  scales: fromScales,
250
- xGridLine,
251
- yGridLine,
252
- y2ndGridLine,
253
- stacked,
254
- multiAxis,
255
- annotations
253
+ xGridLine = true,
254
+ yGridLine = true,
255
+ y2ndGridLine = false,
256
+ stacked = false,
257
+ multiAxis = false,
258
+ annotations = []
256
259
  } = options || {}
257
260
 
258
261
  var baseColor = getBaseColorFromTheme(theme)
@@ -326,7 +329,7 @@ export async function buildSciChart(
326
329
 
327
330
  if (annotations) {
328
331
  annotations.forEach(annotation => {
329
- let sciAnnotation: any
332
+ let sciAnnotation
330
333
  let horizontalAnchorPoint: EHorizontalAnchorPoint =
331
334
  annotation.horizontalAnchorPoint == 'Right'
332
335
  ? EHorizontalAnchorPoint.Right
@@ -350,7 +353,9 @@ export async function buildSciChart(
350
353
  verticalAnchorPoint,
351
354
  fontSize: annotation.fontSize,
352
355
  fontFamily: annotation.fontFamily,
353
- textColor: convertColor(annotation.stroke, fontColor)
356
+ textColor: convertColor(annotation.stroke, fontColor),
357
+ xCoordinateMode: (annotation.xCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode,
358
+ yCoordinateMode: (annotation.yCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode
354
359
  })
355
360
  break
356
361
  case 'line':
@@ -361,8 +366,8 @@ export async function buildSciChart(
361
366
  y2: annotation.y2,
362
367
  stroke: convertColor(annotation.stroke, '#FF0000'),
363
368
  strokeThickness: annotation.strokeThickness,
364
- xCoordinateMode: ECoordinateMode.Relative,
365
- yCoordinateMode: ECoordinateMode.DataValue
369
+ xCoordinateMode: (annotation.xCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode,
370
+ yCoordinateMode: (annotation.yCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode
366
371
  })
367
372
  break
368
373
  case 'box':
@@ -373,21 +378,27 @@ export async function buildSciChart(
373
378
  y2: annotation.y2,
374
379
  fill: convertColor(annotation.fill, '#FF0000'),
375
380
  stroke: convertColor(annotation.stroke, '#FF0000'),
376
- strokeThickness: annotation.strokeThickness
381
+ strokeThickness: annotation.strokeThickness,
382
+ xCoordinateMode: (annotation.xCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode,
383
+ yCoordinateMode: (annotation.yCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode
377
384
  })
378
385
  break
379
386
  case 'horizontalLine':
380
387
  sciAnnotation = new HorizontalLineAnnotation({
381
388
  y1: annotation.y1,
382
389
  stroke: convertColor(annotation.stroke, '#FF0000'),
383
- strokeThickness: annotation.strokeThickness
390
+ strokeThickness: annotation.strokeThickness,
391
+ xCoordinateMode: (annotation.xCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode,
392
+ yCoordinateMode: (annotation.yCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode
384
393
  })
385
394
  break
386
395
  case 'verticalLine':
387
396
  sciAnnotation = new VerticalLineAnnotation({
388
397
  x1: annotation.x1,
389
398
  stroke: convertColor(annotation.stroke, '#FF0000'),
390
- strokeThickness: annotation.strokeThickness
399
+ strokeThickness: annotation.strokeThickness,
400
+ xCoordinateMode: (annotation.xCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode,
401
+ yCoordinateMode: (annotation.yCoordinateMode || ECoordinateMode.DataValue) as ECoordinateMode
391
402
  })
392
403
  break
393
404
  default:
@@ -434,7 +445,7 @@ export async function buildSciChart(
434
445
  export async function buildSciChartOverview(
435
446
  config: OperatoChart.ChartConfig | undefined | null,
436
447
  container: any,
437
- { fontSize, fontFamily, fontColor }: { fontSize?: number; fontFamily?: string; fontColor?: string },
448
+ { fontSize = 14, fontFamily = 'Roboto', fontColor }: { fontSize?: number; fontFamily?: string; fontColor?: string },
438
449
  axisSynchroniser: AxisSynchroniser
439
450
  ): Promise<{ chart: any; dataSeries: any[] } | undefined> {
440
451
  if (!config) return
@@ -33,12 +33,6 @@ export default class ScichartMultipleTimeseries extends HTMLOverlayContainer {
33
33
  return NATURE
34
34
  }
35
35
 
36
- async oncreate_element(scichart: OxSciChartMultiple) {}
37
-
38
- dispose() {
39
- super.dispose()
40
- }
41
-
42
36
  setElementProperties(scichart: OxSciChartMultiple) {
43
37
  const { data, chart, showOverview, visibleSeries } = this.state
44
38
 
@@ -48,10 +42,6 @@ export default class ScichartMultipleTimeseries extends HTMLOverlayContainer {
48
42
  scichart.visibleSeries = visibleSeries || []
49
43
  }
50
44
 
51
- reposition() {
52
- super.reposition()
53
- }
54
-
55
45
  get tagName() {
56
46
  return 'ox-scichart-multiple'
57
47
  }
@@ -27,12 +27,6 @@ export default class ScichartTimeSeries extends HTMLOverlayContainer {
27
27
  return NATURE
28
28
  }
29
29
 
30
- async oncreate_element(scichart: OxSciChart) {}
31
-
32
- dispose() {
33
- super.dispose()
34
- }
35
-
36
30
  setElementProperties(scichart: OxSciChart) {
37
31
  const { data, chart } = this.state
38
32
 
@@ -40,13 +34,13 @@ export default class ScichartTimeSeries extends HTMLOverlayContainer {
40
34
  scichart.data = data
41
35
  }
42
36
 
43
- reposition() {
44
- super.reposition()
45
- }
46
-
47
37
  get tagName() {
48
38
  return 'ox-scichart'
49
39
  }
40
+
41
+ async onchangeData(after: Properties, before: Properties): Promise<void> {
42
+ ;(this.element as OxSciChart).data = this.data
43
+ }
50
44
  }
51
45
 
52
46
  Component.register('scichart-timeseries', ScichartTimeSeries)