I have a xamWebChart that I want to bind data, wich is dynamic (i.e. I only know the datasource structure at runtime).
I'm using data points to feed the series of the chart, but it seems that this is not working in stackedcharts...
Here is the code that I use to generate the points in the data chart:
for (int j = (int)rowLabelColumn + 1; j <= data.Data.Data.Length - 1; j++) { Infragistics.Silverlight.Chart.Series series = new Infragistics.Silverlight.Chart.Series(); series.ChartType = ChartType.Column; for (int i = 0; i <= data.Data.Data[(int)rowLabelColumn + 1].Length - 1; i++){ double value; if (double.TryParse(data.Data.Data[j][i].ToString(), out value)){ series.DataPoints.Add(new DataPoint(){ Label = data.Data.Data[(int)rowLabelColumn][i].ToString(), Value = value, ToolTip = "Valor: " + ((precision != null) ? Math.Round(value, (int)precision) : value) }); } } //series.DataSource = items; //series.DataMapping = "Value = value; Label = Label"; chartObj.Series.Add(series); }
Hello,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
I solved the issue. Thank you.
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post and I created a sample project for you using the code you have provided and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Feel free to write me if you have further questions.