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

Navigation issue on chart click #18

Closed
cghanassia opened this issue Aug 5, 2017 · 2 comments
Closed

Navigation issue on chart click #18

cghanassia opened this issue Aug 5, 2017 · 2 comments

Comments

@cghanassia
Copy link

Hello,
The navigation failed when i try to navigate after click on chart

public chartClicked(e: any): void { this.router.navigate(['/page/home']); }

<div echarts [options]="optionPieWhite" class="demo-chart-2" (chartClick)="chartClicked($event)"></div>

This is an issue from ngx-echarts or angular 4 ?

Thank for your response.

@xieziyu
Copy link
Owner

xieziyu commented Aug 6, 2017

@cghanassia I'm afraid this should not be an issue of ngx-echarts if chartClick is correctly emitted. I did some test in my project and it can navigate to the target url when I clicked some components in the chart.

Remember that, the chartClick is only emitted when you clicked certain components in the chart. Please refer to the official doc of echarts for details about the events: https://ecomfe.github.io/echarts-doc/public/en/api.html

@cghanassia
Copy link
Author

Thank you to your response.

For sure, i dont' manage efficiently angular 4 or echarts. I just find a workaround i declare also a 'click' event and by lucky this event is trigger after 'chartClick'.

So i get back what i need for the navigation and on 'click' event i do the navigation.

I hope for the futur release for Angular or Echarts the event 'chartClick' work correctly.

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

2 participants