dojox/charting/StoreSeries.js

  • Provides:

    • dojox.charting.StoreSeries
  • dojox.charting.StoreSeries

    • type
      Function
    • parameters:
      • store: (typeof Object)
        A dojo object store.
      • kwArgs: (typeof Object)
        A store-specific keyword parameters used for querying objects.
        See dojo.store docs
      • value: (typeof Function|Object|String|Null)
        Function, which takes an object handle, and
        produces an output possibly inspecting the store's item. Or
        a dictionary object, which tells what names to extract from
        an object and how to map them to an output. Or a string, which
        is a numeric field name to use for plotting. If undefined, null
        or empty string (the default), "value" field is extracted.
    • source: [view]
        this.store = store;
        this.kwArgs = kwArgs;


        if(value){
         if(typeof value == "function"){
          this.value = value;
         }else if(typeof value == "object"){
          this.value = function(object){
           var o = {};
           for(var key in value){
            o[key] = object[value[key]];
           }
           return o;
          };
         }else{
          this.value = function(object){
           return object[value];
          };
         }
        }else{
         this.value = function(object){
          return object.value;
         };
        }


        this.data = [];


        this.fetch();
    • summary
      Series adapter for dojo object stores (dojo.store).
  • dojox.charting.StoreSeries.destroy

    • type
      Function
    • source: [view]
        if(this.observeHandle){
         this.observeHandle.dismiss();
        }
    • summary
      Clean up before GC.
  • dojox.charting.StoreSeries.setSeriesObject

    • type
      Function
    • parameters:
      • series: (typeof dojox.charting.Series)
        Our interface to the chart.
    • source: [view]
        this.series = series;
    • summary
      Sets a dojox.charting.Series object we will be working with.
  • dojox.charting.StoreSeries.fetch

    • type
      Function
    • source: [view]
        var objects = this.objects = [];
        var self = this;
        if(this.observeHandle){
         this.observeHandle.dismiss();
        }
        var results = this.store.query(this.kwArgs.query, this.kwArgs);
        dojo.when(results, function(objects){
         self.objects = objects;
         update();
        });
        if(results.observe){
         this.observeHandle = results.observe(update, true);
        }
        function update(){
         self.data = dojo.map(self.objects, function(object){
          return self.value(object, self.store);
         });
         self._pushDataChanges();
        }
    • summary
      Fetches data from the store and updates a chart.
  • dojox.charting.StoreSeries._pushDataChanges

    • type
      Function
    • source: [view]
        if(this.series){
         this.series.chart.updateSeries(this.series.name, this);
         this.series.chart.delayedRender();
        }
    • summary
  • dojox.charting.StoreSeries.series

    • summary
  • dojox.charting.StoreSeries.setSeriesObject.series

    • type
      dojox.charting.Series
    • summary
      Our interface to the chart.
  • dojox.charting.StoreSeries.objects

    • summary
  • dojox.charting.StoreSeries.observeHandle

    • summary
  • dojox.charting.StoreSeries.store

    • type
      Object
    • summary
      A dojo object store.
  • dojox.charting.StoreSeries.kwArgs

    • type
      Object
    • summary
      A store-specific keyword parameters used for querying objects.
      See dojo.store docs
  • dojox.charting.StoreSeries.value

    • type
      Function|Object|String|Null
    • parameters:
      • object: (typeof )
    • source: [view]
          return object.value;
    • summary
      Function, which takes an object handle, and
      produces an output possibly inspecting the store's item. Or
      a dictionary object, which tells what names to extract from
      an object and how to map them to an output. Or a string, which
      is a numeric field name to use for plotting. If undefined, null
      or empty string (the default), "value" field is extracted.
  • dojox.charting.StoreSeries.data

    • summary
  • dojox.charting

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary