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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

konforti’s picture

This 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?

btopro’s picture

Haven'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).

btopro’s picture

Status: Needs review » Needs work