This is a bug in Bar
, so I have logged it in our Feedback portal
, where you can vote and track its progress. I have also update your Telerik points for this bug report.
There is a workaround, whose idea follows these steps:
- Create a constant variable which is a very small number like 0.00000000001 and use it as a marker
- When you populate the SeriesItems, check if the next item's value is equal to 0 (zero) and if this is the case, change its value to the constant variable in step 1.
- Use the ClientTemplate property of the LabelsAppearance to switch the item's label - check if the item's values is equal to INVALID_VALUE (the constant in step 1) and show a label with the value "0" in this case:
SPECIAL_VALUE = 0.000000000000000000000001M;
BarSeries bar1 =
"#= value === "
+ SPECIAL_VALUE +
" ? 0 : value #"
I also attach a sample page, where I have demonstrated this approach. You can use it as a reference and apply the idea in your scenario.
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed