root / trunk / web / dojo / dojox / charting / themes / Electric.js @ 13
History | View | Annotate | Download (2.2 KB)
| 1 |
/*
|
|---|---|
| 2 |
Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
|
| 3 |
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
| 4 |
see: http://dojotoolkit.org/license for details
|
| 5 |
*/
|
| 6 |
|
| 7 |
|
| 8 |
if(!dojo._hasResource["dojox.charting.themes.Electric"]){ |
| 9 |
dojo._hasResource["dojox.charting.themes.Electric"]=true; |
| 10 |
dojo.provide("dojox.charting.themes.Electric");
|
| 11 |
dojo.require("dojox.gfx.gradutils");
|
| 12 |
dojo.require("dojox.charting.Theme");
|
| 13 |
(function(){
|
| 14 |
var dc=dojox.charting,_1=dc.themes,_2=dc.Theme,g=_2.generateGradient,_3={type:"linear",space:"shape",x1:0,y1:0,x2:0,y2:75}; |
| 15 |
_1.Electric=new dc.Theme({chart:{fill:"#252525",stroke:{color:"#252525"},pageStyle:{backgroundColor:"#252525",backgroundImage:"none",color:"#ccc"}},plotarea:{fill:"#252525"},axis:{stroke:{color:"#aaa",width:1},tick:{color:"#777",position:"center",font:"normal normal normal 7pt Helvetica, Arial, sans-serif",fontColor:"#777"}},series:{stroke:{width:2,color:"#ccc"},outline:null,font:"normal normal normal 8pt Helvetica, Arial, sans-serif",fontColor:"#ccc"},marker:{stroke:{width:3,color:"#ccc"},outline:null,font:"normal normal normal 8pt Helvetica, Arial, sans-serif",fontColor:"#ccc"},seriesThemes:[{fill:g(_3,"#004cbf","#06f")},{fill:g(_3,"#bf004c","#f06")},{fill:g(_3,"#43bf00","#6f0")},{fill:g(_3,"#7300bf","#90f")},{fill:g(_3,"#bf7300","#f90")},{fill:g(_3,"#00bf73","#0f9")}],markerThemes:[{fill:"#06f",stroke:{color:"#06f"}},{fill:"#f06",stroke:{color:"#f06"}},{fill:"#6f0",stroke:{color:"#6f0"}},{fill:"#90f",stroke:{color:"#90f"}},{fill:"#f90",stroke:{color:"#f90"}},{fill:"#0f9",stroke:{color:"#0f9"}}]}); |
| 16 |
_1.Electric.next=function(_4,_5,_6){ |
| 17 |
var _7=_4=="line"; |
| 18 |
if(_7||_4=="area"){ |
| 19 |
var s=this.seriesThemes[this._current%this.seriesThemes.length]; |
| 20 |
s.fill.space="plot";
|
| 21 |
if(_7){
|
| 22 |
s.stroke={width:2.5,color:s.fill.colors[1].color};
|
| 23 |
} |
| 24 |
if(_4=="area"){ |
| 25 |
s.fill.y2=90;
|
| 26 |
} |
| 27 |
var _8=_2.prototype.next.apply(this,arguments); |
| 28 |
delete s.stroke;
|
| 29 |
s.fill.y2=75;
|
| 30 |
s.fill.space="shape";
|
| 31 |
return _8;
|
| 32 |
} |
| 33 |
return _2.prototype.next.apply(this,arguments); |
| 34 |
}; |
| 35 |
_1.Electric.post=function(_9,_a){ |
| 36 |
_9=_2.prototype.post.apply(this,arguments); |
| 37 |
if((_a=="slice"||_a=="circle")&&_9.series.fill&&_9.series.fill.type=="radial"){ |
| 38 |
_9.series.fill=dojox.gfx.gradutils.reverse(_9.series.fill); |
| 39 |
} |
| 40 |
return _9;
|
| 41 |
}; |
| 42 |
})(); |
| 43 |
} |