Feature Wiki
Tabs
Introducing KS-Charts for Poll
Page Overview
[Hide]1 Initial Problem
Results presentation uses non-KS Chart.
2 Conceptual Summary
The charts used in in the presentation of results in Polls should be replaced by KS counterparts. Bar charts are already available in the KS, and pie charts should be replaced by stacked bar charts (which only require a small extension of the KS).
Stacked bar charts fulfill the same basic purpose as pie charts (they show data points in proportion to the totality of the data), but they are preferrable in a few aspects: they make better use of the space they are given, they are easier to interpret, and they scale better with more data points.
3 User Interface Modifications
3.1 List of Affected Views
- Poll in Secondary Panel in Container
- 'Settings' tab in Polls
3.2 User Interface Details
Results in the Poll block are shown as a KS bar-chart, either stacked or not depending on the Poll settings. The normal bar charts are styled to stay close in presentation to the old progress bars. Percentages are now only visible in the tooltips.
In the 'Settings' tab of polls, 'Stacked Chart' is offered as an option under 'Show Results as' instead of 'Pie Chart'.
3.3 New User Interface Concepts
A slight extensions of KS bar charts are necessary to allow stacked datasets. This functionality is provided in chart.js (the library used for KS bar charts), and only needs to be made available through the KS.
4 Technical Information
-
5 Privacy Information
No changes required to the privacy information.
6 Security Implications
We do not see any changes for special security issues.
7 Contact
- Author of the Request: Samoila, Oliver [oliver.samoila]
- Maintainer: Meyer, Stefan [smeyer], Schmitz, Tim [tschmitz]
- Implementation of the feature is done by: Schmitz, Tim [tschmitz]
8 Funding
If you are interest in funding this feature, please add your name and institution to this list.
- …
9 Discussion
JourFixe, ILIAS [jourfixe], 04 MAR 2024: We highly appreciate this suggestion and schedule the feature for ILIAS 10.
UI/UX/Ally-Experts, 14 OCT 2024: As discussed in the PR Add stacking to Bar Charts #7855, we should consider how we can make charts accessible so that the different bars can be easily read by people with different colour perceptions. At the moment there is no concrete concept in the ILIAS community for an accessible colour palette in charts. We should check in which direction we want to go, how charts can be displayed in a meaningful way and which possibilities are even possible due to the UI component. It could be helpful for us to meet in a UI Clinic meeting to first clarify what measures we can take to influence the display of the UI component.
Schmitz, Tim [tschmitz], 18 OCT 2024: Thanks for making us aware of potential accessibility problems of this feature! For now, colours in charts are hard-coded for every usage of the chart UI component. Because of this, the only thing we can do here is choose a specific accessible colour palette for KS charts in the Poll.
As far as I understand, non-stacked bar charts are fine to be mono-coloured, so there we can just use the standard ILIAS main color (#4C6586). For stacked charts, a list of colors is required such that every neighbouring pair has a contrast of at least 3:1. Same goes for every color paired with white. As a starting point, how about:
- #35485F
- #F06B05
- #374E1D
- #A18BB6
- #2C2C2C
- #3D9FAE
- #663D00
- #F75E82
This palette fulfils the conditions above, and is based on the standard main ILIAS colors, including the extended palette (with the lightness modified). Unfortunately, the standard ILIAS blue is not dark enough to have a 3:1 contrast neighbour without that neighbour being too light on a white background, so that had to be made darker.
For stacked charts for Polls with more than 8 options, looping through the list of colours is probably fine (for much more than 8 options a stacked chart would probably not be selected anyways).
Does that pallete seem ok, both aesthetically and from a accessibility standpoint? Feedback would be greatly appreciated!
10 Implementation
Implemented as described above, including the changes in color palette from the discussion. For a stacked chart with more than 8 entries, colors are reused.
Test Cases
Test cases completed at 23.10.2024 by Elagamy, Ahmed [Ahmed]
- C18642 : Bar chart and Stacked chart.
Approval
Approved at 2024-10-23 by Tödt, Alexandra [atoedt].
Last edited: 24. Oct 2024, 17:47, Schmitz, Tim [tschmitz]