Jump to content
Software FX Community

X-axis labelling with curve and line


jusim

Recommended Posts

Hi,

I use integer values for the X-axis and when I choose a line or a curve chart I don't have X-Axis labels well-displayed (see file attached). If values on this axis are "string" or "datetime" Labels are well displayed

my code is:

Chart.Data.Clear();

Chart.DataSourceSettings.Fields.Clear();

Chart.DataSourceSettings.Fields.Add(new FieldMap(points.Columns[0].ColumnName, FieldUsage.XValue));

for (int i = 1; i < points.Columns.Count; ++i)

{

Chart.DataSourceSettings.Fields.Add(new FieldMap(points.Columns.ColumnName, ChartFX.WinForms.FieldUsage.Value));

Chart.DataSourceSettings.Fields.DisplayName = points.Columns.Caption;

}

Chart.AxisX.Step = 1;Chart.AxisX.Staggered = true;

Chart.DataSource = points;

Thank you

 

Link to comment
Share on other sites

It seems that either at sesign-time or in some code not posted, you are setting the X-Axis step to a small number (not zero). If you want the step to automatically adjust to the available size, you must leave it as default (zero).

If you think my assesment is incorrect, please post a sample program (stand-alone) that reproduces the problem.

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.

Guest
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...