Is it possible to draw a 3D chart using JfreeChart like in the following link.If possible can anyone give some hints and some snippets of code on what parameters of Plot can be used to do this.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s possible though it won’t look exactly the same. The easiest way is to create a dataset (descendant of
org.jfree.data.general.PieDataset) and use one oforg.jfree.chart.ChartFactorymethods:PieDataset data = new DefaultPieDataset(); data.setValue("Section1", 30); data.setValue("Section2", 60); data.setValue("Section3", 120); JFreeChart pieChart = ChartFactory.createPieChart3D( "My Pie Chart", // title data, // data set true, // draw a legend true, // show tooltips over sections false); // do not generate image map with URLsYou can then further customize your chart through
pieChartmethods. For example, here’s how to explode one pie section:PiePlot plot = (PiePlot) pieChart.getPlot(); plot.setExplodePercent("Section2", 0.25);