mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboard: Single right-aligned y axis loses gridlines (#54206)
Co-authored-by: gitstart <gitstart@gitstart.com> Co-authored-by: gitstart <gitstart@users.noreply.github.com> Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev> Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com> Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com> Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com> Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com> Co-authored-by: Júlio Piubello da Silva Cabral <julio.piubello@gitstart.dev> Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com> Co-authored-by: gitstart <gitstart@users.noreply.github.com> Co-authored-by: gitstart <gitstart@gitstart.com> Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev> Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com> Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com> Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com> Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com> Co-authored-by: Júlio Piubello da Silva Cabral <julio.piubello@gitstart.dev> Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
This commit is contained in:
parent
96dfc4bac5
commit
667993eae7
@ -269,7 +269,10 @@ export class UPlotConfigBuilder {
|
|||||||
const xAxis = axes.find((a) => a.props.scaleKey === 'x');
|
const xAxis = axes.find((a) => a.props.scaleKey === 'x');
|
||||||
const axesWithoutGridSet = axes.filter((a) => a.props.grid?.show === undefined);
|
const axesWithoutGridSet = axes.filter((a) => a.props.grid?.show === undefined);
|
||||||
const firstValueAxisIdx = axesWithoutGridSet.findIndex(
|
const firstValueAxisIdx = axesWithoutGridSet.findIndex(
|
||||||
(a) => a.props.placement === AxisPlacement.Left || (a.props.placement === AxisPlacement.Bottom && a !== xAxis)
|
(a) =>
|
||||||
|
a.props.placement === AxisPlacement.Left ||
|
||||||
|
a.props.placement === AxisPlacement.Right ||
|
||||||
|
(a.props.placement === AxisPlacement.Bottom && a !== xAxis)
|
||||||
);
|
);
|
||||||
|
|
||||||
// For all axes with no grid set, set the grid automatically (grid only for first left axis )
|
// For all axes with no grid set, set the grid automatically (grid only for first left axis )
|
||||||
|
Loading…
Reference in New Issue
Block a user