Jump to content
JasperReports Library 7.0 is now available ×

amit_walinjkar

Members
  • Posts

    2
  • Joined

  • Last visited

amit_walinjkar's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Code://The quality of pie-chart is not to what can be expected for a professional tool. // createBufferedImage when rendered on the report(Image object) and exported to // pdf does not generate a sharp image, it is rather blurred and lossy. //Even the 48x48 pix icons appear blurred in the PDF reports. JFreeChart chart3 = ChartFactory.createPieChart3D("", dataset, true, false, false); PiePlot3D plot3 = (PiePlot3D) chart3.getPlot(); TextTitle title= new TextTitle(); title.setFont(new Font("Arial", Font.PLAIN,10)); title.setText("Carbon BreakDown Community"); chart3.setTitle(title); plot3.setLabelPadding(RectangleInsets.ZERO_INSETS); plot3.setLabelFont(new Font("Arial", Font.PLAIN,8)); plot3.setLabelGenerator(new StandardPieSectionLabelGenerator("{1}={2}")); plot3.setDepthFactor(0.1);plot3.setCircular(false);//plot3.setStartAngle(270); plot3.setDirection(Rotation.CLOCKWISE); plot3.setInsets(RectangleInsets.ZERO_INSETS, true); chart3.getLegend().setItemFont(new Font("Arial", Font.PLAIN,10)); chart3.getLegend().setItemLabelPadding(RectangleInsets.ZERO_INSETS); chart3.setBackgroundPaint(Color.LIGHT_GRAY); Image img = chart3.createBufferedImage(225, 175); return img;
  2. I have a similar problem, although with the charts generated in the pdf reports. We have used jasper reports 3.7.4 and found out that the charts generated from jfreecharts library in jasper reports do not render well when printed. They appear blurred and the labels on the pie and bar charts cannot be customized. The default renderer sets a width to the pie-chart labels which I have not found a way to alter. The createImage function for charts, it seems, generates an image and I do not know how to create a lossless bitmap from java using either getImage() or 'new ImageIcon()'. Similar problem occurs when the pdf report prints 48x48 pixel Icons. I have used gimp or adobe photoshop to generate icons and with proper loss less compressions even when I change across image formats. Any suggestions would be appreciated. Thanks. Post Edited by amit_walinjkar at 10/15/2010 14:27
×
×
  • Create New...