jusim Posted November 19, 2009 Report Share Posted November 19, 2009 Hi, For my business Object I use a class which implements this interface: public interface IGraphPoint<T1,T2> { string SerieName { get; } T1 XValue { get; }T2 YValue { get ; } } So I created a class Point which implements IGraphPoint : public class Point : IGraphPoint<double, double> { /* Implementation */ } and I initialise my chart using listDataProvider and CrossTabDataProvider: ListProvider l = new ListProvider(pointsList); // pointsList = List<Point> CrosstabDataProvider c = new CrosstabDataProvider();c.RowHeadingSettings = RowHeadingSettings.Auto; c.DataSource = l;Chart.DataSourceSettings.Fields.Add(new FieldMap("SerieName", FieldUsage.ColumnHeading)); Chart.DataSourceSettings.Fields.Add( new FieldMap("XValue", FieldUsage.RowHeading));Chart.DataSourceSettings.Fields.Add(new FieldMap("YValue", FieldUsage.Value)); Chart.DataSource = c; And my issue is when I set the RowHeadingSettings property of my crossTabDataProvider to "Auto", labels on the X-Axis are well displayed but not in ascending order and when I set the same property to "XValues" I don't have all X-Axis labels and sometimes the x-Axis label displayed is not the corresponding X value of the chart (Maybe I'm not very clear...).(see file attached)Can you help me? Thank you Quote Link to comment Share on other sites More sharing options...
Frank Posted November 19, 2009 Report Share Posted November 19, 2009 The CrossTab provider will NOT sort the objects. You need to sort your collection (using any order you like) beefore giving it to de CrossTab as a DataSource. You do not want to use the X-Axis labels as X-Values as this is only usefull for X/Y charts and when Dates are used in the X-axis. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.