提交 7db0a9c0 编写于 作者: P pissang

feat(label): enable darkMode

上级 804a99c6
......@@ -1327,6 +1327,7 @@ class ECharts extends Eventful {
// Set background
let backgroundColor = ecModel.get('backgroundColor') || 'transparent';
const darkMode = ecModel.get('darkMode');
// In IE8
if (!env.canvasSupported) {
......@@ -1338,6 +1339,11 @@ class ECharts extends Eventful {
}
else {
zr.setBackgroundColor(backgroundColor);
// Force set dark mode.
if (darkMode != null && darkMode !== 'auto') {
zr.setDarkMode(darkMode);
}
}
performPostUpdateFuncs(ecModel, api);
......
......@@ -25,6 +25,8 @@ if (typeof navigator !== 'undefined') {
}
export default {
darkMode: 'auto',
// backgroundColor: 'rgba(0,0,0,0)',
// https://dribbble.com/shots/1065960-Infographic-Pie-chart-visualization
......
......@@ -54,6 +54,8 @@ const colorPalette = [
'#eedd78', '#73a373', '#73b9bc', '#7289ab', '#91ca8c', '#f49f42'
];
const theme = {
darkMode: true,
color: colorPalette,
backgroundColor: '#333',
tooltip: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册