diff --git a/src/components/charts/bar/index.tsx b/src/components/charts/bar/index.tsx index 35a242d..a65e6ea 100644 --- a/src/components/charts/bar/index.tsx +++ b/src/components/charts/bar/index.tsx @@ -48,6 +48,12 @@ export const Bar = (props: IProps) => { }, series: [ { + type: "bar", + label: { + show: true, + position: "top", + margin: 8 + }, data: data.map(item => { return { value: item.y, @@ -56,12 +62,6 @@ export const Bar = (props: IProps) => { } } }), - type: "bar", - label: { - show: true, - position: "top", - margin: 8 - }, }, ], tooltip: { diff --git a/src/components/charts/pie/index.tsx b/src/components/charts/pie/index.tsx index 3ac0c9f..50dcdc8 100644 --- a/src/components/charts/pie/index.tsx +++ b/src/components/charts/pie/index.tsx @@ -41,7 +41,7 @@ export default function Pie(props: IProps) { // }, series: [ { - // name: `${year}-${month}`, + name: "金额", type: "pie", radius: ['40%', '70%'], // roseType: "radius", diff --git a/src/pages/Record/Record.tsx b/src/pages/Record/Record.tsx index a969b72..c2b611a 100644 --- a/src/pages/Record/Record.tsx +++ b/src/pages/Record/Record.tsx @@ -161,7 +161,7 @@ function Record() {