remove unnecessary axis show stuff

This commit is contained in:
Paul Marbach
2025-12-15 10:05:46 -05:00
parent 65249a12ae
commit c048b3ff6f
5 changed files with 0 additions and 11 deletions
@@ -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 },
@@ -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 },
@@ -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;
@@ -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,
@@ -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,