Results 1 to 3 of 3

Thread: Using itemevents in Touch Charts 2

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    30

    Default Using itemevents in Touch Charts 2

    Hello,

    I'm trying to use itemEvents with touch chart 2 but I can not figure out how to use it. The doc only shows the list of all events and not how to use them. Can you point me to a tutorial or quickly show me how it works please.

    Thanks

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,448

    Default

    Code:
    Ext.create('Ext.chart.Chart', {
        ...
    
        listeners : {
            itemtap : function(series, item, e, opts) {}
        }
    });
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    30

    Default

    Here is what I do and my event never gets fired :

    Code:
    Ext.setup({
        onReady: function() {
            new Ext.chart.Panel({
                fullscreen: true,
                chart: new Ext.chart.Chart({
                    store: new Ext.data.JsonStore({
                        fields: ['mois', 'poids'],
                        data: [{
                            mois: 'Janvier',
                            poids: 60
                        }, {
                            mois: 'Fvrier',
                            poids: 70
                        }, {
                            mois: 'Mars',
                            poids: 80
                        }]
                    }),
                    axes: [{
                        type: 'Numeric',
                        position: 'left',
                        fields: ['poids']
                    }, {
                        type: 'Category',
                        position: 'bottom',
                        fields: ['mois']
                    }],
                    series: [{
                        type:'line',
                        axis:'left',
                        xField:'mois',
                        yField:'poids'
                    }],
                    listeners: {
                        itemclick: function() {
                            console.log(arguments);
                        }
                    }
                })
            });
        }
    });
    Thanks for your help.

Posting Permissions

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