Results 1 to 3 of 3

Thread: Reload the data of a chart on tap / click (for drilldown purpose)

  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    20
    Vote Rating
    0
      0  

    Default Reload the data of a chart on tap / click (for drilldown purpose)

    Hi,

    There's a piechart I must "reload" the data on tap.

    The screen shows an "overview" piechart. Each slice shows the sum of sub items. Tapping a slice must reload the pie chart, showing this time its details.

    Code:
            var chartPanel = new Ext.chart.Panel({
                title: 'Pie Chart',
                items: {
                    cls: 'pie1',
                    theme: 'Demo',
                    store: store,
                    interactions: [{
                    {
                        type: 'iteminfo',
                        gesture: 'tap',
                        listeners: {
                            show: function(interaction, item, panel) {
                                // doing stuff
    iteminfo will always popup a frame, in which the "show" listener's handling function may write data.

    I would like a type that simple exectues code.
    What could that be? Reading the API gave me a series of interactions, but none seem to help. Maybe I don't proceed the right way to perform this drill down?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    Why not make your own interaction? In the onGesture method load the store instead of showing a panel or something
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Jun 2009
    Posts
    47
    Answers
    3
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    Why not make your own interaction? In the onGesture method load the store instead of showing a panel or something
    Why not actually? I removed it but it seems to work the same way and the documentation gives the following example:
    Code:
        new Ext.chart.Chart({
            renderTo: Ext.getBody(),
            width: 800,
            height: 600,
            animate: true,
            store: store1,
            shadow: true,
            theme: 'Category1',
            legend: {
                position: 'right'
            },
            axes: [ ...some axes options... ],
            series: [ ...some series options... ]
        });

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
  •