Barchart/Time series: Allow x axis label (#41142)

pull/41112/head^2
Oscar Kilhed 4 years ago committed by GitHub
parent be5dafb980
commit 43bd32206f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/grafana-ui/src/components/TimeSeries/utils.ts
  2. 1
      public/app/plugins/panel/barchart/utils.ts

@ -79,6 +79,7 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<{ sync: DashboardCursor
scaleKey: xScaleKey,
isTime: true,
placement: AxisPlacement.Bottom,
label: xField.config.custom?.axisLabel,
timeZone,
theme,
grid: { show: xField.config.custom?.axisGridShow },
@ -98,6 +99,7 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<{ sync: DashboardCursor
builder.addAxis({
scaleKey: xScaleKey,
placement: AxisPlacement.Bottom,
label: xField.config.custom?.axisLabel,
theme,
grid: { show: xField.config.custom?.axisGridShow },
});

@ -109,6 +109,7 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<BarChartOptions> = ({
scaleKey: 'x',
isTime: false,
placement: vizOrientation.xOri === 0 ? AxisPlacement.Bottom : AxisPlacement.Left,
label: frame.fields[0].config.custom?.axisLabel,
splits: config.xSplits,
values: config.xValues,
grid: { show: false },

Loading…
Cancel
Save