Добавил возможность выбора множества тегов для отображения.

This commit is contained in:
Первов Артем
2026-06-22 21:49:52 +03:00
parent 6ab9cd1c75
commit 9fc66624dc
10 changed files with 229 additions and 109 deletions

View File

@@ -0,0 +1,14 @@
import { useMemo } from 'react';
import type { SeriesOption } from 'echarts';
import { createSeriesOptions } from './historyChartSeries';
import type { HistoryChartLineData } from './useHistoryChartQueries';
export function useHistoryChartSeries(lines: HistoryChartLineData[]): SeriesOption[] {
return useMemo(
() =>
lines.flatMap((line) =>
line.rows.length ? createSeriesOptions(line.rows, line.index, line.label) : [],
),
[lines],
);
}