TimeSeriesChart - Background with different colors

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Traxer
Posts: 15
Joined: Tue Jan 31, 2012 9:06 pm
antibot: No, of course not.

TimeSeriesChart - Background with different colors

Post by Traxer » Fri Feb 03, 2012 10:33 am

Hi,

I want to create a TimeSeriesChart with a two colored background. That means for example:
- Y-axis from 0 to 100 (this is fix)
- background color for the range from 0-20 = grey
- background colot for the range from 20 - 80 = blue
- background color for the range from 80-100 = grey (again)

Is it possible to do?

Traxer
Posts: 15
Joined: Tue Jan 31, 2012 9:06 pm
antibot: No, of course not.

Re: TimeSeriesChart - Background with different colors

Post by Traxer » Sun Feb 05, 2012 9:21 am

Great support forum! Two questions and not one answer...... :(

Thais really great!

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: TimeSeriesChart - Background with different colors

Post by paradoxoff » Sun Feb 05, 2012 9:51 pm

Create some IntervalMarkes with suitable start and end values and colors, and add them to your XYPlot. Make sure that you add them to Layer.BACKGROUND.

Traxer
Posts: 15
Joined: Tue Jan 31, 2012 9:06 pm
antibot: No, of course not.

Re: TimeSeriesChart - Background with different colors

Post by Traxer » Mon Feb 06, 2012 3:45 pm

@paradoxoff: Tanks a lot! You gave me the right hint! It runs perfect!!!

Locked