Book Image

Sencha Charts Essentials

By : Ajit Kumar
Book Image

Sencha Charts Essentials

By: Ajit Kumar

Overview of this book

Table of Contents (16 chapters)
Sencha Charts Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Styling using configs


The first mechanism to style different aspects of a chart is using the various configurations available on different Sencha Charts classes. Let's review them one by one.

Chart

The AbstractChart class is the base class for different types of charts. This class offers various configurations that we can use to style a chart. In this section, we will look at the chart level configurations and you will learn how to style different aspects of a chart.

Framing

To create a nice frame around the chart, we can use the shadow config. The only thing that we have to take note of is that it can be used only if the chart is a floating component. So, once we set up the following configuration on our cartesian chart, we have to additionally pass the height, width, and autoShow properties:

...
title: 'Chart',

height: 500,
width: 500,
autoShow: true,

floating: true,
shadow: true,
...

This is done as it is a floating component and does not have a parent container, and hence whether it needs...