I have configured JFree chart for my charting purpose and could plot the bar chart using <c:chart> tag and CategoryDataset. Now i would like to customize the chart from my backing bean and display in jsf page. But i'm getting " org.jfree.chart.JFreeChart@133c2d2 " in the page while displaying. Following the code for generating the chart
OK, so you are using a 3rd party charting component called jsf-comp. The fact that you were able to pass a DataSet parameter in the datasource attribute makes me think that you can't substitute a JFreeChart instead, which is a completely different beast. Have you seen anything that indicates this should be possible?
posted 11 years ago
I'm trying to build the UI from the bean. For that i can't use the <c:chart> tag as it offers only limited customization. In the code i'm getting the <h anelGrid id="barGraph") and trying to add the chart as a child to it.
I'd be very surprised if the JSF tags knew what to do with a JFreeChart component. That's what that library is for, after all.
My preferred way of including JFreeChart images in JSPs is the cewolf library, which is linked in my signature. It has a number of so-called "post processors" that can be used to customize charts; if none of those do what you need, then it's not hard to write your own.
posted 11 years ago
I could generate the byte for the jfreechart image. Right now i'm looking for an option to render this byte as an image in jsf page.
I have the same problem where the chart is not being displayed in a JSF page. I see org.jfree.chart.JFreeChart@133c2d2 " in the page source while displaying.
Were you able to fix this problem? Please share any ideas that I can use
posted 10 years ago
Hello "tester testser "-
Welcome to JavaRanch.
On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.
As to your question, how are you trying to display the chart? A chart image (or a JFreeChart object) is not something you can output from a JSP/JSP page. You need to embed an <img> link that points to an URL where an image generated from that chart can be gotten. A library like cewolf (or apparently "jsf-comp") can do this for you.
A day job? In an office? My worst nightmare! Comfort me tiny ad!