Page 1 of 1

Pie on Linux without running X11

Posted: Tue May 24, 2011 9:11 am
by 15355046
I running TeeChart on Linux without running X11. Wenn i use PieSeries i get this Exception.

Caused by: java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at sun.awt.HeadlessToolkit.getScreenSize(HeadlessToolkit.java:261)
at com.steema.teechart.drawing.Graphics3D.getScreenWidth(Graphics3D.java:301)
at com.steema.teechart.styles.Circular.calcCircledRatio(Circular.java:151)
at com.steema.teechart.styles.Circular.doBeforeDrawValues(Circular.java:200)
at com.steema.teechart.styles.Series.drawSeries(Series.java:2267)
at com.steema.teechart.Chart.internalDraw(Chart.java:756)
at com.steema.teechart.Chart.paint(Chart.java:2031)
at com.steema.teechart.exports.ImageExport.image(ImageExport.java:107)
at com.steema.teechart.Chart.image(Chart.java:310)
at com.steema.teechart.exports.ImageExportFormat.save(ImageExportFormat.java:110)
at org.tribut.targettbsev.TbSevOhneChartImgHandler.onRender(TbSevOhneChartImgHandler.java:100)

Thanks!

Re: Pie on Linux without running X11

Posted: Wed May 25, 2011 9:15 am
by yeray
Hello,

I've been able to run the features demo in an Ubuntu 11.04 system. But you are probably trying to create your chart in a system without loading a GUI, probably to save it to disk to be streamed to a browser or something like that.
I'm not a linux expert but googling a little bit I found some similar cases and some answers that may help you.
- Someone with the same error message when trying to use a similar chart library was addressed here, where in short words suggests to set:

Code: Select all

java.awt.headless=true
- Another developer who found the above wasn't enough for him solved it using FilteredImageSource instead of JFrame.

If you still have problems with it, please tell us more details on your environment and how are you trying to use TeeChart Java.