[BIRT 2.3.2(StandAlone)]“跳跃”问题?

时间:2021-07-08 01:03:11

Here's the fact : I made a tiny app which consist of a table related to a bar chart (a birt one ... of course), when I modify my table values it automaticaly alter my chart (like Excel but less fancy) ...

事实如下:我制作了一个小应用程序,其中包含一个与条形图相关的表(当然是一个birt ...),当我修改我的表值时,它会自动改变我的图表(比如Excel但不那么花哨)。 。

Anyway everything works fine ... BUT when I want to make my chart interactive in order to show tooltips (for example) I inform naturaly my IDeviceRenderer whit the following command idr.setProperty( IDeviceRenderer.UPDATE_NOTIFIER, this ); but doing so brings an error when (much later) my code come to gr.render(idr, gr.build(idr.getDisplayServer(), this.chart, bo, vroum,null)); (Which have never failed before) ...

无论如何一切都运行正常...但是当我想让我的图表交互以显示工具提示时(例如)我通知naturaly我的IDeviceRenderer以下命令idr.setProperty(IDeviceRenderer.UPDATE_NOTIFIER,this);但这样做会导致错误(很久以后)我的代码来到gr.render(idr,gr.build(idr.getDisplayServer(),this.chart,bo,vroum,null)); (以前从未失败过)......

I feel lost ...

我感到失落 ...

ps: The error I get are that I get no bars to my chart and receive the following error message : org.eclipse.birt.chart.exception.ChartException at org.eclipse.birt.chart.factory.Generator.render(Generator.java:1373) at clickable.chart.ClickableProto.paintControl(ClickableProto.java:520) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:217) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012) at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1424) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3842) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:337) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4541) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2371) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3420) at clickable.chart.ClickableProto.main(ClickableProto.java:151) Caused by: java.lang.NullPointerException at org.eclipse.birt.chart.render.InteractiveRenderer.isColoredByCategories(InteractiveRenderer.java:197) at org.eclipse.birt.chart.render.InteractiveRenderer.getSource(InteractiveRenderer.java:161) at org.eclipse.birt.chart.render.InteractiveRenderer.modifyEvent(InteractiveRenderer.java:116) at org.eclipse.birt.chart.device.swt.SwtRendererImpl.fillPolygon(SwtRendererImpl.java:502) at org.eclipse.birt.chart.event.PolygonRenderEvent.fill(PolygonRenderEvent.java:156) at org.eclipse.birt.chart.render.DeferredCache.flushPlanes(DeferredCache.java:499) at org.eclipse.birt.chart.render.DeferredCache.flushOptions(DeferredCache.java:271) at org.eclipse.birt.chart.render.DeferredCacheManager.flushOptions(DeferredCacheManager.java:165) at org.eclipse.birt.chart.render.AxesRenderer.flushClipping(AxesRenderer.java:3416) at org.eclipse.birt.chart.render.AxesRenderer.restoreClipping(AxesRenderer.java:3401) at org.eclipse.birt.chart.render.Bar.renderSeries(Bar.java:1533) at org.eclipse.birt.chart.render.AxesRenderer.renderPlot(AxesRenderer.java:2181) at org.eclipse.birt.chart.render.AxesRenderer.render(AxesRenderer.java:314) at org.eclipse.birt.chart.factory.Generator.render(Generator.java:1368) ... 14 more

ps:我得到的错误是我没有得到我的图表的条形并收到以下错误消息:org.eclipse.birt.chart.exce.ChartException org.eclipse.birt.chart.factory.Generator.render(Generator。 java:1373)在org.eclipse.swt.wtt.EwtTable.sendEvent上的org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:217)的clickable.chart.ClickableProto.paintControl(ClickableProto.java:520) (EventTable.java:84)org.eclipse中的org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)中的org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)。 swt.widgets.Widget.sendEvent(Widget.java:1012)位于org.eclipse.swt.wts.widgets.Control.windowProc上的org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1424)(Control.java: 3842)org.eclipse.swt.wts.widgets.Canvas.windowProc(Canvas.java:337)atg.eclipse.swt.wts.windows.rocows.rocowProc(windows.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: org.eclipse.swt.internal.win32.OS.DispatchMessage上的.OS.DispatchMessageW(Native方法) (OS.java:2371)atg.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3420)at clickable.chart.ClickableProto.main(ClickableProto.java:151)引起:java.lang.NullPointerException at at org.eclipse.birt.chart.render.InteractiveRenderer.isColoredByCategories(InteractiveRenderer.java:197)位于org.eclipse.birt.chart的org.eclipse.birt.chart.render.InteractiveRenderer.getSource(InteractiveRenderer.java:161)。在org.eclipse.birt.chart.ewt.folygonRenderEvent.fill的org.eclipse.birt.chart.device.swt.SwtRendererImpl.fillPolygon(SwtRendererImpl.java:502)的render.InteractiveRenderer.modifyEvent(InteractiveRenderer.java:116) PolygonRenderEvent.java:156)org.eclipse.birt.chart.render.DeferredCache.flushPlanes(DeferredCache.java:499)org.eclipse.birt.chart.render.DeferredCache.flushOptions(DeferredCache.java:271)at org org.eclipse.birt.chart.render.AxesRenderer.flushClipping(AxesRenderer.ja)中的.eclipse.birt.chart.render.DeferredCacheManager.flushOptions(DeferredCacheManager.java:165) va:3416)org.eclipse.bot.chart.render.AxesRenderer.restoreClipping(AxesRenderer.java:3401)org.eclipse.birt.chart.render.Bar.renderSeries(Bar.java:1533)atg.eclipse位于org.eclipse.birt.chart.factory.Generator的org.eclipse.birt.chart.render.AxesRenderer.render(AxesRenderer.java:314)的.birt.chart.render.AxesRenderer.renderPlot(AxesRenderer.java:2181) .render(Generator.java:1368)......还有14个

