Field: use 0-based field.state.seriesIndex (#37563)

This commit is contained in:
Leon Sorokin
2021-08-04 13:02:27 -05:00
committed by GitHub
parent e403d54ba4
commit 1fe3452886
@@ -169,16 +169,16 @@ export function applyFieldOverrides(options: ApplyFieldOverrideOptions): DataFra
range = { min, max, delta: max! - min! };
}
field.state!.seriesIndex = seriesIndex;
field.state!.range = range;
field.type = type;
// Some color modes needs series index to assign field color so we count
// up series index here but ignore time fields
if (field.type !== FieldType.time) {
seriesIndex++;
}
field.state!.seriesIndex = seriesIndex;
field.state!.range = range;
field.type = type;
// and set the display processor using it
field.display = getDisplayProcessor({
field: field,