Sha256: 880ec55c73fe9970418a1f56431fc5b46bab65eae82d36fa4204af027fba6e78
Contents?: true
Size: 1.61 KB
Versions: 1
Compression:
Stored size: 1.61 KB
Contents
define("dojox/charting/plot2d/Stacked", ["dojo/_base/declare", "./Default", "./commonStacked"], function(declare, Default, commonStacked){ return declare("dojox.charting.plot2d.Stacked", Default, { // summary: // Like the default plot, Stacked sets up lines, areas and markers // in a stacked fashion (values on the y axis added to each other) // as opposed to a direct one. getSeriesStats: function(){ // summary: // Calculate the min/max on all attached series in both directions. // returns: Object // {hmin, hmax, vmin, vmax} min/max in both directions. var stats = commonStacked.collectStats(this.series); this._maxRunLength = stats.hmax; return stats; // Object }, buildSegments: function(i, indexed){ var run = this.series[i], max = indexed?Math.min(run.data.length-1, Math.ceil(this._hScaler.bounds.to-this._hScaler.bounds.from)):run.data.length-1, rseg = null, segments = []; // split the run data into dense segments (each containing no nulls) // except if interpolates is false in which case ignore null between valid data for(var j = 0; j <= max; j++){ var value = indexed ? commonStacked.getIndexValue(this.series, i, j) : commonStacked.getValue(this.series, i, run.data[j] ?run.data[j].x: null); if(value != null && (indexed || value.y != null)){ if(!rseg){ rseg = []; segments.push({index: j, rseg: rseg}); } rseg.push(value); }else{ if(!this.opt.interpolate || indexed){ // we break the line only if not interpolating or if we have indexed data rseg = null; } } } return segments; } }); });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dojox-rails-0.11.0 | vendor/assets/javascripts/charting/plot2d/Stacked.js.uncompressed.js |