更新
This commit is contained in:
@ -9,6 +9,10 @@ const props = defineProps({
|
||||
type:String,
|
||||
default:'lineId'
|
||||
},
|
||||
color:{
|
||||
type:String,
|
||||
default:'#fff'
|
||||
},
|
||||
data:{
|
||||
type:Array,
|
||||
default:[]
|
||||
@ -20,13 +24,12 @@ watch(()=>props.data,val=>{
|
||||
|
||||
function chartFn() {
|
||||
var myChart = echarts.init(document.getElementById(props.echartsId));
|
||||
var option;
|
||||
option = {
|
||||
var option = {
|
||||
grid: {
|
||||
top: "8%",
|
||||
right: "2%",
|
||||
left: "10%",
|
||||
bottom: "7%",
|
||||
bottom: "12%",
|
||||
containLabel:true
|
||||
},
|
||||
tooltip: {
|
||||
@ -51,7 +54,7 @@ function chartFn() {
|
||||
axisLabel: { color: "#fff" },
|
||||
axisLabel: {
|
||||
show: true,
|
||||
color: "#fff",
|
||||
color: props.color,
|
||||
interval: 0, // 强制显示所有标签
|
||||
// rotate: 15, // 标签旋转角度
|
||||
}
|
||||
@ -67,7 +70,7 @@ function chartFn() {
|
||||
},
|
||||
axisTick: { show: false },
|
||||
axisLine: { show: false },
|
||||
axisLabel: { color: "#fff" },
|
||||
axisLabel: { color: props.color },
|
||||
},
|
||||
series: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user