The chart context is the object in control of the painting process, and holds instances of
several chart entities, like the vertical and horizontal axis, grid, titles, series and others.
Some of these entities must be explicitily created, like series, whereas other entities are
internally created by the chart context, like the grid, axis and titles.
The chart context is represented by the GenericGraph class, which descends from JPanel. Use one
of the subclasses of GenericGraph to create a chart context. To develop applications to display
charts other than scatter charts and pie charts, use the Graph class,
otherwise use ScatterGraph and PieGraph. The Graph class can be found in the
sGraphChart.jar file, whereas ScatterGraph and PieGraph can be found in
sScatterChart.jar and sPieChart.jar, respectively.
The example below creates a chart context using the Graph class, which is then laid out on a
JFrame component. JetChart core classes are found in the package com.jinsight.jetchart.
import javax.swing.*; import java.awt.*; import com.jinsight.jetchart.*; public class Example1 extends JFrame { public Example1() { Graph graph=new Graph(); Container ct=getContentPane(); ct.add("Center",graph); setSize(400,300); setVisible(true); } public static void main(String[] args) { new Example1(); } }