entronad / flutter_echarts

A Flutter widget to use Apache ECharts in a reactive way.

Home Page:https://pub.dev/packages/flutter_echarts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请问如何触发onMessage呢

anjiajie opened this issue · comments

我想要获取点击Echart图的Y轴数据,但是发现点击时,onMessage并不会返回任何消息,并且测试后发现onMessage并没有调用。我的extraScript方法是这样的:

extraScript: '''
chart.on('click', (params) => {

     if(params.componentType === 'series') {

            Messager.postMessage(JSON.stringify({

                  type: 'select',

                  payload: params.dataIndex,

              }));

          }

   });

''',

点折线的圆圈(折线的点),就会触发

点折线的圆圈(折线的点),就会触发

谢谢,成功了