diff options
author | 2008-11-13 09:49:11 +0000 | |
---|---|---|
committer | 2008-11-13 09:49:11 +0000 | |
commit | e44a7e37b6c7b5961adaffc62b9042b8d442938e (patch) | |
tree | 95b67c356e93163467db2451f2b8cce84ed5d582 /includes/js/dojox/charting/plot2d/Base.js | |
parent | a62b9742ee5e28bcec6872d88f50f25b820914f6 (diff) | |
download | scuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.gz scuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.zip |
New feature: basic Ajax suggestion for tags and implementation of Dojo toolkit
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/charting/plot2d/Base.js')
-rw-r--r-- | includes/js/dojox/charting/plot2d/Base.js | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/includes/js/dojox/charting/plot2d/Base.js b/includes/js/dojox/charting/plot2d/Base.js new file mode 100644 index 0000000..c894ce3 --- /dev/null +++ b/includes/js/dojox/charting/plot2d/Base.js @@ -0,0 +1,60 @@ +if(!dojo._hasResource["dojox.charting.plot2d.Base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. +dojo._hasResource["dojox.charting.plot2d.Base"] = true; +dojo.provide("dojox.charting.plot2d.Base"); + +dojo.require("dojox.charting.Element"); +dojo.require("dojox.charting.plot2d.common"); + +dojo.declare("dojox.charting.plot2d.Base", dojox.charting.Element, { + clear: function(){ + this.series = []; + this._hAxis = null; + this._vAxis = null; + this.dirty = true; + return this; + }, + setAxis: function(axis){ + if(axis){ + this[axis.vertical ? "_vAxis" : "_hAxis"] = axis; + } + return this; + }, + addSeries: function(run){ + this.series.push(run); + return this; + }, + calculateAxes: function(dim){ + return this; + }, + render: function(dim, offsets){ + return this; + }, + getRequiredColors: function(){ + return this.series.length; + }, + + // utilities + _calc: function(dim, stats){ + // calculate scaler + if(this._hAxis){ + if(!this._hAxis.initialized()){ + this._hAxis.calculate(stats.hmin, stats.hmax, dim.width); + } + this._hScaler = this._hAxis.getScaler(); + }else{ + this._hScaler = {bounds: {lower: stats.hmin, upper: stats.hmax}, + scale: dim.width / (stats.hmax - stats.hmin)}; + } + if(this._vAxis){ + if(!this._vAxis.initialized()){ + this._vAxis.calculate(stats.vmin, stats.vmax, dim.height); + } + this._vScaler = this._vAxis.getScaler(); + }else{ + this._vScaler = {bounds: {lower: stats.vmin, upper: stats.vmax}, + scale: dim.height / (stats.vmax - stats.vmin)}; + } + } +}); + +} |