-
-
Notifications
You must be signed in to change notification settings - Fork 605
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
Echarts onclick #1562
Echarts onclick #1562
Conversation
this.chart.setOption(this.options); | ||
this.chart.resize(); | ||
function unpack(e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have you picked this subset of event arguments? Have you seen the uncycle
function in chart.js
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I could see in the documentation these are the options available in the response from the click
event.
I saw the uncycle
in chart.js
but I'm not great with javascript and didn't understand it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, we will let @falkoschindler decide which variant we will integrate. Thanks!
Don't want to steal you're thunder @natankeddem, I just had your code in my repo for testing when I committed my onclick PR. |
No worries, I wanted to look further into the element testing and some other things. If you want to continue with this it will give me some time to do that. I will close my PR. |
I'm also sorry @natankeddem. I haven't seen that this PR also includes the changes from #1556. But the same remarks I made in #1556 apply here: We will need tests and demos to the docs. I'll convert this to "Draft" for now. Maybe its simpler to reopen #1556 and let @thetableman create a new PR without the dynamic option conversion so we can work on both features separately? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need demos and tests.
@rodja I can't find any tests for echarts at all in the main branch, we're any completed with the initial element PR? |
You are right @thetableman. There where no tests added in #1346. It somehow slipped through. Maybe you can coordinate with @natankeddem? https://github.com/zauberzeug/nicegui/blob/main/tests/test_chart.py could be used as an inspiration. |
Yes, I was thinking of basing it on the test for |
@thetableman Do you mind if we work together under your PR? You could add me as a collaborator. Since our contributions are interrelated it would probably be easier to manage. Also, it should be less heartburn on the maintainers with merging.
|
At first glance testing this element might be quite different than testing the |
Sounds good @natankeddem! I'll have to close this PR and submit another because the repo is located in an organization and I can't invite external collaborators, I'll invite you from a personal repo instead. This will be an opportunity to reference the dynamic parsing as part of the new PR too. New PR is #1579 |
That's why I didn't insist on tests for #1346. But sure, it's always better to have them. |
This PR adds the
on_click_point
functionality to Apache Echarts.