Question:
The customer is trying to add the plotline in HTML5 bubble chart as following:
<hc:chartProperty name="xAxis.plotLines.dashStyle" value="Solid"/> <hc:chartProperty name="xAxis.plotLines.value" value="2000"/>
However, it raised exception "org.mozilla.javascript.EcmaError:Type Error: Cannot find function concat in object [object Object]......"
Solution:
The property xAxis.plotLines is an array of objects, and setting such values as properties is not currently supported.
There is a workaround for the plotLines properties for this situation. Please try the following expression which have been tested in my testing environment.
<hc:chartProperty name="xAxis.plotLines"> <hc:propertyExpression> <![CDATA["(function(){return [{value: 31000,width: 1,color: 'green',dashStyle: 'dash',label: {text: 'Latest value',align: 'right',y: 12,x: 0}},{value: 31000,width: 1,color:'red',dashStyle: 'dash',label: {text: 'New value',align: 'right',y: 12,x: 0}}]})()"]]> </hc:propertyExpression> </hc:chartProperty>
Note, please make sure the property com.jaspersoft.jasperreports.highcharts.function.properties.allowed is set as true in your Studio or JasperReports Server.
Recommended Comments
There are no comments to display.