lcw
This commit is contained in:
@ -9,11 +9,11 @@ const props = defineProps({
|
||||
type:String,
|
||||
default:'lineId'
|
||||
},
|
||||
color:{
|
||||
color:{
|
||||
type:String,
|
||||
default:'#fff'
|
||||
},
|
||||
data:{
|
||||
data:{
|
||||
type:Array,
|
||||
default:[]
|
||||
}
|
||||
@ -34,7 +34,7 @@ function chartFn() {
|
||||
if (myChart.value) {
|
||||
myChart.value.dispose();
|
||||
}
|
||||
|
||||
|
||||
// 创建新实例
|
||||
myChart.value = echarts.init(document.getElementById(props.echartsId));
|
||||
var option = {
|
||||
@ -64,7 +64,7 @@ function chartFn() {
|
||||
data:props.data.map(v=>{return v.label}),
|
||||
axisTick: { show: false },
|
||||
axisLine: { show: false },
|
||||
axisLabel: {
|
||||
axisLabel: {
|
||||
show: true,
|
||||
color: props.color,
|
||||
interval: 0, // 强制显示所有标签
|
||||
@ -141,4 +141,4 @@ onUnmounted(()=>{
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user