Debian Codegraph @

dojox/charting/themes/PlotKit/base.js

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