-
Notifications
You must be signed in to change notification settings - Fork 319
Open
Description
The TimeSeries.legendCalcs field validates the values that can go in its list:
Lines 2315 to 2342 in 3ed1a9c
| legendCalcs = attr.ib( | |
| factory=list, | |
| validator=attr.validators.deep_iterable( | |
| member_validator=in_([ | |
| 'lastNotNull', | |
| 'min', | |
| 'mean', | |
| 'max', | |
| 'last', | |
| 'firstNotNull', | |
| 'first', | |
| 'sum', | |
| 'count', | |
| 'range', | |
| 'delta', | |
| 'step', | |
| 'diff', | |
| 'logmin', | |
| 'allIsZero', | |
| 'allIsNull', | |
| 'changeCount', | |
| 'distinctCount', | |
| 'diffperc', | |
| 'allValues' | |
| ]), | |
| iterable_validator=instance_of(list), | |
| ), | |
| ) |
Other chart types don't, e.g. BarChart:
Line 4494 in 3ed1a9c
| legendCalcs = attr.ib(factory=list, validator=instance_of(list)) |
At least on my Grafana instance, there are more legend calculations available, such as p95 (not sure if this a plugin or just some new feature that's been added since the code was originally written). It would be convenient if this client-side validation was dropped, in case the user's Grafana has more options available.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels