Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions docs/assets/examples/en/theme/theme-switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,8 @@ const spec = {
]
};

const getNewTheme = async () => {
const theme = // your custom theme
(
await import('https://www.unpkg.com/@visactor/vchart-theme@latest/public/dark.json', {
assert: { type: 'json' }
})
).default;
return theme;
};

const newTheme = await getNewTheme();
const response = await fetch('https://www.unpkg.com/@visactor/vchart-theme@latest/public/dark.json');
const newTheme = await response.json();

// 注册主题
VChart.ThemeManager.registerTheme('user', newTheme);
Expand Down
13 changes: 2 additions & 11 deletions docs/assets/examples/zh/theme/theme-switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,8 @@ const spec = {
]
};

const getNewTheme = async () => {
const theme = // your custom theme
(
await import('https://www.unpkg.com/@visactor/vchart-theme@latest/public/dark.json', {
assert: { type: 'json' }
})
).default;
return theme;
};

const newTheme = await getNewTheme();
const response = await fetch('https://www.unpkg.com/@visactor/vchart-theme@latest/public/dark.json');
const newTheme = await response.json();

// 注册主题
VChart.ThemeManager.registerTheme('user', newTheme);
Expand Down
Loading