Charts
Charts copied to clipboard
[Issue 4782] Add AudioGraphSupportChart
Issue Link :link:
https://github.com/danielgindi/Charts/issues/4782
Goals :soccer:
- For visually impaired end users, they should be able to get quick grasp of the chart by using AuidoGraph feature.
- For developers who use this library, I want them to be able to get benefits of AudioGraph out of the box. That is, I want to offer them default implementation for AudioGraph support.
- But if developers want to use their own implementation for AudioGraph support, they should be able to do that.
Implementation Details :construction:
Most of the logics are held within new AudioGraphSupportChart
protocol, so that it can be read and understood in seperate context.
BarLineChartViewBase
conforms to AudioGraphSupportChart
, because it is the most basic chart class that has X and Y axis, which is required for chart to be represented as AudioGraph.
There are few following changes in BarLineChartViewBase
- Add necessary stored properties for
AudioGraphSupportChart
conformation - Call
automaticallyUpdateYAxisForSelectedEntry
ininitialization
so that yAxis that AudioGraph depend on can be updated everytime VoiceOver focus has changed. - In
notifyDataSetChanged
, callupdateAccessibilityChartDesciptor
so that AudioGraph can be updated to the latest data.
Most of added code will be executed only when VoiceOver is running.
Testing Details :mag:
https://user-images.githubusercontent.com/4796743/156188863-dee5a476-719c-4b15-8c7d-70822b1226e8.mp4
https://user-images.githubusercontent.com/4796743/156189678-a29e1ad3-b9e1-4338-8f27-7ae31b5851d3.mp4
https://user-images.githubusercontent.com/4796743/156189972-3d105be4-d6a2-4ef7-8e32-8e3594d72dd6.mp4
https://user-images.githubusercontent.com/4796743/156190307-55c9914a-e71f-4443-8c42-92faa8dd6032.mp4
https://user-images.githubusercontent.com/4796743/156190562-745d4534-805d-4cee-ae5a-6918fbafb47e.mp4
https://user-images.githubusercontent.com/4796743/156190779-17c519cd-3873-4ee2-8c16-d3b981e3e4e3.mp4