how to add 3 trend line in a same chart in JFreeChart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
lakshmi
Posts: 10
Joined: Wed Mar 08, 2006 6:15 am

how to add 3 trend line in a same chart in JFreeChart

Post by lakshmi » Tue Mar 14, 2006 5:55 am

i need to draw three trend lines in the same chart. is it possible to draw?
In my program i have day in the x-axis and 3 parameters in the y-axis.i was able to plot the graph. for the trend line. i need to draw trendline for all the parameter in the y-axia vs x-axis. i was able to draw tend line for all the parameter,but seperately.i want all the 3 trend line to be drawn in the same plot. Is it possible to draw?

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 » Tue Mar 14, 2006 10:16 am

I'm not sure what you mean by "parameters in the y-axis". But you can certainly add as many trend lines to the plot as you want - either by representing them as separate data series, or adding them as annotations (see XYLineAnnotation).
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

lakshmi
Posts: 10
Joined: Wed Mar 08, 2006 6:15 am

how to add 3 trend line in a same chart in JFreeChart

Post by lakshmi » Tue Mar 14, 2006 10:31 am

I have three field in y-axis(T1,T2,DR) and in x-axis(day).
i need to draw a plot b/w day and T1,T2 and DR.
i was able to draw the plot. i will get 3 curves.I need to draw the trend line for all the three curves. but i was able to draw trendline for a curve at a time.how to incorporate all the 3 trendlines for 3 curves in the same plot.

Locked