Libraries for pretty charts in SWT? [closed]

2019-01-10 23:27发布

I know the following libraries for drawing charts in an SWT/Eclipse RCP application:

Which other libraries are there for drawing pretty charts with SWT? Or charts in Java generally? After all, you can always display an image...

11条回答
Root(大扎)
2楼-- · 2019-01-10 23:53

SWTChart gives good results for line, scatter, bar, and area charts. The API is straight forward and there are numerous examples on the website. I went from finding it on google to viewing my data in less than an hour.

SWTChart

查看更多
【Aperson】
3楼-- · 2019-01-10 23:54

There's also JGraph, but I'm not sure if that's only for graphs (i.e. nodes and edges), or if it does charts also.

查看更多
劫难
4楼-- · 2019-01-10 23:59

There’s also ILOG JViews Charts which looks pretty feature-complete… if you can afford it. Here is some additional infos on using it with eclipse.

查看更多
戒情不戒烟
5楼-- · 2019-01-10 23:59

I suggest you try jzy3d, a simple java library for plotting 3d data. It's for java, on AWT, Swing or SWT.

查看更多
祖国的老花朵
6楼-- · 2019-01-11 00:03

I have not used BIRT or JGraph, however I use JFreeChart in my SWT application. I have found the best way to use JFreeChart in SWT is by making a composite an AWT frame and using the AWT functionality for JFreeChart. The way to do this is by creating a composite

Composite comp = new Composite(parent, SWT.NONE | SWT.EMBEDDED);
Frame frame = SWT_AWT.new_Frame(comp);
JFreeChart chart = createChart();
ChartPanel chartPanel = new ChartPanel(chart);
frame.add(chartPanel);

There are several problems in regards to implementations across different platforms as well as the SWT code in it is very poor (in its defense Mr. Gilbert does not know SWT well and it is made for AWT). My two biggest problems are as AWT events bubble up through SWT there are some erroneous events fired and due to wrapping the AWT frame JFreeChart becomes substantially slower.

@zvikico

The idea of putting the chart into a web page is probably not a great way to go. There are a few problems first being how Eclipse handles integrating the web browser on different platforms is inconsistent. Also from my understanding of a few graphing packages for the web they are server side requiring that setup, also many companies including mine use proxy servers and sometimes this creates issues with the Eclipse web browsing.

查看更多
你好瞎i
7楼-- · 2019-01-11 00:03

I was also looking for a charting library for an Eclipse RCP app, stumbled on Caleb's post here and can definitely recommend SWTChart now myself. It is a lot faster than JFreeChart for me, plus easily extensible. If I would really have to complain about something, I'd say the javadoc could be a bit more verbose, but this is just to say everything else is great.

查看更多
登录 后发表回答