David-Desmaisons / vue-plotly

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

Support for Vue3 #45

Open vrandeshbandikatti opened 2 years ago

vrandeshbandikatti commented 2 years ago

This library does not work with Vue3.

Desperate need for support on vue3 as many are migrating from Vue2 to Vue3

mikemrg17 commented 2 years ago

I wish I had read your comment earlier, I have been struggling with this library all day.

mokadevcloud commented 1 year ago

Hello, any chance Vue 3 support will be forthcoming? Thanks!

tall1 commented 1 year ago

Hi, are there any changes since last post here? Is there support for Vue3?

EWChina999 commented 9 months ago

Is there support for Vue3?

hhaensel commented 6 months ago

There's quite an easy workaround to get it working. Before loading "vueplotly.min.js" execute the following script:

window.vueLegacyPlugins = {}
Vue.component = function(componentname, component) {
    window.vueLegacyComponents[componentname] = component
}

Then in your vue app add the following line after creating your app:

app = Vue.createApp()
// legacy component support
app.component("plotly", vueLegacyComponents.plotly)
Tylorgonza commented 3 months ago

There's quite an easy workaround to get it working. Before loading "vueplotly.min.js" execute the following script:

window.vueLegacyPlugins = {}
Vue.component = function(componentname, component) {
    window.vueLegacyComponents[componentname] = component
}

Hello, at what level of the code does this part go in?