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

AG Charts Vue does not work with composition API/script setup #699

Closed
sk-tjdownes opened this issue Dec 5, 2023 · 3 comments
Closed

AG Charts Vue does not work with composition API/script setup #699

sk-tjdownes opened this issue Dec 5, 2023 · 3 comments

Comments

@sk-tjdownes
Copy link

sk-tjdownes commented Dec 5, 2023

I'm submitting a ...
feature request

Providing a Reproducible Scenario
Repro Sandbox

Current behavior
Installed AG Charts Community, AG Charts Vue with Vue 3 on Vite.
Exception occurs at runtime, stating
Could not find dependency: 'vue-class-component' relative to '/node_modules/ag-charts-vue3/lib/AgChartsVue.js'

Expected behavior
Since Vue maintainers have clearly stated that composition API and script setup are The Way, AG Grid Vue should support these by default.

At the very least, the documentation should state that it does not work with script setup at this time

Vue 3.10.10
Ag Charts Community 9.0.0
AG Charts Vue 3 9.0.0

  • Browser:
    Any

  • Language: ES6/7

@AG-DavidG AG-DavidG reopened this Dec 6, 2023
@AG-DavidG
Copy link
Contributor

Hi @sk-tjdownes

I see you've closed this issue yourself, but I just wanted to check that you were able to get this to work.

Please do let me know if there's anything we can improve in our library or documentation around our support for Vue.

Thanks

David

@jacobp100
Copy link
Contributor

For now, you'll need to install vue-class-component, since our package currently lists this as a peer dependency

What would 'ideal' look like for you?

@sk-tjdownes
Copy link
Author

I see you've closed this issue yourself, but I just wanted to check that you were able to get this to work.

Yes, thanks. I realized I needed to install vue-class-component. Everything was good after that. Oddly, I thought I installed it initially and was getting odd errors, but it likely could have been a package name typo.

Please do let me know if there's anything we can improve in our library or documentation around our support for Vue.

I think adding that ag-charts-community and vue-class-component as requirements in the docs would simplify getting up and running.

Also, vue-class-component is deprecated, and the repo suggests a replacement. It would be good to see this switched in the vue charts plugin.

Additionally it would be nice to have some details regarding testing. I ended up mocking canvas with vitest-canvas-mock, after some research.

Thanks @AG-DavidG anf @jacobp100

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

3 participants