visualization pie chart dynamic value

Hi,

I am working with vaadin based project now i implemented static pie chart so how will i change dynamicall ? how can fetched data from database now i am using hibernate based postgresql database . if any sample how to dyanmically data show the chart?

This is my pie chart code:

                    PieChart pc = new PieChart();
		pc.setSizeFull();
		pc.setImmediate(true);
		pc.add("test1", 1.5);
		pc.add("test2", 6);
		pc.add("test3", 7);
		pc.setOption("width", 650);
		pc.setOption("height", 375);
		pc.setOption("title", "test Pie Chart Report");
		pc.setColors("red", "green", "#0000ff", "orange");
		pc.setOption("legend", "center");
		pc.setOption("is3D", true);

how to i get data for dynamically

Thanks
karthik