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,
Please find the attached sample, where I add a new ChartDataMapper elements for the missing values of the departments in every group. In the sample currently every group from your data source is placed in a different series (group 1- blue, 2-purple, 3-pink). I add “empty” elements, so Cardiology, Neonatal and Nephrology are all representable in every group and I also sort the elements by implementing IComparable interface for ChartDataMapper. By making this changes you can notice that now the data with the same DeptName gets arranged strictly under its label.
If you have any further questions on this, please do not hesitate to ask.
Hi Elena,
I already sent the sample.
Kindly do the require modification into my sample and send me back.
So we will understand where problem is. Its major issue in chart control.
I am waiting your sample, Kindly reply me ASAP.
Thank you for the code you sent. I was looking into your sample and I believe that the issue is caused by the way you set the series. Currently datasource for series[0] contains all Data from the DeptID=1, series[1] contains DeptID=2 and series[2] contains DeptID=3. The chart renders series 0 in blue, series 1- in purple and series 3- in pink and render the label for every group as the Name of the first element of every group(name of the element of series 0). Currently in the 3th group there is no element form series 0, so the label is set to 3. Based on the why you want the data to be rendered you can set different source for the series or change their labels the way you want.
If you need any further assistance on this, please let me know what is the desired arrangement of the series you want to achieve.
Kindly find the attachment of area chart with sample xml.
From that xml "Area chart Horizontal label” is not showing proper.
This is major issue.
Kindly resolve this issue ASAP.
Please find the attachment of area chart.
In this chart "Horizontal Labels" is not showing proper.
kindly find the attachment.
Please solve that issue ASAP.