PiePlot3D dimension

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
spillo491
Posts: 1
Joined: Thu May 27, 2010 11:40 am
antibot: No, of course not.

PiePlot3D dimension

Post by spillo491 » Thu May 27, 2010 11:42 am

How can I set pieplot dimension ? If I set dimension for html tag img I have some problems with legend, it is fuzzy !!!!

Code: Select all

private JFreeChart drawChart() {
		
		final DefaultPieDataset dataset = new DefaultPieDataset();
        dataset.setValue("Ticket Chiusi - 65%", new Double(65.0));
        dataset.setValue("Ticket Girati - 35%", new Double(35.0));
        
        final JFreeChart chart = ChartFactory.createPieChart3D(
                "",  // chart title
                dataset,             // data
                true,               // include legend
                false,
                false
            );
        
        chart.setBackgroundPaint(new Color(216, 233, 252));
        
        
        
        final PiePlot3D plot = (PiePlot3D) chart.getPlot();
                
        plot.setBackgroundPaint(new Color(216, 233, 252));
        plot.setOutlineVisible(false);
        plot.setLabelLinksVisible(false);
        plot.setLabelGenerator(null);
        
        plot.setSectionPaint(dataset.getKey(0), new Color(0, 85, 127));
        plot.setSectionPaint(dataset.getKey(1), new Color(204, 221, 230));
                
        return chart;
	} 
Into JSP

Code: Select all

<div style="width: 250px; margin: auto;">
	<logic:notEqual name="reportForm" property="image" value="">
		<html:img page="/displayChart.jtck" paramName="reportForm" paramProperty="image" paramId="image"/> 
	</logic:notEqual>	
</div>

Locked