diff options
| author | Tristan Zur <tzur@web.web.ccwn.org> | 2014-03-27 22:27:47 +0100 |
|---|---|---|
| committer | Tristan Zur <tzur@web.web.ccwn.org> | 2014-03-27 22:27:47 +0100 |
| commit | b62676ca5d3d6f6ba3f019ea3f99722e165a98d8 (patch) | |
| tree | 86722cb80f07d4569f90088eeaea2fc2f6e2ef94 /js/dojo-1.7.2/dojox/charting/themes/Renkoo.js | |
Diffstat (limited to 'js/dojo-1.7.2/dojox/charting/themes/Renkoo.js')
| -rw-r--r-- | js/dojo-1.7.2/dojox/charting/themes/Renkoo.js | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/js/dojo-1.7.2/dojox/charting/themes/Renkoo.js b/js/dojo-1.7.2/dojox/charting/themes/Renkoo.js new file mode 100644 index 0000000..ef883e1 --- /dev/null +++ b/js/dojo-1.7.2/dojox/charting/themes/Renkoo.js @@ -0,0 +1,84 @@ +//>>built +define("dojox/charting/themes/Renkoo", ["../Theme", "dojox/gfx/gradutils", "./common"], function(Theme, gradutils, themes){ + + // created by Tom Trenka + + var g = Theme.generateGradient, + defaultFill = {type: "linear", space: "shape", x1: 0, y1: 0, x2: 0, y2: 150}; + + themes.Renkoo = new Theme({ + chart: { + fill: "#123666", + pageStyle: {backgroundColor: "#123666", backgroundImage: "none", color: "#95afdb"} + }, + plotarea: { + fill: "#123666" + }, + axis:{ + stroke: { // the axis itself + color: "#95afdb", + width: 1 + }, + tick: { // used as a foundation for all ticks + color: "#95afdb", + position: "center", + font: "normal normal normal 7pt Lucida Grande, Helvetica, Arial, sans-serif", // labels on axis + fontColor: "#95afdb" // color of labels + } + }, + series: { + stroke: {width: 2.5, color: "#123666"}, + outline: null, + font: "normal normal normal 8pt Lucida Grande, Helvetica, Arial, sans-serif", // labels on axis + fontColor: "#95afdb" + }, + marker: { + stroke: {width: 2.5, color: "#ccc"}, + outline: null, + font: "normal normal normal 8pt Lucida Grande, Helvetica, Arial, sans-serif", // labels on axis + fontColor: "#95afdb" + }, + seriesThemes: [ + {fill: g(defaultFill, "#e7e391", "#f8f7de")}, + {fill: g(defaultFill, "#ffb6b6", "#ffe8e8")}, + {fill: g(defaultFill, "#bcda7d", "#eef7da")}, + {fill: g(defaultFill, "#d5d5d5", "#f4f4f4")}, + {fill: g(defaultFill, "#c1e3fd", "#e4f3ff")} + ], + markerThemes: [ + {fill: "#fcfcf3", stroke: {color: "#e7e391"}}, + {fill: "#fff1f1", stroke: {color: "#ffb6b6"}}, + {fill: "#fafdf4", stroke: {color: "#bcda7d"}}, + {fill: "#fbfbfb", stroke: {color: "#d5d5d5"}}, + {fill: "#f3faff", stroke: {color: "#c1e3fd"}} + ] + }); + + themes.Renkoo.next = function(elementType, mixin, doPost){ + if("slice,column,bar".indexOf(elementType) == -1){ + // custom processing to substitute colors + var s = this.seriesThemes[this._current % this.seriesThemes.length]; + s.fill.space = "plot"; + s.stroke = { width: 2, color: s.fill.colors[0].color}; + if(elementType == "line" || elementType == "area"){ + s.stroke.width = 4; + } + var theme = Theme.prototype.next.apply(this, arguments); + // cleanup + delete s.stroke; + s.fill.space = "shape"; + return theme; + } + return Theme.prototype.next.apply(this, arguments); + }; + + themes.Renkoo.post = function(theme, elementType){ + theme = Theme.prototype.post.apply(this, arguments); + if((elementType == "slice" || elementType == "circle") && theme.series.fill && theme.series.fill.type == "radial"){ + theme.series.fill = gradutils.reverse(theme.series.fill); + } + return theme; + }; + + return themes.Renkoo; +}); |
