Opened 8 years ago
Closed 5 years ago
#16870 closed enhancement (fixed)
[patch][ccla] charting: provide a way to change the query for a store series
Reported by: | ben hockey | Owned by: | dylan |
---|---|---|---|
Priority: | undecided | Milestone: | 1.11 |
Component: | Charting | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
currently, to change the query for a StoreSeries? it feels a bit dirty to do:
series.kwArgs.query = aNewQuery; series.fetch();
perhaps there's a way to allow a new query
and options
to be passed to fetch
(or a new method with a different name)?
series.fetch(query, options);
it's possible that i've oversimplified it but i think the patch below would support what i'm thinking of
-
charting/StoreSeries.js
diff --git a/charting/StoreSeries.js b/charting/StoreSeries.js index 68342b3..ea07760 100644
a b define(["dojo/_base/array", "dojo/_base/declare", "dojo/_base/Deferred"], 66 66 67 67 // store fetch loop 68 68 69 fetch: function( ){69 fetch: function(query, options){ 70 70 // summary: 71 71 // Fetches data from the store and updates a chart. 72 72 var self = this; 73 73 if(this.observeHandle){ 74 74 this.observeHandle.remove(); 75 75 } 76 var results = this.store.query( this.kwArgs.query,this.kwArgs);76 var results = this.store.query(query || this.kwArgs.query, options || this.kwArgs); 77 77 Deferred.when(results, function(objects){ 78 78 self.objects = objects; 79 79 update();
Change History (2)
comment:1 Changed 5 years ago by
Milestone: | tbd → 1.11 |
---|---|
Owner: | changed from Eugene Lazutkin to dylan |
Status: | new → assigned |
comment:2 Changed 5 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
In 3342214be86a085fda80c21a17400539b7094d68/dojox: