Price and volume chart demo

Discussion about JFreeChart related to stockmarket charts.
Locked
jnovice
Posts: 14
Joined: Fri Jan 16, 2009 1:13 pm

Price and volume chart demo

Post by jnovice » Fri Jan 16, 2009 1:17 pm

Is there sample source code to build Price and volume chart? I have found some but all are related to old version of Jfreechart.

Thank you in advance.

RoyW
Posts: 93
Joined: Wed Apr 23, 2008 7:42 pm
Contact:

Post by RoyW » Fri Jan 16, 2009 3:12 pm

This was written for version 1.0.10
http://www.jfree.org/phpBB2/viewtopic.php?t=23534

What version are you using?
The answer does not come from thinking outside the box, rather the answer comes from realizing the truth; There is no Box. my js site

jnovice
Posts: 14
Joined: Fri Jan 16, 2009 1:13 pm

Post by jnovice » Fri Jan 16, 2009 3:59 pm

I am using the last version, I will try this from your link. Thanks :D

jnovice
Posts: 14
Joined: Fri Jan 16, 2009 1:13 pm

Post by jnovice » Fri Jan 16, 2009 7:30 pm

Hi,

I would like to ask two questions:

1) is there some way how to draw two chart into one plot? One chart will be bars (volume) and second will be line (price). In mentioned example there are two charts but painted in two plots.

2) What renderer is suitable for drawing line chart? I tried XYLineAndShapeRenderer but the line seems to be too wide.

Thanks.

RoyW
Posts: 93
Joined: Wed Apr 23, 2008 7:42 pm
Contact:

Post by RoyW » Fri Jan 16, 2009 9:33 pm

What you want is a combined line and bar chart. Search the forum for "line AND bar"

XYLineAndShapeRenderer is the renderer for drawing lines. You should be able to set the series stroke (which defines the width). Check the JavaDoc.
The answer does not come from thinking outside the box, rather the answer comes from realizing the truth; There is no Box. my js site

jnovice
Posts: 14
Joined: Fri Jan 16, 2009 1:13 pm

Post by jnovice » Sat Jan 17, 2009 10:19 am

Hi,

I am looking for example source code, or how to modify previous example to draw both two charts in one plot. I think must used something different plot than CombinedDomainXYPlot?

Locked