base.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. Copyright (c) 2004-2012, 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. if(!dojo._hasResource["dojox.charting.themes.PlotKit.base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
  7. dojo._hasResource["dojox.charting.themes.PlotKit.base"] = true;
  8. dojo.provide("dojox.charting.themes.PlotKit.base");
  9. dojo.require("dojox.charting.Theme");
  10. // the baseline theme for all PlotKIt themes
  11. (function(){
  12. var dc = dojox.charting, pk = dc.themes.PlotKit;
  13. pk.base = new dc.Theme({
  14. chart:{
  15. stroke: null,
  16. fill: "yellow"
  17. },
  18. plotarea:{
  19. stroke: null,
  20. fill: "yellow"
  21. },
  22. axis:{
  23. stroke: {color:"#fff", width:1},
  24. line: {color:"#fff", width:.5},
  25. majorTick: {color: "#fff", width: .5, length: 6},
  26. minorTick: {color: "#fff", width: .5, length: 3},
  27. tick: {font: "normal normal normal 7pt Helvetica,Arial,sans-serif", fontColor: "#999"}
  28. },
  29. series:{
  30. stroke: {width: 2.5, color:"#fff"},
  31. fill: "#666",
  32. font: "normal normal normal 7.5pt Helvetica,Arial,sans-serif", // label
  33. fontColor: "#666"
  34. },
  35. marker:{ // any markers on a series.
  36. stroke: {width: 2},
  37. fill: "#333",
  38. font: "normal normal normal 7pt Helvetica,Arial,sans-serif", // label
  39. fontColor: "#666"
  40. },
  41. colors: ["red", "green", "blue"]
  42. });
  43. pk.base.next = function(elementType, mixin, doPost){
  44. var theme = dc.Theme.prototype.next.apply(this, arguments);
  45. if(elementType == "line"){
  46. theme.marker.outline = {width: 2, color: "#fff"};
  47. theme.series.stroke.width = 3.5;
  48. theme.marker.stroke.width = 2;
  49. } else if (elementType == "candlestick"){
  50. theme.series.stroke.width = 1;
  51. } else {
  52. theme.series.stroke.color = "#fff";
  53. }
  54. return theme;
  55. };
  56. })();
  57. }