Home

Awesome

<p align="center"><img width="140"src="https://raw.githubusercontent.com/David-Desmaisons/vue-plotly/master/example/assets/logo.png"></p>

vue-plotly

GitHub open issues CircleCI codecov Npm version MIT License

<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 on resizing</li> </ul>

example

Live example

https://david-desmaisons.github.io/vue-plotly/

Usage

<Plotly :data="data" :layout="layout" :display-mode-bar="false"></Plotly>
import { Plotly } from 'vue-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

Installation

npm install vue-plotly

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your tests

npm run test

Lints and fixes files

npm run lint

Run your unit tests

npm run test:unit

Customize configuration

See Configuration Reference.