You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/12/05 07:42:47 UTC
[GitHub] XiaoNode opened a new issue #9528: echarts监听中如何调用vue方法?
XiaoNode opened a new issue #9528: echarts监听中如何调用vue方法?
URL: https://github.com/apache/incubator-echarts/issues/9528
`export default {
name: "rejectratio",
data() {
return {
monthData: {
title: { text: "Production line annual reject rate", x: "center" },
xAxis: {
data: ["1月", "2月", "3月", "4月"]
},
series: [
{
name: "Production line annual reject rate",
type: "bar",
data: ["1", "2", "3", "2"],
barWidth: "70%",
animationDelay: function(idx) {
return idx * 100;
}
}
]
},
MMcur: -1,
};
},
mounted() {
this.drawMonth()
},
methods: {
drawMonth() {
let myChart = this.$echarts.init(document.getElementById("MM"));
myChart.setOption(this.monthData);
myChart.on("click", function(params) {
// echarts中如何调用vue方法funTest?
});
},
funTest() {
console.log("this is test msg")
}
}
};`
新手问,vue项目中使用了echarts,如何在echarts监听中调用其他vue方法或者变量?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org