source: Dev/trunk/src/client/dojox/charting/tests/Theme.js @ 483

Last change on this file since 483 was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 1.5 KB
Line 
1define(["doh", "dojox/charting/Theme", "dojox/charting/themes/PlotKit/blue"],
2        function(doh, Theme, blue){
3        doh.register("dojox.charting.tests.Theme", [
4                function testDefineColor(t){
5                        var args={ num:16, cache:false };
6                        Theme.defineColors(args);
7                        var a=blue.colors;
8                        var s="<table border=1>";
9                        for(var i=0; i<a.length; i++){
10                                if(i%8==0){
11                                        if(i>0) s+="</tr>";
12                                        s+="<tr>";
13                                }
14                                s+='<td width=16 bgcolor='+a[i]+'>&nbsp;</td>';
15                        }
16                        s+="</tr></table>";
17                        doh.debug(s);
18
19                        var args={ num:32, cache: false };
20                        Theme.defineColors(args);
21                        var a=blue.colors;
22                        var s="<table border=1 style=margin-top:12px;>";
23                        for(var i=0; i<a.length; i++){
24                                if(i%8==0){
25                                        if(i>0) s+="</tr>";
26                                        s+="<tr>";
27                                }
28                                s+='<td width=16 bgcolor='+a[i]+'>&nbsp;</td>';
29                        }
30                        s+="</tr></table>";
31                        doh.debug(s);
32
33                        var args={ saturation:20, num:32, cache:false };
34                        Theme.defineColors(args);
35                        var a=blue.colors;
36                        var s="<table border=1 style=margin-top:12px;>";
37                        for(var i=0; i<a.length; i++){
38                                if(i%8==0){
39                                        if(i>0) s+="</tr>";
40                                        s+="<tr>";
41                                }
42                                s+='<td width=16 bgcolor='+a[i]+'>&nbsp;</td>';
43                        }
44                        s+="</tr></table>";
45                        doh.debug(s);
46
47                        var args={ low:10, high:90, num:32, cache: false };
48                        Theme.defineColors(args);
49                        var a=blue.colors;
50                        var s="<table border=1 style=margin-top:12px;>";
51                        for(var i=0; i<a.length; i++){
52                                if(i%8==0){
53                                        if(i>0) s+="</tr>";
54                                        s+="<tr>";
55                                }
56                                s+='<td width=16 bgcolor='+a[i]+'>&nbsp;</td>';
57                        }
58                        s+="</tr></table>";
59                        doh.debug(s);
60                }
61        ]);
62});
Note: See TracBrowser for help on using the repository browser.