Flash Charting Components / Pie Chart
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
The pie chart is by far the simplest of the three charting components. There are fewer API calls and there are fewer labels to set on the stage itself. As you can see from our example here there is just the chart title which can be set through the API calls. When we click on the pie chart itself, we can see that there is one more set of parameters we can choose however, and that is that of the pie colors. This allows us to pick and choose the pie color slices that will be used to display the different types of data represented on the pie chart itself. Let's run this and see how it works, as you can see the chart title is loaded due to our initialization code and we can change this to whatever we want, my pie chart for instance. Good thing about this however is that as we move our mouse over each of the slices we will then be presented with the label which shows which portion this is from, which value it is and even the percentage of the total pie slice. Again this is all handled through the charting component itself and not something that you have to do in your action script code. So if we want to look at how much of the slice B offer, we simply scroll over to the B and we see that the value is 25 and the percentage is 10.12 As you can see this is a very handy way of presenting the information and letting the charting component do a lot of the calculations for you. We'll go ahead and take a look at the actions script code, hold down the scripts, pin that location. Again we just have the initialization, which is shortened, because we only have one chart title text box to fill and on our push button we only have one chart title to actually set. So the code is a lot simpler than before. Let's take a look at the API calls for the pie chart. We can see that there are a few things that we can set, label source size, value source, sort items by and so on. As I mentioned before most of these are handled in the advanced developer title, which is available through VTC. n the advanced developer title, which is available through VTC.
Tutorial Information
| Course: | Macromedia Flash MX Intermediate Developer |
| Author: | Eric Hake |
| SKU: | 33424 |
| ISBN: | 1932072292 |
| Release Date: | 2003-04-15 |
| Duration: | 7 hrs / 93 lessons |
| Captions: | For Online University members only |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 