How to get the chart a-axis and y-axis data onclick
srishalu opened this issue · comments
srishalu commented
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