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.6/dojox/charting/themes/Tom.xd.js | |
Diffstat (limited to 'js/dojo-1.6/dojox/charting/themes/Tom.xd.js')
| -rw-r--r-- | js/dojo-1.6/dojox/charting/themes/Tom.xd.js | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/js/dojo-1.6/dojox/charting/themes/Tom.xd.js b/js/dojo-1.6/dojox/charting/themes/Tom.xd.js new file mode 100644 index 0000000..788e013 --- /dev/null +++ b/js/dojo-1.6/dojox/charting/themes/Tom.xd.js @@ -0,0 +1,104 @@ +/*
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+dojo._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dojox.charting.themes.Tom"],
+["require", "dojox.gfx.gradutils"],
+["require", "dojox.charting.Theme"]],
+defineResource: function(dojo, dijit, dojox){if(!dojo._hasResource["dojox.charting.themes.Tom"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.charting.themes.Tom"] = true;
+dojo.provide("dojox.charting.themes.Tom");
+
+dojo.require("dojox.gfx.gradutils");
+dojo.require("dojox.charting.Theme");
+
+// created by Tom Trenka
+
+(function(){
+ var dc = dojox.charting, themes = dc.themes, Theme = dc.Theme, g = Theme.generateGradient,
+ defaultFill = {type: "linear", space: "shape", x1: 0, y1: 0, x2: 0, y2: 100};
+
+ themes.Tom = new dc.Theme({
+ chart: {
+ fill: "#181818",
+ stroke: {color: "#181818"},
+ pageStyle: {backgroundColor: "#181818", backgroundImage: "none", color: "#eaf2cb"}
+ },
+ plotarea: {
+ fill: "#181818"
+ },
+ axis:{
+ stroke: { // the axis itself
+ color: "#a0a68b",
+ width: 1
+ },
+ tick: { // used as a foundation for all ticks
+ color: "#888c76",
+ position: "center",
+ font: "normal normal normal 7pt Helvetica, Arial, sans-serif", // labels on axis
+ fontColor: "#888c76" // color of labels
+ }
+ },
+ series: {
+ stroke: {width: 2.5, color: "#eaf2cb"},
+ outline: null,
+ font: "normal normal normal 8pt Helvetica, Arial, sans-serif",
+ fontColor: "#eaf2cb"
+ },
+ marker: {
+ stroke: {width: 1.25, color: "#eaf2cb"},
+ outline: {width: 1.25, color: "#eaf2cb"},
+ font: "normal normal normal 8pt Helvetica, Arial, sans-serif",
+ fontColor: "#eaf2cb"
+ },
+ seriesThemes: [
+ {fill: g(defaultFill, "#bf9e0a", "#ecc20c")},
+ {fill: g(defaultFill, "#73b086", "#95e5af")},
+ {fill: g(defaultFill, "#c7212d", "#ed2835")},
+ {fill: g(defaultFill, "#87ab41", "#b6e557")},
+ {fill: g(defaultFill, "#b86c25", "#d37d2a")}
+ ],
+ markerThemes: [
+ {fill: "#bf9e0a", stroke: {color: "#ecc20c"}},
+ {fill: "#73b086", stroke: {color: "#95e5af"}},
+ {fill: "#c7212d", stroke: {color: "#ed2835"}},
+ {fill: "#87ab41", stroke: {color: "#b6e557"}},
+ {fill: "#b86c25", stroke: {color: "#d37d2a"}}
+ ]
+ });
+
+ themes.Tom.next = function(elementType, mixin, doPost){
+ var isLine = elementType == "line";
+ if(isLine || elementType == "area"){
+ // custom processing for lines: substitute colors
+ var s = this.seriesThemes[this._current % this.seriesThemes.length];
+ s.fill.space = "plot";
+ if(isLine){
+ s.stroke = { width: 4, color: s.fill.colors[0].color};
+ }
+ var theme = Theme.prototype.next.apply(this, arguments);
+ // cleanup
+ delete s.outline;
+ delete s.stroke;
+ s.fill.space = "shape";
+ return theme;
+ }
+ return Theme.prototype.next.apply(this, arguments);
+ };
+
+ themes.Tom.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 = dojox.gfx.gradutils.reverse(theme.series.fill);
+ }
+ return theme;
+ };
+})();
+
+}
+
+}};});
|
