Opened 7 years ago

Closed 4 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"], 
    6666
    6767       // store fetch loop
    6868
    69        fetch: function(){
     69       fetch: function(query, options){
    7070           // summary:
    7171           //      Fetches data from the store and updates a chart.
    7272           var self = this;
    7373           if(this.observeHandle){
    7474               this.observeHandle.remove();
    7575           }
    76            var results = this.store.query(this.kwArgs.query, this.kwArgs);
     76           var results = this.store.query(query || this.kwArgs.query, options || this.kwArgs);
    7777           Deferred.when(results, function(objects){
    7878               self.objects = objects;
    7979               update();

Change History (2)

comment:1 Changed 4 years ago by dylan

Milestone: tbd1.11
Owner: changed from Eugene Lazutkin to dylan
Status: newassigned

comment:2 Changed 4 years ago by dylans <dylan@…>

Resolution: fixed
Status: assignedclosed

In 3342214be86a085fda80c21a17400539b7094d68/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.