-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathindex.jsx
29 lines (25 loc) · 933 Bytes
/
index.jsx
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
import { DiscoverHistogram } from "@/components/vendor/discover/public/application/components/histogram/histogram";
import { Icon, Popover } from "antd"
import { useEffect, useRef, useState } from "react";
import styles from "./index.less";
export default (props) => {
const { histogramData, timefilterUpdateHandler } = props
const [visible, setVisible] = useState(false)
return (
<Popover
visible={visible}
placement="left"
title={null}
overlayClassName={styles.histogram}
content={(
<DiscoverHistogram
chartData={histogramData}
timefilterUpdateHandler={timefilterUpdateHandler}
/>
)}>
<Icon type="bar-chart" style={{color: '#006BB4', cursor: 'pointer'}} onClick={() => {
setVisible(!visible)
}}/>
</Popover>
)
}