lots of lines, tooltips, and selection feedback?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Anonymous

lots of lines, tooltips, and selection feedback?

Post by Anonymous » Thu Apr 11, 2002 2:06 am

Our company is evaluating use of JFreeChart for our product. First we need to know if it supports several key features (in descending order of importance):

1) We may have up to 500 lines on a given XY chart. Is it possible to draw the legend separately (e.g., in its own scrollable pane)?

2) It would be great if the user could click-to-select a given line in an XY chart, or on a bar in a bar chart, or a pie on a pie chart. JFreeChart could then highlight the clicked selection with a black border (or some such). Are there any plans for this?

3) We need tooltips to work on XY charts. Is it true that tooltips only work on pie, scatter, and bar charts?

4) Is it possible to change the stipple pattern (analogously to the color cycling) of the lines? That way, we could have a dashed orange line, a solid orange line, etc (to make it easy to tell the difference between similar colors on a chart with hundreds of lines). Are there any plans for this feature?

Many thanks for any feedback!

David Gilbert

Re: lots of lines, tooltips, and selection feedback?

Post by David Gilbert » Thu Apr 11, 2002 8:23 am

> 1) We may have up to 500 lines on a given XY chart. Is it
> possible to draw the legend separately (e.g., in its own
> scrollable pane)?

You could set the legend to null then write your own class to display the legend in a scroll pane next to the JFreeChartPanel.

A LegendPanel class might be a nice addition to JFreeChart, but I don't have time to do it right now.

> 2) It would be great if the user could click-to-select a
> given line in an XY chart, or on a bar in a bar chart, or a
> pie on a pie chart. JFreeChart could then highlight the
> clicked selection with a black border (or some such). Are
> there any plans for this?

Not supported at present. It might be in the future, but I'm not working on it at present.

> 3) We need tooltips to work on XY charts. Is it true that
> tooltips only work on pie, scatter, and bar charts?

With XYPlots, the tooltips are currently working only when shapes are displayed. I've modified the code so that it will work in all cases from version 0.8.2. If you want to see the changes, you can check out the development version of JFreeChart from CVS on SourceForge.

> 4) Is it possible to change the stipple pattern (analogously
> to the color cycling) of the lines? That way, we could have
> a dashed orange line, a solid orange line, etc (to make it
> easy to tell the difference between similar colors on a chart
> with hundreds of lines). Are there any plans for this feature?

You can use the setSeriesStroke(...) method in the Plot class. There is an example in LineChartDemo1.java. The only limitation is that the Legend class doesn't display the pattern yet, just the color.

Regards,

DG.

Locked