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

Ensure that events defined in chart options are called too. #105

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

tiegz
Copy link
Contributor

@tiegz tiegz commented Jun 5, 2024

Currently vue3-apexcharts defines the same callback for each of apexcharts events, and those callbacks just calls "emit()" so that the e.g. @mousemove='some-handler'-style definition works:

let callback = (...args) => emit(event, ...args); // args => chartContext, options
newOptions.chart.events[event] = callback;

But the docs don't mention this limitation anywhere, so most people unsuccessfully define events in the chart options like the apexcharts docs describe.

This fix calls any defined events in the chart options after the emit() is called, so the chart options' events will work.

fix #20

@junedchhipa junedchhipa merged commit ef20080 into apexcharts:main Jun 24, 2024
@leoatfentech
Copy link

Has this been released yet ? I'm working with "apexcharts": "^3.49.2" and "vue3-apexcharts": "^1.5.3" and it seems to not be there yet ?

@junedchhipa
Copy link
Contributor

This is yet to be released.

@rabrowne85
Copy link

@junedchhipa any updates on a new release for this? Just ran into this exact issue.

@junedchhipa
Copy link
Contributor

released vue3-apexcharts@v1.6.0

@ggrote
Copy link
Contributor

ggrote commented Sep 26, 2024

This commit introduced the issues #121, #120, #119, #118, (maybe #117) and #115.
Maybe it should be reverted or a fix is needed.

@Zippanova
Copy link

This commit has caused many regressions in v1.6.0 which is now unstable.
I agree with @ggrote this should be reverted or fixed, and v1.6.0 needs this patch to make the latest package version stable again.

@junedchhipa
Copy link
Contributor

released vue3-apexcharts@1.7.0

@Zippanova
Copy link

@junedchhipa Release v1.7.0 did not address the issue introduced in this commit. Both versions 1.6.0 and 1.7.0 now contain this regression. I would suggest reverting the entirety of changes in v1.6.0 until these can be regression tested against all issues below, which remain unresolved.

This commit introduced the issues #121, #120, #119, #118, (maybe #117) and #115. Maybe it should be reverted or a fix is needed.

@ggrote
Copy link
Contributor

ggrote commented Oct 11, 2024

I would suggest reverting the entirety of changes in v1.6.0 until these can be regression tested against all issues below, which remain unresolved.

My changes did not introduce any issues. If you revert the config event change and keep my changes everything works fine.

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

Successfully merging this pull request may close these issues.

ApexCharts events not working with vue3
6 participants