jusim Posted November 27, 2009 Report Share Posted November 27, 2009 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 Quote Link to comment Share on other sites More sharing options...
Frank Posted November 30, 2009 Report Share Posted November 30, 2009 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. Quote Link to comment Share on other sites More sharing options...
jusim Posted December 1, 2009 Author Report Share Posted December 1, 2009 hi, I have already set "AxisX.step" to 1 and I have the same issue but this one only appears with curve and line. I have good results with bar,bubble....Chart.AxisX.Step = 1;Chart.AxisX.Staggered = true; Chart.DataSource = points; 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.