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

Theming your chart


By default, Sencha Charts uses a theme to draw series, axis, labels, and legends. This is the reason we did not have to provide any color or style related configuration to the charts that we created in the earlier topics.

This default theme may not be suitable for your application because the colors do not gel well with your application theme. There are three ways in which we can theme our chart:

  • Using various style-related configurations: Sencha Charts provides various configurations at different levels to style different sections of a chart. For example, the chart component has configurations such as background, cls, gradients, and style. Similarly, axis has background, grid, style, and renderer. Series has background, animation, colors, markerSubStyle, style, subStyle, useDarkerStrokeColor and renderer. Likewise, label has display, color, font, orientation, and renderer configurations to style it.

  • Creating a custom theme and applying it to the chart: In this approach...