Jump to content
Software FX Community

Problems setting x axis for dates


User (Legacy)

Recommended Posts

I have been having problems setting my x axis properly.

The date column passed from the dataset will always be in the format of

"YYYY/MM/DD". The datasource's date column will always be the first of the

month:

I.E

2004/01/01

2004/02/01

2004/03/01

The user has the option of selecting by Year or Month

If they select year, the tick marks should be 2003, 2004, etc.

If they select month, the tick marks should display JAN/04, FEB/04, MAR/04,

etc.

I have step the Step property=30. How do I get the tick mark to show up

exactly when the first day occurs?

For example, my xy values should be (JAN/04, y value corresponding to

2004/01/01), (FEB/04, y value corresponding to 2004/02/01).

I want the y-value for 2004/05/01 displayed directly above MAY/04 (see image

attached).

I thought of setting the date field as a label, but I didn't like how things

were graphing. When I did this the JAN/01 label didn't start at point(0,0)-

the bottom left corner and the last label (Tick mark) wasn't starting marked

at the bottom right hand corner. The JAN/01 label was displayed at (1,0)

and the last label was displayed at (max x value -1, 0). Is there a way I

can force it to do that?

I have attached the binary file of my graph as well as an image of what's

going on. Any suggestions?

Thanks,

Link to comment
Share on other sites

When I added the line:

chartReport.AxisX.Style = AxisStyle.AutoFirstLabel

I received an overflow error message.

I am using vb. I also checked my version of chartfx and I am using the

latest sp.

Please let me know what is missing. I have attached the binary file and

error msg.

Thanks,

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:g1OtpI3PEHA.4020@webserver3.softwarefx.com...

> By default Chart FX adjusts to your data, so no matter where your data

> start, the tickmarks go at the end of each month.

>

> Since you want the tickmarks to start right where your data starts, all

you

> need to do is turn off this behavior by doing:

>

> chart1.AxisX.Style &= ~AxisStyle.AutoFirstLabel;

>

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

Does this make it work?

Chart1.AxisX.Style = Chart1.AxisX.Style And Not AxisStyle.AutoFirstLabel

-CharlesS?

"Joanne" <jsam@hydro.mb.ca> wrote in message

news:DqnwrDmQEHA.3152@webserver3.softwarefx.com...

> When I added the line:

> chartReport.AxisX.Style = AxisStyle.AutoFirstLabel

>

> I received an overflow error message.

>

> I am using vb. I also checked my version of chartfx and I am using the

> latest sp.

> Please let me know what is missing. I have attached the binary file and

> error msg.

>

> Thanks,

>

>

>

>

>

>

> "SoftwareFX Support" <noreply@softwarefx.com> wrote in message

> news:g1OtpI3PEHA.4020@webserver3.softwarefx.com...

> > By default Chart FX adjusts to your data, so no matter where your data

> > start, the tickmarks go at the end of each month.

> >

> > Since you want the tickmarks to start right where your data starts, all

> you

> > need to do is turn off this behavior by doing:

> >

> > chart1.AxisX.Style &= ~AxisStyle.AutoFirstLabel;

> >

> >

> > --

> > FP

> > Software FX

> >

> >

>

>

>

ChartReport.zip

ChartReport.zip

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...