Jump to content
Software FX Community

X-Axis dates don't appear at first plot point


User (Legacy)

Recommended Posts

Using ChartFX.Net (C#) . Have an X-axis as a range of dates - however cannot seem to get first X axis label to start under first plotted point.

See attached a .gif image of the chart to see what I mean.

The range of dates is wide enough to have the X axis step weekly, i.e;

Chart1.AxisX.Step = 7;

and have set

Chart1.AxisX.FirstLabel = 0;

Any ideas?

Thanks in advance..

Jason

Link to comment
Share on other sites

This is because Chart FX chose a step of one week and it is drawing a label for every Sunday. Your first point does not correspond to 07/08/2004 (the previous Sunday) so the label is not display (it would be misleading).

If instead of plotting every Sunday you want to start at the first point, no matter what that day is, you can do it by turning off the AutoFirstLabel flag as follows:

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

--

FP

Software FX

post-2107-13922366050675_thumb.gif

post-2107-13922377233742_thumb.gif

Link to comment
Share on other sites

That's great, thanks.

But the actual plot points don't align to vertical bar (or dates)..

Any assistance much appreciated. .

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:eHeBwkOnEHA.416@webserver3.softwarefx.com...

This is because Chart FX chose a step of one week and it is drawing a label for every Sunday. Your first point does not correspond to 07/08/2004 (the previous Sunday) so the label is not display (it would be misleading).

If instead of plotting every Sunday you want to start at the first point, no matter what that day is, you can do it by turning off the AutoFirstLabel flag as follows:

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

--

FP

Software FX

Link to comment
Share on other sites

Figured it now.

Chart1.Series[0].PointLabelAlign = SoftwareFX.ChartFX.LabelAlign.Center;

"Jason Pittock" <jason.pittock@millerstarr.com> wrote in message news:YFIqZ%23LoEHA.420@webserver3.softwarefx.com...

That's great, thanks.

But the actual plot points don't align to vertical bar (or dates)..

Any assistance much appreciated. .

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:eHeBwkOnEHA.416@webserver3.softwarefx.com...

This is because Chart FX chose a step of one week and it is drawing a label for every Sunday. Your first point does not correspond to 07/08/2004 (the previous Sunday) so the label is not display (it would be misleading).

If instead of plotting every Sunday you want to start at the first point, no matter what that day is, you can do it by turning off the AutoFirstLabel flag as follows:

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

--

FP

Software FX

post-2107-13922366058279_thumb.gif

post-2107-13922377239838_thumb.gif

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...