Page 1 of 1
Different axis labels for Top and Bottom when aBothHorizAxis
Posted: Thu Jul 13, 2006 6:00 pm
by 9333098
When a series is configured to use both horizontal axis, it is possible to assign a different axis label for the top and for the bottom axis ? I would prefer to do this in the series1.AddXY method rather than OnGetAxisLabel event. OnGetAxisLabel fires for axis labels other than those data values actually added to the series. It fires for example for labels that are going to be shown in-between the data values supplied with AddXY. Such labels must be detected and not shown. When the label is supplied in the AddXY method, no in-between data value labels appear on the chart.
Steve
Posted: Fri Jul 14, 2006 7:23 am
by narcis
Hi Steve,
To achieve what you request you should use custom labels as shown in the All Features\Welcome!\Axes\Labels\Custom Labels example at in TeeChart's features demo.
Posted: Tue Jul 18, 2006 4:18 pm
by 9333098
Narcis,
For my application, custom labels has an issue in that their label separation is not automatically recalculated to remove overlap if the chart or its form is resized.
I am also using chart1.Assign to copy one chart to another invisible chart so that I may change some of the copied chart's properties (colors) before it is printed. I do not recall if such custom labels persist into such a copied chart, but that may be another issue for my application.
Steve
Posted: Mon Jul 24, 2006 9:01 am
by Pep
Hi,
When a series is configured to use both horizontal axis, it is possible to assign a different axis label for the top and for the bottom axis ? I
You could use the AddXY method, but will use the same label for top and bottom axes. If you want to have different labels will have to use the OnGetAxisLabel event, or a trick, which is to use a fake Series, assigning the top axis to this one, add the same data as for the other Series and make it invisible setting clNone as color and setting false to ShowInLegend property.