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
32 lines (28 loc) · 733 Bytes
/
index.js
File metadata and controls
32 lines (28 loc) · 733 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
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 datasetOld = [["x", "y"], [1, 1000], [2, 1170], [3, 660], [4, 1030]];
const datasetNew = [
["x", "y"],
[1.1, 1100],
[2.1, 1000],
[2.8, 960],
[4.4, 1300]
];
class App extends React.Component {
render() {
return (
<div className="App">
<Chart
chartType="ScatterChart"
width="100%"
height="400px"
diffdata={{ old: datasetOld, new: datasetNew }}
/>
</div>
);
}
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);