O'Reilly logo

Learning Ext JS - Fourth Edition by Armando Gonzalez, Crysfel Villa, Carlos A. Méndez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introducing chart themes

Chart themes are classes that contain preconfigured looks for our charts. This one has been added to the Ext JS framework since version 5.0.1. So, for you to get a clearer idea, let's take a look at the ext-5.x.x/packages/sencha-charts/src/chart/theme folder. You will see many files, as shown here:

Introducing chart themes

These files or themes (classes) extend the Ext.chart.theme.Base class. Also, these classes are singleton (singleton:true) in order to use the same instance when referenced. As an example, let's make a duplicate of the first code example (bar chart):

  1. Define a new chart theme as follows:
    Ext.require([ 'Ext.*', 'Ext.draw.*', 'Ext.chart.*' ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required