I'd like to display some kind of histogram from user-data, but i don't really know the approach to do so. I have a model Vote, they belong to a User (user has_many votes), and each User has a Profile, and in there i store things like age, location, etc. (user.profile.age or vote.user.profile.age)
I now have a certain collection of votes from which i want a histogram, and what i would like to have is for example for the ages a result like: 0-20 => 15 votes, 21-50 => 10 votes, and 50+ => 2 votes (the collection would have 27 votes)
how do i set this up?