Skip to content

Commit

Permalink
Update README.md (#3)
Browse files Browse the repository at this point in the history
Added style tag to exported chart for Chart.js implementation

When I first tested this library out I wasn't sure if it was charting, adding the style tag in the example might help people getting started. 😁 

(There is a similar issue with UPlot but I was unable to see the charted line after adding height and width).
  • Loading branch information
mountain-hiker authored May 26, 2022
1 parent 2b2b600 commit 7cdb22d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const chartConfig = {
},
};

export default () => <Chart config={chartConfig}/>;
export default () => <Chart config={chartConfig} style={{height: '100%', width: '100%'}}/>;
```

#### Streaming Data
Expand All @@ -109,7 +109,7 @@ export default () => {
// Update the charted data with newData
setDataRef.current.setData(newData);

return (<Chart config={chartConfig} ref={setDataRef}/>);
return (<Chart config={chartConfig} ref={setDataRef} style={{height: '100%', width: '100%'}}/>);
}
```

Expand Down

0 comments on commit 7cdb22d

Please sign in to comment.