A pie chart using jFreeChart
Code: "canvas2D_chart_pie.py". Programming language: Python DMelt Version 1. Last modified: 07/06/2015. License: Free
https://datamelt.org/code/cache/canvas2D_chart_pie_3495.py
To run this script using the DMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.



from org.jfree.chart import ChartFactory
from org.jfree.data.general import DefaultPieDataset
from jhplot import HPlotChart

piedataset =DefaultPieDataset()
piedataset.setValue("Apr", 10)
piedataset.setValue("May", 30)
piedataset.setValue("June", 40)

chart = ChartFactory.createPieChart("Pie Chart",piedataset,1,1,1)
c1 = HPlotChart( chart )
c1.visible()