mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
TimeSeries/Barchart: Only show default label for y axis (#44713)
* TimeSeries/Barchart: only show default label for x axis * Update docs * Update packages/grafana-ui/src/options/builder/axis.tsx Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com> Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
This commit is contained in:
parent
69e4796504
commit
78ed5a99e6
@ -47,7 +47,7 @@ Set a Y-axis text label.
|
||||
|
||||

|
||||
|
||||
If you have more than one Y-axis, then you can give assign different labels in the Override tab.
|
||||
If you have more than one Y-axis, then you can give assign different labels in the Override tab. You can also set the X-axis label using an override.
|
||||
|
||||
## Width
|
||||
|
||||
|
@ -37,8 +37,8 @@ export function addAxisConfig(
|
||||
placeholder: 'Optional text',
|
||||
},
|
||||
showIf: (c) => c.axisPlacement !== AxisPlacement.Hidden,
|
||||
// no matter what the field type is
|
||||
shouldApply: () => true,
|
||||
// Do not apply default settings to time and string fields which are used as x-axis fields in Time series and Bar chart panels
|
||||
shouldApply: (f) => f.type !== FieldType.time && f.type !== FieldType.string,
|
||||
})
|
||||
.addNumberInput({
|
||||
path: 'axisWidth',
|
||||
|
Loading…
Reference in New Issue
Block a user