Commit 3f44445d by ryan

drop one level of nesting

parent 7498de04
......@@ -24,23 +24,25 @@ export class GraphPanel extends PureComponent<Props> {
const vmSeries: TimeSeriesVMs = [];
for (const table of data) {
const timeColumn = getFirstTimeColumn(table);
if (timeColumn >= 0) {
for (let i = 0; i < table.columns.length; i++) {
const column = table.columns[i];
// Show all numeric columns
if (column.type === ColumnType.number) {
const tsvm = processTimeSeries({
data: [table],
xColumn: timeColumn,
yColumn: i,
nullValueMode: NullValueMode.Null,
})[0];
const colorIndex = vmSeries.length % colors.length;
tsvm.color = colors[colorIndex];
vmSeries.push(tsvm);
}
if (timeColumn < 0) {
continue;
}
for (let i = 0; i < table.columns.length; i++) {
const column = table.columns[i];
// Show all numeric columns
if (column.type === ColumnType.number) {
const tsvm = processTimeSeries({
data: [table],
xColumn: timeColumn,
yColumn: i,
nullValueMode: NullValueMode.Null,
})[0];
const colorIndex = vmSeries.length % colors.length;
tsvm.color = colors[colorIndex];
vmSeries.push(tsvm);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment