Skip to content
Snippets Groups Projects
Commit 473a4190 authored by Tom Robinson's avatar Tom Robinson
Browse files

Disable clicking and pointer cursor on bar charts

parent 69c22a62
No related branches found
No related tags found
No related merge requests found
......@@ -450,6 +450,15 @@ function lineAndBarOnRender(chart, settings) {
return min;
}
function disableClickFiltering() {
chart.selectAll("rect.bar")
.style({ cursor: "inherit" })
.on("click", (d) => {
chart.filter(null);
chart.filter(d.key);
});
}
// run these first so the rest of the margin computations take it into account
hideDisabledLabels();
hideDisabledAxis();
......@@ -477,6 +486,7 @@ function lineAndBarOnRender(chart, settings) {
hideDisabledLabels();
hideDisabledAxis();
hideBadAxis();
disableClickFiltering();
});
chart.render();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment