Hello,
I'm having a trouble with XamDataChart control, in specific with the stacked column control. When I update the bound collection, the chart just render some of the items, but if I change tab (Not included in this demo), the chart draws all the collection with the missing items. To reproduce the error, in the demo you must change the number to greater or lower values, just generate with 10, then with 1, and after with 5 and you are going to see the trouble.
Is there a way to refresh the chart without forcing to change the tabs in order to find a workaround for this problem?
My best wishes,
Here is a video displaying this problem
Hello Claudio,
Thank you for contacting Infragistics. I took a look at your sample and determined the issue is caused from incrementing the count variable when adding fragments. I was able to resolve this by either decrementing the count when setting the ValueMemberPath or only incrementing the count when the number of series is equal to the number of fragments. In cases where you have a different number of fragments per series I would recommend the first solution. I've updated and reattached your solution to demonstrate the first approach. Let me know if this is a viable.
eg.
for (int i = 0; i < numberSeries; i++) { var fragment = new Infragistics.Controls.Charts.StackedFragmentSeries(); fragment.ValueMemberPath = String.Format("TonnageCollection[{0}].Tonnage", count--); scChart.Series.Add(fragment); count++; }
Let me know if you also have any additional questions.