Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
735
Binding collection of series with Datapoint
posted

Hi,

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

We are using xamwebChart (line,column and bar charts). We are binding collection of series. Now I want to implement datapoint, how can I do the same.

Following is the code for series binding:

foreach (ControlSeries Series in ListControlSeries)

{

#region Dynamic Series

       //Setting xCol and yCol and Serice

       Infragistics.Silverlight.Chart.Series MySeries = new Infragistics.Silverlight.Chart.Series();

MySeries.DataMapping = "Value=" + Control.xCol + ";Label=" + Control.yCol;

       MySeries.ChartType = Infragistics.Silverlight.Chart.ChartType.Line;

       MySeries.Label = Series.Value.ToString();

 

       //Default Animation

       Animation a = new Animation();

       MySeries.Animation = a;

 

       _XamLineChart.Series.Add(MySeries);

       #endregion

 

       var dataSource = (from d in doc.Descendants(XML_ELM_GROUP_FIELD).Descendants(XML_ELM_DATA)

where d.Parent.Parent.Parent.Attribute(XML_ATR_CONTROL_NAME).Value == Convert.ToString(_XamLineChart.Tag).Trim() &&

                           d.Parent.Attribute(groupByAttribute).Value == Series.Value

                           select new ChartDataMapper

                           {

                                  Value = (double)d.Attribute(xCol),

                                  Name = (string)d.Attribute(yCol).Value

                           }).ToList<ChartDataMapper>();

 

                _XamLineChart.Series[i].DataSource = dataSource;

                _XamLineChart.Series[i].Label = Series.Value;

 

                i++;

            }

 Thanks

Parents
No Data
Reply Children
No Data