This is a migrated thread and some comments may be shown as answers.

Populate StackedBar Chart with Sparse Data

3 Answers 42 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Eli Schleifer
Top achievements
Rank 1
Eli Schleifer asked on 28 Jun 2010, 07:00 AM
I am looking for some guidance on how to populate a StackedBar chart with Sparse data. Take for example the 3 categories of Animals : Monkeys, Dogs, Cats. My Data set then includes counts of those animals for a given period of time

2010 - Dogs = 7, Cats = 5, Monkeys = 0
2009 - Dogs = 4, Cats = 0, Monkeys = 3
2008 - Dogs = 0, Cats = 0, Monkeys = 22

I don't want the chart to render the zeroes for the animals when they are missing. I just want to present the data for animals that are present. I am building my data now from a List of double[] which does not appear to do the trick. I tried passing in NaN for the blank postions or using double? and NULL but that did not work either.

Please provide some guidance here.

Thanks

3 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 30 Jun 2010, 02:13 PM
Hello Eli Schleifer,

Unfortunately the current version of the control does not provide proper support for sparse data scenarios (i.e. empty values) and at the moment it is not possible to hide the "zero" labels. We will do our best to introduce public API to control the labels visibility in this scenario for the next official release that is scheduled around mid-July.

Sorry for the temporary inconvenience.


Kind regards,
Freddie
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Sam
Top achievements
Rank 1
answered on 06 Jan 2012, 09:46 PM
Has this been accomplished yet? If so, can you please provide an example in C# of how to hide a zero value in a data series? Thanks!

-Sam
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 09 Jan 2012, 10:03 AM
Hello Sam,

You can achieve the desired appearance by setting the StackedBarSeriesDefinition.LabelSettings.ShowZeroValueLabels property to false.


Greetings,
Bart.
Tags
Chart
Asked by
Eli Schleifer
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Sam
Top achievements
Rank 1
Bartholomeo Rocca
Top achievements
Rank 1
Share this question
or