albbux
Posts: 1
Joined: Tue Jul 27, 2021 6:32 pm

Trouble making bar charts click size accessible

I am trying to make sure all by bars in by bar charts are 44 px wide so that it meets WCAG accessibility guidelines.

But since the bars are so thick now, it limits how much info I can show. In the past, I had just made the click area bigger than the bar. But I am not seeing any option to do so. How have others made the click area be larger than the bar graphs themselves?

Thanks
OysteinMoseng
Posts: 52
Joined: Mon May 19, 2014 8:29 am

Re: Trouble making bar charts click size accessible

Hi, it is hard to achieve this without making the bars thick. Adding a border to SVG elements (partially) eats into the element, so adding a transparent border usually won't be ideal. Using a scrollable plot area or make the chart container scrollable might be the easiest option: https://jsfiddle.net/fr3qL7bg/1/.

Otherwise you could draw transparent boxes on top of the bars using the Highcharts Renderer, and attach your click events to those, see https://www.highcharts.com/docs/advance ... rm-drawing and https://jsfiddle.net/gh/get/library/pur ... erer-basic. This could get a bit complicated, however.
Øystein Moseng
Head of Accessibility / Core Developer
Highcharts Team

Return to “Highcharts Usage”