Skip to content

Conversation

@Stamates
Copy link
Contributor

@Stamates Stamates commented Oct 9, 2021

Add labels to the data in the accessibility tables.

@Stamates
Copy link
Contributor Author

Stamates commented Oct 9, 2021

@tmecklem I added labels for the data tables using a protocol built for the dataset. My thoughts...

  1. I feel like the code would be cleaner if I just added the data_name_label and data_value_label functions to the Uncharted.Chart protocol (then I could just use @Chart in the templates instead of @chart.dataset). However, I wasn't really sure if data labels was a "chart" level concept (like title) since it's dealing with the data and I wasn't sure if there'd be situations with multiple datasets (plotting on secondary y-axis) that would further complicate things.
  2. It feels like there should be a dataset implementation for the Uncharted.Chart protocol. I see a lot of places where we're dot deconstructing from a protocol implementation (ex. @chart.dataset...) where it seems like this is defeating some of the purpose of using protocols (avoid Law of Demeter violations).

Let me know when you get 20-30 mins to chat about this.

@rheubach
Copy link
Contributor

@Stamates I think you are right we created data sets that were linked to a table this would be more flexible to be applied to more types of charts.

@rheubach rheubach requested review from tmecklem and removed request for tmecklem November 19, 2021 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants