<h2>Thin vue wrapper for <a href="https://plot.ly/javascript/" target="_blank" >plotly.js</a></h2> <span>It provides:</span> <ul> <li>all plotly.js methods and events</li> <li>data reactivity</li> <li>Redraw o
npm install vue3-plotlyHTML
`
`javascript
import { VuePlotly } from 'vue3-plotly'export default {
components: {
Plotly
},
data() {
return {
data:[{
x: [1,2,3,4],
y: [10,15,13,17],
type:"scatter"
}],
layout:{
title: "My graph"
}
}
}
}
`
API
#### Props
-
data Array (optional) Data to be displayed
-
layout Object (optional) Graphic layout
-
id String (optional) Id of the root HTML element of the component.
- Others:
Plotly component implements the transparent wrapper pattern:
All other props will be passed as plotly graphic option.
Installation
`
npm install vue3-plotly
`Project setup
`
npm install
`$3
`
npm run serve
`$3
`
npm run build
`$3
`
npm run lint
``