Field: use 0-based field.state.seriesIndex (#37563)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user