Bugfixes for charts

Description

Aim of the ticket is to collect bugs from chart module, and fix them

Environment

None

Attachments

2

Activity

Nicolas Micoud
May 6, 2022 at 8:09 AM

Hi,
Found a new issue "org.zkoss.zk.ui.UiException: Not unique in ID space"

I have a window with several charts and I'm facing this issue

09:59:05.381===========> ChartRenderer.render: [687]
org.zkoss.zk.ui.UiException: Not unique in ID space <Grid vU4Aj9k>: 0_WG_SOCIÉTÉ_2020
at org.zkoss.zk.ui.AbstractComponent.checkIdSpaces(AbstractComponent.java:282)
at org.zkoss.zk.ui.AbstractComponent.setId(AbstractComponent.java:567)
at org.adempiere.webui.apps.graph.jfreegraph.ChartRenderer.render(ChartRenderer.java:123)
at org.adempiere.webui.apps.graph.jfreegraph.ChartRendererServiceImpl.renderChart(ChartRendererServiceImpl.java:175)
at org.adempiere.webui.editor.WChartEditor.onEvent(WChartEditor.java:178)

Resolved by adding a unique timestamp on the Id of the area ; see https://github.com/idempiere/idempiere/pull/1317

Regards,

Nicolas

Nicolas Micoud
March 24, 2022 at 9:40 AM

Hi,

I've identified 2 other issues, but I'm not sure about how to fix them (and maybe there is nothing to do).
I have done the setup in http://test.idempiere.org and exported it on the attached 2Pack.

#1 : Error on the Tab Editor when there is a field with Reference = Chart and Chart field is empty (unknown chart type=null).
Is really annoying as it raises after each time a field is moved.
Not sure if we should just let it as it, or if the error should be 'hidden' from the user.
See commit here : https://github.com/idempiere/idempiere/pull/1262/commits/d8ea0b64077a976e0c1958997f6d893230312d3e

#2 : the label for the dates. I've added a "Element per year" chart.

As the TimeUnit is "Year", I think it would be better to have 2012, 2013, ... instead of 2012-01-01, 2013-01-01, ... but I can't find where this is generated.
wdyt?

Regards,

Nicolas

Nicolas Micoud
March 22, 2022 at 3:15 PM
(edited)

The default of the AD_ChartDatasource.WhereClause is totally misleading
it shows:

WHERE ...

but the WHERE must not be present, if we save the record with the WHERE clause then rendering the chart throws an error, I think the default must simply not be there.

 

When AD_Chart.WinHeight = 0, the system throws an error when rendering the chart, but that’s the default and is allowed to be saved, would be better to make explicit that a value there is required.

 

Missing check for the TimeUnit field. Is not mandatory and throws an error if IsTimeSeries=Y (Cannot invoke "String.equals(Object)" because the return value of "org.compiere.model.MChart.getTimeUnit()" is null).

Remove AD_Chart_ID from tab in grid mode

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created March 22, 2022 at 3:04 PM
Updated July 1, 2022 at 2:30 PM
Resolved May 6, 2022 at 11:41 AM