Jump to content
Software FX Community

Business Object with a generic class


Recommended Posts


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 :


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));


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



Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...