I have a content type which has an entity reference field referencing a taxonomy vocabulary. I am trying to make a chart using Views which displays a count of how many nodes reference each taxonomy term.
I have it working as a bar or column chart. Each bar is a different color. The colors are configured under "Entity grouping settings" next to each taxonomy term entity label.
If I switch it to the desired pie chart, the pie pieces are the correct size, but they are all the same color. They are all the color under "Field Name" rather than the colors configured for each taxonomy term under "Entity grouping settings" (donut also behaves this way).
I am using Billboard.js.
Am I doing something wrong or is this a bug?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | charts-pie_donut_colors-3442641-5.patch | 757 bytes | liam morland |
| #4 | charts-pie_donut_colors-3442641-4.patch | 751 bytes | liam morland |
Issue fork charts-3442641
Show commands
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 #3
liam morlandI was able to get the colors working by adding a patch to
charts_billboard. The patch deals with#grouping_colors, which is currently not used bycharts_billboard. I note thatcharts_highchartsdoes have code that uses#grouping_colors.Comment #4
liam morlandCurrent merge request contents as a patch.
Comment #5
liam morlandThis patch handles non-existent #grouping_colors. Merge request updated.
Comment #6
andileco commentedThank you for your patch! If you wanted to, you could add that identical code in the C3.js class.
Billboard.js and C3.js are a little neglected within the Charts module just because I end up using Highcharts for my work. I appreciate you identifying, posting, and patching!
Comment #7
liam morlandOK, I added identical code to
charts_c3in the merge request. I have not tested it since I don't use it.Comment #9
andileco commentedI tested and confirmed it works - thanks again!