mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
BarChart: Fix legend and tooltip colors off by 1 after data refresh (#39234)
This commit is contained in:
@@ -246,10 +246,16 @@ export function prepareGraphableFrames(
|
||||
};
|
||||
}
|
||||
|
||||
let seriesIndex = 0;
|
||||
|
||||
for (let frame of series) {
|
||||
const fields: Field[] = [];
|
||||
for (const field of frame.fields) {
|
||||
if (field.type === FieldType.number) {
|
||||
field.state = field.state ?? {};
|
||||
|
||||
field.state.seriesIndex = seriesIndex++;
|
||||
|
||||
let copy = {
|
||||
...field,
|
||||
config: {
|
||||
|
||||
Reference in New Issue
Block a user