左下角图表默认背景色
This commit is contained in:
parent
c18495d8a4
commit
0a351689d7
|
@ -128,9 +128,9 @@ const init = (max: any, value: any) => {
|
||||||
color: '#00214d',
|
color: '#00214d',
|
||||||
barGap: '-100%',
|
barGap: '-100%',
|
||||||
},
|
},
|
||||||
/* {
|
{
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: [1],
|
data: [100],
|
||||||
z: 0,
|
z: 0,
|
||||||
silent: true,
|
silent: true,
|
||||||
coordinateSystem: 'polar',
|
coordinateSystem: 'polar',
|
||||||
|
@ -138,7 +138,7 @@ const init = (max: any, value: any) => {
|
||||||
roundCap: true,
|
roundCap: true,
|
||||||
color: '#00214d',
|
color: '#00214d',
|
||||||
barGap: '-100%',
|
barGap: '-100%',
|
||||||
}, */
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
myChart.value.setOption(option);
|
myChart.value.setOption(option);
|
||||||
|
|
|
@ -19,7 +19,7 @@ onMounted(() => {
|
||||||
// resize(){
|
// resize(){
|
||||||
// this.myChart.resize();
|
// this.myChart.resize();
|
||||||
// },
|
// },
|
||||||
const init=(max, value) =>{
|
const init = (max, value) => {
|
||||||
|
|
||||||
chartMax.value = max ? max : 100;
|
chartMax.value = max ? max : 100;
|
||||||
chartValues.value = value ? value : 0;
|
chartValues.value = value ? value : 0;
|
||||||
|
@ -102,17 +102,6 @@ const init=(max, value) =>{
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
/* {
|
|
||||||
type: 'bar',
|
|
||||||
data: [{ name: "新生总人数", value: chartMax.value }],
|
|
||||||
startAngle: 0,
|
|
||||||
z: 1,
|
|
||||||
coordinateSystem: 'polar',
|
|
||||||
barMaxWidth: 35,
|
|
||||||
roundCap: 1,
|
|
||||||
color: '#00214d',
|
|
||||||
barGap: '-100%',
|
|
||||||
}, */
|
|
||||||
{
|
{
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: [{ name: "新生总人数", value: chartMax.value }],
|
data: [{ name: "新生总人数", value: chartMax.value }],
|
||||||
|
@ -124,11 +113,22 @@ const init=(max, value) =>{
|
||||||
color: '#00214d',
|
color: '#00214d',
|
||||||
barGap: '-100%',
|
barGap: '-100%',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'bar',
|
||||||
|
data: [100],
|
||||||
|
z: 0,
|
||||||
|
silent: true,
|
||||||
|
coordinateSystem: 'polar',
|
||||||
|
barMaxWidth: 35,
|
||||||
|
roundCap: true,
|
||||||
|
color: '#00214d',
|
||||||
|
barGap: '-100%',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
option && myChart.value.setOption(option);
|
option && myChart.value.setOption(option);
|
||||||
}
|
}
|
||||||
defineExpose({init})
|
defineExpose({ init })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
Loading…
Reference in New Issue