Changeset 38
- Timestamp:
- 14/06/06 16:26:12 (2 years ago)
- Files:
-
- plotkit/trunk/PlotKit/Canvas.js (modified) (2 diffs)
- plotkit/trunk/PlotKit/PlotKit_Packed.js (modified) (5 diffs)
- plotkit/trunk/PlotKit/SVG.js (modified) (2 diffs)
- plotkit/trunk/tests/dynamic.html (added)
- plotkit/trunk/tests/quickstart-neg.html (added)
- plotkit/trunk/tests/quickstart.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plotkit/trunk/PlotKit/Canvas.js
r32 r38 88 88 89 89 this.layout = layout; 90 this.style = layout.style; 91 this.element = element; 90 this.element = MochiKit.DOM.getElement(element); 92 91 this.container = this.element.parentNode; 93 92 … … 167 166 this._renderBackground(); 168 167 169 if (this. style == "bar") {168 if (this.layout.style == "bar") { 170 169 this._renderBarChart(); 171 170 this._renderBarAxis(); 172 171 } 173 else if (this. style == "pie") {172 else if (this.layout.style == "pie") { 174 173 this._renderPieChart(); 175 174 this._renderPieAxis(); 176 175 } 177 else if (this. style == "line") {176 else if (this.layout.style == "line") { 178 177 this._renderLineChart(); 179 178 this._renderLineAxis(); plotkit/trunk/PlotKit/PlotKit_Packed.js
r36 r38 757 757 MochiKit.Base.update(this.options,_161?_161:{}); 758 758 this.layout=_160; 759 this.style=_160.style; 760 this.element=_159; 759 this.element=MochiKit.DOM.getElement(_159); 761 760 this.container=this.element.parentNode; 762 761 this.isIE=PlotKit.Base.excanvasSupported(); … … 814 813 this._renderBackground(); 815 814 } 816 if(this. style=="bar"){815 if(this.layout.style=="bar"){ 817 816 this._renderBarChart(); 818 817 this._renderBarAxis(); 819 818 }else{ 820 if(this. style=="pie"){819 if(this.layout.style=="pie"){ 821 820 this._renderPieChart(); 822 821 this._renderPieAxis(); 823 822 }else{ 824 if(this. style=="line"){823 if(this.layout.style=="line"){ 825 824 this._renderLineChart(); 826 825 this._renderLineAxis(); … … 1252 1251 MochiKit.Base.update(this.options,_243?_243:{}); 1253 1252 this.layout=_242; 1254 this.style=_242.style;1255 1253 this.element=MochiKit.DOM.getElement(_241); 1256 1254 this.container=this.element.parentNode; … … 1282 1280 this._renderBackground(); 1283 1281 } 1284 if(this. style=="bar"){1282 if(this.layout.style=="bar"){ 1285 1283 this._renderBarChart(); 1286 1284 this._renderBarAxis(); 1287 1285 }else{ 1288 if(this. style=="pie"){1286 if(this.layout.style=="pie"){ 1289 1287 this._renderPieChart(); 1290 1288 this._renderPieAxis(); 1291 1289 }else{ 1292 if(this. style=="line"){1290 if(this.layout.style=="line"){ 1293 1291 this._renderLineChart(); 1294 1292 this._renderLineAxis(); … … 1762 1760 bind(_348,this)(_340); 1763 1761 _340.fill(); 1764 }1765 1762 _340.restore(); 1763 } 1766 1764 _340.shadowBlur=5; 1767 1765 _340.shadowColor=Color.fromHexString("#888888").toRGBString(); plotkit/trunk/PlotKit/SVG.js
r25 r38 83 83 MochiKit.Base.update(this.options, options ? options : {}); 84 84 this.layout = layout; 85 this.style = layout.style;86 85 this.element = MochiKit.DOM.getElement(element); 87 86 this.container = this.element.parentNode; … … 133 132 this._renderBackground(); 134 133 135 if (this. style == "bar") {134 if (this.layout.style == "bar") { 136 135 this._renderBarChart(); 137 136 this._renderBarAxis(); 138 137 } 139 else if (this. style == "pie") {138 else if (this.layout.style == "pie") { 140 139 this._renderPieChart(); 141 140 this._renderPieAxis(); 142 141 } 143 else if (this. style == "line") {142 else if (this.layout.style == "line") { 144 143 this._renderLineChart(); 145 144 this._renderLineAxis(); plotkit/trunk/tests/quickstart.html
r29 r38 42 42 43 43 <script type="text/javascript"> 44 var layout = new Layout(" bar");44 var layout = new Layout("line"); 45 45 layout.addDatasetFromTable("dataset2", $("values"), xcol = 0, ycol = 2); 46 46 layout.addDatasetFromTable("dataset1", $("values"), xcol = 0, ycol = 1);




Atom Feed for the Blog Entries