line chart skips the second month on the xaxis if the first month is a odd number mouth
I am using v3.2. I am building a line chart. It's very werid that the label of the Xaxis would repeat the first odd number month on the second position, it does't happen to the even number month as the start position, is this a bug with v3.2? how can I get around it?
Also, is there a way to leave a little room on the most left and right position without ruining the graph? I tried to make the start point a month earlier and end point a month later, it will shift the line to the earlier month too.
Thanks!
lineChartIssue.doc0.zip
Also, is there a way to leave a little room on the most left and right position without ruining the graph? I tried to make the start point a month earlier and end point a month later, it will shift the line to the earlier month too.
Thanks!
lineChartIssue.doc0.zip
SIGN IN To post a reply.
5 Replies
HZ
Hongbin Zhang
March 26, 2007 03:22 PM UTC
Below is a code snippet for this issue:
myChart.PrimaryXAxis.ValueType = ChartValueType.DateTime;
myChart.PrimaryXAxis.DateTimeFormat = xAxisFormat;
myChart.PrimaryXAxis.RangeType = ChartAxisRangeType.Set;
DateTime dateMin=DateTime.Now,dateMax=DateTime.Now;
int dataCount = myChart.Series[0].SeriesModelImpl.Count;
if (dataCount > 0)
{
dateMin = DateTime.FromOADate(traceChart.Series[0].SeriesModelImpl.GetX(0));
dateMax = DateTime.FromOADate(traceChart.Series[0].SeriesModelImpl.GetX(dataCount-1));
}
myChart.PrimaryYAxis.DateTimeRange = new ChartDateTimeRange(dateMin,dateMax,intervalVal,ChartDateTimeIntervalType.Months);
It would be much appreciated if you can reply in your earliest convienence..
Thanks,
HB
>I am using v3.2. I am building a line chart. It's very werid that the label of the Xaxis would repeat the first odd number month on the second position, it does't happen to the even number month as the start position, is this a bug with v3.2? how can I get around it?
Also, is there a way to leave a little room on the most left and right position without ruining the graph? I tried to make the start point a month earlier and end point a month later, it will shift the line to the earlier month too.
Thanks!
lineChartIssue.doc0.zip
myChart.PrimaryXAxis.ValueType = ChartValueType.DateTime;
myChart.PrimaryXAxis.DateTimeFormat = xAxisFormat;
myChart.PrimaryXAxis.RangeType = ChartAxisRangeType.Set;
DateTime dateMin=DateTime.Now,dateMax=DateTime.Now;
int dataCount = myChart.Series[0].SeriesModelImpl.Count;
if (dataCount > 0)
{
dateMin = DateTime.FromOADate(traceChart.Series[0].SeriesModelImpl.GetX(0));
dateMax = DateTime.FromOADate(traceChart.Series[0].SeriesModelImpl.GetX(dataCount-1));
}
myChart.PrimaryYAxis.DateTimeRange = new ChartDateTimeRange(dateMin,dateMax,intervalVal,ChartDateTimeIntervalType.Months);
It would be much appreciated if you can reply in your earliest convienence..
Thanks,
HB
>I am using v3.2. I am building a line chart. It's very werid that the label of the Xaxis would repeat the first odd number month on the second position, it does't happen to the even number month as the start position, is this a bug with v3.2? how can I get around it?
Also, is there a way to leave a little room on the most left and right position without ruining the graph? I tried to make the start point a month earlier and end point a month later, it will shift the line to the earlier month too.
Thanks!
lineChartIssue.doc0.zip
HZ
Hongbin Zhang
March 26, 2007 03:24 PM UTC
sorry, the code is a bit mixed up, here again:
myChart.PrimaryXAxis.ValueType = ChartValueType.DateTime;
myChart.PrimaryXAxis.DateTimeFormat = xAxisFormat;
myChart.PrimaryXAxis.RangeType = ChartAxisRangeType.Set;
DateTime dateMin=DateTime.Now,dateMax=DateTime.Now;
int dataCount = myChart.Series[0].SeriesModelImpl.Count;
if (dataCount > 0)
{
dateMin = DateTime.FromOADate(myChart.Series[0].SeriesModelImpl.GetX(0));
dateMax = DateTime.FromOADate(myChart.Series[0].SeriesModelImpl.GetX(dataCount-1));
}
myChart.PrimaryYAxis.DateTimeRange = new ChartDateTimeRange(dateMin,dateMax,intervalVal,ChartDateTimeIntervalType.Months);
Thanks,
HB
>Below is a code snippet for this issue:
myChart.PrimaryXAxis.ValueType = ChartValueType.DateTime;
myChart.PrimaryXAxis.DateTimeFormat = xAxisFormat;
myChart.PrimaryXAxis.RangeType = ChartAxisRangeType.Set;
DateTime dateMin=DateTime.Now,dateMax=DateTime.Now;
int dataCount = myChart.Series[0].SeriesModelImpl.Count;
if (dataCount > 0)
{
dateMin = DateTime.FromOADate(traceChart.Series[0].SeriesModelImpl.GetX(0));
dateMax = DateTime.FromOADate(traceChart.Series[0].SeriesModelImpl.GetX(dataCount-1));
}
myChart.PrimaryYAxis.DateTimeRange = new ChartDateTimeRange(dateMin,dateMax,intervalVal,ChartDateTimeIntervalType.Months);
It would be much appreciated if you can reply in your earliest convienence..
Thanks,
HB
>I am using v3.2. I am building a line chart. It's very werid that the label of the Xaxis would repeat the first odd number month on the second position, it does't happen to the even number month as the start position, is this a bug with v3.2? how can I get around it?
Also, is there a way to leave a little room on the most left and right position without ruining the graph? I tried to make the start point a month earlier and end point a month later, it will shift the line to the earlier month too.
Thanks!
lineChartIssue.doc0.zip
myChart.PrimaryXAxis.ValueType = ChartValueType.DateTime;
myChart.PrimaryXAxis.DateTimeFormat = xAxisFormat;
myChart.PrimaryXAxis.RangeType = ChartAxisRangeType.Set;
DateTime dateMin=DateTime.Now,dateMax=DateTime.Now;
int dataCount = myChart.Series[0].SeriesModelImpl.Count;
if (dataCount > 0)
{
dateMin = DateTime.FromOADate(myChart.Series[0].SeriesModelImpl.GetX(0));
dateMax = DateTime.FromOADate(myChart.Series[0].SeriesModelImpl.GetX(dataCount-1));
}
myChart.PrimaryYAxis.DateTimeRange = new ChartDateTimeRange(dateMin,dateMax,intervalVal,ChartDateTimeIntervalType.Months);
Thanks,
HB
>Below is a code snippet for this issue:
myChart.PrimaryXAxis.ValueType = ChartValueType.DateTime;
myChart.PrimaryXAxis.DateTimeFormat = xAxisFormat;
myChart.PrimaryXAxis.RangeType = ChartAxisRangeType.Set;
DateTime dateMin=DateTime.Now,dateMax=DateTime.Now;
int dataCount = myChart.Series[0].SeriesModelImpl.Count;
if (dataCount > 0)
{
dateMin = DateTime.FromOADate(traceChart.Series[0].SeriesModelImpl.GetX(0));
dateMax = DateTime.FromOADate(traceChart.Series[0].SeriesModelImpl.GetX(dataCount-1));
}
myChart.PrimaryYAxis.DateTimeRange = new ChartDateTimeRange(dateMin,dateMax,intervalVal,ChartDateTimeIntervalType.Months);
It would be much appreciated if you can reply in your earliest convienence..
Thanks,
HB
>I am using v3.2. I am building a line chart. It's very werid that the label of the Xaxis would repeat the first odd number month on the second position, it does't happen to the even number month as the start position, is this a bug with v3.2? how can I get around it?
Also, is there a way to leave a little room on the most left and right position without ruining the graph? I tried to make the start point a month earlier and end point a month later, it will shift the line to the earlier month too.
Thanks!
lineChartIssue.doc0.zip
RC
Rajesh C
Syncfusion Team
March 30, 2007 10:41 PM UTC
Hi,
Thank you for using Syncfusion products.
I am able to reproduce the mentioned issue in v3.2. This issue has been fixed in v4.1. Please upgrade to latest version.
Now, We will going to release Essential studio v5.1 with more essential features.
Regards,
Rajesh
Thank you for using Syncfusion products.
I am able to reproduce the mentioned issue in v3.2. This issue has been fixed in v4.1. Please upgrade to latest version.
Now, We will going to release Essential studio v5.1 with more essential features.
Regards,
Rajesh
HZ
Hongbin Zhang
April 16, 2007 08:21 PM UTC
Hi, I upgraded my Syncfusion to v4.2. but this issue still exists:
I am using:
lineChart.PrimaryXAxis.DateTimeRange = new ChartDateTimeRange(dateMin,dateMax,1,ChartDateTimeIntervalType.Months);
dateMin = new DateTime(2006,10,01),
dateMax = new DateTime(2007,03,01)
The second month should be 2006-Nev, but it makes as 10/31/2006.
please see the attached screenshot. is this a bug in v4.2 as well?
thanks,
HB
lineChartIssue0.zip
I am using:
lineChart.PrimaryXAxis.DateTimeRange = new ChartDateTimeRange(dateMin,dateMax,1,ChartDateTimeIntervalType.Months);
dateMin = new DateTime(2006,10,01),
dateMax = new DateTime(2007,03,01)
The second month should be 2006-Nev, but it makes as 10/31/2006.
please see the attached screenshot. is this a bug in v4.2 as well?
thanks,
HB
lineChartIssue0.zip
RR
Ramya R
Syncfusion Team
April 17, 2007 10:49 AM UTC
Hi,
I was not able to reproduce the condition that you have mentioned here. I used v4.2.0.37 and the below shown code snippet to reproduce the issue,
DateTime dateMin;
DateTime dateMax;
ChartSeries series =this.chartControl1.Model.NewSeries("MySeries",ChartSeriesType.Line);
dateMin = new DateTime(2006,10,01);
dateMax = new DateTime(2007,03,01);
DateTime[] xArray = new DateTime[]{dateMin,dateMin.AddMonths(1),dateMin.AddMonths(2)};
double[] yArray = new double[]{10,3,7};
series.SeriesModelImpl = new DateXSeriesModel(xArray,yArray);
this.chartControl1.Series.Add(series);
this.chartControl1.PrimaryXAxis.LabelRotate=true;
this.chartControl1.PrimaryXAxis.LabelRotateAngle=90;
this.chartControl1.PrimaryXAxis.ValueType=ChartValueType.DateTime;
this.chartControl1.PrimaryXAxis.DateTimeRange = new ChartDateTimeRange(dateMin,dateMax,1,ChartDateTimeIntervalType.Months);
but I was not able to reproduce it.
I was only able to see that Min and Max values were not getting displayed correctlyin v4.2. This issue with Min and Max values has been resolved in our latest version 4.4.0.51.
I have attached the samples both in v4.2 and v4.4 which I used for reproducing this issue.
You can download the sample from the below given Webpage link,
Sample for 4.2:
http://websamples.syncfusion.com/samples/Chart.Windows/F58455-I/main.htm
Sample for 4.4:
http://websamples.syncfusion.com/samples/Chart.Windows/F58455-II/main.htm
Kindly take a look at the attached samples and let me know if I have missed any steps in reproducing the issue.
Thanks & Regards,
Ramya.
I was not able to reproduce the condition that you have mentioned here. I used v4.2.0.37 and the below shown code snippet to reproduce the issue,
DateTime dateMin;
DateTime dateMax;
ChartSeries series =this.chartControl1.Model.NewSeries("MySeries",ChartSeriesType.Line);
dateMin = new DateTime(2006,10,01);
dateMax = new DateTime(2007,03,01);
DateTime[] xArray = new DateTime[]{dateMin,dateMin.AddMonths(1),dateMin.AddMonths(2)};
double[] yArray = new double[]{10,3,7};
series.SeriesModelImpl = new DateXSeriesModel(xArray,yArray);
this.chartControl1.Series.Add(series);
this.chartControl1.PrimaryXAxis.LabelRotate=true;
this.chartControl1.PrimaryXAxis.LabelRotateAngle=90;
this.chartControl1.PrimaryXAxis.ValueType=ChartValueType.DateTime;
this.chartControl1.PrimaryXAxis.DateTimeRange = new ChartDateTimeRange(dateMin,dateMax,1,ChartDateTimeIntervalType.Months);
but I was not able to reproduce it.
I was only able to see that Min and Max values were not getting displayed correctlyin v4.2. This issue with Min and Max values has been resolved in our latest version 4.4.0.51.
I have attached the samples both in v4.2 and v4.4 which I used for reproducing this issue.
You can download the sample from the below given Webpage link,
Sample for 4.2:
http://websamples.syncfusion.com/samples/Chart.Windows/F58455-I/main.htm
Sample for 4.4:
http://websamples.syncfusion.com/samples/Chart.Windows/F58455-II/main.htm
Kindly take a look at the attached samples and let me know if I have missed any steps in reproducing the issue.
Thanks & Regards,
Ramya.
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
-
HZ Hongbin Zhang
- Mar 23, 2007 07:21 PM UTC
- Apr 17, 2007 10:49 AM UTC