Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    39
    Vote Rating
    0
    cdiscla is on a distinguished road

      0  

    Default Unanswered: How can i handle TAP on Bar chart?

    Unanswered: How can i handle TAP on Bar chart?


    Hello,
    i've successflully implemented a Bar chart; now i would like to trap the user touch. I've tried by using Interactions but cannot get it.

    Can anyone help me?
    Thanks
    c.

  2. #2
    Sencha User
    Join Date
    Jul 2011
    Posts
    12
    Vote Rating
    0
    Cangot is on a distinguished road

      0  

    Default


    Hi,

    you have an example of iteminfo on bar chart here, except the gesture is 'taphold' :
    http://dev.sencha.com/deploy/touch-c.../examples/Bar/

    Code:
    interactions: [
    {
                        type: 'iteminfo',
    // REMOVE TAPHOLD
                        panel: {
                            dockedItems: [{
                                dock: 'top',
                                xtype: 'toolbar',
                                title: 'Details'
                            }],
    
                            html: 'Testing'
                        },
                        listeners: {
                            'show': function(me, item, panel) {
                                panel.update('<ul><li><b>Month:</b> ' + item.value[0] + '</li><li><b>Value: </b> ' + item.value[1] + '</li></ul>');
                            }
                        }
                    }
    ]

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    39
    Vote Rating
    0
    cdiscla is on a distinguished road

      0  

    Default


    Thank you,
    but i don't want to show an Info panel; when the user taps a bar i need to get the tapped item and call another view.
    How can i do it?

  4. #4
    Sencha User
    Join Date
    Jul 2011
    Posts
    12
    Vote Rating
    0
    Cangot is on a distinguished road

      0  

    Default


    Then you can use the itemhighlight :

    Code:
    interactions: [{
                         type: 'itemhighlight',
                         gesture:'tap',
                         onGesture : function() {                               
                                    // do your stuff here
                            }
                    }
    ]

  5. #5
    Sencha User
    Join Date
    Aug 2011
    Posts
    39
    Vote Rating
    0
    cdiscla is on a distinguished road

      0  

    Default


    But the onGesture event does not carry infos on the clicked item, isn't it? I need to know which item was clicked.
    Thanks for your attention

  6. #6
    Sencha User
    Join Date
    Aug 2011
    Posts
    39
    Vote Rating
    0
    cdiscla is on a distinguished road

      0  

    Question


    ....so it seems that the touch on a column cannot be handled? I can't believe it's true, there must be a solution.

  7. #7
    Sencha User
    Join Date
    Aug 2011
    Posts
    39
    Vote Rating
    0
    cdiscla is on a distinguished road

      0  

    Exclamation


    I was thinking to use Sencha Charts for my app where i need to show chart, click on an element and then showing another chart based on the clicked item.
    If i cannot get the clicked item it is useless for me and need to find another library.
    Can anyone help me in finding a solution?

  8. #8
    Sencha User
    Join Date
    Sep 2011
    Posts
    11
    Vote Rating
    0
    andresantos is on a distinguished road

      0  

    Thumbs up


    Sorry revive an old topic, but someone can still need a solution for this. Looking in the source code, I found how can handle a bar item click:

    Code:
    interactions: [{
                          type: 'itemhighlight',
                          gesture:'tap',
                          onGesture : function(a) {                               
                                    var item = this.getItemForEvent(a);    
                                    //Do your stuff with item
                            }                 } ]

  9. #9
    Sencha User
    Join Date
    Aug 2011
    Posts
    39
    Vote Rating
    0
    cdiscla is on a distinguished road

      0  

    Default


    Thank you very much, andre
    this was the solution !!
    Thanks and greetings !
    c.

  10. #10
    Sencha User
    Join Date
    Dec 2011
    Location
    Hyderabad, India
    Posts
    117
    Answers
    6
    Vote Rating
    5
    Naga is on a distinguished road

      0  

    Default


    You can add your own function in touch-charts-debug.js and refer it in interactions of your chart.

    I tried with that and it justed worked fine for me .

    Thanks,
    Nag

Thread Participants: 3

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi