Created
May 14, 2019 07:32
-
-
Save yakuzaaaa/4a16383a16184c2d1056123f8ca5dd86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Base definition | |
function getTheme(options) { | |
return { | |
"name": "custom", | |
"theme": { | |
"base": { | |
"chart": { | |
"showlegend": "1" | |
}, | |
"dataset": [{ | |
"data": [{ | |
"color": options.colorProductOne | |
}, { | |
"color": options.colorProductTwo | |
}] | |
}] | |
} | |
} | |
} | |
} | |
// wrappers will call return value from getTheme | |
// A dark-mode-wrapper | |
return getTheme({ | |
colorProductOne: '#000000', | |
colorProductTwo: '#000000' | |
}); | |
// A light-mode-wrapper | |
return getTheme({ | |
colorProductOne: '#ffffff', | |
colorProductTwo: '#ffffff' | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment