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
46 lines (44 loc) · 1.07 KB
/
index.js
File metadata and controls
46 lines (44 loc) · 1.07 KB
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
37
38
39
40
41
42
43
44
45
46
import React from "react";
import ReactDOM from "react-dom";
import Chart from "react-google-charts";
class App extends React.Component {
render() {
return (
<div className="App">
<Chart
chartType="OrgChart"
data={[
[
{
v: "Mike",
f:
'Mike<div style="color:red; font-style:italic">President</div>'
},
"",
"The President"
],
[
{
v: "Jim",
f:
'Jim<div style="color:red; font-style:italic">Vice President</div>'
},
"Mike",
"VP"
],
["Alice", "Mike", ""],
["Bob", "Jim", "Bob Sponge"],
["Carol", "Bob", ""]
]}
options={{
allowHtml: true
}}
width="100%"
height="400px"
/>
</div>
);
}
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);