Where to start/end (Charts)

From: JS (dsa._at_asdf.com)
Date: 11/30/04

  • Next message: Gordon Beaton: "Re: JNI: Passing array of objects from C++ to Java"
    Date: Tue, 30 Nov 2004 09:10:12 +0100
    
    

    I have tried to look in the sorce code for the JFreeChart charts to see if I
    could find some help in making a chart. But I would like to get some of the
    basics right on charts first.

    My plan is to make the graph:

    http://www.cis.ksu.edu/~schmidt/CIS200/gifV6html/Ch5/bargraph.gif

    1) My first idea is to make the class:

    class BarGraphWriter extends JPanel

    2) The constructor method:

    public BarGraphWriter( )

    I will use to make the frame where the graph is displayed.

    3) Then I guess I need:

    public void paintComponent(Graphics g)

    as its my "pen" I write the info with

    4) public void setAxes(int x_pos, int y_pos, String top_label, int y_height)

    Is a method I need for defining the axes in the frame.

    5)public void setBar1 - setBar6 (String label1-6, int height1-6, Color c1-6)

    Is methods for each bar

    6) In the end I will need:

    class TestGraph
    { public static void main(String[] a)

    where I enter different values for testing the graph.

    Does this seem reasonable or should one start in another way?

    JS


  • Next message: Gordon Beaton: "Re: JNI: Passing array of objects from C++ to Java"

    Relevant Pages

    • RE: Conditional colors for bars in a chart???
      ... "Meenie" wrote: ... I can make a nice plain graph. ... I'd like the bars to corrospond. ... I'm new to charts and don't understand all the jargon. ...
      (microsoft.public.excel.charting)
    • RE: Conditional colors for bars in a chart???
      ... I can make a nice plain graph. ... "Meenie" wrote: ... I'd like the bars to corrospond. ... I'm new to charts and don't understand all the jargon. ...
      (microsoft.public.excel.charting)
    • Re: Insert objects from MS Graph?
      ... It seems the easiest way to do what I wanted, should anyone else have the same problem, is to re-write the Access query on which the graph is based so that it includes the aggregate functions -- e.g. countand sum-- that the Access Chart Wizard uses when it creates the graph; send the query results to MS Word as a Word Table, and then follow the instructions at ... The general idea is that the charts will form part of a regular management report that'll contain a lot of analysis and commentary, so it's obviously going to a Word document as much as possible. ...
      (microsoft.public.word.newusers)
    • Re: Problem with graph ranges
      ... Describe the resulting graph. ... >> have the same number of entries. ... >> data with data from another text file, and the 6 area charts would ... but the ranges do not. ...
      (microsoft.public.excel.charting)
    • Re: Problem with graph ranges
      ... Describe the resulting graph. ... >> have the same number of entries. ... >> data with data from another text file, and the 6 area charts would ... but the ranges do not. ...
      (microsoft.public.excel)