Piechart sample code