I want to use chart module(c3 lib) of drupal 8 to show a chart of user count for different roles using views. E.g.

Role Name  Total user
a             5
b             10
c             13

I achieved above table using aggregation in views. I followed this guideline to create a chart but when I create chart attachment and add it to parent, the value of child replace the value in the parent chart.It should merge. Any help would be appreciable.

1 Answer 1


This is an issue of needing to be sure that you first set the format of the attachment display to "This chart attachment (override)", and then adjusting the format settings. Don't forget to attach your "Chart attachment" display to the appropriate display.

I wanted to set the style plugin to do this by default (see this issue: https://www.drupal.org/project/charts/issues/2899035), but I am unable to find any documentation on how to do this programmatically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.