We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

lable primary XAxis in a chart

I plot a time series in a chart, so the lable of the XAxis is dateTime type. By default, all dates are shown in the chart, so I get a messy black block for the X label.
I only want to show partial dates in the chart, say one date for each three 3 months. Any sample is helpful.

3 Replies

RF Rashidha F Syncfusion Team July 6, 2007 05:52 AM UTC

Hi Wen,

Thanks for using Syncfusion Products.

You can able to achieve your requirement using DateTimeRange property in Chart Control.

Please have a look at the attached sample.

http://websamples.syncfusion.com/samples/Chart.Windows/F63599/main.htm

The above sample which illustrates how to set the DateTimeRange in Chart Control.

Please let me know if you have any more queries.

Thanks and Regards,
Rashidha.


WJ Wen Jiang July 6, 2007 02:06 PM UTC

Rashidha,

Thanks. I have fixed this problem.
Can you please help me with another problem about chart. I am plotting a time series in a chart, I don't want the chart has any back color, instead, just I want the chart shows its boundary.


>Hi Wen,

Thanks for using Syncfusion Products.

You can able to achieve your requirement using DateTimeRange property in Chart Control.

Please have a look at the attached sample.

http://websamples.syncfusion.com/samples/Chart.Windows/F63599/main.htm

The above sample which illustrates how to set the DateTimeRange in Chart Control.

Please let me know if you have any more queries.

Thanks and Regards,
Rashidha.


RF Rashidha F Syncfusion Team July 9, 2007 04:26 AM UTC

Hi Wen,

Thanks for the update.

You can able to achieve your requirement using ChartInterior and ChartArea BackInterior properties in Chartcontrol.

The following code snippet which illustrates how to set the chart interior color as white.

this.chartControl1.ChartInterior = new Syncfusion.Drawing.BrushInfo(Color.Transparent);
this.chartControl1.BackInterior = new Syncfusion.Drawing.BrushInfo(Color.White);
this.chartControl1.ChartArea.BackInterior = new Syncfusion.Drawing.BrushInfo(Color.White);

You can able to set the boundery of the ChartArea using BorderStyle property in ChartControl.

The following code snippet which illustrates how to set the boundery of the ChartArea in ChartControl.

this.chartControl1.ChartArea.BorderStyle = BorderStyle.FixedSingle;

Please refer the attached sample.

http://websamples.syncfusion.com/samples/Chart.Windows/F63599_1/main.htm

Please let me know if this helps.

Thanks and Regards,
Rashidha.

Loader.
Live Chat Icon For mobile
Up arrow icon