Bugfixes for charts
Description
Environment
Attachments
- 24 Mar 2022, 09:40 AM
- 24 Mar 2022, 09:40 AM
Activity
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
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
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
Aim of the ticket is to collect bugs from chart module, and fix them