Adding FreeChart to JPanel?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Nestor
Posts: 4
Joined: Fri Jul 10, 2015 5:31 pm
antibot: No, of course not.

Adding FreeChart to JPanel?

Post by Nestor » Fri Jul 10, 2015 5:38 pm

Good afternoon,

I want to add my charts to a Jpanel. How to proced? Many thanks in advance.

Nestor

chrisrhyno2003
Posts: 30
Joined: Thu Jun 18, 2015 5:42 pm
antibot: No, of course not.

Re: Adding FreeChart to JPanel?

Post by chrisrhyno2003 » Fri Jul 10, 2015 5:50 pm

Add your chart to a chartPanel and then add the chartPanel to the JPanel.

ChartPanel chartPanel= new ChartPanel(chart);
JPanel panel = new JPanel();
panel .add(chartPanel);

Nestor
Posts: 4
Joined: Fri Jul 10, 2015 5:31 pm
antibot: No, of course not.

Re: Adding FreeChart to JPanel?

Post by Nestor » Fri Jul 10, 2015 6:18 pm

Many thanks. It is ok now.

Locked