Is it possible to change the Bar Series color in code? The data is updating every few seconds, I would like the color to change based on the value.
Thanks
Is it possible to change the Bar Series color in code? The data is updating every few seconds, I would like the color to change based on the value.
Thanks
The Fill property of the RadzenBarSeries determines the color of the series.
Thanks for the reply!
I can change the color for all the bars using the Fill property but I would like to change each bar individually based on the value. If it is even possible.
No, this isn't currently possible.
@korchev is this feature available now, I want to change color of each value in column or bar chart.
You can set the Fills
property of the series. It is IEnumerable<string>
with the desired colors. The series will alternate between the provided values to set the color.
<RadzenBarSeries Title="@Series1Title" Fills=@(new [] { "#000075", "#808000", "#469990", "#158231", "#ffe119", "#3cb44b", "#42d4f4", "#4363d8", "#911eb4", "#800000" }) CategoryProperty="Name" Data="@Items" ValueProperty="@Series1ColumnName">
Thank you @korchev, this resolved my issue to give custom colors for BarSeries and ColumnSeries.
is there a way to set a specific color to a specific value? for example I have bars for warning, go, stop, etc and I would like to apply specific colors, it seems right now is randomly switching
If you use the Fills property the values will be used by index - the first series will get the first color etc.
ohh,thank you I was doing something wrong it seems, after rebuilding it started working properly