Book Image

Learning Ext JS_Fourth Edition

Book Image

Learning Ext JS_Fourth Edition

Overview of this book

Table of Contents (22 chapters)
Learning Ext JS Fourth Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Charts


Now that you have an idea of how the drawing package works, you are ready to see how the Ext JS library uses package capabilities in the chart package.

The chart package is a set of classes that define a chart container to manage axes, legends, series, labels, tips, Cartesian and radial coordinates, and specific series, such as Pie, Area, Bar, Radar, Gauge, and so on.

As we have said before, charts is a package inside the framework and doesn't come as part of the core or widgets, so we need to define it on Ext.Loader, and also inside our application's app.json file (we will cover this later).

It's important to mention that every chart must have three components: data, axes, and a series. These components can be seen in the following diagram:

In the previous figure, you can see the basic parts of a chart and some custom elements.

Legend

The chart configuration object accepts a legend parameter to enable legend items for each series and set the position of the legend, as follows:

legend: ...