使用echarts图片展示数据,他的x轴,一会显示一会不显示,很头疼,百度了很久,解决方案如下
父组件:
`<div>
<botrightcom
:todayWoker="todayWoker"
:OrderWarnConver="OrderWarnConver"
@datachange="datachange"
:returnWaringCountWorder="returnWaringCountWorder"
:edata="edata"
ref="mychild" //此处是为了调子组件的方法而定义的
></botrightcom>
</div>`
//这是向后端请求数据的代码块
MonthWorkOrderCount() {
let param = {
}
getAction(this.url.thisMonthWorkOrderCount, param).then((res) => {
// console.log(res)
if (res.code == 200) {
this.returnWaringCountWorder.thisMonthRejectCount = res.result.thisMonthRejectCount
this.returnWaringCountWorder.thisMonthTotal = res.result.thisMonthTotal
this.returnWaringCountWorder.thisMonthUrgentCount = res.result.thisMonthUrgentCount
var arrdaylist = []
for (var item of res.result.timeList) {
var day = item.split('-'