I have the following code where (as an example)
dtStart = 5/1/04 and dtNow = 4/1/05.
this.chartControl1.PrimaryXAxis.DateTimeRange = new ChartDateTimeRange(dtStart, dtNow, 1, ChartDateTimeIntervalType.Months);
The datetime format is MM-yy. This results in the correct number of points but the labels are wrong and this seems related to the actual data. All I want is to plot one point per month for 12 months why is this so difficuly.
Attached is the X-Axis generated from this code.
DJDavis Jebaraj Syncfusion Team May 12, 2005 12:43 PM
There is a bug in the current calculation of the range that increments the intervals by 30 days instead of by 1 month that results in irregular intervals. This problem can be worked around in your case if you start the date at 05/15/2004 instead of 05/01/2004.
protected void InitializeChartData()
ChartSeries series = this.chartControl1.Model.NewSeries("Series 1");
DateTime start = new DateTime(2004,5,15);
series.Type = ChartSeriesType.Column;
series.Text = series.Name;
this.chartControl1.PrimaryXAxis.DateTimeRange = new ChartDateTimeRange(start.AddMonths(-1), start.AddMonths(13), 1, ChartDateTimeIntervalType.Months);
this.chartControl1.PrimaryXAxis.ValueType = ChartValueType.DateTime;
this.chartControl1.PrimaryXAxis.DateTimeFormat = "MM-yy";
ADAdministrator Syncfusion Team May 12, 2005 03:13 PM
Do you know when a fix for the date axis problem will be available?
I hope to be able to make axis labels of the types
- 1th of each month
- 1th of each quarter (3 months)
- 1th of each year
Another problem is that the last label is chopped off. The problem is visible in the ChartDateHandling sample in version 188.8.131.52.
ADAdministrator Syncfusion Team May 16, 2005 10:35 AM
The axis issue should be fixed before the end of the week. We will make available a patch version with the fix.
You can specify labels as desired after the fix is completed:
1. 1st of month - Specify a interval of 1 month
2. 1st of Quarter - Specify a interval of 3 months
3. 1st of year - Specify a interval of 1 year
>Do you know when a fix for the date axis problem will be available?
>I hope to be able to make axis labels of the types
>- 1th of each month
>- 1th of each quarter (3 months)
>- 1th of each year
>Another problem is that the last label is chopped off. The problem is visible in the ChartDateHandling sample in version 184.108.40.206.
SRShankar RamasubramanianJune 9, 2005 02:09 PM
there is no PrimaryXAxis property in ChartWebControl. How do i set the xaxis as a date in chart web control
ADAdministrator Syncfusion Team June 11, 2005 12:18 AM
The PrimaryXAxis has been moved to the ChartArea in the ChartWebControl.
ADAdministrator Syncfusion Team June 12, 2005 08:50 AM
Has the date x-axis problem been fixed? If so, how do I get new version?
ADAdministrator Syncfusion Team June 15, 2005 04:50 PM
The X axis date (with month interval) problem has not been fixed yet. I have increased the priority for this fix and it should completed within the next few days.
Thank you for your patience.
ADAdministrator Syncfusion Team August 5, 2005 06:52 AM
This fix has been promised for quite some time now. Is it available?
Also, I wonder whether it will be necessary to update the whole essential studio to have this fix? I would prefer not, since I''m using many of the other packages and I am afraid that upgrading may break something else.
ADAdministrator Syncfusion Team August 8, 2005 05:36 PM
We regret for the delay in sending you the fix.
This issue has been fixed internally. I had initially thought that the automatic scaling was incorectly adding 30 days to compute a month interval instead of adding a month itself. However, the implementation was structured in such a manner to accomodate the default range calculation model that requires all range intervals to be the same. We have added a custom implementation for the range now that takes this into account when the range type is in months.
We will be releasing version 220.127.116.11 by tomorrow and I will post download instructions.
JDJohn DiBiaseAugust 15, 2005 02:02 AM
What is the status of this fix?
ADAdministrator Syncfusion Team August 15, 2005 05:08 PM