mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
TimeSeries: Expose option for "Bar width factor" (#77338)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
This commit is contained in:
@@ -32,6 +32,7 @@ export const defaultGraphConfig: GraphFieldConfig = {
|
||||
fillOpacity: 0,
|
||||
gradientMode: GraphGradientMode.None,
|
||||
barAlignment: BarAlignment.Center,
|
||||
barWidthFactor: 0.6,
|
||||
stacking: {
|
||||
mode: StackingMode.None,
|
||||
group: 'A',
|
||||
@@ -90,6 +91,19 @@ export function getGraphFieldConfig(cfg: GraphFieldConfig, isTime = true): SetFi
|
||||
},
|
||||
showIf: (config) => config.drawStyle === GraphDrawStyle.Bars,
|
||||
})
|
||||
.addSliderInput({
|
||||
path: 'barWidthFactor',
|
||||
name: 'Bar width factor',
|
||||
category: categoryStyles,
|
||||
defaultValue: cfg.barWidthFactor,
|
||||
settings: {
|
||||
min: 0.1,
|
||||
max: 1.0,
|
||||
step: 0.1,
|
||||
ariaLabelForHandle: 'Bar width factor',
|
||||
},
|
||||
showIf: (config) => config.drawStyle === GraphDrawStyle.Bars,
|
||||
})
|
||||
.addSliderInput({
|
||||
path: 'lineWidth',
|
||||
name: 'Line width',
|
||||
|
||||
Reference in New Issue
Block a user