mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
BarChart: when horiz, allow rotation and skipping of y tick labels (#59354)
This commit is contained in:
@@ -138,7 +138,7 @@ export const plugin = new PanelPlugin<PanelOptions, PanelFieldConfig>(BarChartPa
|
||||
})
|
||||
.addSliderInput({
|
||||
path: 'xTickLabelRotation',
|
||||
name: 'Rotate bar labels',
|
||||
name: 'Rotate X tick labels',
|
||||
defaultValue: defaultPanelOptions.xTickLabelRotation,
|
||||
settings: {
|
||||
min: -90,
|
||||
@@ -147,18 +147,16 @@ export const plugin = new PanelPlugin<PanelOptions, PanelFieldConfig>(BarChartPa
|
||||
marks: { '-90': '-90°', '-45': '-45°', 0: '0°', 45: '45°', 90: '90°' },
|
||||
included: false,
|
||||
},
|
||||
showIf: (opts) => {
|
||||
return opts.orientation === VizOrientation.Auto || opts.orientation === VizOrientation.Vertical;
|
||||
},
|
||||
})
|
||||
.addNumberInput({
|
||||
path: 'xTickLabelMaxLength',
|
||||
name: 'Bar label max length',
|
||||
description: 'Bar labels will be truncated to the length provided',
|
||||
name: 'X tick label max length',
|
||||
description: 'X labels will be truncated to the length provided',
|
||||
settings: {
|
||||
placeholder: 'None',
|
||||
min: 0,
|
||||
},
|
||||
showIf: (opts) => opts.xTickLabelRotation !== 0,
|
||||
})
|
||||
.addCustomEditor({
|
||||
id: 'xTickLabelSpacing',
|
||||
|
||||
Reference in New Issue
Block a user