Skip to content

Commit

Permalink
fix: modify echart bg color
Browse files Browse the repository at this point in the history
  • Loading branch information
chansee97 committed Aug 23, 2024
1 parent efc1ccb commit 5fb8881
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/hooks/useEcharts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export function useEcharts(el: Ref<HTMLElement | null>, chartOptions: Ref<ECOpti

function update(updateOptions: ECOption) {
if (isRendered.value)
chart!.setOption({ ...updateOptions })
chart!.setOption({ backgroundColor: 'transparent', ...updateOptions })
}

function destroy() {
Expand Down
4 changes: 0 additions & 4 deletions src/views/demo/echarts/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const pieOptions = ref<ECOption>({
title: {
text: '饼图',
},
backgroundColor: 'transparent',
color: [
'#37a2da',
'#32c5e9',
Expand Down Expand Up @@ -83,7 +82,6 @@ const lineOptions = ref<ECOption>({
title: {
text: '折线图',
},
backgroundColor: 'transparent',
tooltip: {
trigger: 'axis',
axisPointer: {
Expand Down Expand Up @@ -276,7 +274,6 @@ const barOptions = ref<ECOption>({
title: {
text: '柱状图',
},
backgroundColor: 'transparent',
tooltip: {},
grid: {
top: '8%',
Expand Down Expand Up @@ -418,7 +415,6 @@ const radarOptions = ref<ECOption>({
title: {
text: 'Multiple Radar',
},
backgroundColor: 'transparent',
tooltip: {},
legend: {
left: 'center',
Expand Down

0 comments on commit 5fb8881

Please sign in to comment.