BUR-62 переработана отрисовка графика на отрезки по грануляции
This commit is contained in:
@@ -3,12 +3,12 @@ import type { SeriesOption } from 'echarts';
|
||||
import { createSeriesOptions } from './historyChartSeries';
|
||||
import type { HistoryChartLineData } from './useHistoryChartQueries';
|
||||
|
||||
export function useHistoryChartSeries(lines: HistoryChartLineData[]): SeriesOption[] {
|
||||
export function useHistoryChartSeries(lines: HistoryChartLineData[], granulate: string): SeriesOption[] {
|
||||
return useMemo(
|
||||
() =>
|
||||
lines.flatMap((line) =>
|
||||
line.rows.length ? createSeriesOptions(line.rows, line.index, line.label) : [],
|
||||
line.rows.length ? createSeriesOptions(line.rows, line.index, line.label, granulate) : [],
|
||||
),
|
||||
[lines],
|
||||
[granulate, lines],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user