Your markup shows two ChartSeries, that is -- two pies. If it were bar series that would mean two sets of bars. Now, each pie will have as many slices as the number of records in the datasource is. For the bars this would be -- the number of bars in each set (series) will be equal to the number of records in the datasource. So, in order to get a single pie with two slices you need to provide the data like this:
This way you will need only one ChartSeries declared and you will get the expected result.
I understand that providing the data like this might not be always possible, so there is an alternative -- do not databind the chart. Create a single ChartSeries, do not set its DataYColumn
property and populate it manually by looping through the data ( in this case by adding two ChartSeriesItems with their corresponding values, retrieved from the datasource).
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat
for a walk through all the exciting stuff we ship with the new release!