Jump to content
Software FX Community

Pie Picture is small


Recommended Posts

 It is difficult to say without seeing an image of you Pie. 

For example, the following code will produce the attached Pie, which doesn't have a lot of space left around.

 <%ChartServer chart1 = new ChartServer(application,request,response);chart1.setGallery(Gallery.PIE);chart1.openData(COD.VALUES, 1, 3);chart1.getValue().setItem(0, 0, 20);chart1.getValue().setItem(0, 1, 45);chart1.getValue().setItem(0, 2, 30);chart1.closeData(COD.VALUES);%><%=chart1.getHtmlTag("400","400","PNG")%>

You can adjust the gap around the pie by calling the setGaps method. i.e. the following code will set the gaps all around to 1 pixel: 

 chart1.setGaps(new java.awt.Rectangle(1,1,1,1)); 

Link to comment
Share on other sites


I tried the code provided by you to set the color of a pie section.

But it is giving an error which is a follows:

java.lang.NoClassDefFoundError: SoftwareFX/ChartFX/Map/DefaultAttributes

at SoftwareFX.ChartFX.PointAttributesCollection.getItem(Unknown Source)

at SoftwareFX.ChartFX.ChartCore.getPoint(Unknown Source)

at com.novartis.CHartFX.PieChart.main(PieChart.java:49)

Exception in thread "main"

 Please find the attached code to generate the Pie Chart.


Thanks and regards,

Sayan Maity


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...