|
Spring Boot integration with ChartDirector lib |
Posted by Adamraju on Aug-08-2022 15:20 |
|
Hi Team ,
We got the bleow details to implement charts using spring boot
1)Chartdirector.jar
2)chartdirector.dll
3)chartdirector.lic
Can u pls provide the steps to integrate spring boot with above files |
Re: Spring Boot integration with ChartDirector lib |
Posted by Peter Kwan on Aug-09-2022 02:48 |
|
Hi Adamraju,
As far as I know, Spring Boot is a Java framework. You may use ChartDirector.jar included in ChartDirector for Java. (There is no chartdirector.dll or chartdirrector.lic. There is a "chartdir.lic" which is a license file for ChartDirector. For testing, it is optional.)
To use ChartDirector.jar in any Java project, you just need to include "ChartDirector.jar" in the project. The exact method depends on the build system you use. For example, suppose you use Maven in Spring Boot, you can add "ChartDirector.jar" as a dependency in the pom.xml file of your project. It is like:
<dependency>
<groupId>ChartDirector</groupId>
<artifactId>ChartDirector</artifactId>
<version>7.0</version>
<scope>system</scope>
<systemPath>${basedir}/ChartDirector.jar</systemPath>
</dependency>
After that, your project should be able to access all "import ChartDirector.*" and access all ChartDirector methods.
The original sample code included in ChartDirector for Java is written for JSP. I have also ported the "Contour Chart" example to Spring MVC using thymeleaf as the template engine. The original example in JSP is:
https://www.advsofteng.com/doc/cdjava.htm#contour.htm
The ported code is as attached. You can see the charting code is almost the same as the original code.
Best Regards
Peter Kwan
|
Re: Spring Boot integration with ChartDirector lib |
Posted by Adamraju on Aug-09-2022 15:27 |
|
Thanks for the quick response.
1. Can you please confirm whether "netchartdir.dll" is required to work with Java/Spring Boot application |
Re: Spring Boot integration with ChartDirector lib |
Posted by Peter Kwan on Aug-10-2022 00:57 |
|
Hi Adamraju,
"netchartdir.dll" is not required for Java/Spring. The "netchartdir.dll" is for the Microsoft .NET Framework. For Java, only ChartDirector.jar is required.
Best Regards
Peter Kwan |
|