mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Barchart/Time series: Allow x axis label (#41142)
This commit is contained in:
parent
be5dafb980
commit
43bd32206f
@ -79,6 +79,7 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<{ sync: DashboardCursor
|
|||||||
scaleKey: xScaleKey,
|
scaleKey: xScaleKey,
|
||||||
isTime: true,
|
isTime: true,
|
||||||
placement: AxisPlacement.Bottom,
|
placement: AxisPlacement.Bottom,
|
||||||
|
label: xField.config.custom?.axisLabel,
|
||||||
timeZone,
|
timeZone,
|
||||||
theme,
|
theme,
|
||||||
grid: { show: xField.config.custom?.axisGridShow },
|
grid: { show: xField.config.custom?.axisGridShow },
|
||||||
@ -98,6 +99,7 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<{ sync: DashboardCursor
|
|||||||
builder.addAxis({
|
builder.addAxis({
|
||||||
scaleKey: xScaleKey,
|
scaleKey: xScaleKey,
|
||||||
placement: AxisPlacement.Bottom,
|
placement: AxisPlacement.Bottom,
|
||||||
|
label: xField.config.custom?.axisLabel,
|
||||||
theme,
|
theme,
|
||||||
grid: { show: xField.config.custom?.axisGridShow },
|
grid: { show: xField.config.custom?.axisGridShow },
|
||||||
});
|
});
|
||||||
|
@ -109,6 +109,7 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<BarChartOptions> = ({
|
|||||||
scaleKey: 'x',
|
scaleKey: 'x',
|
||||||
isTime: false,
|
isTime: false,
|
||||||
placement: vizOrientation.xOri === 0 ? AxisPlacement.Bottom : AxisPlacement.Left,
|
placement: vizOrientation.xOri === 0 ? AxisPlacement.Bottom : AxisPlacement.Left,
|
||||||
|
label: frame.fields[0].config.custom?.axisLabel,
|
||||||
splits: config.xSplits,
|
splits: config.xSplits,
|
||||||
values: config.xValues,
|
values: config.xValues,
|
||||||
grid: { show: false },
|
grid: { show: false },
|
||||||
|
Loading…
Reference in New Issue
Block a user