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

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

Open
srishalu opened this issue Jun 24, 2022 · 0 comments
Open

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

srishalu opened this issue Jun 24, 2022 · 0 comments

Comments

@srishalu
Copy link

srishalu commented Jun 24, 2022

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

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