roscoe
Well-known Member
- Joined
- Jun 4, 2002
- Messages
- 1,046
- Office Version
- 365
- Platform
- Windows
- MacOS
With some help from another (see linky) I was able to use VBA to use the values of a donut chart inputs to set the colors.
(Note - X-1 inner ring to X-6 outer ring, graph is rotated such that "0" azimuth points straight right)
Now...the value I used to create the chart was a gimmick to make it look right...what I need now is to replace each data label (1.0086) with a better number without gorking up the chart. Example: To make the slices all equal size, I took the actual data value to be plotted (e.g. 86%), divided it by 1000 and then added it to one (=1.0086) With all the pie values now all within 1% of each other, each donut slice appears to be an identical 45% wedge.
What I really need is for the label to read 86%, not 1.0086.
Is there a VBA command I can change the value of the label, either by formula or by referencing a cell outside the data range instead (preferred solution as I have more flexibility for making the labels as I develop these charts)? Theoretically I can add it to the code I already have and do it in all in one swell foop.
If not, is there another way to constrain the pie slices to 45 degree wedges, regardless of the value of the underlying data?
Last question...Can I change the rotation angle of each label to match the orientation of the donut? I know in advance what the angle is, just need to know how to do it (if I can do it)
Thanks
(Note - X-1 inner ring to X-6 outer ring, graph is rotated such that "0" azimuth points straight right)
Now...the value I used to create the chart was a gimmick to make it look right...what I need now is to replace each data label (1.0086) with a better number without gorking up the chart. Example: To make the slices all equal size, I took the actual data value to be plotted (e.g. 86%), divided it by 1000 and then added it to one (=1.0086) With all the pie values now all within 1% of each other, each donut slice appears to be an identical 45% wedge.
What I really need is for the label to read 86%, not 1.0086.
Is there a VBA command I can change the value of the label, either by formula or by referencing a cell outside the data range instead (preferred solution as I have more flexibility for making the labels as I develop these charts)? Theoretically I can add it to the code I already have and do it in all in one swell foop.
If not, is there another way to constrain the pie slices to 45 degree wedges, regardless of the value of the underlying data?
Last question...Can I change the rotation angle of each label to match the orientation of the donut? I know in advance what the angle is, just need to know how to do it (if I can do it)
Thanks