Skip to content

Commit 76db36b

Browse files
author
Martin Hansen
committed
Refactor
1 parent e2106e9 commit 76db36b

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# vue-plotly [![Build Status](https://travis-ci.org/statnett/vue-plotly.svg?branch=master)](https://travis-ci.org/statnett/vue-plotly) [![Coverage Status](https://coveralls.io/repos/github/statnett/vue-plotly/badge.svg?branch=master)](https://coveralls.io/github/statnett/vue-plotly?branch=master)
22

3-
> A vue wrapper for plotly.js chart library
4-
53
## Install
64

75
```bash
@@ -10,21 +8,19 @@ npm install @statnett/vue-plotly plotly.js --save
108

119
Then use it as a module:
1210

13-
```bash
11+
```js
1412
import VuePlotly from '@statnett/vue-plotly'
15-
```
1613

17-
```js
1814
export default {
15+
components: {
16+
VuePlotly
17+
},
1918
data: function () {
2019
return {
2120
data: [{ x: [1, 3], y: [2, 4] }],
2221
layout: {},
2322
options: {}
2423
}
25-
},
26-
components: {
27-
VuePlotly
2824
}
2925
}
3026
```
@@ -90,7 +86,6 @@ All plotly events are captured and emitted as vue events. The names are without
9086

9187
`click`, `hover`, `unhover`, `selecting`, `selected`, `restyle`, `relayout`, `autosize`, `deselect`, `doubleclick`, `redraw`, `animated`
9288

93-
To understand the events read the official documentation https://plot.ly/javascript/plotlyjs-events/
9489

9590
## Function reference
9691

@@ -123,7 +118,3 @@ Accepts no arguments. Uses data, layout and options from the props data.
123118

124119
Read more about plotlyjs function reference here:
125120
https://plot.ly/javascript/plotlyjs-function-reference/
126-
127-
## Licence
128-
129-
MIT

0 commit comments

Comments
 (0)