For more information about J/Chart, see the J/Chart Javadoc Reference.
cgHistogramChartVisualandcgRoseHistogramVisualuse an updatedcgHistogramBinDiscwhich implements HdrHistogram, an external library designed for recoding histograms of value measurements in latency and performance sensitive applications.- Added support for cgBarChartVisual.BarType.PERCENTAGE in
cgHistogramChartVisual. - Added support for cgBarChartVisual.BarType.BESIDE, STACKED, and PERCENTAGE to
cgRoseHistogramVisual. The functionssetMinimumTickDistance(int)andsetTickPrecision(int)have been added to customize the adaptive tick placement.
- Polar chart improvements: added new base class
cgPolarChartVisualthat is extended bycgRoseDiagramVisualandcgRoseHistogramVisual. Allows improved API to the polar charts.cgPolarChartVisualobjects do not support shadow or 3D effects. - Added
cgRoseHistogramControlPanel. - Improved javadocs in the polar charts.
- Removed the deprecated
cgChartVisualControland its subclasses. Methods incgChartAnnotationVisual,cgLegendVisual,cgChartLabel,cgChartAxisVisual,cgChartGridVisualthat returned these objects now return a dummy controller and are themselves deprecated. - Made curve fill be accurate when the data visual is moved up in the chart frame.
- Added Tornado chart (
cgTornadoChartVisualand associated tutorial TornadoChartDemo).
Add shaded grids. This allows the grid to shade alternating rows with light grey or arbitrary colors. We added the following methods to cgChartGridVisual.
- setEnableRowShading
- isRowShading
- setRowShadingColors
- getRowShadingColors
The tutorial showing this feature is RoundedBarDemo.java.
Added rounded bar tops for the bar chart. We added the following methods to cgBarChartVisual2D:
- setEnableRoundedBars
- isRoundedBars
- setRoundedBarHorizontalRadius
- getRoundedBarHorizontalRadius
- setRoundedBarVerticalRadius
- getRoundedBarVerticalRadius
The demonstration tutorial is RoundedBarDemo.java.
We added the feature to have internal axes This allows the axes for a chart to be displayed inside the central component. This feature is useful to save space when user has ony a small screen area for the display.
On cgChartFrameVisual, we added enums AxesType {INTERNAL,EXTERNAL} and AxesEndClip {BOTH, HORIZONTAL, NONE, VERTICAL} and new methods.
We added to cgChartFrameVisual the following constructors and/or methods:
- cgChartFrameVisual(cgChartDataVisual dataVisual, cgCrossLayout.Position legendPosition, cgChartFrameVisual.AxesEndClip axisClip))
- cgChartFrameVisual(cgFrameAxisSpec[] specs, cgCrossLayout.Position legendPosition, cgChartFrameVisual.AxesEndClip axisClip)
- AxesType getAxesType()
- setInternalAxesClip(AxesEndClip axesEndClip)
- AxesEndClip getInternalAxesClip()
The tutorial is InternalAxesChartDemo.
Removed artificial limit to the number of points in the cgPolarLineChartVisual.
Added new interface cgClippable. Changed cgChartAnnotationVisual to implement this new interface (it already implemented the two methods in this interface). Changed cgChartDataVisual to implement this new interface and provided new methods to implement the interface. This change allows users to clip all drawing to the central data visual area. For example, sometime the line in a line chart was going beyond the bounds of the central data visual area. By enabling clipping on the cgChartDataVisual, that can now be prevented.
Added logarithmic scale ability to the Y axis of cgHistogramChartVisual. This class now implements cgScaleModeSelectable. The tutorial, HistogramDemo, has been changed to show this new capability. To see it, change the source code line
private boolean useLogarithmicScale = false;So that useLogarithmicScale is true.
Added methods cgChartAxisVisual.isDetailSelfAdjustable() and setDetailSelfAdjustable(boolean) so that users can get better performance by disabling the axis behavior that changes the level of detail based on the view scale.
Added new tutorial variants/ResizingChart to demonstrate how to make a chart that resizes when its container resizes.
Improved docs in LogLineDemo.
Fixed set-ManualRange -- chart now updates self after this method is called.
Details of the API changes
com.interactive.jchart.shapes.cgChartAxisVisual
- Added : method public boolean com.interactive.jchart.shapes.cgChartAxisVisual.isDetailSelfAdjustable()
- Added : method public void com.interactive.jchart.shapes.cgChartAxisVisual.setDetailSelfAdjustable(boolean)
com.interactive.jchart.shapes.data.cgHistogramChartVisual
- Added : method public com.interactive.jchart.shapes.data.cgScaleModeSelectable$ScaleMode com.interactive.jchart.shapes.data.cgHistogramChartVisual.getXDisplayScaleMode()
- Added : method public com.interactive.jchart.shapes.data.cgScaleModeSelectable$ScaleMode com.interactive.jchart.shapes.data.cgHistogramChartVisual.getYDisplayScaleMode()
- Added : method public void com.interactive.jchart.shapes.data.cgHistogramChartVisual.setXDisplayScaleMode(com.interactive.jchart.shapes.data.cgScaleModeSelectable$ScaleMode)
- Added : method public void com.interactive.jchart.shapes.data.cgHistogramChartVisual.setYDisplayScaleMode(com.interactive.jchart.shapes.data.cgScaleModeSelectable$ScaleMode)
Added ability to have multiple axis for a chart, see tutorial MultipleCharts and changes to cgChartFrameVisual.
Added a completely new editor for charts.
Added new chart types: cgRoseDiagramVisual, cgRoseHistogramVisual, cgPolarLineChartVisual.
We deprecated cgChartDefaultSeries and cgChartDefaultDataSource. We also added some new classes that should be preferred instead of these deprecated classes: cgImmutableDataSource, cgStandardDataSource, cgImmutableDataSeries, cgStandardDataSeries, cgImmutableStringSeries, cgStandardStringSeries, and cgStandardSelectionSeries.
We also added two implementations of cgChartInvalidater: cgStandardChartInvalidater and cgEmptyChartInvalidater. These classes are useful on their own and also to serve as a base class that can be extended when you need to write a class that must implement cgChartInvalidater.
- In
cgChartDefaultDataSource, changed the visibility of the methodsaddLabelSeries,addSelectionSeries,addAnnotation, andclearfrom protected to public. - In
cgChartDefaultSeries, changed the visibility of the methodsaddValue(double),addString(String)andclear()from protected to public. - Added new class
cgAbstractLegendVisual. - Added three methods to
cgChartFrame:getAxis(cgCrossLayout.Position), getAnnotation(cgCrossLayout.Position), andsetLegend(cgAbstractLegendVisual, cgCrossLayout.Position position). - Changed
cgChartFrame.getLegend()to return acgAbstractLegendVisual. - Removed the protected field
_defAttrfromcgChartVisual, and replaced it with a new protected methodgetDefaultAttribute(). - Changed
cgChartDataSeries.getValueto return adoubleinstead of aDouble. - Also changed
cgChartDefaultSeries.addValueto accept adoubleinstead of aDouble. - Added method
getDataVisual()tocgChartFrameVisual. - Fixed broken implementation of
cgChartDefaultDatasource.clearSelection(). - Added convenience methods to cgChartFrameVisual and cgChartAxisVisual to set the fonts.
- Made axis tick and tick labels smaller to improve the look.
- Fixed clipping problem while printing.
- Allow user to set and get a chart title (new methods on cgChartFrameVisual).
- Axis width now follows the width of the widest axis tick label automatically.
- Histogram chart now listens to changes in the histogram bin description.
Removed the deprecated method removeAllChartAttributeEventListener from the interface cgChartInvalidater.
Removed support for the clone method from all data component interfaces. This entailed the below changes.
- Removed
Object clone()method andextends Cloneablefrom the interfacescgChartStringSeries, cgChartSelectionSeries, cgChartDataSeries, cgChartDataSource, and cgLegendSource. - Changed the
clonemethod incgChartDefaultSeriesandcgChartDefaultDataSourceso that it is protected and always throwsCloneNotSupportedException. - Removed
clonemethod fromgallery.RandomDataSourceandchart.data.RandomDataSource.
The cgHistogramEdges.initInterval method was changed to remove any assumptions that the bins start or end on integer values. Callers that desire this behavior should modify their calling code to perform the appropriate Math.floor or Math.ceil on the parameters to this method.
cgHistogramChartVisual was changed so that after a call to setEdges, this class will stop automatically managing the edges. Any users who call cgHistogramChartVisual.setEdges should listen for changes in their data and make calls to cgHistogramChartVisual.setEdges when appropriate.
Added new tutorial Simplest that shows a very simple line chart.
Details of the API changes can be found in JChart_32changes.txt.
The 3.1 release is the first release for J/Chart. This module depends on J/CarnacPro jars and the int util jars, and does not have any other dependencies.
Copyright © 2004-2026 by SLB.
All rights reserved.