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
Multiple series issue.
posted

Hi,

We are assigning series to chart (XamWebChart control) programmatically. We are facing following issues:

[1] I am assigning 9 series but control is showing first 4 series. 

[2] on x-axis first 4 names are appear (“lynn..”) and after that numbers are appearing.

 

Please find the screenshot and data as attachment. In data “Value” field is Sales and “Name” field is Name.

 

We are using following code to add series to control:

 

            _XamBarWebChart.Series.Clear();

            foreach (ControlSeries Series in ListControlSeries)

            {

                #region Dynamic Series

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

 

                MySeries.DataMapping = _clsDashBoard.DASHBOARD_Value + _clsDashBoard.DASHBOARD_LABELNAME;//"Value=Value"   ";Label=Name"

                MySeries.Label = "S" + Series.Value.ToString();

 

                //Default Animation

                Animation a = new Animation();

                MySeries.Animation = a;

 

                _XamBarWebChart.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(_XamBarWebChart.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>();

 

                if (_XamBarWebChart.Series.Count() >= i + 1)

                {

                    _XamBarWebChart.Series[i].DataSource = dataSource;

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

                }

                i++;

            }

        }

        #endregion

 

Kindly let us know, if you need anything else.

 

MultiSeries Issue.zip
Parents Reply Children
No Data