finalChart.Series["Series1"].ChartType = SeriesChartType.Column;
finalChart.Series["Series1"].XValueMember = mydatasource;
finalChart.Series["Series1"].YValueMembers = mydatasource;
if (SortDropDownList.SelectedItem.Text == "Ascending")
finalChart.DataManipulator.Sort(PointSortOrder.Ascending, "Series1");
else
finalChart.DataManipulator.Sort(PointSortOrder.Descending, "Series1");
What I’m trying to do is display the sorted chart. Only Unsorted chart is displayed.After the selection is made from SortDropDownList there is no change in chart series i.e. it doesn’t sort.
I have used the selectedChangedEvent though i have not shown here.
Any help would really be a great help.
Thanks
Well i find the solution to my problem(sorting not working). In the above code I assigned the xvaluemember and yvaluemember from a datasource columns names. For the DataManipulator.Sort to workout I tried the Point data i.e I used DataBindXY(xvaluemember, yvaluemember). I think all the chartcontrols sorting and grouping formulas work only for point datas not the datasource.