1. #1
    Sencha User atian25's Avatar
    Join Date
    Oct 2008
    Location
    china
    Posts
    114
    Vote Rating
    2
    atian25 is on a distinguished road

      0  

    Default [Overridde]Ext.chart.Chart

    [Overridde]Ext.chart.Chart


    1.more js style code,no as-like
    2.add some fn to filter data

    Code:
    Ext.override(Ext.chart.Chart,{
      /**
       * override the as-like code, and add some interface for filter data
       */
      refresh : function(){
        var dataProvider = [];
        if(!this.series){
          dataProvider.push({
            type: this.type, 
            dataProvider: this.collectData(this.store)
          });
        }else{
          var styleChanged = false;
          var seriesCount = this.series.length;
          for(var i = 0; i < seriesCount; i++){
            var currentSeries = this.series[i];
            //make a copy of the series definitions so that we aren't editing them directly.
            var item = {};
            Ext.apply(item,currentSeries,{
              type:this.type,
              queryFn:this.queryFn,
              prepareData:this.prepareData,
              collectData: this.collectData
            });
            //encode the style
            if(currentSeries.style){
              item.style = Ext.encode(currentSeries.style);
              styleChanged = true;
            }
            //collect the data for this series
            item.dataProvider = item.collectData(this.store);
            dataProvider.push(item);
            item=null;
          }
        }
        this.swf.setDataProvider(dataProvider);
      },
      
      /**
       * Function which can be overridden to provide custom formatting for each Record
       * ^_^ some code in DataView
       */
      prepareData:function(obj,index,record){
        return obj;
      },
      /**
       * filter some data for some series
       */
      queryFn:function(record,id){
        return true;
      },
      /**
       * Use for each series, if u want to filter some data for some series.notify these is function queryFn
       * ^_^ also from DataView,and make some changes.
       */
      collectData:function(store){
        var records = store.queryBy(this.queryFn).getRange();
        var r = [];
        for(var i = 0, len = records.length; i < len; i++){
          r[r.length] = this.prepareData(records[i].data, i, records[i]);
        }
        return r;
      },
      /**
       * add if
       */
      setSeries : function(series){
        this.series = series;
        if(this.isInitialized){
          this.refresh();
        }
      },
      tz:''
    });

  2. #2

Thread Participants: 1

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