TechArena Community

TechArena Community (http://forums.techarena.in/)
-   Software Development (http://forums.techarena.in/software-development/)
-   -   JfreeChart (http://forums.techarena.in/software-development/1178547.htm)

puk284 12-05-2009 08:35 PM

JfreeChart
 
Hi,

I have a line chart that iv created using jfreechart. The graph has six lines.when the graph comes up, there are no lines on it.This is delibrate. Iv also made six check boxes. The problem i have is that when the check boxes are checked, the lines are supposed to apear, each line corresponding to the boxes that has been checked. But the lines are'nt appearing when the boxes are checked. Please can someone help. Thank you for your help.

Team Leader 12-05-2009 10:02 PM

Re: JfreeChart
 
1. Start Eclipse 3.0. (If you do not have Eclipse installed, visit www.eclipse.org.)
2. Go to File -> New -> Project....
3. Select Java Project and click on Next. Enter in a project name and click Finish.
4. Select the project in the Package Explorer view. Go to Project -> Properties.
5. Click on Java Build Path? on the left-hand side of the dialog box and on the right-hand side
click on the Libraries? tab.
6. Click on Add External JARs...? and locate jfreechart-1.0.0-pre1.jar and jcommon-1.0.0-common.jar.
Click on OK.
7. Select the project in the Package Explorer view. Go to File -> New -> Package. Give the package
a name and click on Finish.
8. Select the newly-created package in the Package Explorer view. Go to File -> New -> Class. Give the
class a name and click on Finish.
9. You are now ready to start using the JFreeChart library!

For more info go to this link.

DllD 12-05-2009 10:20 PM

Re: JfreeChart
 
To begin with, you need to download the JFreeChart and JCommon distributions, unpack them on your local machine, and generate the API documentation.
  1. Download the latest version of the JCommon class library.
  2. From the subdirectory unpack JCommon, run javadoc to generate the Javadocs locally. If you are unfamiliar then skip this step, but then Eclipse won’t be able to show you the Javadoc popups for JCommon.
  3. Download the latest version of the JFreeChart class library,unpack it to a directory on your local computer,to the ant subdirectory of the just-unpacked JFreeChart, run ant javadoc to generate the Javadocs locally. As with step 2, you can skip this step, but then you’ll be missing the API documentation.
  4. In Eclipse, select Preferences then from the Window menu choose the Java ->Build Path -> User Libraries node in the tree. Click on the New and enter JCommon 1.0.12 as the name for a new user library.
  5. select JCommon version number in the list, Add JARs button and select the jcommon-1.0.12.jar file from the JCommon directory created in the early steps.

for more information check here.....
http://nchc.dl.sourceforge.net/sourc....9-install.pdf

puk284 12-05-2009 10:26 PM

Re: JfreeChart
 
I have already installed the jcommon, and jfreechart libraries and attached them to the program that i have written. I have no problem with displaying the graph. i just wanted to make the lines respond to the check boxes that were selected

Zecho 13-05-2009 08:22 AM

Re: JfreeChart
 
Which line chart Jfreechart are you using ?

There are many alternatives -
- Line Animation in Java
- Different Line Styles
- Adding Line to JTree

.....try any one of this and check


All times are GMT +5.5. The time now is 04:12 AM.