Skip to content

Instantly share code, notes, and snippets.

@yakuzaaaa
Created May 14, 2019 07:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yakuzaaaa/4a16383a16184c2d1056123f8ca5dd86 to your computer and use it in GitHub Desktop.
Save yakuzaaaa/4a16383a16184c2d1056123f8ca5dd86 to your computer and use it in GitHub Desktop.
// 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