forked from rakannimer/react-google-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
35 lines (32 loc) · 663 Bytes
/
index.js
File metadata and controls
35 lines (32 loc) · 663 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import React from "react";
import ReactDOM from "react-dom";
import Chart from "react-google-charts";
const columns = [
{
type: "number",
label: "year"
},
{
label: "AttentionSpan",
type: "number"
}
];
const rows = [[2015, 5], [2016, 3], [2018, 1]];
class App extends React.Component {
render() {
return (
<div className="App">
<Chart
chartType="AreaChart"
width="100%"
height="400px"
legendToggle
rows={rows}
columns={columns}
/>
</div>
);
}
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);