Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessible goal chart (colors) #1161

Closed
myasonik opened this issue May 14, 2021 · 2 comments · Fixed by #1218
Closed

Accessible goal chart (colors) #1161

myasonik opened this issue May 14, 2021 · 2 comments · Fixed by #1218
Assignees
Labels
:accessibility Accessibility related issue discuss To be discussed enhancement New feature or request :goal/gauge (old) Old Goal/Gauge chart related issues released on @32.x released Issue released publicly

Comments

@myasonik
Copy link

Goals have color-focused range definitions, but what's a good way to make those accessible?

Currently, the range definition might look something like:

const colorMap: { [k: number]: Color } = {
  '-200': `rgb(${q1},${q1},${q1})`,
  '-250': `rgb(${q2},${q2},${q2})`,
  '-300': `rgb(${q3},${q3},${q3})`,
};

My idea is to extend that to include semantic information as well:

const colorMap: { [k: number]: [Color, string] } = {
  '-200': [`rgb(${q1},${q1},${q1})`, 'cold',
  '-250': `rgb(${q2},${q2},${q2})`, 'really cold'
  '-300': `rgb(${q3},${q3},${q3})`, 'freezing'
};

This way, the author is setting up one map and has everything in one place.

And then when rendering, this info can be added to the accessible graph summary.

@myasonik myasonik added bug Something isn't working discuss To be discussed :accessibility Accessibility related issue labels May 14, 2021
@markov00 markov00 added enhancement New feature or request and removed bug Something isn't working labels May 26, 2021
@rshen91 rshen91 self-assigned this Jun 9, 2021
@markov00 markov00 added the :goal/gauge (old) Old Goal/Gauge chart related issues label Jun 12, 2021
nickofthyme pushed a commit that referenced this issue Jul 12, 2021
# [32.0.0](v31.1.0...v32.0.0) (2021-07-12)

### chore

* **license:** elastic license 2.0 ([#1242](#1242)) ([67fa0a3](67fa0a3)), closes [#1213](#1213)

### Features

* **a11y:** allow user to add optional semantic meaning to goal/gauge charts ([#1218](#1218)) ([87629e2](87629e2)), closes [#1161](#1161)

### BREAKING CHANGES

* **license:** the library is released now under Elastic License 2.0 and SSPL
@nickofthyme
Copy link
Collaborator

🎉 This issue has been resolved in version 32.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nickofthyme nickofthyme added the released Issue released publicly label Jul 12, 2021
@nickofthyme
Copy link
Collaborator

🎉 This issue has been resolved in version 32.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to Metrika-Inc/elastic-charts that referenced this issue Jul 21, 2021
# [31.2.0](Metrika-Inc/metrika-charts@v31.1.0...v31.2.0) (2021-07-21)

### Bug Fixes

* **heatmap:** correctly place x axis text in all cases ([1cf37d4](Metrika-Inc/metrika-charts@1cf37d4))
* **xychart:** when axis title is on top, it correctly lines up with axis labels vertically ([12839b5](Metrika-Inc/metrika-charts@12839b5))

### Features

* **a11y:** allow user to add optional semantic meaning to goal/gauge charts ([elastic#1218](https://github.com/Metrika-Inc/metrika-charts/issues/1218)) ([87629e2](Metrika-Inc/metrika-charts@87629e2)), closes [elastic#1161](https://github.com/Metrika-Inc/metrika-charts/issues/1161)
* **heatmap:** added the ability to customize the position and rotation of the x axis labels ([8280b64](Metrika-Inc/metrika-charts@8280b64))
* **heatmap:** hard code x-axis labels sideways ([26ebe5e](Metrika-Inc/metrika-charts@26ebe5e))
* **xychart:** basic customization support for putting the axis title on top of the chart ([79865ba](Metrika-Inc/metrika-charts@79865ba))
* **xychart:** hard code left axis label to top of graph ([f10ff72](Metrika-Inc/metrika-charts@f10ff72))
* **xychart:** the title for the right axis can now also go on top ([b2087a1](Metrika-Inc/metrika-charts@b2087a1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:accessibility Accessibility related issue discuss To be discussed enhancement New feature or request :goal/gauge (old) Old Goal/Gauge chart related issues released on @32.x released Issue released publicly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants