user-hostile
Registered User.
- Local time
- Yesterday, 19:59
- Joined
- Oct 20, 2007
- Messages
- 10
Hi. I'm working with some Access (MS Graph) pie charts on a report. The charts display their data correctly, and so the rowsources are set correctly. However, I'm trying to customize the positioning of the pie slices' datalabels. Here's what I'm trying to do, but it's not quite working:
The problem is, on my second line within the loop (setting the Top property), Access can't seem to set the DataLabel.Top value to _exactly_ the same value as the LegendEntries.Top value?!
Sometimes it does: it may set the DataLabel.Top to 71, where the LegendEntries(x).Top is also 71.
But most of the time, it refuses to set DataLabel.Top to _exactly_ the value passed by LegendEntries(x).Top. Example:
LegendEntries.Top = 120
If I try to set DataLabel.Top to LegendEntries(x).Top, it will set DataLabel.Top to, maybe, 122. Access refuses to set that value to the _exact_ value passed.
Is there some invisible grid associated with the Chart object that is preventing me from setting the positioning this precisely? Any other ideas on how to "force" Access to position a datalabel _exactly_ where my code specifies?
Thanks in advance.
U-H
Code:
for x = 1 to 4
chart.seriescollection(1).datalabels.Left = chart.legendentries(x).Left + chart.legendentries(x).width
chart.seriescollection(1).datalabels.Top = chart.legendentries(x).Top
next x
Sometimes it does: it may set the DataLabel.Top to 71, where the LegendEntries(x).Top is also 71.
But most of the time, it refuses to set DataLabel.Top to _exactly_ the value passed by LegendEntries(x).Top. Example:
LegendEntries.Top = 120
If I try to set DataLabel.Top to LegendEntries(x).Top, it will set DataLabel.Top to, maybe, 122. Access refuses to set that value to the _exact_ value passed.

Is there some invisible grid associated with the Chart object that is preventing me from setting the positioning this precisely? Any other ideas on how to "force" Access to position a datalabel _exactly_ where my code specifies?
Thanks in advance.
U-H