BIRT:图表 API 入门

发布于 2024-12-04 03:02:22 字数 313 浏览 2 评论 0原文

因此,我需要一些有关 BIRT 图表 API 的简单指南。

我正在尝试绘制一个随时间变化的数值的简单折线图。我有一个(日期,双)对向量作为输入。我已经阅读了 org.eclipse.birt.chart.examples 中的示例,但尚未获得足够的 API 吸引力以开始使用它。只是编写一个 org.eclipse.birt.chart.model.impl.ChartWithAxesImpl 就让我难住了。

最终的目标是 Eclipse 编辑器,而我可以做到。有没有人可以推荐的教程或书籍可以让我继续使用 BIRT 图表?

我应该非常感激

M。

So I need a few simple pointers with the BIRT chart API.

I am trying to draw a simple line chart of a numeric value over time. I have a vector of (Date,Double) pairs as input. I have read through the examples in org.eclipse.birt.chart.examples but not yet gained enough traction with the API to start making use of it. Just composing a org.eclipse.birt.chart.model.impl.ChartWithAxesImpl has me stumped.

The eventual destination is an Eclipse editor, and that I can do. Is there a tutorial or book anyone can recommend that might get me going with the BIRT chart side?

I should be very grateful

M.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

未央 2024-12-11 03:02:22

出色地。有这个例子: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)

Well. There is this example: http://www.eclipse.org/articles/article.php?file=Article-BIRTChartEngine/index.html

But I am having some problems actually getting it to work myself. All I end up with is an exception like this:

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)
花开浅夏 2024-12-11 03:02:22

我对 org.eclipse.birt.chart.examples 中的示例也遇到了同样的问题。有一些很好的 java 代码片段,但您看不到它们对应的内容。这就是为什么我决定生成所有示例并将它们放在网站上:BIRT Charts Gallery< /a>.

I had the same trouble with the examples from org.eclipse.birt.chart.examples. There are some good java code snippets, but you do not see to what they correspond. This is why I decided to generate all the examples and put them on a web site: BIRT Charts Gallery.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文