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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...