accomodating even y axis spacing & appropriate left marg
Posted: Fri Apr 11, 2008 2:59 am
Hello.
I'm battling with a functional issue that I can't seem to implement in
a predicatable manner. It relates to the placement of multiple custom y
axes on the left side of the chart, and adjusting the Panel left margin
to accomodate them. I have looked at several forum articles, one which
specifically talked about using units of pixels versus percentage,
although it seems that using pixels as the units results in only the top half
of the y-axis being utilized when series are drawn. These units I know
exist for both the chart Panel and the custom y axes.
What I would like to do is set the distance between the configured y
axes (there can be up to 12 y-axes configured) to be approximately 70
pixels. The rationale behind this is that there will be enough space
between y axes to display the y-axis labels (9 digits in total) and the
title, without adjacent y axis overlap occurring (given the default labels font used for the custom y axes).
I saw the method in the forum example that shows how to determine the 70 pixels as a percentage of the tchart.chart.chartrect width. Using this of course gives a value that I assign to the y axis RelativePosition property
(whos units are configured as a percentage, not in pixels).
So a question is, when setting the RelativePosition property (which will be negative values) to the
chart width percentage (that is equivalent to 70 pixels), does this
mean that when the chart is drawn, each y axis width will be set to the
calculated percentage? Or does the spacing for each configured y axis
get progressively smaller as each one is drawn (perhaps because of some
internal calculation that may do something like, applying the configured percentage of the new chart width after a y-axis has been drawn). Anyways next I need to set the Left margin (again units are percentage, not pixels) to accomodate each of the y-axes so that they are all visible. Of course by increasing the chart Panel left margin value, means that the chart rectangle width decreases, which in turn means that now the widths between each y-axis decreases because the percentage calculation decreases. This has been my experience anyway.
So to summarize. I'm looking for a predictable way to set the spacing
between all configured custom left y-axes to 70 pixels, and be able to
set the chart panel left margin value to show all configured y axes
(up to 12) so that the 70 pixel spacing is preserved and so that there
is not an excessive gap on the left size of the chart, which will allow the
chart rectangle width to be as wide as possible.
I cannot find a predictable way to do this because as explained above,
there is an 'inter-dependency' that exists between setting the custom
y-axis RelativePostion, the size of the chart rectangle width, which
seems to vary with the panel margin Left property setting.
Hopefully this makes sense. Can you please advise?
Thanks,
Ben.
I'm battling with a functional issue that I can't seem to implement in
a predicatable manner. It relates to the placement of multiple custom y
axes on the left side of the chart, and adjusting the Panel left margin
to accomodate them. I have looked at several forum articles, one which
specifically talked about using units of pixels versus percentage,
although it seems that using pixels as the units results in only the top half
of the y-axis being utilized when series are drawn. These units I know
exist for both the chart Panel and the custom y axes.
What I would like to do is set the distance between the configured y
axes (there can be up to 12 y-axes configured) to be approximately 70
pixels. The rationale behind this is that there will be enough space
between y axes to display the y-axis labels (9 digits in total) and the
title, without adjacent y axis overlap occurring (given the default labels font used for the custom y axes).
I saw the method in the forum example that shows how to determine the 70 pixels as a percentage of the tchart.chart.chartrect width. Using this of course gives a value that I assign to the y axis RelativePosition property
(whos units are configured as a percentage, not in pixels).
So a question is, when setting the RelativePosition property (which will be negative values) to the
chart width percentage (that is equivalent to 70 pixels), does this
mean that when the chart is drawn, each y axis width will be set to the
calculated percentage? Or does the spacing for each configured y axis
get progressively smaller as each one is drawn (perhaps because of some
internal calculation that may do something like, applying the configured percentage of the new chart width after a y-axis has been drawn). Anyways next I need to set the Left margin (again units are percentage, not pixels) to accomodate each of the y-axes so that they are all visible. Of course by increasing the chart Panel left margin value, means that the chart rectangle width decreases, which in turn means that now the widths between each y-axis decreases because the percentage calculation decreases. This has been my experience anyway.
So to summarize. I'm looking for a predictable way to set the spacing
between all configured custom left y-axes to 70 pixels, and be able to
set the chart panel left margin value to show all configured y axes
(up to 12) so that the 70 pixel spacing is preserved and so that there
is not an excessive gap on the left size of the chart, which will allow the
chart rectangle width to be as wide as possible.
I cannot find a predictable way to do this because as explained above,
there is an 'inter-dependency' that exists between setting the custom
y-axis RelativePostion, the size of the chart rectangle width, which
seems to vary with the panel margin Left property setting.
Hopefully this makes sense. Can you please advise?
Thanks,
Ben.