Jump to content
Software FX Community

Date axis


DannE

Recommended Posts

1. I have data coming in for the X-axis as date (YYYY-MM-DD). I just want to display the YYYY part on the X-axis, how do I set up the

chart1.AxisY.LabelsFormat.CustomFormat 

field?

 2. I want to set the interval on the X-axis as 1 year ( I have data for different months in a year). This is what I am doing: chart1.AxisX.Step = 1. It just creates a dark black line on the X-axis ( i am guessing that is because of overriding labels). Any idea how it can be done?

 

Link to comment
Share on other sites

> 1. I have data coming in for the X-axis as date (YYYY-MM-DD). I just want to display the YYYY part on the X-axis, how do I set up the

chart1.AxisX.LabelsFormat.Format = AxisFormat.Date; 

chart1.AxisX.LabelsFormat.CustomFormat = "yyyy";

 (Notice is AxisX not AxisY)

 > 2. I want to set the interval on the X-axis as 1 year

chart1.AxisX.Step = 365;

In a date/datetime axis, the unit is one day.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...