Closed sjennen closed 5 years ago
The plotly instance could be passed back to the component via an event and then you could use anything in it. I can do a quick PR for this if still interested.
// Plotly.vue
mounted() {
Plotly.newPlot(this.$el, this.data, this.innerLayout, this.options);
events.forEach(evt => {
this.$el.on(evt.completeName, evt.handler(this));
});
this.$emit("plotlyready", Plotly);
},
@sjennen You can import ploty in your code to access Plotly.Fx.hover.
@David-Desmaisons could you give an example? I don't find anything related to Fx in plotly when imported.
It's been a while since anyone commented on this, but here's what I did:
import { Plotly } from 'vue-plotly'
import * as PlotlyJs from 'plotly.js'
// then
PlotlyJs.Fx.hover()
Is there a way to call Plotly.Fx.hover using this wrapper? We have a a need for that functionality based on the code from this page: https://plot.ly/javascript/hover-events/#triggering-hover-events