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++;
Kindly let us know, if you need anything else.
Hello Asit,
I was looking into your requirements, however I am not sure what may cause the issue you are describing. Could you please provide me with a small test sample, where this behavior is reproducible.
Thanks in advance.