base.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. define("dojox/charting/themes/PlotKit/base", ["dojo/_base/kernel","dojo/_base/lang","../../Theme", "../common"],
  2. function(dojo, lang, Theme, themes){
  3. // the baseline theme for all PlotKIt themes
  4. var pk = lang.getObject("PlotKit", true, themes);
  5. pk.base = new Theme({
  6. chart:{
  7. stroke: null,
  8. fill: "yellow"
  9. },
  10. plotarea:{
  11. stroke: null,
  12. fill: "yellow"
  13. },
  14. axis:{
  15. stroke: {color:"#fff", width:1},
  16. line: {color:"#fff", width:.5},
  17. majorTick: {color: "#fff", width: .5, length: 6},
  18. minorTick: {color: "#fff", width: .5, length: 3},
  19. tick: {font: "normal normal normal 7pt Helvetica,Arial,sans-serif", fontColor: "#999"}
  20. },
  21. series:{
  22. stroke: {width: 2.5, color:"#fff"},
  23. fill: "#666",
  24. font: "normal normal normal 7.5pt Helvetica,Arial,sans-serif", // label
  25. fontColor: "#666"
  26. },
  27. marker:{ // any markers on a series.
  28. stroke: {width: 2},
  29. fill: "#333",
  30. font: "normal normal normal 7pt Helvetica,Arial,sans-serif", // label
  31. fontColor: "#666"
  32. },
  33. colors: ["red", "green", "blue"]
  34. });
  35. pk.base.next = function(elementType, mixin, doPost){
  36. var theme = Theme.prototype.next.apply(this, arguments);
  37. if(elementType == "line"){
  38. theme.marker.outline = {width: 2, color: "#fff"};
  39. theme.series.stroke.width = 3.5;
  40. theme.marker.stroke.width = 2;
  41. } else if (elementType == "candlestick"){
  42. theme.series.stroke.width = 1;
  43. } else {
  44. theme.series.stroke.color = "#fff";
  45. }
  46. return theme;
  47. };
  48. return pk;
  49. });