Closed (fixed)
Project:
Charts
Version:
5.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Nov 2021 at 17:39 UTC
Updated:
28 Mar 2022 at 13:39 UTC
Jump to comment: Most recent
This issue enabled use of the grouping feature in Views: https://www.drupal.org/project/charts/issues/3207514. However, this solution is incompatible with the color-picker currently in place in the data provider section of the (Views) chart format settings form.
There are other situations in which the current color model doesn't work, particularly pie/donut charts.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #5
andileco commentedTested and it's working great!
Comment #6
it-cru@andileco & @nikathone: Hello together, I can't figured out yet, how to configure this in my Charts (with Chart.js) view with pie or donut.
I have a view where I count a true/false field on my entities and wanted to display the result as a pie or donut chart with green and red colors. Currently my view is using aggregation for this count, but maybe this is not the right way anymore.
Previously I've used views_simplechart module for this where it was working out of the box with this views configuration, but I switched this project yesterday from an old D8 to D9 and replaced views_simplechart with charts module.
Will be nice if one of you or someone else could give me a little hint for a Charts module newbie ;)
Comment #7
andileco commentedHi @IT-Cru. I think you *should* have already been able to do this by selecting "no label" for the label field and then selecting "True" and "False" as data providers and assigning each a color (assuming to have a Views field representing/summing each). I know this is not documented anywhere because I just discovered how to do this when chatting with @nikathone.
That said, you are right that this issue needs to be updated to focus more on the grouping aspect. We felt we may need to separate out the pie/donut issue into a separate one after completing the first part of the task, but had not updated the ticket yet.