Best way to show thresholds for time series chart

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

Best way to show thresholds for time series chart

Post by Tim Bardzil » Wed Mar 12, 2003 11:38 pm

I'm looking for some advice as to the best way to show theshold values on a time series chart. By threshold, I mean a set value that distinguishes "good" values from "bad" values. Imagine a time series chart showing GPA each semester where the threshold is a C average. Furthermore there could be multiple threshold levels such as A, B, C, D, F averages for GPA. In my particular case, I'm plotting network round-trip-time and want to disguingish "good", "decent" and "poor" values.

Anyways, I've thought about a couple of different approaches but am not sure how easy successful they will be.

1) Plot the threshold line as its own series.
This is rather easy to do. Just create a new TimeSeries with two data points. The X-values will be the start/end to of the graph and the y-value will be the threshold. Actually I'm currently doing this but looking for a better approach. I don't think its obvious that the line represents a threshold.

2) Show threshold levels using background image. A different background color is used at each treshold level. This seems like a good idea but probably very difficult to implement.

3) Change color of series as its drawn through the various threshold levels. I tried this by extending StandardXYItemRenderer but it didn't quite work right. I could get a data point shape to be the correct color based on its y-value but I like to use lines between the shapes and this is where it didn't work.

4) Show various threshold values / levels on the y-axis label. I'm not sure how to do this. Some thing line 10 / 20 / 30 / Poor / 40 / 50 / 60 / OK / 70 / 80 / 90 / GOOD

Anyways, looking for some help here if you've implemented something similar. Hope I made sense.

Thanks,
Tim

tbardzil

RE: Best way to show thresholds for time series chart

Post by tbardzil » Tue Mar 18, 2003 6:21 pm

OK, I found the Marker class for doing a range marker. This is exactly what I need.

Actually, a few improvements would make it even better

1) Include the range marker in the calculation of the axis range so that it gets drawn no matter what.

2) Allow some way to label the marker similar to a data series

3) Add extract tick mark and axis label for the marker so one can easily tell exactly what value the marker is at.

Tim

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Wed Mar 19, 2003 12:11 am

Hi Tim,

Thanks for the suggestions. I've added a link back to this thread to a related Feature Request on SourceForge:

http://sourceforge.net/tracker/index.ph ... tid=365494

Regards,

Dave Gilbert

Locked