Solved

OWC10 Pie Chart Labels

Posted on 2003-10-23
2
883 Views
Last Modified: 2013-12-25
Hello.

I'm working on ASP and OWC10 to generate graphics from a database. The graphics are working well except for the following issue. I can't locate the labels of the graphic outside the pie, the are positioned right in the center of the pie, and -of course- it looks terrible. Coould anyone help me with this issue? In the case, the labels can't be positioned outside the pie area, I would like to know if it's possible to put the labels in the legends area, -at the left of the graphic-. Thanks in advanced, and hope it works.

Jcaicedc
0
Comment
Question by:jcaicedc
2 Comments
 
LVL 2

Accepted Solution

by:
MPDeveloper earned 125 total points
ID: 9767499
Hey jc,

I'm working as well with ASP and OWC10, (which annoys me more and more every day). I felt the same way about the pie chart and in OWC10 you cannot place the labels outside of the pie chart unless you want to manually position them.


As far as placing them in the legend - I'm not sure how you go about making your calculations, but I decided to do all of my own calculations in the ASP and then dump it to an array which I have OWC read - like this

'---- BEGIN ASP/VBSCRIPT ----

   chsp.Charts(1).setData c.chDimCategories, c.chDataLiteral, ARYcat

'---- END ASP/VBSCRIPT ----

If you are doing your own calculations, you can just through the totals, or the percentages at the beginning of the category label. Something like...

'---- BEGIN ASP/VBSCRIPT ----

ARYcat(1) = pieSliceVal & " - " & pieSliceLabel

'---- END ASP/VBSCRIPT ----


The last option, which I took, is just to change the background and foreground of the labels. I just took the background and make it white and turned the text black so that it at least showed up on the pie chart and looked decent. Heres the code I wrote for this...

'---- BEGIN ASP/VBSCRIPT ----

set dls = chsp.Charts(1).SeriesCollection(0).DataLabelsCollection.Add
dls.numberformat = ".#%"
dls.interior.color = "white"
dls.HasPercentage = True
dls.font.size = 8
dls.font.bold = true
dls.font.color = "black"
dls.HasValue = False

'---- END ASP/VBSCRIPT ----

I hope this helps you out a little.

Best of Luck,

Benny B.
0
 

Author Comment

by:jcaicedc
ID: 9771139
Thanks a lot MPD. Well, since there's no other way I will start immediately with manual working. See you soon!!

Jcaicedc
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to count occurrences of each item in an array.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now