2001 JI Open Discussion Posted August 21, 2006 Share Posted August 21, 2006 By: raj4java - rajganesh4 CHART Tags 2005-08-04 06:27Hi, I am evaluting Jasper Reports for creating reports and charts in our project. I wrote a couple of charts and all of them use JFreechart and Scriptlet to create chart. I also came across some tags like <candlestickChart> in jasper quickreference. My questions is, Is it possible to draw chart and evaluate data using ONLY jasper XML tags. It'll keep my templates free from scriptlets, which are report specific. Please share if you have any suggestions. An example would be helpful too. thanks! By: Teodor Danciu - teodord RE: CHART Tags 2005-08-04 07:15 Hi, You should be able to create charts using only JRXML tags. That was the whole purpose when implementing built-in support for charts in JasperReports. However, our first initial set of chart tags expose only a subset of the JFreeChart functionality in terms of chart customization. But this subset would be enough in most cases. We'll be adding new tags and attributes for charts in JRXML as we go and as users will request them. You can check the supplied "charts" sample that comes with our latest release to see how different types of charts can be created using JRXML only. Thank you, Teodor By: raj4java - rajganesh4 RE: CHART Tags 2005-08-04 07:20Thanks for the reply, Teodor! I'll try the new version. By: Barry Klawans - bklawans RE: CHART Tags 2005-08-04 08:00I'd like to add a bit to what Teodor said. Right now we are waiting for the GUI tools to add chart support (coming soon) so you do have to add the chart itself to the JRXML manually. I recently created 21 reports for the Bizgres integration, and many of them had charts. I found the easiest thing is to design your report in one of the GUIs and leave an empty spot wherever you intend to add the chart. If you want a 200x400 chart in a band header, make the band header height 200 bigger than it needs to be. Then, when you are done, open up the JRXML and add the chart to fill up the empty space. Since most of the charts use very few lines of JRXML, its pretty easy. I just copied the chart tags from the samples and then modified the size, data bindings, etc. -Barry Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now