• Post Reply Bookmark Topic Watch Topic
  • New Topic

Custom Charts  RSS feed

 
pradeep selvaraj
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am developing an application that requires me to draw charts. This is the functionality i would be requiring. A bid image with lots of charts in it. This big image should be scrollable. Each of the charts in the big image should let me have tool tip.

This is what i have as a plan,

For the big image it has to extend JComponent, so that we can add the charts to it and to make it scrollable depending on the number of charts added.

The charts too should extend JComponent so that i can have tool tips on them.

Is my idea correct? feed back please....

Serish
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not advanced Java. Moving to Swing/AWT.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An image can't extend anything - it is a binary component that may be drawn somewhere (e.g. on a Canvas). If it's big enough to not fit on in the viewable area, then a JScrollPane could be used to achieve scrolling.

The same goes for charts - they are drawn somewhere, but are not part of the Swing object hierarchy.

So you have to decide if either the charts are drawn on top of the big image (in which case there is only a single scrollable component), or if they are separate from it (in which case you probably won't see much of the big image, since it's obscured by the chart components).
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your idea sounds workable. A hint to ease the way for showing graphic components:
 
pradeep selvaraj
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think i did not explain the charting component properly. The big image is just a collection of the charts(nothing else). I want the big image to be scrollable. The charts in the big image should each have a tooltip. How should i do it? Please tell me what classes i should use (extend or implement) and where i should draw the charts.

Thanks
Serish
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your statement of intent seems to be a straightforward guide to building your app.
 
pradeep selvaraj
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Craig.
 
Laurie Haischer
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Awhile back I worked on an application that required that the data be displayed with charts. I found a package called JFreeChart that solved all my problems and is very easy to make use of both for server side and client side displays.

check out www.jfreechart.org if you still need this type of api.

Best regards,
Laurie
 
Laurie Haischer
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry ... minor correction for the url: it's http://www.jfree.org

hope this helps!

Laurie
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!