![]()
ActionScript Graphing Cookbook
Table of Contents
ActionScript Graphing Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Getting Started with Graph Drawing
Introduction
Drawing in two dimensions
Getting ready
How to do it...
How it works...
There's more...
Graphics drawing
Coordinate systems and transformations
See also
Building point charts
Getting ready
How to do it...
How it works...
There's more...
Coordinate system
Scaling woes
Adding more parameters
See also
Creating a line graph based on a function
Getting ready
How to do it...
How it works...
There's more...
Improving the Graph class
Using points to draw functions
Curves
See also
Adding labels and axes
Getting ready
How to do it...
How it works...
There's more...
Vertical axis
Screen versus graph coordinates
Error checking and adding parameters
Graphing a spreadsheet
Getting ready
How to do it...
How it works...
There's more...
Two arrays
Associative array
Vectors
Associative array to two-dimensional array conversion
See also
Area charts
Getting ready
How to do it...
How it works...
There's more...
Having the color as a parameter
The fill style
See also
Multiple area charts
Getting ready
How to do it...
How it works...
There's more...
Improving the interface
Styling the fill
Styling a graph
Getting ready
How to do it...
How it works...
There's more...
Transformation
Gradient lines and points, bitmap areas
See also
Adding legends
Getting ready
How to do it...
How it works...
There's more...
TextField customization
A background
See also
Using Flex for charts
Getting ready
How to do it...
How it works...
There's more...
Flex without MXML
ActionScript in Flex
See also
2. Working with Data
Introduction
Preparing your data
Getting ready
How to do it...
How it works...
There's more...
Databases
Embedding CSV files
Getting ready
How to do it...
How it works...
There's more...
CSV parsing
See also
Loading a data file from the Internet
Getting ready
How to do it...
How it works...
There's more...
Other events
Relative URL
Security and cross-domain policies
See also
Loading a file from the local hard drive
Getting ready
How to do it...
How it works...
There's more...
Cancel file browsing
See also
Loading data with XML
Getting ready
How to do it...
How it works...
There's more...
Loading from other sources
Different XML structures
Loading data from Excel files
Getting ready
How to do it...
How it works...
There's more...
as3xls
See also
Consuming the REST services
Getting ready
How to do it...
How it works...
There's more...
More web APIs
Using SOAP services
Exporting data as CSV to import in Excel
Getting ready
How to do it...
How it works...
There's more...
Semicolon or comma
CSV header
Exporting data to a PDF file
Getting ready
How to do it...
How it works...
There's more...
Headers and footers
Adding images
See also
3. Creating Bar Charts
Introduction
Drawing a bar chart with Flex
Getting ready
How to do it...
How it works...
There's more...
Showing data tips
Displaying vertical bars
Adding more bars
See also
Building vertical bar charts
Getting ready
How to do it...
How it works...
There's more...
Styling
Interactivity
Accommodating a wider data range
See also
Creating comparison bar charts
Getting ready
How to do it...
How it works...
There's more...
Adding a legend
See also
Drawing histograms
Getting ready
How to do it...
How it works...
There's more...
Data range
So many bars
See also
Creating sparklines to enrich text content
Getting ready
How to do it...
How it works...
There's more...
Adding the area under the line
Averaging the data
Making 3D bar charts
Getting ready
How to do it...
How it works...
There's more...
Using gradient
Using a real 3D engine
See also
4. Drawing Different Types of Graphs
Introduction
Drawing a pie chart with Flex
Getting ready
How to do it...
How it works...
There's more...
Bevel or not
See also
Creating donut charts
Getting ready
How to do it...
How it works...
There's more...
Labels
Donut chart as a pie chart
See also
Drawing meters and gauges
Getting ready
How to do it...
How it works...
There's more...
Animation
Using the Flash IDE
See also
Making Venn diagrams
Getting ready
How to do it...
How it works...
There's more...
Interactivity
More sets
Building pyramid charts
Getting ready
How to do it...
How it works...
There's more...
Getters and setters
3D!
See also
Drawing bubble charts
Getting ready
How to do it...
How it works...
There's more...
Interactivity
Legends
See also
Creating tag clouds
Getting ready
How to do it...
How it works...
There's more...
Modifying the alpha
Using embedded fonts
Creating a treemap
Getting ready
How to do it...
How it works...
There's more...
Representing small values
Using a tree as data
See also
5. Adding Interaction
Introduction
Zooming and panning around a graph
Getting ready
How to do it...
How it works...
There's more...