1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    26
    Vote Rating
    3
    gisada is on a distinguished road

      0  

    Default Unanswered: A problem with filterby and graph

    Unanswered: A problem with filterby and graph


    Hi I am having a problem with a graph. I have a json file behind it and I have two data series in the file and I am trying to toggle between the series with the radio buttons. When I first render the graph I use a default filter but when I use the radio buttons I use filterby method. Everything works fine in Firefox but in IE I get both of the data series at once. There are images of the graph below. Any suggestions would be kindly appreciated.

    The store:
    Code:
    Ext.define('TestGA.store.StoreGraf', {
        extend: 'Ext.data.Store',
        model: 'TestGA.model.ModelGraf',
        autoLoad: true,
        storeId: 'StoreGraf',
        proxy: {
            type: 'ajax',
            url: '/Test/data/DataGraf.json',
            reader: {
                type: 'json',
                root: 'rows'
            }
        } 
        ,filters: [
        {
            property: 'KPI',
            value   : /a/
        }
        ] 
    });
    The controll:
    Code:
    Ext.define('TestGA.controller.Controll', {
        extend: 'Ext.app.Controller',
        stores: ['StoreGraf'],
        models: ['ModelGraf'],
        views : ['TestGA.view.ViewGraf'],
        init: function() {
            this.control({
                'viewgraf > #tableAndRadio > #radioValues': {change: this.onTest}
                });
        },
        onTest: function() {    
            var radiovalue = Ext.getCmp('radioValues').getValue()['val'];
            console.log(radiovalue);
            var store = this.getStoreGrafStore();
            filterCheck = function(record) {
            if(Ext.Array.contains(radiovalue, record.get('KPI')) == true) {return true} else {return false};
            };
            store.filterBy(filterCheck, this);
        }
        
    });
    Image of the graph in IE:
    skermbilde.jpg

    Image of the same graph in Firefox:
    Skermbilde2.jpg

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,013
    Answers
    3490
    Vote Rating
    848
    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


    Sounds like an issue with the VML engine not cleaning itself up. What version are you testing on? Have you used 4.1.0 b2?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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
    Nov 2011
    Posts
    26
    Vote Rating
    3
    gisada is on a distinguished road

      0  

    Default


    Yes I have tried it but I got a totally blank page for the graph when I did so I did not go further with that. Would you recommend that I try 4.1?

  4. #4
    Sencha User
    Join Date
    Nov 2011
    Posts
    26
    Vote Rating
    3
    gisada is on a distinguished road

      0  

    Default


    I have tried the 4.1.0 b2 and I have the same problem there. It seam as if the filterby() does not work in IE in my case. Is there any other way to do this filtering? It is a shame because I am doing a pilot project and if I cant get this to work then I will not be able to use Ext js for the project.

Thread Participants: 1