I would like to know if is possible to customize the column width of a bar graph.
Regards
Franco
Short answer, yes, see this, you should be able to customize everything in Live-Charts, by default MaxColumnWidth
property is 35px, this means the bar will be capped at 35 px, no matter if there is more available space, if you change this property your bars will grow, mySeries.MaxColumnWidth = double.PositiveInfinity;
Playing with the column properties you can practically achieve any effect:
But it is a bit more complicated than that, bars will only have a greater width if there is enough space to grow, the width of any bar (ColumnSeries, RowSeries, StackedRow and StackedColumn), do always have a width of 1 chart unit, this because as you can notice the chart scales no matter what values you give to it, the next diagram explains a bit how it works:
For a bar series, the available space of a bar changes according to the number of visible bars:
You can only customize the max value, never the minimum dimension, in both previous cases the column width was capped by the MaxColumnWidth
property, but notice when there are many bars, column's width needs to be less than 35px to be displayed correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With