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

Data Binding to WCF Service

2 Answers 64 Views
Chart
This is a migrated thread and some comments may be shown as answers.
avinash
Top achievements
Rank 1
avinash asked on 06 Jul 2011, 07:49 AM
Hi,

Im trying to develop a stacked bar chart.
I got help from http://www.telerik.com/help/silverlight/radchart-populating-with-data-binding-to-wcf.html
But, this is for bar chart. I want to make this dynamic.

The challenge what im facing here is my code in XAML is generic.
  <Grid Style="{StaticResource WrapperStyle}">
             <telerik:RadChart x:Name="radChartRag"/>
  </Grid>

Below is my data.
Week Data 1 Data2 Data3 Data4
4/30/2011 0:00 9 7 9 4
3/31/2011 0:00 8 7 9 8
2/28/2011 0:00 7 6 8 8
1/28/2011 0:00 5 6 12 8
12/28/2010 0:00 6 5 14 11

How can i generate a stacked bar chart? (Everything should be done in code behind...!!!)
Could you please guide me to a proper example?
Really appreciate your help.

Regards,
Avi

2 Answers, 1 is accepted

Sort by
0
Sri
Top achievements
Rank 1
answered on 06 Jul 2011, 02:40 PM
Actually I would like to piggy back on this thread, cause I am databinding via WCF.   The problem I"m getting is that one bar is off center, when I look at the example for telerik, you guys seem to have the same issue.

I'm attaching a picture of it to this post.  So it seems that if the telerik examples is having the issue, it may be something to do with the chart control.
0
Evgenia
Telerik team
answered on 12 Jul 2011, 07:03 AM
Hello Avinash,

 You can follow the help topic mentioned and to create Stacked Bar series you will need a new SeriesMapping for each Bar Series. For example if you want to have a Stack of 3 Bars - you will need 3 SeriesMappings. You can find more information about binding to manual series mappings programmatically in the end of our help topic.

Best wishes,
Evgenia
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Chart
Asked by
avinash
Top achievements
Rank 1
Answers by
Sri
Top achievements
Rank 1
Evgenia
Telerik team
Share this question
or