1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    9
    Vote Rating
    0
    crummy is on a distinguished road

      0  

    Default Unanswered: Scatter plot update after store filter

    I have 2 charts to display. I am trying to apply a data filter to chart B's store when user mouse overs on chart A content - simple enough i think. [chart A - tooltip listener code given below]
    Code:
        listeners : {                            'itemmouseover' : function(item) {
    
    
                                    var filterID = Number(item.storeItem.data.ID);
                                    eventsXmlStore.clearFilter(); //clear any other filters that may apply
                                
                                    //dbTimeChart.surface.removeAll(true);
                                    eventsXmlStore.filter("WAITS_PER_MIN", 158.7); //eventsXmlStore - store for Chart - B                                dbTimeChart.refresh();
                                    dbTimeChart.redraw(true);
                                }
    
                            }


    Filter works well, I've logged the data coming from the newly filtered store. But when it comes to chart.reDraw(), my chart's new sprite gets tossed to the corner of the container, the old sprites from the unfiltered store remain on chart B with stripped labels. Is there a clean way to refresh scatter charts after filtering their store?

    Thanks!

  2. #2
    Sencha User
    Join Date
    Jun 2012
    Posts
    9
    Vote Rating
    0
    crummy is on a distinguished road

      0  

    Default update

    I'm on EXT JS 4.1 RC2

  3. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,251
    Vote Rating
    485
    Answers
    694
    scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute

      0  

    Default

    Please upgrade to 4.1.1 GA and report back.

    Regards,
    Scott

  4. #4
    Sencha User
    Join Date
    Jun 2012
    Posts
    9
    Vote Rating
    0
    crummy is on a distinguished road

      0  

    Default

    Thanks for your reply.
    Treading slightly off-topic - I'm planning to roll back to 3.4 as it seems that chart axis "reverse" config option is not supported on 4.1 - (the option was missing in 4.1.1 rc2 src code as well as documentation) Would this be available on 4.1.1 GA?

  5. #5
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,251
    Vote Rating
    485
    Answers
    694
    scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute

      0  

    Default

    I am not sure without researching ... as I am sure you are aware, Ext3 uses YUI charts (flash), where Ext4 uses native JS charts.

    Scott.

  6. #6
    Sencha User
    Join Date
    Jun 2012
    Posts
    9
    Vote Rating
    0
    crummy is on a distinguished road

      0  

    Default

    Ah, you have saved me some sweet time!
    I started playing with the latest version of ExtJS last month so I wasnt aware of the history. Flash wont do, will give GA a go and report back.

  7. #7
    Sencha User
    Join Date
    Jun 2012
    Posts
    9
    Vote Rating
    0
    crummy is on a distinguished road

      0  

    Default workaround

    There was a refresh problem even on 4.1 GA when different filters are being applied continuously to a store. I wanted the chart to be drawn *only* when a new filter is applied so sprites from the unfiltered store are not left behind on the surface(clustered in a corner awkwardly)

    My WA was to unbind chart from data store each time I need to swap filters:

    Code:
                                                                    myTimeChart.bindStore();								myXmlStore.clearFilter();
    								myTimeChart.series.getAt(0).hideAll(); //delay series display
    								myXmlStore.filter("ID", filterID);
    								myXmlStore.load()
    								myXmlStore.sort('SOME_COL',
    										'DESC');
    								myTimeChart.bindStore(myXmlStore);
    								myTimeChart.series.getAt(0).showAll();
    								myTimeChart.redraw(true);

  8. #8
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    13
    Vote Rating
    0
    Answers
    1
    Dan@Glooko is on a distinguished road

      0  

    Default

    crummy's code block reformatted a bit:

    Quote Originally Posted by crummy View Post
    Code:
    myTimeChart.bindStore();
    myXmlStore.clearFilter();
    myTimeChart.series.getAt(0).hideAll(); //delay series display
    myXmlStore.filter("ID", filterID);
    myXmlStore.load()
    myXmlStore.sort('SOME_COL', 'DESC');
    myTimeChart.bindStore(myXmlStore);
    myTimeChart.series.getAt(0).showAll();
    myTimeChart.redraw(true);

Thread Participants: 2

Tags for this Thread