flutter_echarts icon indicating copy to clipboard operation
flutter_echarts copied to clipboard

在下面这段使用到flutter_echarts的代码中,tooltips里formatter的onclick填入什么样的方法,才能在onMessage中获取到数据?

Open EnV1ronment opened this issue 2 years ago • 0 comments

Echarts( reloadAfterInit: true, option: ''' { dataset: { dimensions: ['name', 'value'], source: ${jsonEncode(_data1)}, }, tooltip: { enterable: true, trigger: 'item', formatter: function (params) { var data = params.data.name;

                      return '数据:' + data + ' <button onclick="">点击查看</button>';
                    },
                  },
                  .....
                }
              ''',
              onMessage: ( message) {
              },
            )

EnV1ronment avatar Jul 03 '23 16:07 EnV1ronment