style mini-histogram popups (#845)

* popup styling changes

* change to target hover only and change delay

* change popover wording

* change popover wording
This commit is contained in:
Severiano Badajoz
2019-07-13 16:52:00 -07:00
committed by GitHub
parent 3d98797d8c
commit 3833bada54
+15 -6
View File
@@ -130,7 +130,12 @@ class Occupancy extends React.Component {
}; };
render() { render() {
const { colorAccessor, categoricalSelection } = this.props; const {
colorAccessor,
categoricalSelection,
category,
categoryIndex
} = this.props;
this.canvas?.getContext("2d").clearRect(0, 0, this._WIDTH, this._HEIGHT); this.canvas?.getContext("2d").clearRect(0, 0, this._WIDTH, this._HEIGHT);
@@ -138,8 +143,9 @@ class Occupancy extends React.Component {
return ( return (
<Popover <Popover
interactionKind={PopoverInteractionKind.HOVER} interactionKind={PopoverInteractionKind.HOVER_TARGET_ONLY}
hoverOpenDelay={1000} hoverOpenDelay={1500}
hoverCloseDelay={200}
position={Position.LEFT} position={Position.LEFT}
modifiers={{ modifiers={{
preventOverflow: { enabled: false }, preventOverflow: { enabled: false },
@@ -170,11 +176,14 @@ class Occupancy extends React.Component {
/> />
<div key="text" style={{ fontFamily: "Roboto", fontSize: "14px" }}> <div key="text" style={{ fontFamily: "Roboto", fontSize: "14px" }}>
<p style={{ margin: "0" }}> <p style={{ margin: "0" }}>
These histograms show the distribution of{" "} This histograms shows the distribution of{" "}
<strong>{colorAccessor}</strong> within each category. <strong>{colorAccessor}</strong> within{" "}
<strong>{category.categoryValues[categoryIndex]}</strong>.
<br />
<br /> <br />
The x axis is the same for each histogram, while the y axis is The x axis is the same for each histogram, while the y axis is
scaled to the highest bin within each histogram. scaled to the largest bin within this histogram instead of the
largest bin within the whole category.
</p> </p>
</div> </div>
</Popover> </Popover>