Results 1 to 5 of 5

Thread: How to get access to selected item's series in Ext.chart.Panel?

Hybrid View

Previous Post Previous Post   Next Post Next Post
    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    15
    Vote Rating
    0
      0  

    Default Unanswered: How to get access to selected item's series in Ext.chart.Panel?

    Hi,

    I was going through the bar chart example http://dev.sencha.com/deploy/touch-c.../examples/Bar/ , may i know how to get hold of the selected item's series. I mean, if i select a bar in the chart i need to get what month, value and also year (2008/2009/2010) the item falls.

    Regards
    Ranjith.G

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

    Default

    It's in the interactions
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

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

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    15
    Vote Rating
    0
      0  

    Default

    Hi,

    I have tried using interactions, but i couldn't find the solution to get selected items series value e.g. Mar 2009 in the bar chart example. Can you please provide a code snippet to get this value.

    Regards
    Ranjith.G

  4. #4
    Sencha User
    Join Date
    May 2012
    Posts
    6
    Vote Rating
    0
      0  

    Default

    Yes, I know this is an old post. But I figured it would be better served to post a reply here. I too would like a code snippet as I have run into a similar snag. I've already RTFM and can't find it "in the interactions".

  5. #5
    Sencha User
    Join Date
    Jul 2009
    Posts
    15
    Answers
    1
    Vote Rating
    1
      0  

    Default

    this should be helpful

    Code:
    interactions: [{
    	            type: 'iteminfo',
    	            gesture:'singletap',
    	            panel:{
    		            modal: false,
    		            centered: false,
    		            width:'80px',
    		            maxWidth: 150,
    		            cls:'chart-tooltip',
    		            bodyPadding:'4px 10px',
    		            renderTo: Ext.getBody(), 
    	            },
    		        listeners: {
    		            show: function(me, item, panel, e) {
    		                panel.setPosition(e.pageX, e.pageY);
    panel.update(item.value[0] +' :' + item.value[1]); //item.value gives x-axis n y-axis values of the selected or tapped item
    		                
                   	},
    	        }],

Posting Permissions

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