TimeSeries: Expose option for "Bar width factor" (#77338)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
This commit is contained in:
Sebastian Hiebl
2024-06-29 01:13:34 +02:00
committed by GitHub
parent c2cd32ab64
commit 8008bcd003
2 changed files with 18 additions and 0 deletions

View File

@@ -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',