Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

OWC10 Pie Chart Labels

Posted on 2003-10-23
2
901 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

792 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