File tree 1 file changed +16
-10
lines changed
1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -178,20 +178,26 @@ export default class Theme {
178
178
updateThemeOptions ( options ) {
179
179
options . chart = options . chart || { }
180
180
options . tooltip = options . tooltip || { }
181
- const mode = options . theme . mode || 'light'
182
- const palette = options . theme . palette
183
- ? options . theme . palette
184
- : mode === 'dark'
181
+ const mode = options . theme . mode
182
+ const background = mode === 'dark'
183
+ ? '#424242'
184
+ : mode === 'light'
185
+ ? '#fff'
186
+ : options . chart . background || '#fff'
187
+ const palette = mode === 'dark'
185
188
? 'palette4'
186
- : 'palette1 '
187
- const foreColor = options . chart . foreColor
188
- ? options . chart . foreColor
189
- : mode === 'dark'
189
+ : mode === 'light '
190
+ ? 'palette1'
191
+ : options . theme . palette || 'palette1'
192
+ const foreColor = mode === 'dark'
190
193
? '#f6f7f8'
191
- : '#373d3f'
194
+ : mode === 'light'
195
+ ? '#373d3f'
196
+ : options . chart . foreColor || '#373d3f'
192
197
193
- options . tooltip . theme = mode
198
+ options . tooltip . theme = mode || 'light'
194
199
options . chart . foreColor = foreColor
200
+ options . chart . background = background
195
201
options . theme . palette = palette
196
202
197
203
return options
You can’t perform that action at this time.
0 commit comments