Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
This patch appends the SUM of the values being displayed on the chart next to each item in the legend. This is a special case for just the PieChart render type as it's the only one that uses the first data point set for an exact count. This provides a better indicator of the total values included in the data set at a glance. Otherwise you'd have to hover over parts of the image to see what the % actually represents.
Example output:
Peaches (10)
Apples (12)
Screenshot included in addition to patch to show what this provides.
Comment | File | Size | Author |
---|---|---|---|
counts.png | 73.69 KB | btopro | |
google_chart_tools-piechartcounts.patch | 1.8 KB | btopro |
Comments
Comment #1
konforti CreditAttribution: konforti commentedThis is very nice. It might worth implement it in base module, and not only for the views integration.
What about the ability to turn it off if someone wants too?
Comment #2
btopro CreditAttribution: btopro commentedHaven't worked much with the base module to know what the implementation there would entail (module seems pretty minimal outside of views integration imo). I'll have to take a look tomorrow but that makes sense to me (option as well).
Comment #3
btopro CreditAttribution: btopro commented