Plot Quadratic Equation in JasperReports

Hi

I am running JasperReports on AWS and what I am looking to do is create a line graph that has the shape of a quadratic equation of the form, ax^2 + bx + c where the values of a, b and c are measures in JasperReport. The x value then depends on the value I select for the x axis.

Is this possible with JasperReports?

Thanks
Andrew

akew's picture
20
Joined: Feb 16 2015 - 12:38am
Last seen: 7 years 5 months ago

1 Answer:

If anyone is interested the way I got around this was as follows:

The x axis values for the graph I have had to store in a new table in my data source. Then the y values will be this x value passed into my quadratic equation. I created a derived view in my domain which does a select on the x values (giving my range of values) and then calculates the y value based on my equation constants (could use a store procedure to calculate this)

I then set the x value as a dimension and the y value as a measure and plot them on a graph, this gives me the quadratic equation plot.

akew's picture
20
Joined: Feb 16 2015 - 12:38am
Last seen: 7 years 5 months ago
Feedback