From c048b3ff6faf4b7e8eb415890dbd22bf53a8572b Mon Sep 17 00:00:00 2001 From: Paul Marbach Date: Mon, 15 Dec 2025 10:05:46 -0500 Subject: [PATCH] remove unnecessary axis show stuff --- packages/grafana-ui/src/graveyard/TimeSeries/utils.ts | 3 --- public/app/core/components/TimeSeries/utils.ts | 3 --- public/app/plugins/panel/barchart/utils.ts | 2 -- public/app/plugins/panel/heatmap/utils.ts | 1 - public/app/plugins/panel/xychart/scatter.ts | 2 -- 5 files changed, 11 deletions(-) diff --git a/packages/grafana-ui/src/graveyard/TimeSeries/utils.ts b/packages/grafana-ui/src/graveyard/TimeSeries/utils.ts index bb270e9c672..0e6dd998016 100644 --- a/packages/grafana-ui/src/graveyard/TimeSeries/utils.ts +++ b/packages/grafana-ui/src/graveyard/TimeSeries/utils.ts @@ -108,7 +108,6 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<{ const xFieldAxisPlacement = xField.config.custom?.axisPlacement !== AxisPlacement.Hidden ? AxisPlacement.Bottom : AxisPlacement.Hidden; - const xFieldAxisShow = xField.config.custom?.axisPlacement !== AxisPlacement.Hidden; if (xField.type === FieldType.time) { builder.addScale({ @@ -136,7 +135,6 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<{ scaleKey: xScaleKey, isTime: true, placement: xFieldAxisPlacement, - show: xFieldAxisShow, label: xField.config.custom?.axisLabel, timeZone, theme, @@ -178,7 +176,6 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<{ builder.addAxis({ scaleKey: xScaleKey, placement: xFieldAxisPlacement, - show: xFieldAxisShow, label: xField.config.custom?.axisLabel, theme, grid: { show: xField.config.custom?.axisGridShow }, diff --git a/public/app/core/components/TimeSeries/utils.ts b/public/app/core/components/TimeSeries/utils.ts index 88a82ec299c..323d871fc1e 100644 --- a/public/app/core/components/TimeSeries/utils.ts +++ b/public/app/core/components/TimeSeries/utils.ts @@ -127,7 +127,6 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn = ({ : isHorizontal ? AxisPlacement.Bottom : AxisPlacement.Left; - const xFieldAxisShow = xField.config.custom?.axisPlacement !== AxisPlacement.Hidden; if (xField.type === FieldType.time) { builder.addScale({ @@ -178,7 +177,6 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn = ({ scaleKey: xScaleKey, isTime: true, placement: xFieldAxisPlacement, - show: xFieldAxisShow, label: xField.config.custom?.axisLabel, timeZone, theme, @@ -236,7 +234,6 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn = ({ builder.addAxis({ scaleKey: xScaleKey, placement: xFieldAxisPlacement, - show: xFieldAxisShow, label: custom?.axisLabel, theme, grid: { show: custom?.axisGridShow }, diff --git a/public/app/plugins/panel/barchart/utils.ts b/public/app/plugins/panel/barchart/utils.ts index 36d66a73979..01318ed6739 100644 --- a/public/app/plugins/panel/barchart/utils.ts +++ b/public/app/plugins/panel/barchart/utils.ts @@ -319,7 +319,6 @@ export const prepConfig = ({ series, totalSeries, color, orientation, options, t ? AxisPlacement.Bottom : AxisPlacement.Left : AxisPlacement.Hidden; - const xFieldAxisShow = frame.fields[0]?.config.custom?.axisPlacement !== AxisPlacement.Hidden; builder.addAxis({ scaleKey: 'x', @@ -335,7 +334,6 @@ export const prepConfig = ({ series, totalSeries, color, orientation, options, t gap: 15, tickLabelRotation: vizOrientation.xOri === 0 ? xTickLabelRotation * -1 : 0, theme, - show: xFieldAxisShow, }); // let seriesIndex = 0; diff --git a/public/app/plugins/panel/heatmap/utils.ts b/public/app/plugins/panel/heatmap/utils.ts index a51c86f0d1c..c7c0407677c 100644 --- a/public/app/plugins/panel/heatmap/utils.ts +++ b/public/app/plugins/panel/heatmap/utils.ts @@ -342,7 +342,6 @@ export function prepConfig(opts: PrepConfigOpts) { builder.addAxis({ scaleKey: yScaleKey, - show: yAxisConfig.axisPlacement !== AxisPlacement.Hidden, placement: yAxisConfig.axisPlacement || AxisPlacement.Left, size: yAxisConfig.axisWidth || null, label: yAxisConfig.axisLabel, diff --git a/public/app/plugins/panel/xychart/scatter.ts b/public/app/plugins/panel/xychart/scatter.ts index f66416c68f2..b3abb3f4d82 100644 --- a/public/app/plugins/panel/xychart/scatter.ts +++ b/public/app/plugins/panel/xychart/scatter.ts @@ -344,7 +344,6 @@ export const prepConfig = (xySeries: XYSeries[], theme: GrafanaTheme2) => { scaleKey: 'x', isTime: xIsTime, placement: customConfig?.axisPlacement !== AxisPlacement.Hidden ? AxisPlacement.Bottom : AxisPlacement.Hidden, - show: customConfig?.axisPlacement !== AxisPlacement.Hidden, grid: { show: customConfig?.axisGridShow }, border: { show: customConfig?.axisBorderShow }, theme, @@ -402,7 +401,6 @@ export const prepConfig = (xySeries: XYSeries[], theme: GrafanaTheme2) => { scaleKey, theme, placement: customConfig?.axisPlacement === AxisPlacement.Auto ? AxisPlacement.Left : customConfig?.axisPlacement, - show: customConfig?.axisPlacement !== AxisPlacement.Hidden, grid: { show: customConfig?.axisGridShow }, border: { show: customConfig?.axisBorderShow }, size: customConfig?.axisWidth,