Pie DataLabel Position constants are a joke (dedicated to Thao Moua)

S

Sascha Sertel

If there was an OWC magazine, I would probably write the Ranting article for
every issue. So here is my latest tidbit:

Since I couldn't find anyone complaining about positioning data labels in
the last 500 posts, I thought it would be time to bring this up again. Here
I was sitting, using the simplest form of all charts, the Pie Chart, until
reality hit me hard again. Despite the things I had experienced before, I
was still a strong believer in following the documentation. If we look on
the page with the Position Property description, especially the part for the
ChDataLabels object, we find that the values from the
ChartDataLabelPositionEnum can be used to position the data labels. Great, I
thought, since I need to position my data labels in the pie chart outside of
the pie segments.

But then the unthinkable happened. Upon using the chLabelPositionOutsideEnd
constant from the enumeration, I got an invalid parameter error. While
chLabelPositionAutomatic and chLabelPositionCenter both worked fine, well
actually they do exactly the same, none of the other 8 (!!!) constants
worked. One Google later, Thao Moua brought the answer. Let me quote again:

"Data label positioning in Excel Chart and OWC Chart are different. In OWC
Chart we only support automatic which is the same as center whereas in Excel
Chart there are more options. If you want to draw your own data labels in
OWC Chart, you should use custom drawing. Search for 'custom drawing' in the
Help file for more info."

This nice little statement would have been very helpful, if they had been
included it in the documentation! I said it before, I'll repeat it once
more: Why don't they include these known limitations or missing
implementation pieces in the documentation, so that people are at least
aware of this? Fine, having to use the AfterRender event to place text with
the DrawText method outside of the pie to emulate outside data labels is not
very elegant, but at least it works (more or less). Or if as said above you
only support certain constants, then don't put the other constants in the
object, or mark them as not implemented etc. There are lots of ways to save
the developer the time he needs to figure out by himself why things don't
work as stated in the documentation.

Cya in the next issue ;-)
Sascha
 
S

Sascha Sertel

I wouldn't say it doesn't buy me anything, at least other people are made
aware of these bugs or misbehaviors. I admit that a three page essay is
probably a waste of time and could have replaced with a simple "Don't be
surprised if the label placement constants don't work, only Center is
implemented" line, but that would have been less fun :)

As for the article you wrote, it's definitely useful information, but as I
said in my original posting I had already figured out how to place my data
labels outside of the slices by using the DrawText method (using a nice
little function which calculates the appropriate coordinates for me using a
variable radius), it just seemed odd to me that it wasn't mentioned anywhere
in the documentation that the already defined constants are not working
properly.

What's the proper way of submitting a bug report for the OWC? I've done beta
testing for various Microsoft products before and always delivered extensive
and detailed bug reports using the Microsoft Beta homepage. However, this
site doesn't allow submitting bug reports for non-beta products, so please
help me out with the right link, and I will gladly submit anything I said in
this forum in a non-ranting form.

Sascha
 
S

Sascha Sertel

Thanks Alvin for the info, I'll sure submit whatever I got, and I'll also
post my solution for the pie chart outside label problem as soon as
possible, unfortunately I'm having another problem right now which I will
put into another new post, but I hope you or someone else knows a reason or
solution for that.

I'll get back on this thread in a bit,
Sascha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top