You would have a view that return a json with voting data..
And use a ajax request to this view..Using the structure's lib.
I recommend the chartjs.
Basically you will use the simplejson to format that dal data and use in view this json formatted..