Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2150 mathias 1
if(!dojo._hasResource["dojox.charting.tests.Theme"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
2
dojo._hasResource["dojox.charting.tests.Theme"] = true;
3
dojo.provide("dojox.charting.tests.Theme");
4
dojo.require("dojox.charting.Theme");
5
dojo.require("dojox.charting.themes.PlotKit.blue");
6
 
7
(function(){
8
	var dxc=dojox.charting;
9
	var blue=dxc.themes.PlotKit.blue;
10
	tests.register("dojox.charting.tests.Theme", [
11
		function testDefineColor(t){
12
			var args={ num:16, cache:false };
13
			blue.defineColors(args);
14
			var a=blue.colors;
15
			var s="<table border=1>";
16
			for(var i=0; i<a.length; i++){
17
				if(i%8==0){
18
					if(i>0) s+="</tr>";
19
					s+="<tr>";
20
				}
21
				s+='<td width=16 bgcolor='+a[i]+'>&nbsp;</td>';
22
			}
23
			s+="</tr></table>";
24
			doh.debug(s);
25
 
26
			var args={ num:32, cache: false };
27
			blue.defineColors(args);
28
			var a=blue.colors;
29
			var s="<table border=1 style=margin-top:12px;>";
30
			for(var i=0; i<a.length; i++){
31
				if(i%8==0){
32
					if(i>0) s+="</tr>";
33
					s+="<tr>";
34
				}
35
				s+='<td width=16 bgcolor='+a[i]+'>&nbsp;</td>';
36
			}
37
			s+="</tr></table>";
38
			doh.debug(s);
39
 
40
			var args={ saturation:20, num:32, cache:false };
41
			blue.defineColors(args);
42
			var a=blue.colors;
43
			var s="<table border=1 style=margin-top:12px;>";
44
			for(var i=0; i<a.length; i++){
45
				if(i%8==0){
46
					if(i>0) s+="</tr>";
47
					s+="<tr>";
48
				}
49
				s+='<td width=16 bgcolor='+a[i]+'>&nbsp;</td>';
50
			}
51
			s+="</tr></table>";
52
			doh.debug(s);
53
 
54
			var args={ low:10, high:90, num:32, cache: false };
55
			blue.defineColors(args);
56
			var a=blue.colors;
57
			var s="<table border=1 style=margin-top:12px;>";
58
			for(var i=0; i<a.length; i++){
59
				if(i%8==0){
60
					if(i>0) s+="</tr>";
61
					s+="<tr>";
62
				}
63
				s+='<td width=16 bgcolor='+a[i]+'>&nbsp;</td>';
64
			}
65
			s+="</tr></table>";
66
			doh.debug(s);
67
		}
68
	]);
69
})();
70
 
71
}