From b863c2e19d2df008a7490c506c5ff49136f8f49f Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Fri, 10 Apr 2020 13:04:39 +0200 Subject: [PATCH] Used cursor pointer in bar charts --- src/visits/GraphCard.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/visits/GraphCard.js b/src/visits/GraphCard.js index b7c221a0..7cccf30d 100644 --- a/src/visits/GraphCard.js +++ b/src/visits/GraphCard.js @@ -79,6 +79,9 @@ const renderGraph = (title, isBarChart, stats, max, highlightedStats, onClick) = // Do not show tooltip on items with empty label when in a bar chart filter: ({ yLabel }) => !isBarChart || yLabel !== '', }, + onHover: isBarChart && (({ target }, chartElement) => { + target.style.cursor = chartElement[0] ? 'pointer' : 'default'; + }), }; const graphData = generateGraphData(title, isBarChart, labels, data, highlightedData); const height = isBarChart && labels.length > 20 ? labels.length * 8 : null;