Book Image

Mastering ArcGIS Server Development with JavaScript

By : Raymond Kenneth Doman
Book Image

Mastering ArcGIS Server Development with JavaScript

By: Raymond Kenneth Doman

Overview of this book

Table of Contents (18 chapters)
Mastering ArcGIS Server Development with JavaScript
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using dojox charting


We should first look inside the ArcGIS API for JavaScript to see what it has to offer. We can access a host of charting resources with dojox/charting. The modules allow you to draw line graphs, pie charts, bar charts, and a whole host of other graphs and charts in a browser. It contains numerous canned themes to show your data, and it can be extended with your custom themes as well. The charting libraries can render in Scalable Vector Graphics (SVG), Vector Markup Language (VML), Silverlight, and Canvas, making them both progressive and backwards-compatible for older browsers like IE7.

Like most Dojo components, dojox/charting can render charts either declaratively within your HTML, or programmatically through JavaScript. Declarative charting takes advantage of the data-dojo attributes. In the exercises that follow, we'll explore the programmatic examples, since they are more dynamic and easier to troubleshoot when things go wrong.

Creating a chart in JavaScript

There is...