flutter_echarts icon indicating copy to clipboard operation
flutter_echarts copied to clipboard

How to get the chart a-axis and y-axis data onclick

Open srishalu opened this issue 2 years ago • 0 comments

I want to show the selected x-axis and y-axis data in a separate text widget. I don 't want to use tooltip. I have used extra scipt

extraScript: '''
                            chart.on('click', (params) => {
                              if(params.componentType === 'series') {
                                Messager.postMessage(JSON.stringify({
                                  type: 'select',
                                  payload: params.dataIndex,
                                }));
                              }
                            });
                          ''',

But this code is not working, i am not getting anything payload. How to get the datas ?

Any help is really appreciated

srishalu avatar Jun 24 '22 07:06 srishalu