BIRT:Chart API入门

时间:2011-09-09 18:06:57

标签: eclipse-rcp birt

所以我需要一些BIRT图表API的简单指针。

我试图绘制一个数字值的简单折线图。我有一个(日期,双)对矢量作为输入。我已经阅读了org.eclipse.birt.chart.examples中的示例,但尚未获得足够的牵引力来开始使用它。只是编写一个org.eclipse.birt.chart.model.impl.ChartWithAxesImpl让我感到难过。

最终的目标是Eclipse编辑器,我可以这样做。是否有人可以推荐的教程或书籍可能会让我选择BIRT图表?

我应该非常感激

微米。

2 个答案:

答案 0 :(得分:0)

好。有这个例子:http://www.eclipse.org/articles/article.php?file=Article-BIRTChartEngine/index.html

但是我实际上遇到了一些让自己工作的问题。所有我最终都是这样的例外:

java.lang.NullPointerException
at org.eclipse.birt.chart.device.swt.SwtTextMetrics.getHeight(SwtTextMetrics.java:178)
at org.eclipse.birt.chart.computation.Methods.computeFontHeight(Methods.java:1272)
at org.eclipse.birt.chart.computation.BIRTChartComputation.computeFontHeight(BIRTChartComputation.java:30)
at org.eclipse.birt.chart.computation.EllipsisHelper$SimpleTester.<init>(EllipsisHelper.java:213)
at org.eclipse.birt.chart.computation.EllipsisHelper.createSimpleTester(EllipsisHelper.java:176)
at org.eclipse.birt.chart.computation.EllipsisHelper.simpleInstance(EllipsisHelper.java:183)
at org.eclipse.birt.chart.computation.LabelLimiter.limitLabelSize(LabelLimiter.java:256)
at org.eclipse.birt.chart.computation.LabelLimiter.limitLabelSize(LabelLimiter.java:211)
at org.eclipse.birt.chart.model.layout.impl.TitleBlockImpl.computeBox(TitleBlockImpl.java:288)
at org.eclipse.birt.chart.model.layout.impl.LabelBlockImpl.getPreferredSize(LabelBlockImpl.java:266)
at org.eclipse.birt.chart.internal.layout.LayoutManager$ChartLayout.<init>(LayoutManager.java:111)
at org.eclipse.birt.chart.internal.layout.LayoutManager.doLayout_tmp(LayoutManager.java:1145)
at org.eclipse.birt.chart.internal.layout.LayoutManager.doLayout(LayoutManager.java:1310)
at org.eclipse.birt.chart.factory.Generator.build(Generator.java:1092)

答案 1 :(得分:0)

org.eclipse.birt.chart.examples的示例遇到了同样的问题。有一些很好的java代码片段,但你没有看到它们对应的内容。这就是我决定生成所有示例并将它们放在网站上的原因:BIRT Charts Gallery