I have hundreds of food products in a directory and want to show average of a specific field, lets say carbs per 100g across all food nodes that have that field data.
I want to create a bar chart and show it on every food product page that shows both the average across the site with the next data point on the chart being that specific nodes carbs per 100g so they can be compared.
How is this possible with charts? Thanks!
Comments
Comment #2
andileco commented@effortDee you could make use of the "Chart Attachment" display and in that display, use aggregation and the average function (make sure you chose "Apply to this Chart Attachment only" when aggregating, adjusting your chart settings, etc. You would attach the Chart Attachment to your block that has the current page's product. Let me know if this gives you direction.
Comment #3
andileco commentedHere's another option that I think is a good solution to your challenge: https://www.drupal.org/project/views_descriptive_statistics. Closing this ticket for that reason.