Details
-
Improvement
-
Resolution: Fixed
-
Major
-
1.0
-
None
-
None
-
Unknown
-
Description
The idea would be to let the user provide color configuration via the options parameter.
ChartJS handles color configuration at the dataset level. When using the TableToChartJS macro, we could hence think of adding the colors to the data table itself. However, this approach raises several concerns:
- For accessibility reasons, we would need to remove the color column from the table since it makes no sense to persons reading the HTML page with a screen reader.
- While there is a simple way to add a column for mapping each data label to one color, it's more difficult to address the case when one wants one color per dataset. Also, it's handy to have global parameters such as opacity at the options level rather than at the data level.
For these reasons, I suggest to let the extension provide the ability to specify the chart colors via the options parameter.