knowm / XChart

XChart is a light-weight Java library for plotting data.
http://knowm.org/open-source/xchart
Apache License 2.0
1.5k stars 397 forks source link

Non-modal windows #156

Closed thorstenwagner closed 8 years ago

thorstenwagner commented 8 years ago

Hi,

I'm using xchart (2.6.1) is some of my ImageJ plugins. The plot is shown by

new SwingWrapper(charts, numRows, numCols).displayChartMatrix();

However, as soon I close the plot imagej closes as well. How can I open non-model charts?

Regards, Thorsten

timmolter commented 8 years ago

Can you try 3.1.0?

SwingWrapper is meant as a quick and dirty way to pop up a plot. What you can do create a JPanel with the chart, and integrate it into your app however you want:

  JPanel chartPanel = new XChartPanel(chart);