User (Legacy) Posted June 1, 2004 Report Share Posted June 1, 2004 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 More sharing options...
Software FX Posted June 1, 2004 Report Share Posted June 1, 2004 Try this: chart.AxisX.Style |= AxisStyle.ShowEnds; -- FP Software FX chart.xml Link to comment Share on other sites More sharing options...
User (Legacy) Posted June 2, 2004 Author Report Share Posted June 2, 2004 > 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... 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 More sharing options...
Software FX Posted June 2, 2004 Report Share Posted June 2, 2004 > 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 More sharing options...
User (Legacy) Posted June 2, 2004 Author Report Share Posted June 2, 2004 > 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 Link to comment Share on other sites More sharing options...
Software FX Posted June 2, 2004 Report Share Posted June 2, 2004 > thanks but no, I need to make it work nicely for runtime generated data I did not mean that the solution (if I can give you one) will work only for that dataset, I just want to know what "smart" means for you. -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted June 3, 2004 Author Report Share Posted June 3, 2004 > I did not mean that the solution (if I can give you one) will work only for > that dataset, I just want to know what "smart" means for you. well, here's a typical graph which illustrates the problem (attached)... Link to comment Share on other sites More sharing options...
Software FX Posted June 3, 2004 Report Share Posted June 3, 2004 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 Link to comment Share on other sites More sharing options...
User (Legacy) Posted June 3, 2004 Author Report Share Posted June 3, 2004 > 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.