h.sem
Posts: 2
Joined: Tue Feb 28, 2023 1:38 pm

Pie chart slice focus options

When using arrow keys inside the pie chart, the focus on the individual slice is not efficiently visible because of the rectangle shape. It is not directly visible to which piece the rectangle refers in some narrow cases. To more clearly highlight which slice has the focus, the border of the element itself could be highlighted.

Is there an option for focus with the exact border of the slice rather than a rectangle?
If this is not available right now, are there any plans for this in the foreseeable future?
kamil.k
Posts: 458
Joined: Thu Oct 06, 2022 12:49 pm

Re: Pie chart slice focus options

Hello h.sem,

Welcome to our forum and thanks for contacting us with your question!

If I get you correctly, you can increase the visibility of the hovered element by changing its color, border, halo, etc. Based on what effect you want to achieve, you can use our API properties or directly update the point (slice) on a specific action. Please, take a look at this demo: https://jsfiddle.net/BlackLabel/5j9e4bmL/.

As you can see, the point's color and borderColor properties are being updated by referring to the point using a built-in event. You can find a list of possible events here: https://api.highcharts.com/highcharts/p ... int.events.

Also, the example shows how to update the halo on a specific action, feel free to read our documentation about it: https://api.highcharts.com/highcharts/p ... hover.halo.

Let me know if any of these solutions work for you and if not, feel free to precise the exact effect you'd like to achieve.

Looking forward to your response,
Kind Regards!
Kamil Kubik
Highcharts Developer
h.sem
Posts: 2
Joined: Tue Feb 28, 2023 1:38 pm

Re: Pie chart slice focus options

Thank you for the information. I am looking more for the keyboard navigation. The focus visible around the slice can overlap sometimes as seen in the attachment. It is worse when patterns are used in the accessibility case.

The borderColor and borderWidth could help to mimic the focus rectangle but the border is partially shown in the example. More like a second halo than a border.
Attachments
Screenshot 2023-03-02 at 09.56.53.png
Screenshot 2023-03-02 at 09.56.53.png (21.32 KiB) Viewed 441 times
Screenshot.jpg
Screenshot.jpg (152.55 KiB) Viewed 441 times
kamil.k
Posts: 458
Joined: Thu Oct 06, 2022 12:49 pm

Re: Pie chart slice focus options

Thanks for the clarification!

Unfortunately, we currently don't support changing the shape of the focus border. You can find all possible options to customize it here: https://api.highcharts.com/highcharts/a ... ocusBorder.

You can freely create a new GitHub thread here: https://github.com/highcharts/highchart ... new/choose and mark it as a feature request. With enough user votes, there's a high possibility that this option will be added to the core code.

Regards!
Kamil Kubik
Highcharts Developer

Return to “Highcharts Stock”