fix: Fixed serie color

This commit is contained in:
jsers 2020-04-14 13:07:13 +08:00
parent dfebb86a76
commit 60fcbcb3eb
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ import { SerieInterface } from '../interface';
export default function normalizeSeries(data: any[]) {
const series = [] as SerieInterface[];
_.each(data, (o, i) => {
_.each(_.sortBy(data, ['counter', 'endpoint']), (o, i) => {
const { endpoint } = o;
const color = getSerieColor(o, i);
const separatorIdx = o.counter.indexOf('/');