Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

canvas.setOption(option) 中的option参数是否可以使用 page.data 里的数据? #10

Open
ycheukf opened this issue Apr 30, 2020 · 0 comments

Comments

@ycheukf
Copy link

ycheukf commented Apr 30, 2020

    onShareAppMessage: function(res) {  },
    data: {
        ec_data: {....}
        ec: {
            onInit: function(canvas, width, height) {
            const oChart = echarts.init(canvas, null, {
                width: width,
                height: height
            });
            canvas.setChart(this.oChart); 
            oChart.setOption(this.ec_data); // 希望在这里使用  ec_data
            return oChart;
        }
    },
    onReady() {}
});

如上面的代码, 我希望重新画图, 是否可以不用重新赋值 ec, 而是赋值 ec_data, 这样是否有什么办法?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant