forked from rakannimer/react-google-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
28 lines (26 loc) · 759 Bytes
/
index.js
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
import React from "react";
import ReactDOM from "react-dom";
import Chart from "react-google-charts";
const data = [
["Year", "Visitations", { role: "style" }],
["2010", 10, "color: gray"],
["2020", 14, "color: #76A7FA"],
["2030", 16, "color: blue"],
["2040", 22, "stroke-color: #703593; stroke-width: 4; fill-color: #C5A5CF"],
[
"2050",
28,
"stroke-color: #871B47; stroke-opacity: 0.6; stroke-width: 8; fill-color: #BC5679; fill-opacity: 0.2"
]
];
class App extends React.Component {
render() {
return (
<div className="App">
<Chart chartType="Bar" width="100%" height="400px" data={data} />
</div>
);
}
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);