JFreeChart Developer Guide (0.9.20)

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

JFreeChart Developer Guide (0.9.20)

Post by david.gilbert » Tue Jun 08, 2004 11:35 am

A new version of the JFreeChart Developer Guide has been released. For more information about how to purchase the guide:

http://www.object-refinery.com/jfreechart/guide.html

The update is free for those that have purchased the guide previously.
Last edited by david.gilbert on Mon Sep 13, 2004 10:01 am, edited 1 time in total.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

juhi
Posts: 15
Joined: Wed Jul 14, 2004 7:19 pm

Re Developer Guide

Post by juhi » Wed Jul 21, 2004 5:58 pm

Hi David,

I've purchased the Developer Guide as it said that it would help in understanding how to create datasets. however, I haven't been able to find any section in it that really explains how to go about doing so. It just explains the classes and what they are used for. Is there some particular section that I may not be seeing correctly?? Can you please point out which sections in the guide (the latest one) can help me understand how to create datasets. For example, if I want to create an XYPlot, I know that I require an XYDataset, but how is it to be created, or what kind of values do i need to pass to it is a little unclear. Any help in this matter will be highly appreciated.

thanks so much,
Juhi.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Thu Jul 22, 2004 10:38 am

Hi Juhi,

I'm working on the JFreeChart Developer Guide right now, so I will try to improve the coverage of the XYDataset interface, how it is used, etc. But to help you along right away:

XYDataset is just an interface, so to create a dataset you need to use a class that implements the interface. JFreeChart provides two classes that should cover most common requirements:

- XYSeriesCollection - for regular (x, y) data items;
- TimeSeriesCollection - for (date, value) data items;

The documentation for these classes has been enhanced just recently, so I've uploaded the latest "work in progress" version of the JFreeChart Developer Guide to the download page (it should be accessible now if you want to take a look).

Two demos worth looking at are XYSeriesDemo.java and TimeSeriesDemo.java (both can be found in the src/org/jfree/chart/demo directory of the JFreeChart 0.9.20 distribution). These show a simple dataset being created, followed by a chart that displays the dataset.

Hope that helps...

Dave

juhi
Posts: 15
Joined: Wed Jul 14, 2004 7:19 pm

Re - Duplicate values

Post by juhi » Thu Jul 22, 2004 11:38 pm

Hi David,

Thanks for that update! I had a question regarding duplicate values which I have not been able to understand. I'm using the XYSeries to create an XYPlot. by using the default constructor, it allows duplicate values. But in my plot I can see only 1 point corresponding to that (x,y) pair. This is exactly what I needed, but I don't understand how it does it when the flag for duplicates is set to true? Also, if I need to do the same thing in histograms - as in, if I'm plotting a histogram based on a column of data (retrieved from a table), and i want NO duplicate values allowed for a specified column (say Id), how do I do that? For example, I have data such as this-
(A,B) - { (1,2),(1,2),(1,2),(3,4),(5,6),(4,5),(9,8),(9,8) }
For this dataset, I want a histogram for values of B, BUT where the values of A are repeated, I don't want to inclue them multiple times. In other words, B value 2 should be taken only ONCE though it is listed 3 times, and B value 8 should be taken only ONCe though it is listed 2 times. Does this make sense??

your help would be appreciated highly!
Thanks,
Juhi.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: Re - Duplicate values

Post by david.gilbert » Fri Jul 23, 2004 4:47 pm

juhi wrote:I'm using the XYSeries to create an XYPlot. by using the default constructor, it allows duplicate values. But in my plot I can see only 1 point corresponding to that (x,y) pair. This is exactly what I needed, but I don't understand how it does it when the flag for duplicates is set to true?
It is probably drawing multiple items on top of one another, but you only see the last one drawn because it obscures the others. That's my guess, anyway.
juhi wrote:Also, if I need to do the same thing in histograms - as in, if I'm plotting a histogram based on a column of data (retrieved from a table), and i want NO duplicate values allowed for a specified column (say Id), how do I do that? For example, I have data such as this-
(A,B) - { (1,2),(1,2),(1,2),(3,4),(5,6),(4,5),(9,8),(9,8) }
For this dataset, I want a histogram for values of B, BUT where the values of A are repeated, I don't want to inclue them multiple times. In other words, B value 2 should be taken only ONCE though it is listed 3 times, and B value 8 should be taken only ONCe though it is listed 2 times. Does this make sense??
For this you will need to pre-process your data to remove the duplicates.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

juhi
Posts: 15
Joined: Wed Jul 14, 2004 7:19 pm

Post by juhi » Wed Jul 28, 2004 5:37 pm

Hi David,

thanks for that advice. the flag for allowing duplicates if set to false will take care of the duplicate values in XY-plots right?

I was also asking if there was some way by which I could have a graph showing a grid with different cells colored differently based on some parameters. If I need to accomplish a chart like that - showing different cells, what would be the best renderer and dataset to use?
Can you please help me out with this? I was going through the documentation as well, but as you mentioned that its still a "work-in-progress", I haven't been able to get much of an idea to do this kind of plotting. your help would be very much appreciated!

thanks,
juhi.

petitlen

two question

Post by petitlen » Mon Aug 23, 2004 8:02 pm

hi david:
I'm a developer from china.I have some question:
1.Jfreechart is very good.But I think it's hard to use as it's docs is so simple and it's class struct is so complex.So I want to get the guide,how can purchase it from china?
2.I have doubt for serval days, how can view the actual value over the position of bar chart etc. I search the docs,beacause the struct is so complex,I didn't know what class to do this,plot?render?or ....
thx:)

Guest

How to get new updated Developer guide.

Post by Guest » Tue Sep 21, 2004 7:35 pm

Hi David,

I have already purchased the developer guide with v0.9.16. How do i get a new updated one. Thanks,

-Anupma

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: How to get new updated Developer guide.

Post by david.gilbert » Tue Sep 21, 2004 8:43 pm

Guest wrote:I have already purchased the developer guide with v0.9.16. How do i get a new updated one.
You can download the latest version using the URL, username and password supplied in your purchase confirmation e-mail.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked