a01cb8bff023307c82dda28d66ea8cf5db7a4555.svn-base 2.4 KB

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