Book Image

ActionScript Graphing Cookbook

Book Image

ActionScript Graphing Cookbook

Overview of this book

"A picture is worth a thousand words" has never been more true than when representing large sets of data. Bar charts, heat maps, cartograms, and many more have become important tools in applications and presentations to quickly give insight into complicated issues.The "ActionScript Graphing Cookbook" shows you how to add your own charts to any ActionScript program. The recipes give step-by-step instructions on how to process the input data, how to create various types of charts and how to make them interactive for even more user engagement.Starting with basic ActionScript knowledge, you will learn how to develop many different types of charts.First learn how to import your data, from Excel, web services and more. Next process the data and make it ready for graphical display. Pick one of the many graph options available as the book guides you through ActionScript's drawing functions. And when you're ready for it, branch out into 3D display.The recipes in the "ActionScript Graphing Cookbook" will gradually introduce you into the world of visualization.
Table of Contents (17 chapters)
ActionScript Graphing Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Mapping keyboard usage in 3D, part 1: The model


In the next two recipes, we want to create a better way of representing the data found in this Wikipedia article: http://en.wikipedia.org/wiki/Letter_frequency.

The idea is to create a 3D graph of the frequency with which letters are used in various languages and to overlay this graph on an actual keyboard image, so the letters that are used the most are represented by keys that stick out more from the base keyboard, as shown in the following screenshot:

We will create this in two steps: in the first recipe, we'll look at how to create the 3D model of the keyboard and the bars. In the second recipe, we'll add the actual data to the chart.

Getting ready

This chapter will use the Away3D 4 library. So to get started, you should set up your workspace, exactly as in the previous chapter. Also copy over the Main and Graph3D classes from the Graphing a function in three dimensions recipe in Chapter 9, Creating Three-Dimensional Graphs.

How to do it...