[Geoserver-devel] Make pie chart from database query in geoserver map

Hi,

I am very new to geoserver.I Have one question.
I am using geoserver,openlayer and postGIS. I want to make pie chart on map based on the data from PostGIS database. I am not able to retrieve the data. Can you please tell me how to get data from database and make pie chart accordingly on given point ?
I have one main.html ,while querying it should get data from database and display pie chart on map point…Please tell me how to do this.