mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
XYChart: Fix formatting of axis ticks (units, decimals) (#70190)
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
DataFrame,
|
||||
FieldColorModeId,
|
||||
fieldColorModeRegistry,
|
||||
formattedValueToString,
|
||||
getDisplayProcessor,
|
||||
getFieldColorModeForField,
|
||||
getFieldDisplayName,
|
||||
@@ -620,6 +621,7 @@ const prepConfig = (
|
||||
xAxisLabel == null || xAxisLabel === ''
|
||||
? getFieldDisplayName(xField, scatterSeries[0].frame(frames), frames)
|
||||
: xAxisLabel,
|
||||
formatValue: (v, decimals) => formattedValueToString(xField.display!(v, decimals)),
|
||||
});
|
||||
|
||||
scatterSeries.forEach((s, si) => {
|
||||
@@ -653,7 +655,7 @@ const prepConfig = (
|
||||
yAxisLabel == null || yAxisLabel === ''
|
||||
? getFieldDisplayName(field, scatterSeries[si].frame(frames), frames)
|
||||
: yAxisLabel,
|
||||
values: (u, splits) => splits.map((s) => field.display!(s).text),
|
||||
formatValue: (v, decimals) => formattedValueToString(field.display!(v, decimals)),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user