Project

General

Profile

Statistics
| Revision:

root / trunk / web / dojo / dojox / charting / themes / ThreeD.js @ 9

History | View | Annotate | Download (1.48 KB)

1 9 andrej.cim
/*
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.ThreeD"]){
9
dojo._hasResource["dojox.charting.themes.ThreeD"]=true;
10
dojo.provide("dojox.charting.themes.ThreeD");
11
dojo.require("dojo.colors");
12
dojo.require("dojox.charting.Theme");
13
dojo.require("dojox.charting.themes.gradientGenerator");
14
dojo.require("dojox.charting.themes.PrimaryColors");
15
(function(){
16
var dc=dojox.charting,_1=dc.themes,_2=dc.Theme,gi=_1.gradientGenerator.generateGradientByIntensity,_3=["#f00","#0f0","#00f","#ff0","#0ff","#f0f"],_4={type:"linear",space:"shape",x1:0,y1:0,x2:100,y2:0},_5=[{o:0,i:174},{o:0.08,i:231},{o:0.18,i:237},{o:0.3,i:231},{o:0.39,i:221},{o:0.49,i:206},{o:0.58,i:187},{o:0.68,i:165},{o:0.8,i:128},{o:0.9,i:102},{o:1,i:174}],_6=2,_7=100,_8=50,_9=dojo.map(_3,function(c){
17
var _a=dojo.delegate(_4),_3=_a.colors=_1.gradientGenerator.generateGradientByIntensity(c,_5),_b=_3[_6].color;
18
_b.r+=_7;
19
_b.g+=_7;
20
_b.b+=_7;
21
_b.sanitize();
22
return _a;
23
});
24
_1.ThreeD=_1.PrimaryColors.clone();
25
_1.ThreeD.series.shadow={dx:1,dy:1,width:3,color:[0,0,0,0.15]};
26
_1.ThreeD.next=function(_c,_d,_e){
27
if(_c=="bar"||_c=="column"){
28
var _f=this._current%this.seriesThemes.length,s=this.seriesThemes[_f],old=s.fill;
29
s.fill=_9[_f];
30
var _10=_2.prototype.next.apply(this,arguments);
31
s.fill=old;
32
return _10;
33
}
34
return _2.prototype.next.apply(this,arguments);
35
};
36
})();
37
}