How to change a chart in Jaspersoft Studio or create your own?

I need to insert a graph in Jaspersoft, which contains the last 24 energy consumptions of a person to print it on an invoice. I'm programming in Java.

 

With each invoice will come different consumption values, which must respect the fixed size of the graph, and develop the size of its bars based on the highest consumption to keep proportion with the rest of the consumption.

enter image description here

I have developed the model that I attached in the image in Java with Graphics 2D and it is very laborious, I would like to do it in JasperSoft to generate a report, but as much as I explore the properties of the bar graph, I cannot obtain something similar.

I've seen on Google that Jaspersoft can use some modified JFreeChart charts to add to their themes, but I can't find any documentation to investigate how this is done.

Jaspersoft's documentation is very brief and doesn't say much about how to do what I need.

Can someone help me with this problem, either by sending me a link with examples or more complete documentation?

gustavo.echenique's picture
Joined: May 14 2017 - 5:31pm
Last seen: 1 hour 44 min ago

2 Answers:

jgust's picture
2592
Joined: Jun 10 2010 - 6:39am
Last seen: 6 hours 54 min ago

Thank you very much dear jgust.

I have downloaded the complete set of examples contained in the file "jasperreports-6.20.0-project.zip", which contains the one in the link you sent me, I uploaded it as a project to Eclipse, but it gives me an error.
Could you tell me what I should do to compile correctly?

gustavo.echenique's picture
Joined: May 14 2017 - 5:31pm
Last seen: 1 hour 44 min ago
Feedback