Skip to content

Commit

Permalink
Merge pull request #1 from 0xflotus/patch-1
Browse files Browse the repository at this point in the history
small adjustments
  • Loading branch information
jwilber committed Oct 10, 2019
2 parents f0829ff + 0eb9679 commit fa14f62
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions README.md
Expand Up @@ -99,20 +99,20 @@ new roughViz.Donut(
### <code id="Bar">roughViz.Bar</code>
Required
- `element` [string]: Id or class of container element.
- `data`: Data with which to constuct chart.
- `data`: Data with which to construct chart.
Can be either an object or string.

- If object: must contain `labels` and `values` keys:

```
```js
new roughViz.Bar({
element: '.viz',
data: {labels: ['a', 'b'], values: [10, 20]}
})
```

- If string: must be a path/url to a `csv` or `tsv`, and you must also specify the `labels` and `values` as separate attributes that represent columns in said file:
```
```js
new roughViz.Bar({
element: '#viz0',
data: 'stringToDataUrl.csv',
Expand Down Expand Up @@ -150,20 +150,20 @@ Optional
### <code id="BarH">roughViz.BarH</code>
Required
- `element` [string]: Id or class of container element.
- `data`: Data with which to constuct chart.
- `data`: Data with which to construct chart.
Can be either an object or string.

- If object: must contain `labels` and `values` keys:

```
```js
new roughViz.BarH({
element: '.viz',
data: {labels: ['a', 'b'], values: [10, 20]}
})
```

- If string: must be a path/url to a `csv` or `tsv`, and you must also specify the `labels` and `values` as separate attributes that represent columns in said file:
```
```js
new roughViz.BarH({
element: '#viz0',
data: 'stringToDataUrl.csv',
Expand Down Expand Up @@ -201,20 +201,20 @@ Optional
### <code id="Donut">roughViz.Donut</code>
Required
- `element` [string]: Id or class of container element.
- `data`: Data with which to constuct chart.
- `data`: Data with which to construct chart.
Can be either an object or string.

- If object: must contain `labels` and `values` keys:

```
```js
new roughViz.Donut({
element: '.viz',
data: {labels: ['a', 'b'], values: [10, 20]}
})
```

- If string: must be a path/url to a `csv`, `json`, or `tsv`, and you must also specify the `labels` and `values` as separate attributes that represent columns in said file:
```
```js
new roughViz.Donut({
element: '#viz0',
data: 'stringToDataUrl.csv',
Expand Down Expand Up @@ -248,7 +248,7 @@ Optional
Required
- `element` [string]: Id or class of container element.
- `data`: Must be a path/url to a `csv` or `tsv`, and you must also specify the each `y` as separate attributes that represent columns in said file. Each attribute prefaced with `y` (except `yLabel`) will receive its own line:
```
```js
new roughViz.Line({
element: '#viz0',
data: 'https://raw.githubusercontent.com/jwilber/random_data/master/profits.csv',
Expand Down Expand Up @@ -289,20 +289,20 @@ Optional
### <code id="Pie">roughViz.Pie</code>
Required
- `element` [string]: Id or class of container element.
- `data`: Data with which to constuct chart.
- `data`: Data with which to construct chart.
Can be either an object or string.

- If object: must contain `labels` and `values` keys:

```
```js
new roughViz.Pie({
element: '.viz',
data: {labels: ['a', 'b'], values: [10, 20]}
})
```

- If string: must be a path/url to a `csv`, `json`, or `tsv`, and you must also specify the `labels` and `values` as separate attributes that represent columns in said file:
```
```js
new roughViz.Pie({
element: '#viz0',
data: 'stringToDataUrl.csv',
Expand Down Expand Up @@ -335,20 +335,20 @@ Optional
### <code id="Scatter">roughViz.Scatter</code>
Required
- `element` [string]: Id or class of container element.
- `data`: Data with which to constuct chart.
- `data`: Data with which to construct chart.
Can be either an object or string.

- If object: must contain `x` and `y` keys:

```
```js
new roughViz.Scatter({
element: '.viz',
data: {x: [1, 2, 35], y: [10, 20, 8]}
})
```

- If string: must be a path/url to a `csv` or `tsv`, and you must also specify the `x` and `y` as separate attributes that represent columns in said file:
```
```js
new roughViz.Scatter({
element: '#viz0',
data: 'stringToDataUrl.csv',
Expand Down

0 comments on commit fa14f62

Please sign in to comment.