Jump to content
Software FX Community

X axis label of last point in series


User (Legacy)

Recommended Posts

hi,

Is it possible to make sure that the last point in a series is labelled on

the x axs?

My specific example is an xy line graph where the x axis values are dates.

It's important that the most recent date (ie the last point in the series)

is explicitely labelled. Can this be done?

thanks,

Rob

Link to comment
Share on other sites

> Try this:

>

> chart.AxisX.Style |= AxisStyle.ShowEnds;

cheers, that works.

inidentally, shouldn't that also cause the other end of the x-axis to be

labelled? It only sems to affect the

right hand end (which is what I want, but... B)

also, how can I make sure the end of axis label doesn't overlap the

automatically generated labels?

Rob

Link to comment
Share on other sites

> inidentally, shouldn't that also cause the other end of the x-axis to be

> labelled

No. Only if the axis has two halves (positive and negative) the ShowEnds

will affect both ends.

If you want to control where the labels start, you must use the FirstLabel

property.

> also, how can I make sure the end of axis label doesn't overlap the

> automatically generated labels?

I'm afraid you can't have it both ways, if you force the label to show it

may overlap other labels. What do you want to do when there is no room ? we

can't make the screen grow :-)

Maybe if you provide me with an specific example of what would you like

Chart FX to do with a specific dataset I could point you to some other

properties that may allow you to achieve what you want.

--

FP

Software FX

Link to comment
Share on other sites

> I'm afraid you can't have it both ways, if you force the label to show it

> may overlap other labels. What do you want to do when there is no room ?

we

> can't make the screen grow :-)

No, but you could make it smart enough to detect when labels overlap, and if

they do, give priority to the more important one (ie the end label, since it

has been specifically requested)

> Maybe if you provide me with an specific example of what would you like

> Chart FX to do with a specific dataset I could point you to some other

> properties that may allow you to achieve what you want.

thanks but no, I need to make it work nicely for runtime generated data

cheers

Rob

post-2106-13922379459283_thumb.png

Link to comment
Share on other sites

I know that ! My question was what would YOU like Chart FX to do ?

Hide the label right before it (27/12/2002) ? If so that sounds like a good

suggestion, I will included it in our Wish-List.

You can do this on your own now by capturing the GetAxisLabel event, detect

that it is the label before the last (based on its value and AxisX.Max) and

return an Empty String for it. You can do this only when the difference

between the last label and the Max is less than a certain number.

--

FP

Software FX

post-2107-13922379460139_thumb.gif

Link to comment
Share on other sites

> I know that ! My question was what would YOU like Chart FX to do ?

>

> Hide the label right before it (27/12/2002) ? If so that sounds like a

good

> suggestion, I will included it in our Wish-List.

I'd like it to hide the label before if

- it overlaps the end-of-axis label, or

- the gap between the two labels is less than a certain distance, say the

height of the label font

> You can do this on your own now by capturing the GetAxisLabel event,

detect

> that it is the label before the last (based on its value and AxisX.Max)

and

> return an Empty String for it. You can do this only when the difference

> between the last label and the Max is less than a certain number.

sounds like a good workaround, I'll try that

cheers

Rob

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...