David-Desmaisons / vue-plotly

📈 vue wrapper for plotly.js
https://david-desmaisons.github.io/vue-plotly/
MIT License
256 stars 74 forks source link

Does it work with Vue 3 ? #22

Open clementlefevre opened 4 years ago

clementlefevre commented 4 years ago

i could not make the example works on Vue 3 : "core-js": "^3.6.5", "vue": "^3.0.0-0", "vue-plotly": "^1.1.0"

runtime-core.esm-bundler.js?5c40:38 [Vue warn]: Property "$createElement" was accessed during render but is not defined on instance. at <Plotly data= [{…}, __v_reactive: Proxy] layout= {title: "Plot update test", __v_reactive: Proxy} > at <App> and runtime-core.esm-bundler.js?5c40:496 TypeError: Cannot read property '_c' of undefined at Proxy.render (vue-plotly.umd.js?04d1:209952) at renderComponentRoot (runtime-core.esm-bundler.js?5c40:529) at componentEffect (runtime-core.esm-bundler.js?5c40:4214) at reactiveEffect (reactivity.esm-bundler.js?a1e9:42) at effect (reactivity.esm-bundler.js?a1e9:17) at setupRenderEffect (runtime-core.esm-bundler.js?5c40:4197) at mountComponent (runtime-core.esm-bundler.js?5c40:4155) at processComponent (runtime-core.esm-bundler.js?5c40:4111) at patch (runtime-core.esm-bundler.js?5c40:3761) at mountChildren (runtime-core.esm-bundler.js?5c40:3924)

Otherwise, great project, thanks again !

talsibony commented 2 years ago

yes I have the same issue looks like it not working on vue 3

kfern commented 2 years ago

https://github.com/inys/covid-dashboard-js has an adaptation of the plotly component to vue3

"The sources for the plotly component where copied from David-Desmaisons/vue-plotly. Small adoptions were made since vue-plotly is not compatible with vue3 yet."

MCYouks commented 2 years ago

Thanks for sharing this resource @kfern 🙏

talsibony commented 2 years ago

Well done!

MCYouks commented 2 years ago

I am using Vite + Vue 3. Did anyone figure out a simple workaround?