mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
BarChart: show x tick picker (#43510)
This commit is contained in:
@@ -14,6 +14,7 @@ import { BarChartFieldConfig, PanelOptions, defaultBarChartFieldConfig, defaultP
|
||||
import { BarChartSuggestionsSupplier } from './suggestions';
|
||||
import { prepareBarChartDisplayValues } from './utils';
|
||||
import { config } from '@grafana/runtime';
|
||||
import { TickSpacingEditor } from './TickSpacingEditor';
|
||||
|
||||
export const plugin = new PanelPlugin<PanelOptions, BarChartFieldConfig>(BarChartPanel)
|
||||
.useFieldConfig({
|
||||
@@ -113,23 +114,17 @@ export const plugin = new PanelPlugin<PanelOptions, BarChartFieldConfig>(BarChar
|
||||
name: 'Bar label max length',
|
||||
description: 'Bar labels will be truncated to the length provided',
|
||||
settings: {
|
||||
placeholder: 'Auto',
|
||||
placeholder: 'None',
|
||||
min: 0,
|
||||
},
|
||||
})
|
||||
// .addSliderInput({
|
||||
// path: 'xTickLabelSpacing',
|
||||
// name: 'Bar label minimum spacing',
|
||||
// description: 'Bar labels will be skipped to maintain this distance',
|
||||
// defaultValue: 0,
|
||||
// settings: {
|
||||
// min: -300,
|
||||
// max: 300,
|
||||
// step: 10,
|
||||
// marks: { '-300': 'Backward', 0: 'None', 300: 'Forward' },
|
||||
// included: false,
|
||||
// },
|
||||
// })
|
||||
.addCustomEditor({
|
||||
id: 'xTickLabelSpacing',
|
||||
path: 'xTickLabelSpacing',
|
||||
name: 'Bar labels minimum spacing',
|
||||
defaultValue: defaultPanelOptions.xTickLabelSpacing,
|
||||
editor: TickSpacingEditor,
|
||||
})
|
||||
.addRadio({
|
||||
path: 'showValue',
|
||||
name: 'Show values',
|
||||
|
||||
Reference in New Issue
Block a user