Allowed visits to be selected on charts so that they get highlighted on the rest of the charts

This commit is contained in:
Alejandro Celaya
2020-04-10 11:59:53 +02:00
parent 05deb1aff0
commit 8f42e65ccd
8 changed files with 169 additions and 90 deletions

View File

@@ -20,6 +20,7 @@ export default class SortableBarGraph extends React.Component {
sortingItems: PropTypes.object.isRequired,
extraHeaderContent: PropTypes.func,
withPagination: PropTypes.bool,
onClick: PropTypes.func,
};
state = {
@@ -74,7 +75,7 @@ export default class SortableBarGraph extends React.Component {
}
render() {
const { stats, sortingItems, title, extraHeaderContent, highlightedStats, withPagination = true } = this.props;
const { stats, sortingItems, title, extraHeaderContent, withPagination = true, ...rest } = this.props;
const { currentPageStats, pagination, max } = this.determineStats(stats, sortingItems);
const activeCities = keys(currentPageStats);
const computeTitle = () => (
@@ -115,7 +116,7 @@ export default class SortableBarGraph extends React.Component {
stats={currentPageStats}
footer={pagination}
max={max}
highlightedStats={highlightedStats}
{...rest}
/>
);
}