forked from rakannimer/react-google-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
36 lines (34 loc) · 911 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
29
30
31
32
33
34
35
36
import React from "react";
import ReactDOM from "react-dom";
import Chart from "react-google-charts";
// Ref : https://developers.google.com/chart/interactive/docs/gallery/histogram
const data = [
["Name", "Salary", "Full time employee"],
["Mike", { v: 10000, f: "$10,000" }, true],
["Jim", { v: 8000, f: "$8,000" }, false],
["Alice", { v: 12500, f: "$12,500" }, true],
["Bob", { v: 7000, f: "$7,000" }, true]
];
const options = {
title: "Company Performance",
curveType: "function",
legend: { position: "bottom" },
pageSize: 1
};
class App extends React.Component {
render() {
return (
<div className="App">
<Chart
chartType="Table"
width="100%"
height="400px"
data={data}
options={options}
/>
</div>
);
}
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);