1. #1
    Sencha User
    Join Date
    Jan 2010
    Posts
    35
    Answers
    3
    Vote Rating
    0
    Pacos is on a distinguished road

      0  

    Default Answered: Chart label not displayed & no animation

    Answered: Chart label not displayed & no animation


    Hello,

    I'm trying to display a label on a Gauge chart. Nothing fancy, but the label doesn't shows up. The animation doesn't work either. Here is an extract of the code :

    Code:
            var dshSumStore = new Ext.data.JsonStore({
                autoDestroy: true,
                storeId: 'dshSumStore',
                proxy: {
                    type: 'ajax',
                    url: 'Controller?action=dslist',
                    reader: {
                        type: 'json',
                        root: 'dshSum',
                        idProperty: 'id'
                    }
                },
                fields: ['id', 'itm', 'bi']
            });
            dshSumStore.load();
    
        var gaugeBI = Ext.create('Ext.chart.Chart', {
                style: 'background:#fff',
                animate: {
                    easing: 'bounceOut',
                    duration: 500
                },
                store: dshSumStore,
                flex: 1,
                width: 300,
                height: 200,
                axes: [{
                    type: 'gauge',
                    position: 'gauge',
                    minimum: 0,
                    maximum: 10000,
                    steps: 4,
                    margin: -10
                }],
                series: [{
                    type: 'gauge',
                    field: 'bi',
                    donut: 70,
                    colorSet: ['#3AA8CB', '#ddd'],
                    label: {
                        display: 'over',
                        field: 'bi',
                        renderer: function(v) { return v + ' euros'; }
                    }
                }]
            });
    Any idea/suggestion/critic would be welcome !

  2. Your animation settings are fine, they only animate when new data is loaded. The initial data load won't cause an animation.

    As far as I can tell labels aren't supported by gauge charts. Those same label settings work fine if you change the series type to pie.

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,568
    Answers
    538
    Vote Rating
    306
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Your animation settings are fine, they only animate when new data is loaded. The initial data load won't cause an animation.

    As far as I can tell labels aren't supported by gauge charts. Those same label settings work fine if you change the series type to pie.

Thread Participants: 1