Chart Series provide a toggleVisibility() method that allows to hide some data points of the series (or all of them) from the user. However, setting the first series to invisible breaks the chart's keyboard navigation.
This DOJO demonstrates the behavior: For the sake of simplicity, the first of the two series is toggled invisible right after the chart is rendered, but this may happen at any other point in time. Click anywhere in the DOJO's output area. Press TAB to focus the chart. The following error is logged in the browser console:
Uncaught TypeError: Cannot read properties of undefined (reading 'options') at init.focusVisual (kendo.all.min.js:9:4230266) at init._focusElement (kendo.all.min.js:9:4410242) at init._focusFirstPoint (kendo.all.min.js:9:4409100) at init._focus (kendo.all.min.js:9:4407358)
Hello Michael,
Thank you very much for sharing a workaround to the issue. I am sure it will be helpful to the other users in the community.
We will review the typescript definitions and will modify the file if appropriate.
Regards,
Neli
Progress Telerik
Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024
Update: I have found out that a small change seems to fix the error: Instead of toggling every item's visibility using the filter function parameter of the toggleVisibility() method like this
chart.findSeriesByName("foo").toggleVisibility(false, () => true);
one could pass undefined as filter function
chart.findSeriesByName("foo").toggleVisibility(false, undefined);
Et voilà, the error is gone. See this updated DOJO as an example.
However, according to the typescript typings, passing undefined is not supported.
Hi Michael,
Thank you very much for your patience.
I am changing the status of the issue to 'Unplanned' which means that currently there is no developer assigned to the issue yet. I would suggest follow the issue in order to be notified when its status is updated.
As a token of gratitude for reporting a bug, I have increased your Telerik points.
Regards,
Neli
Progress Telerik
Hi Michael,
The issue is currently under review. I will write back with more information next week.
Thank you very much for your patience.
Regards,
Neli
Progress Telerik