Chart2D: 1.6.2 Released: Free

Keywords: chart2d, chart, graph, pie, bar, line, dot, scatter, plot

Chart2D is a library written in Java for adding 2D charts to Java programs (or for exporting them to images). It can draw the following charts: pie, line, vertical bar, horizontal bar, scatter-plot, and charts with any combination of lines, bars, and dots.

Chart2D excels at offering sizing options: magnification (on/off), stretching (on/off), supports both automatic and custom sizing.

Chart2D is a JComponent, so adding charts to your programs is almost as easy as adding JButtons to them. Configure the chart, add it to a layout manager..., and forget about it.

Chart2D charts can be exported to java.awt.BufferedImage images which are sub-classes of java.awt.Image images. There's no need to first display the chart. Configure the chart and then get the image.

See runnable demos and screenshots at:

http://chart2d.sourceforge.net

[955 byte] By [jjsimas] at [2007-9-26 5:23:56]
# 1
Bump.
jjsimas at 2007-6-29 19:31:00 > top of Java-index,Security,Cryptography...
# 2
Bump.
jjsimas at 2007-6-29 19:31:00 > top of Java-index,Security,Cryptography...
# 3
Hi !Thanks, look's very nice, just was I was looking for.Mikael
mikael_aronsson at 2007-6-29 19:31:00 > top of Java-index,Security,Cryptography...
# 4

1.9.3e (2001 January 07):

-Fixed minor bug in GraphChart2DProperties.validate(boolean). Sometimes

returned "valid" when properties were invalid.

-No API Change.

1.9.3d (2001 January 04):

-Fixed bug for line charts with only one data category and set.

-Fixed minor bug in GraphPropertiesPanel.

-Changed default minimum sizes for LBChart2D, LLChart2D, and PieChart2D.

-No API Change.

1.9.3c (2002 January 02):

-Fixed bug in Chart2DPropertiesPanel. Colors type property wasn't working.

-Improved pie labels layout. Labels now hug chart more closely.

-Improved Dataset class for use with pie charts. Values to represent by pie

sectors are sums of all the items for each set of data in the dataset.

-No API Change.

1.9.3b (2001 December 29):

-For overlay charts, added ability to specify the order graphs are painted.

See GraphChart2DProperties.setGraphOverlayOrder (int).

See GraphChart2DProperties.setGraphOverlayOrderCustom (int[]).

-No API Change.

1.9.3a (2001 December 27):

-Rename static variable of Dataset.

-Fix bugs relating to incorrect layout when graph borders where different

thicknesses.

-Improve use of available space and preferred sizing accurracy. This was a

significant improvement.

-Other bug fixes for charts with extreme settings.

-Some API Change:

-Dataset.VALIDATE_ON_UPDATE renamed to Dataset.VALIDATE_ON_UPDATE_DEFAULT.

1.9.2c (2001 December 26):

-Each *Properties class now has a method that returns all the *Chart2D objects

that are using *Properties object. This is useful because *Chart2D objects

in GUIs can now be told to repaint themselves, without validating the the GUI.

-Some bug fixes in the update logic.

-No API Change.

1.9.2b (2001 December 25):

-Corrected javadoc descriptions in PieChart2D, LBChart2D, LLChart2D, and

Dataset.

-Renamed GraphProperties setVerticalLines* methods to setLabelsLines*.

-Renamed GraphProperties setHorizontalLines* methods to setNumbersLines*.

-Added new constructors/specifiers/accessors for many classes in order to make

chart configuration easier. No new customizability introduced.

-Moderate API Change: Renaming of some methods.

1.9.2a (2001 December 23):

-Switched to new structure for data sets. Instead of float[][] now use the

Dataset class. A Dataset class can be used by multiple different charts so

that copying the dataset is reduced.

-Changed naming scheme for axis properties in GraphChart2DProperties. The XAxis

and YAxis methods have been dropped and replaced by LabelsAxis and NumbersAxis

methods. This way, one GraphChart2DProperties configuration will produce the

same chart when added to either LBChart2D or LLChart2D.

Also the single PlotAxis method was replaced by a NumbersAxis method.

"LabelsAxis" refers to the axis for which one must specify labels explicitly.

"NumbersAxis" refers to the axis that always contains the range of numbers to

plot against.

-Moderate API Change:

-Change dataset structure from float[][] to Dataset. Use new Dataset methods.

-Change XAxis and YAxis methods to LabelsAxis and NumbersAxis methods.

1.9.1c (2001 December 22):

-Bug fix for GraphChart2DPropertiesDialog.

setCustomizeGreatestValue (boolean) not updating properties.

-Input error checking implemented for *Dialog classes.

-No API Change.

1.9.1b (2001 December 21):

-Bug fix for certain overlay charts.

-Changed the preferred size logic some. Always performs calculation regardless

of chart changes. This makes behavior more consistent.

-Changed pack() some. Calling pack() now sets the size of the component to its

preferred size. Not to be used if *Chart2D is added to a content pane.

-Some API Change: The behavior of pack() is different.

1.9.1a (2001 December 20):

-Updated Chart2D dialogs for 1.9.0 API. Dialogs are now designed for developers

expirementing with Chart2D settings, rather than for end users.

-Changed the preferred size layout logic some.

-Improved LLChart2DFrameDemo. Vertical graph lines should be visible.

-Some API Change:

-The old dialogs don't exist anymore. Replaced by new dialogs.

-Some methods were renamed slightly

(ex. setXAxisBulletsColor (Color) became setXAxisTicksColor (Color)).

1.9.0g (2001 December 16):

-Fixed bug in graph charts sizing logic. Preferred size now more accurate.

-Added logic for specifying the amount of overlap of components for charts with

multiple data values per category and per set. New methods are:

GraphProperties.setGraphBarsWithinCategoryOverlapRatio (float),

GraphProperties.setGraphDotsWithinCategoryOverlapRatio (float), and

GraphProperties.setGraphLinesWithinCategoryOverlapRatio (float).

-Added logic for specifying how much of any leftover graph space should be fed

back to dots and lines thicknesses. Now, logic matches that for bar feedback.

Use GraphProperties.setGraphBarsExcessSpaceFeedbackRatio (float).

Use GraphProperties.setGraphDotsExcessSpaceFeedbackRatio (float).

Use GraphProperties.setGraphLinesExcessSpaceFeedbackRatio (float).

-Improved logic for pie labels lines. Thick lines are smoother.

-Fixed bug in GraphProperties. GraphProperties can now be used for multiple

charts.

-Fixed bug in preferred size logic of LLChart2D.

-No API Change: Compatible with 1.9.0f.

1.9.0f (2001 December 10):

-Moved logic of the setCustomPreferredSize() method into the setPreferredSize()

method. Using setPreferredSize() will cause all preferred size calculations

to be bypassed, until the pack() method is called.

-Added logic for setMinimumSize(). The minimum size will bound the preferred

size at the "bottom" similar to setMaximumSize() bounding the preferred size at

the "top".

-Removed Chart2DProperties.setCustomMinPrefSize(). That would have been

duplicate logic, since now this can be specified in the *Chart2D classes.

-Some API Change: Not totally compatible with 1.9.0e.

-Change calls of Chart2DProperties.setCustomMinPrefSize() to calls of

*Chart2D.setMinimumSize().

-Change calls of *Chart2D.setCustomPreferredSize() to calls of

*Chart2D.setPreferredSize().

1.9.0e (2001 December 9):

-Added logic that allows for faster start up time of GUI's with multiple charts,

where at least one of them is hidden (ex. charts added to a JTabbedPane). See

MultipleChart2DFrameDemo for an example of how to take advantage of this logic.

-Added a method, setCustomPreferredSize (boolean, Dimension) for scenarios where

multiple charts are being created, they all have equal initial sizes, and they

are allowed to magnify. Use the method to make the preffered sizes of charts

the initial size so that all the charts won't be magnified at the initial size.

-No API Change: Compatible with 1.9.0d.

1.9.0d (2001 December 5):

-Fixed more problems with graph components due to trying to keep components

from overlapping. They look better when they are allowed to overlap.

To keep components from overlapping, reduce their thickness models manually.

-Fixed problem with some GraphProperties constants not being accessible/public.

-No API Change: Compatible with 1.9.0c.

1.9.0c (2001 December 4):

-Fixed a problem with stacked bar charts overlapping eachother. Added a method

for specifying how much of the extra space in a graph should be fedback to

the bars. The default is for 75% of the space to be fedback to the bars.

-Improved the look of the labeling of pie charts. Added one method.

-No API Change: Compatible with 1.9.0b.

1.9.0b (2001 December 1):

-Gap between chart and legend now specifiable from the Chart2DProperties

class. See the setChartBetweenChartAndLegendGap*(*) methods.

-No API Change: Compatible with 1.9.0a.

1.9.0a (2001 November 30):

-Bug fixes for extreme cases (i.e. charts with no data).

-Better bar charts. Unused space on the graph can be fed back to the bar.

The new method for adjusting the amount of feedback is:

GraphProperties.setGraphBarsExcessSpaceFeedbackRatio (float).

The default is to feedback .75f * the amount of space to the bars, the

rest will remain as unused graph space between bars.

-Better pie charts. The preferred size is more accurate now.

-No API Change: Compatible with 1.9.0.

1.9.0 (2001 November 28):

-Beginning transition to new model for configuring charts. (More on this below)

-Added ability for charts to have multiple GraphArea classes Before, each set

of data could only be graphed by the same components. Now, one can add

multiple data sets to the chart, and with each data set, one can add a new

graph area specifying what components to graph the data (i.e. bars, lines,

dots...). See the LLChart2DFrameDemo or the tutorial for more information.

-Changed some code in TextArea to make it compute the smallest bounds of a label

faster.

-Changes some code that computes the preferred sizes of the charts. Preferred

sizes should now be more accurate.

-Added ability to specify the color of the outline of graph components.

-Added ability to set the minimum preferred size of the *ChartArea. This is

useful because the layout of Chart2D is so good, the charts don't need enough

room... Setting the custom minimum preferred size, the Chart will be at least

as big as you want.

-API Change: The old Chart2D API is no more. The properties of the charts

are now in seperate classes than the charts themselves. This way multiple

charts can be configured/and changed via a single properties class. This new

API is under development and may still see significant chagnes. To configure

charts now, you create a Chart2DProperties class, then configure either a

PieChart2DProperties class or a GraphChart2DProperties class (depending on the

kind of chart that you want) then pass that last configured class to either

a PieChart2D, LBChart2D, or LLChart2D class depending on what kind of chart

you want. As before, you then either add the chart2d to a content pane of

a GUI or call getImage.

1.8.3 (2001 November 19):

-Bug fix for data sets with floating point labels.

-No API Change.

jjsimas at 2007-6-29 19:31:00 > top of Java-index,Security,Cryptography...
# 5

Hello,

Thanks for creating and sharing

your charting system.

I'm having an issue using

the pie charts where the labels

are too small to read (there are

btween 5 and 15 of them) while

the pie itself is quite large.

Which option would correct this?

zeldy at 2007-6-29 19:31:00 > top of Java-index,Security,Cryptography...