All new features implemented in JetChart version 2.0 are listed below.
- Swing compatibility. JetChart now includes a set of jar files that is
Swing compatible. The AWT jar files are still available.
- XML data reading. Chart labels and series values can be read from an XML
formatted data source, using the method GenericGraph.readXMLData(Reader reader).
- Zooming. It is possible to zoom into a selected area of a chart generated
with the Graph class.
- Zoom events. A ZoomEvent object is dispatched to zoom event listeners if
chart is zoomed-in or zoomed-out. The ZoomEvent object contains information
regarding the area selected for zooming.
- The applets parameters now support international characters, passed as a
Unicode sequence.
- Scale labels can be customized using the method Scale.setLabel(String[] labels).
- The methods AbstractSerie.setValues(double[] values, int offset, int len)
and AbstractSerie.setMultipleValues(double[][] multipleValues,int offset,int len)
delimit a range of data to be displayed out of the full length of the values
array.
- The method Graph.setLabels(String[] labels,int offset,int len) to delimit a range
of data to be displayed out of the full length of the labels array.
- The method Graph.setStartDate(String startDate,int offset) can be used to shift a
starting date forward in time.
- The method Graph.setDataSetRange(int dataSetStartIndex,int dataSetEndIndex) to
delimit a range of series data points to be displayed. This method can be used
in conjunction with a sliding bar to implement chart scrolling.
- The method Graph.setShiftScope(int shiftScope), to define the horizontal shifting
scope of bar series displayed against multiple scales.
- The method Graph.setZoomAreaSplitEnabled(boolean isZoomAreaSplitEnabled) to
allow splitting the zoom selection area among GraphSet objects in a chart
displaying stacked scales.
- The mouse event listener of the Graph class is now a public class and it can be
extended to add new features to the handling of mouse events.
A reference to the GraphEventListener object can be obtained using the
method Graph.getGraphEventListener().
- The TargetLine class. A target line is a visual representation of a goal to
achieve or a limit to be avoided.
- Dashed line series.
- Dashed grid lines.
- The method AbstractSerie.setToolTipContent(String[] toolTipContent), to
customize the tooltip contents of series data points.
- The RegressionLine class. A linear regression line is a statistical tool used to
predict future values from past values.
- Logarithmic scales are now supported.
- The methods Grid.setInnerLogLinesEnabled(boolean isInnerLogLinesEnabled) and
Grid.setInnerLogLinesCount(int innerLogLinesCount) to enable inner logarithmic lines and
set the number of inner lines displayed.
- The method Scale.setVisibleLabelsIndexes(int[] visibleLabelsIndexes) to set the indexes
of the only scale labels to be displayed.
- The method Grid.setVisibleLinesIndexes(int[] visibleLinesIndexes) to set the indexes of
the only gridlines to be displayed.
- The method GridCrossedLines.setVisibleLinesIndexes(int[] visibleLinesIndexes) to set the
indexes of the only grid crossed lines to be displayed.
- The default cursor can now be changed with the method GenericGraph.setDefaultCursor(Cursor cursor).
- Chart labels can be alternately painted using a step number defined with the method
Graph.setLabelsStep(int labelsStep).
- The method GraphSerie.setCoordinatesStatus(int[] coordinatesStatus) is now effective with
the PointSerie class.
- A scale can now be positioned along the inner sides of the left and right vertical axis,
in vertical charts. Three new constants were defined to be used with the
Scale.setPosition(int position) method.
- A series title can now be positioned at two additional locations, using the method
GraphSerie.setTitlePosition(int titlePosition).
- The method Graph.setSeriesTitleShiftScope(int seriesTitleShiftScope) to change the way
series titles are arranged beside the top of the left vertical axis if series are displayed
against multiple scales.
- The TargetZone class. A target zone is a color filled polygon painted across the chart
area delimiting a zone against which series data points are plotted and can be compared
to sequences of maximum and minimum target values.
- The method Graph.setBackgroundImageArea(int backgroundImageArea) sets the area where a
background image can be painted.
- The method Graph.setGradientColorsArea(int gradientColorsArea) sets the area where the
gradient colors effect is displayed.
- A JPEG encoder is now available.
- The image encoding process was migrated from GenericGraph to the new ChartEncoder class.
- Five new methods were implemented in the Note class:
- Note.setBounds(Rectangle bounds), to set the bounds of a Note object.
- Note.setBorderColor(Color bordercolor), to set the border color.
- Note.setBorderThickness(int borderThickness), to set the border thickness in pixels.
- Note.setDraggingEnabled(boolean isDraggingEnabled), to toggle between a fixed or
a draggable Note object.
- Note.setAlignment(int alignment), to define the text alignment.
- The line thickness of the following classes can be changed:
- XAxis
- YAxis
- Grid
- GridCrossedLines
- TargetLine
- Two new variants of the method AbstractSerie.getSerieMap, one that adds chart
labels to the tooltips of series data points and another that allows a complete
customization of the series data points tooltips, using an array of strings.