How do I draw a horizontal line?


What would be the best practice in drawing a horizontal line on an existing chart? Would love to avoid having to create a multi-axis chart as I need to do this for a ton of graphs. Basically I just want to have a few thresholds defined that show if my data is anywhere near hitting that threshold.

So for example CPU usage I want to have a line that exists at 90 (or 90%) which would indicate to the reviewer that perhaps cpu should be upgraded on this particular server if the values were near or above that threshold..

cclement's picture
Joined: Jul 7 2016 - 7:08am
Last seen: 3 years 8 months ago

1 Answer:


If you're using JFreeCharts, you can write a chart customizer.  The JFreeChart setting is described in a couple of places:

Chart customizers require you to write a little Java and then apply it to your report.

Here's an example of a simple customizer & how to add it:

and some more info on customizers:

elizam's picture
Joined: Mar 5 2012 - 9:19am
Last seen: 1 week 19 hours ago