1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    21
    Vote Rating
    -3
    AlphaBravo can only hope to improve

      0  

    Default Store(chart) multi-filters

    Store(chart) multi-filters


    Hi there,

    I'm trying to dynamically add filters to a store for Ext.chart.Chart. My problem is that it doesn't allow multi-filtering.

    Code:
        doFiltering: function(view,node,group) {
            var me = this,
                store = view.up('window').down('chart').store,
                filterList = [],
                found = false;
    
    
            store.filters.each(function(f) {
                if (f.value === group) {
                    found = true;
                } else {
                    filterList.push( Ext.create('Ext.util.Filter', {property: 'FuelStationName', value: f.value, root: 'data'}));
                }
            });
    
    
            if(!found) {
                filterList.push( Ext.create('Ext.util.Filter', {property: 'FuelStationName', value: group, root: 'data'}));
            }
    
    
            store.clearFilter(true);
            store.filter(filterList);
            console.log(filterList);
            view.up('window').down('chart').redraw();
        }
    So far, it only filters for 1 item (the first item as far as i know) in the filterList array.

    Any ideas?
    Last edited by AlphaBravo; 2 May 2012 at 1:58 AM. Reason: Code tags

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Posts
    21
    Vote Rating
    -3
    AlphaBravo can only hope to improve

      0  

    Default


    Bump

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar