-
Notifications
You must be signed in to change notification settings - Fork 179
/
PropertyPieChart.js
51 lines (39 loc) · 1.02 KB
/
PropertyPieChart.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import Toolkit from 'Viewer.Toolkit'
import PieChart from 'PieChart'
import React from 'react'
class PropertyPieChart extends React.Component {
/////////////////////////////////////////////////////////
//
//
/////////////////////////////////////////////////////////
constructor () {
super ()
}
/////////////////////////////////////////////////////////
//
//
/////////////////////////////////////////////////////////
render () {
const { guid, title, data, viewer, style } = this.props
return (
<div className="property-pie-chart" style={style}>
<div className="title controls">
<label>
{ title }
</label>
</div>
<PieChart onGroupClicked={(e) => {
const dbIds = e.expanded ? [] : e.data.dbIds
Toolkit.isolateFull(
viewer,
dbIds)
viewer.fitToView()
}}
guid={guid}
data={data}
/>
</div>
)
}
}
export default PropertyPieChart