Situation:
You need to create a chart that uses error bar series type (https://www.highcharts.com/demo/error-bar). How to do that using JasperReports?
Solution:
See attached sample. The way this is done is using 3 measures in a chart. The cart type is set to be column chart but we won't do the column visualization. One measure for the actual error bar, one measure for low value, one measure for high value. The measure for the error bar is set to value expression 0d (zero value for Double) as we won't get the value from the value expression. In the advanced properties you can see Series property Type set to errorbar to have that visualization. Then there are two properties - low and high - which store the values for the lowest and highest point of the error bar. The values for these properties is set to be taken from other two measures (Use measure value). The other two measures are just basic measures but they are hidden and thus not rendered. They are only used to obtain the values for low and high property of the first measure.
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now