Skip to content

Commit

Permalink
fix: 主题问题修复
Browse files Browse the repository at this point in the history
  • Loading branch information
yxh01132861 committed Aug 1, 2023
1 parent b31c300 commit 3634a61
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,15 @@ const IntervalLine = ({
if (!plotRef.current) {
const chart = new Chart({
container: containerRef.current!,
theme: theme,
autoFit: true,
padding: 'auto',
paddingTop: 20,
paddingBottom: 30,
});

const themeCfg = getChartTheme(theme) as Record<string, any>;
chart.theme(themeCfg);

chart.options({
type: 'view',
children: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ const Pie = ({ className, theme, height, width, data = [], angleField, colorFiel
if (!plotRef.current) {
const chart = new Chart({
container: containerRef.current!,
theme: theme,
autoFit: true,
style: { lineWidth: 2 },
padding: 30,
});

const themeCfg = getChartTheme(theme) as Record<string, any>;
chart.theme(themeCfg);

chart.options({
type: 'view',
children: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default implementWidget({
showLegend: false,
adaptive: true,
aggregationMethod: 'count',
theme: 'dark',
},
component,
registerForm,
Expand Down

0 comments on commit 3634a61

Please sign in to comment.