Package org.askalon.graph.chart

This package defines the main parts needed to create charts.

See:
          Description

Interface Summary
Chart This interface is implemented by every chart and provides some basic common functionality.
DescriptionModeChart This interface is implemented by all charts that support different modes for descriptions.
HierarchyChart Provides an interface for the hierarchy chart, providing access to basic functionality like the setting of values, descriptions, showing level and layouts.
LinearChart Provides an interface for the linear chart, providing access to basic functionality like the setting of values, order, visability and grouping.
LineBarChart Provides an interface for the line-bar chart, providing access to basic functionality like the setting of values, order and visability.
MultipleSurfaceChart The multiple surface chart is similar to the surface chart, but it additionally allows to display multiple surfaces, each one with a configurable color.
NormalizeableChart This interface is implemented by all charts which support the normalisation of values.
OrderedChart This is a super-interface for all charts that support multiple sections that can be arranged in different orders.
PieChart Interface for the pie chart, which is a is a circular chart divided into sections that display relative magnitudes or percents.
RibbonChart Interface for the ribbon chart, providing access to basic functionality like the setting of values, visibility and accumulation.
SectionChart The super-interface of all charts that support multiple sections with different colors.
SurfaceChart The surface chart allows to display data that is distributed on a grid as a bended surface.
SurfacesChart This is the common super-interface for charts that support one or more surfaces consisting of 2 dimensional datapoints.
UnalignedChart This is the super-interface for all charts that support lines in x- and z-direction in their coordinate grid.
XMLEventChart Interface for the xml-event chart, which supports to add events from multiple sources with a timestamp, to link events and add additional attributes for descriptions.
XYChart Interface for the XY chart, which can show nodes with x/y coordinates from a variable number of datasets.
XYXMLChart This is the common super-interface of the XY- and XMLEventChart, providing functionality that is supported by both charts.
 

Class Summary
ChartConfiguration Objects of this class describe the whole configuration for a chart and provide a settings dialog, allowing the user to dynamically change settings in a graphical dialog.
ChartFactory This class is used to create implementation specific (hard or soft rendered) objects of charts and chartpanels.
GridValueElement The GridValueElement describes one datapoint value in the grid.
HierarchyLayout Allows to specify a layout for a level of the hierarchy chart using the ratio of number of elements to be placed on X-axis : number of elements Z-axis.
SurfaceColorCalculator This class calculates the color of a surface of the SurfaceChart, based on it's current height.
 

Enum Summary
ChartType This is an enumeration of all available chart types.
DescriptionMode Description mode: Should the descriptions contain text or the data point postion?
HierarchyMeanFormula Contains various types of supported mean forumals for the hierarchy chart.
LinearGrouping Defines grouping modes available for the linear chart.
NodeType This is an enumeration of the available node types for charts which support different node types (XY and XML event chart).
Renderer This enum should be used to create renderer-specific ChartFactories.
 

Exception Summary
ChartNotAvailableException This exception is thrown if a chart is not available, maybe due to separating it out in the build process, or because a chart is not available for a specific renderer.
 

Package org.askalon.graph.chart Description

This package defines the main parts needed to create charts.
To instantiate a chart the following code snippet is already enough.

 1 import org.askalon.graph.chart.ChartFactory;
 2 import org.askalon.graph.chart.ChartType;
 3 import org.askalon.graph.chart.LinearChart;
 4 import org.askalon.graph.chart.Renderer;
 5 import org.askalon.graph.chart.viewer.ChartPanel;
 6 import org.askalon.graph.chart.viewer.GraphicsPanel;
 7 
 8 public class Example {
 9  public Example() {
10                 Renderer r = Renderer.HARD;
11                 if (!r.isFunctional())
12                         r = Renderer.SOFT;
13                 
14                 ChartFactory cf = r.getFactory();
15                 ChartPanel cp = cf.getChartPanel();
16                 GraphicsPanel gp = new GraphicsPanel(cp);
17                 
18                 // Create the chart etc.
19                 if (r.isChartAvailable(ChartType.LINEAR)) {
20                         LinearChart lc = cf.getLinearChart(5, 3);
21                         cp.setChart(lc);
22                         
23                         // Do whatever comes next for your application
24                 }
25         }
26 }

Not all lines are necessary but recommended. Lines 11 and 19 are additional checks to see if the renderer is available on this platform and if the chosen chart was built for this renderer. The Java3d renderer might for instance fail if either not all jars are in the classpath or if the native libraries are not available via the property java.library.path or they are not the right ones (right operating system but wrong architecture e.g.).

A more detailed documentation is available here.



Part of:
Askalon_Logo
ASKALON Visualisation Diagrams