| 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: 100}; |
| 7 |
|
| 8 |
themes.Julie = new Theme({ |
| 9 |
seriesThemes: [ |
| 10 |
{fill: g(defaultFill, "#59a0bd", "#497c91"), stroke: {color: "#22627d"}}, |
| 11 |
{fill: g(defaultFill, "#8d88c7", "#6c6d8e"), stroke: {color: "#8a84c5"}}, |
| 12 |
{fill: g(defaultFill, "#85a54a", "#768b4e"), stroke: {color: "#5b6d1f"}}, |
| 13 |
{fill: g(defaultFill, "#e8e667", "#c6c361"), stroke: {color: "#918e38"}}, |
| 14 |
{fill: g(defaultFill, "#e9c756", "#c7a223"), stroke: {color: "#947b30"}}, |
| 15 |
{fill: g(defaultFill, "#a05a5a", "#815454"), stroke: {color: "#572828"}}, |
| 16 |
{fill: g(defaultFill, "#b17044", "#72543e"), stroke: {color: "#74482e"}}, |
| 17 |
{fill: g(defaultFill, "#a5a5a5", "#727272"), stroke: {color: "#535353"}}, |
| 18 |
|
| 19 |
{fill: g(defaultFill, "#9dc7d9", "#59a0bd"), stroke: {color: "#22627d"}}, |
| 20 |
{fill: g(defaultFill, "#b7b3da", "#8681b3"), stroke: {color: "#8a84c5"}}, |
| 21 |
{fill: g(defaultFill, "#a8c179", "#85a54a"), stroke: {color: "#5b6d1f"}}, |
| 22 |
{fill: g(defaultFill, "#eeea99", "#d6d456"), stroke: {color: "#918e38"}}, |
| 23 |
{fill: g(defaultFill, "#ebcf81", "#e9c756"), stroke: {color: "#947b30"}}, |
| 24 |
{fill: g(defaultFill, "#c99999", "#a05a5a"), stroke: {color: "#572828"}}, |
| 25 |
{fill: g(defaultFill, "#c28b69", "#7d5437"), stroke: {color: "#74482e"}}, |
| 26 |
{fill: g(defaultFill, "#bebebe", "#8c8c8c"), stroke: {color: "#535353"}}, |
| 27 |
|
| 28 |
{fill: g(defaultFill, "#c7e0e9", "#92baca"), stroke: {color: "#22627d"}}, |
| 29 |
{fill: g(defaultFill, "#c9c6e4", "#ada9d6"), stroke: {color: "#8a84c5"}}, |
| 30 |
{fill: g(defaultFill, "#c0d0a0", "#98ab74"), stroke: {color: "#5b6d1f"}}, |
| 31 |
{fill: g(defaultFill, "#f0eebb", "#dcd87c"), stroke: {color: "#918e38"}}, |
| 32 |
{fill: g(defaultFill, "#efdeb0", "#ebcf81"), stroke: {color: "#947b30"}}, |
| 33 |
{fill: g(defaultFill, "#ddc0c0", "#c99999"), stroke: {color: "#572828"}}, |
| 34 |
{fill: g(defaultFill, "#cfb09b", "#c28b69"), stroke: {color: "#74482e"}}, |
| 35 |
{fill: g(defaultFill, "#d8d8d8", "#bebebe"), stroke: {color: "#535353"}}, |
| 36 |
|
| 37 |
{fill: g(defaultFill, "#ddeff5", "#a5c4cd"), stroke: {color: "#22627d"}}, |
| 38 |
{fill: g(defaultFill, "#dedcf0", "#b3afd3"), stroke: {color: "#8a84c5"}}, |
| 39 |
{fill: g(defaultFill, "#dfe9ca", "#c0d0a0"), stroke: {color: "#5b6d1f"}}, |
| 40 |
{fill: g(defaultFill, "#f8f7db", "#e5e28f"), stroke: {color: "#918e38"}}, |
| 41 |
{fill: g(defaultFill, "#f7f0d8", "#cfbd88"), stroke: {color: "#947b30"}}, |
| 42 |
{fill: g(defaultFill, "#eedede", "#caafaf"), stroke: {color: "#572828"}}, |
| 43 |
{fill: g(defaultFill, "#e3cdbf", "#cfb09b"), stroke: {color: "#74482e"}}, |
| 44 |
{fill: g(defaultFill, "#efefef", "#cacaca"), stroke: {color: "#535353"}} |
| 45 |
] |
| 46 |
}); |
| 47 |
|
| 48 |
themes.Julie.next = function(elementType, mixin, doPost){ |
| 49 |
if(elementType == "line" || elementType == "area"){ |
| 50 |
var s = this.seriesThemes[this._current % this.seriesThemes.length]; |
| 51 |
s.fill.space = "plot"; |
| 52 |
var theme = Theme.prototype.next.apply(this, arguments); |
| 53 |
s.fill.space = "shape"; |
| 54 |
return theme; |
| 55 |
} |
| 56 |
return Theme.prototype.next.apply(this, arguments); |
| 57 |
}; |
| 58 |
|
| 59 |
themes.Julie.post = function(theme, elementType){ |
| 60 |
theme = Theme.prototype.post.apply(this, arguments); |
| 61 |
if(elementType == "slice" && theme.series.fill && theme.series.fill.type == "radial"){ |
| 62 |
theme.series.fill = gradutils.reverse(theme.series.fill); |
| 63 |
} |
| 64 |
return theme; |
| 65 |
}; |
| 66 |
|
| 67 |
return themes.Julie; |
| 68 |
}); |