Results 1 to 3 of 3

Thread: Ext 4 Chart Themes - where are they?

  1. #1
    Sencha User loiane's Avatar
    Join Date
    Aug 2009
    Posts
    191
    Vote Rating
    63
      0  

    Default Ext 4 Chart Themes - where are they?

    Hi,

    I was looking at the chart examples and I saw many of them uses the 'Category2' theme, but I could not find it.

    Code:
    Ext.create('Ext.chart.Chart', {
     *         renderTo: Ext.getBody(),
     *         width: 500,
     *         height: 300,
     *         animate: true,
     *         theme:'Category2',
     *         store: store,
     *         axes: [{
     *             type: 'Radial',
     *             position: 'radial',
     *             label: {
     *                 display: true
     *             }
     *         }],
    Does anyone know where I can find the declaration of this theme?
    Sencha/Java evangelist
    Author of ExtJS 4 First Look and Mastering Ext JS books
    English blog: http://loianegroner.com
    Portuguese blog: http://loiane.com
    Sencha Examples: https://github.com/loiane

  2. #2
    Sencha User nickbretz's Avatar
    Join Date
    Jul 2011
    Location
    Kansas City, MO
    Posts
    12
    Vote Rating
    3
      0  

    Default

    You can find it in the file extjs/src/chart/theme/Base.js

    Code:
        //Create theme from color array
        for (i = 0; i < cats; i++) {
            themes['Category' + (i + 1)] = (function(category) {
                return Ext.extend(themes.Base, {
                    constructor: function(config) {
                        themes.Base.prototype.constructor.call(this, Ext.apply({
                            colors: category
                        }, config));
                    }
                });
            })(categories[i]);
        }

  3. #3
    Sencha Premium Member dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,093
    Vote Rating
    56
      0  

    Default

    Charts are based on our draw library (aka SVG) so they have their own themes.

    Category1 to Category6 and various others, plus you can create your own themes and apply them.

    there is an example here in the docs
    Lead Trainer / Sencha Specialist
    Community And Learning Systems

    Lead Architect
    DigitalTickets.net

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •