如何在SWT中使用chart(曲线图表,如柱状图,饼图等)? 目前我知道的有两种方式:
方式一: 使用Eclipse BIRT中的chart引擎。 BIRT中的chart是随BIRT一起发布的,原只提供BIRT的报表来显示统计图表,但是chart引擎可以单独安装(需要GEF和EMF),在BIRT的下载页面可以看到单独的下载链接,其中还包含了一些简单的例子(曲线图,三维饼图等)。 chart引擎可以用在SWT,也可以在Swing中使用。 BIRT提供的sample就包含了在SWT和Swing中的例程。 我参照sample简单的尝试了一下。


方式二: 使用JFreeChart。 最新的JFreeChart 1.0.2增加了对SWT的支持。以前我只在JSP网页上使用过JFreeChart,还没有试过新增对SWT的支持,有空去看看。
Technorati : birt, eclipse, jfreechart, rcp, swt