.png)
<hc:chartProperty name="yAxis.plotBands.color"><hc:propertyExpression><![CDATA["#E3FFC5"]]></hc:propertyExpression></hc:chartProperty><hc:chartProperty name="yAxis.plotBands.from"><hc:propertyExpression><![CDATA[new Integer(0)]]></hc:propertyExpression></hc:chartProperty><hc:chartProperty name="yAxis.plotBands.to"><hc:propertyExpression><![CDATA[new Integer(50)]]></hc:propertyExpression></hc:chartProperty>
plotBands: [{color: '#E3FFC5',from: '0',to: '50'}, {color: '#E3FFC5',from: '60',to: '80'}]
2 Answers:
An array of objects for something like yAxis.plotLines, or plotBands, and setting such values as properties is not currently supported. There is a feature request for this ability, specifically for plotlines.
There is a workaround that might help in some scenarios or help give you some ideas.
First, "com.jaspersoft.jasperreports.highcharts.function.properties.allowed" must be set to true in your jasperreports.properties (in your client as well as JRS), then use a function to return the values.
The following would return a single line.
(function(){return [{value: 0.696, width: 1, color: 'green', dashStyle: 'dash', label: { text: 'Latest value', align: 'right', y: 12, x: 0 }]})()
Attached is an example of doing something similar with plotLines, with a TimeSeriesLine chart using our sample foodmart tables, it has two lines.
Attachment | Size |
---|---|
![]() | 4.22 KB |
Hi, I just ran into this same problem. Did you ever find an answer to this.