1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    13
    Vote Rating
    0
    rans is on a distinguished road

      0  

    Default Unanswered: update chart pie after filter

    Unanswered: update chart pie after filter


    hi,

    I am having problem with filtering my chart fields.
    I have a chart pie that contain some fields. the user can filtering the chart pie and select which fields he want to see.
    the problem is if the pie had 8 fields and now the user selecet only 6 fields, the filtering filter only the data but not filter the fields as well.

    for example, if I have the fields
    {name:'Asia','data1':9, sex:'Male'},
    {name:'Africa','data1':2, sex:'Male'},
    {name:'Europe','data1':5, sex:'Female'},
    {name:'USA','data1':3, sex:'Male'},

    and I want to filter Asia, Africa and Europe, I can still see the USA name fields.

    the code:
    storeIng.filterBy(function(record,id){
    var fieldName = record.get('name')
    for(var i = 0; i < fields.length; i++) {
    if (fields[i] === fieldName)
    return true;
    }
    return false;
    });

    I add screen shots as well



    1.jpg2.jpg

    thanks
    ran

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Answers
    3462
    Vote Rating
    828
    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


    The pie should change automatically when the store changes as long as the events on the store fire.
    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
    Oct 2012
    Posts
    13
    Vote Rating
    0
    rans is on a distinguished road

      0  

    Default


    the pie change but it seems like I have a "ghost" field as you can see on the attheched pics.
    moreover, I did the same action on ext-4.0.7-gpl/examples/charts/Pie.html

    handler: function() {
    //store1.loadData(generateData(6, 20));
    fields = ["June", "May"];
    store1.filterBy(function(record,id){
    var fieldName = record.get('name')
    for(var i = 0; i < fields.length; i++) {
    if (fields[i] === fieldName)
    return true;
    }
    return false;
    });
    }

    and the result remain the same, I have a ghost fields of all the other month.

Thread Participants: 1

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