Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3623 in a recent build.
  1. #1
    Sencha User jep's Avatar
    Join Date
    Sep 2010
    Posts
    862
    Vote Rating
    21
    jep will become famous soon enough jep will become famous soon enough

      0  

    Default Ext.chart.AbstractChart#getItemForPoint does not ignore hidden series

    Ext.chart.AbstractChart#getItemForPoint does not ignore hidden series


    In ST2.1 RC2, Ext.chart.AbstractChart#getItemForPoint simply does this:
    Code:
        getItemForPoint: function (x, y) {
            var me = this,
                i = 0,
                items = me.getSeries(),
                l = items.length,
                series, item;
    
            for (; i < l; i++) {
                series = items[i];
                item = series.getItemForPoint(x, y);
                if (item) {
                    return item;
                }
            }
    
            return null;
        },
    It does not do any checking to see if the series is actually hidden. This seems like quite an oversight. My preference would be to change it to:

    Code:
        getItemForPoint: function (x, y, includeHidden) {
            var me = this,
                i = 0,
                items = me.getSeries(),
                l = items.length,
                series, item;
    
            for (; i < l; i++) {
                series = items[i];
                if (includeHidden || !series.getHidden()) {
                    item = series.getItemForPoint(x, y);
                    if (item) {
                        return item;
                    }
                }
            }
    
            return null;
        },
    That way, if you really wanted to you could include the hidden ones but the default would be to hide them. Honestly, I really don't see the use case where you need to find out which hidden series point is at a certain coordinate.

    Similar things apply for getItemsForPoint (the plural version).

  2. #2
    Sencha User jep's Avatar
    Join Date
    Sep 2010
    Posts
    862
    Vote Rating
    21
    jep will become famous soon enough jep will become famous soon enough

      0  

    Default


    I was using this with interactions. As I dug into it more, I think there's the same issue upstream in ItemPublisher#relayMethod. It's the code that actually gets called to fire off the interactions. But it's not as obvious to me how a fix should be work with that code.

  3. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,059
    Vote Rating
    851
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

Thread Participants: 1