mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
get label and color from series
This commit is contained in:
parent
e867a8f402
commit
7bb996203f
@ -25,17 +25,16 @@ export class PiechartPanel extends PureComponent<Props> {
|
|||||||
nullValueMode: NullValueMode.Null,
|
nullValueMode: NullValueMode.Null,
|
||||||
});
|
});
|
||||||
|
|
||||||
vmSeries.forEach(serie => {
|
for (let i = 0; i < vmSeries.length; i++) {
|
||||||
|
const serie = vmSeries[i];
|
||||||
if (serie) {
|
if (serie) {
|
||||||
datapoints.push({
|
datapoints.push({
|
||||||
value: serie.stats[valueOptions.stat],
|
value: serie.stats[valueOptions.stat],
|
||||||
// TODO: get name
|
name: serie.label,
|
||||||
name: 'tmpName',
|
color: serie.color,
|
||||||
// TODO: add color option
|
|
||||||
color: 'tmpColor',
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
// TODO: support table data
|
// TODO: support table data
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user