Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to realize print Export by integrating echarts Statistical Chart in java Project

Shulou Source: shulou.com Published: 2022-06-01 20:32:56 10月03日 Update

This article will explain in detail how to print and export the integrated echarts statistical chart in the java project. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Echarts, an open source software developed by Baidu, is a pure JS chart library. Echarts is a web-side technology, front-end display, it is often integrated in J2EE projects, many types of graphics and intuitive, vivid, interactive, highly personalized customization. In recent years, it has been selected as the "most popular Chinese open source software of the year" by Open Source China, and became an Apache incubator project last year, so it develops more rapidly and has more and more users.

There is no problem with Echarts graphics presentation, and separate exports are supported, but Echarts is mostly integrated into other pages. For example, we combine Echarts with reports, which contain both table content and graphics generated by Echarts.

In this case, can you export or print at the same time?

According to the analysis, Echarts graphics support export printing, which is usually realized by back-end programs. When printing and exporting, getting the front-end graphics is the key to solve the problem.

Combined with the contents mentioned above, two difficulties are summarized:

1. In the case of integration, you not only need to export echarts diagrams, but also export other contents, such as tables and diagrams.

2, take the report as an example, if the report has a large number of pages and is paged, how can you get the echarts diagram that is not shown on other pages?

In view of the above problems, a more appropriate solution:

1. Get the Echarts code for each page

2. Regenerate the picture according to the code

3. Put the picture in the corresponding position on the integrated page.

On the java project integrated echarts statistical chart how to achieve print export is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Content graphics projects reports questions pages centrals statistics code front end pictures situations articles more knowledge articles tables software China support Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB vpn Apple Shulou Tech Info Redmi