cats-charts 0.0.59 → 0.0.60

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.
@@ -3062,6 +3062,24 @@ class CustomChartComponent {
3062
3062
  });
3063
3063
  return legends;
3064
3064
  }
3065
+ buildMarkLines() {
3066
+ const logs = this.config.data?.[0]?.office_entry_logs;
3067
+ if (!logs?.length)
3068
+ return undefined;
3069
+ return {
3070
+ silent: true,
3071
+ symbol: 'none',
3072
+ data: logs.map((log) => ({
3073
+ xAxis: this.convertTimeToNumber(log.time),
3074
+ label: { formatter: '' },
3075
+ lineStyle: {
3076
+ color: '#5A5F66',
3077
+ type: log.type === 'OUT' ? [8, 6] : 'solid',
3078
+ width: 1,
3079
+ },
3080
+ })),
3081
+ };
3082
+ }
3065
3083
  buildOption() {
3066
3084
  if (!this.config?.categories || !this.config?.data)
3067
3085
  return;
@@ -3288,6 +3306,16 @@ class CustomChartComponent {
3288
3306
  ],
3289
3307
  series,
3290
3308
  };
3309
+ const markLines = this.buildMarkLines();
3310
+ if (markLines) {
3311
+ series.push({
3312
+ type: 'custom',
3313
+ silent: true,
3314
+ z: 10,
3315
+ data: [],
3316
+ markLine: markLines,
3317
+ });
3318
+ }
3291
3319
  }
3292
3320
  ngOnDestroy() {
3293
3321
  this.chartInstance?.dispose();