I am open to any idea !

我对任何想法持开放态度!

1 个解决方案

#1


Finally I managed it on my own ...

最后我自己管理了......

So here are some common mistakes not to make when you make a chart on BIRT and wnat it to be interactive ...

所以这里有一些常见的错误,当你在BIRT上制作一个图表并且它是交互式的时候不要做...

1 Implement barely anything which need to be overriden

        I personnaly forgot to override

我个人忘了覆盖

getDesignTimeModel()

and

getRunTimeModel()

comming with the ICallBackNotifier implementation ...

与ICallBackNotifier实现一起...

2 Do not nest your chart (or be prepared to nest most of your methods too)

        I had my chart not directly on my shell but nested in a bunch of composites widgets, canvas and such ... Therefore my canvas where hidding my shell which was the only one able to react in the way I wanted to my mouse controller. (Funny fact : I figured this all out when I (for no reason) tried to drag a small part of my shell which was not overlapped by the chart and drop it on my bars ... There the tooltip poped ... ^^ Funny way to understand how things work :p)

我的图表不是直接在我的shell上,而是嵌套在一堆复合材料小部件,画布等......所以我的画布隐藏了我的shell,这是唯一一个能够以我想要的方式对我的鼠标控制器做出反应的人。 (有趣的事实:当我(无缘无故)试图拖动我的贝壳的一小部分时,我想出了这一切,这部分没有被图表重叠并放在我的酒吧上......那里有工具提示poped ... ^^有趣的方式来了解事情的运作方式:p)

3 Do not be me ...

        It is to much work and pain for a barely acceptable result ;p

对于几乎不可接受的结果来说,这需要付出很大的努力和痛苦; p

Hope this help, dont hesitate to mail me if you face the same probleme, I'd be glad to help as much as I can ^^

希望这有帮助,如果你遇到同样的问题,请随时给我发邮件,我很乐意尽我所能帮助^^

#1


Finally I managed it on my own ...

最后我自己管理了......

So here are some common mistakes not to make when you make a chart on BIRT and wnat it to be interactive ...

所以这里有一些常见的错误,当你在BIRT上制作一个图表并且它是交互式的时候不要做...

1 Implement barely anything which need to be overriden

        I personnaly forgot to override

我个人忘了覆盖

getDesignTimeModel()

and

getRunTimeModel()

comming with the ICallBackNotifier implementation ...

与ICallBackNotifier实现一起...

2 Do not nest your chart (or be prepared to nest most of your methods too)

        I had my chart not directly on my shell but nested in a bunch of composites widgets, canvas and such ... Therefore my canvas where hidding my shell which was the only one able to react in the way I wanted to my mouse controller. (Funny fact : I figured this all out when I (for no reason) tried to drag a small part of my shell which was not overlapped by the chart and drop it on my bars ... There the tooltip poped ... ^^ Funny way to understand how things work :p)

我的图表不是直接在我的shell上,而是嵌套在一堆复合材料小部件,画布等......所以我的画布隐藏了我的shell,这是唯一一个能够以我想要的方式对我的鼠标控制器做出反应的人。 (有趣的事实:当我(无缘无故)试图拖动我的贝壳的一小部分时,我想出了这一切,这部分没有被图表重叠并放在我的酒吧上......那里有工具提示poped ... ^^有趣的方式来了解事情的运作方式:p)

3 Do not be me ...

        It is to much work and pain for a barely acceptable result ;p

对于几乎不可接受的结果来说,这需要付出很大的努力和痛苦; p

Hope this help, dont hesitate to mail me if you face the same probleme, I'd be glad to help as much as I can ^^

希望这有帮助,如果你遇到同样的问题,请随时给我发邮件,我很乐意尽我所能帮助^^