Jump to content
Changes to the Jaspersoft community edition download ×

Plot Quadratic Equation in JasperReports


akew
Go to solution Solved by akew,

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

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.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...