mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 17:40:23 +03:00
Used cursor pointer in bar charts
This commit is contained in:
parent
ed584d19e5
commit
b863c2e19d
1 changed files with 3 additions and 0 deletions
|
@ -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
|
// Do not show tooltip on items with empty label when in a bar chart
|
||||||
filter: ({ yLabel }) => !isBarChart || yLabel !== '',
|
filter: ({ yLabel }) => !isBarChart || yLabel !== '',
|
||||||
},
|
},
|
||||||
|
onHover: isBarChart && (({ target }, chartElement) => {
|
||||||
|
target.style.cursor = chartElement[0] ? 'pointer' : 'default';
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
const graphData = generateGraphData(title, isBarChart, labels, data, highlightedData);
|
const graphData = generateGraphData(title, isBarChart, labels, data, highlightedData);
|
||||||
const height = isBarChart && labels.length > 20 ? labels.length * 8 : null;
|
const height = isBarChart && labels.length > 20 ? labels.length * 8 : null;
|
||||||
|
|
Loading…
Reference in a new issue