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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...