| 1 |
define(["../Theme", "dojox/gfx/gradutils", "./common"], function(Theme, gradutils, themes){ |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
var g = Theme.generateGradient, |
| 6 |
defaultFill = {type: "linear", space: "shape", x1: 0, y1: 0, x2: 0, y2: 150}; |
| 7 |
|
| 8 |
themes.Renkoo = new Theme({ |
| 9 |
chart: { |
| 10 |
fill: "#123666", |
| 11 |
pageStyle: {backgroundColor: "#123666", backgroundImage: "none", color: "#95afdb"} |
| 12 |
}, |
| 13 |
plotarea: { |
| 14 |
fill: "#123666" |
| 15 |
}, |
| 16 |
axis:{ |
| 17 |
stroke: { |
| 18 |
color: "#95afdb", |
| 19 |
width: 1 |
| 20 |
}, |
| 21 |
tick: { |
| 22 |
color: "#95afdb", |
| 23 |
position: "center", |
| 24 |
font: "normal normal normal 7pt Lucida Grande, Helvetica, Arial, sans-serif", |
| 25 |
fontColor: "#95afdb" |
| 26 |
} |
| 27 |
}, |
| 28 |
series: { |
| 29 |
stroke: {width: 2.5, color: "#123666"}, |
| 30 |
outline: null, |
| 31 |
font: "normal normal normal 8pt Lucida Grande, Helvetica, Arial, sans-serif", |
| 32 |
fontColor: "#95afdb" |
| 33 |
}, |
| 34 |
marker: { |
| 35 |
stroke: {width: 2.5, color: "#ccc"}, |
| 36 |
outline: null, |
| 37 |
font: "normal normal normal 8pt Lucida Grande, Helvetica, Arial, sans-serif", |
| 38 |
fontColor: "#95afdb" |
| 39 |
}, |
| 40 |
seriesThemes: [ |
| 41 |
{fill: g(defaultFill, "#e7e391", "#f8f7de")}, |
| 42 |
{fill: g(defaultFill, "#ffb6b6", "#ffe8e8")}, |
| 43 |
{fill: g(defaultFill, "#bcda7d", "#eef7da")}, |
| 44 |
{fill: g(defaultFill, "#d5d5d5", "#f4f4f4")}, |
| 45 |
{fill: g(defaultFill, "#c1e3fd", "#e4f3ff")} |
| 46 |
], |
| 47 |
markerThemes: [ |
| 48 |
{fill: "#fcfcf3", stroke: {color: "#e7e391"}}, |
| 49 |
{fill: "#fff1f1", stroke: {color: "#ffb6b6"}}, |
| 50 |
{fill: "#fafdf4", stroke: {color: "#bcda7d"}}, |
| 51 |
{fill: "#fbfbfb", stroke: {color: "#d5d5d5"}}, |
| 52 |
{fill: "#f3faff", stroke: {color: "#c1e3fd"}} |
| 53 |
] |
| 54 |
}); |
| 55 |
|
| 56 |
themes.Renkoo.next = function(elementType, mixin, doPost){ |
| 57 |
if("slice,column,bar".indexOf(elementType) == -1){ |
| 58 |
|
| 59 |
var s = this.seriesThemes[this._current % this.seriesThemes.length]; |
| 60 |
s.fill.space = "plot"; |
| 61 |
s.stroke = { width: 2, color: s.fill.colors[0].color}; |
| 62 |
if(elementType == "line" || elementType == "area"){ |
| 63 |
s.stroke.width = 4; |
| 64 |
} |
| 65 |
var theme = Theme.prototype.next.apply(this, arguments); |
| 66 |
|
| 67 |
delete s.stroke; |
| 68 |
s.fill.space = "shape"; |
| 69 |
return theme; |
| 70 |
} |
| 71 |
return Theme.prototype.next.apply(this, arguments); |
| 72 |
}; |
| 73 |
|
| 74 |
themes.Renkoo.post = function(theme, elementType){ |
| 75 |
theme = Theme.prototype.post.apply(this, arguments); |
| 76 |
if((elementType == "slice" || elementType == "circle") && theme.series.fill && theme.series.fill.type == "radial"){ |
| 77 |
theme.series.fill = gradutils.reverse(theme.series.fill); |
| 78 |
} |
| 79 |
return theme; |
| 80 |
}; |
| 81 |
|
| 82 |
return themes.Renkoo; |
| 83 |
}); |