In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains the "Echarts graphics print export how to achieve", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Echarts graphics print export how to achieve" it!
Step 1: deploy environment 1 and install SlimerJS and Firefox on the server side.
SlimerJS is a server-side JavaScriptAPI tool. That is, a programmable browser without an interface. In this way, the dry report can use Javascript script to manipulate the web page to achieve a series of operations such as page graphics, network monitoring and so on.
Because SlimerJS is based on Firefox's Gecko kernel, you also need to install a matching version of the FireFox browser when using SlimerJS. Then on the report server side, you can use the API program returned by SlimerJS to convert the Echarts statistical chart drawn in the web page into a picture, and then load it into the report cell for printing and export.
Currently, SlimerJS can only support Firefox 38-52 or earlier, so do not download and install the latest version of Firefox.
Download it from SlimerJS's official website https://slimerjs.org/download.html.
2. Add the environment variable and set the installation path where the variable is named SLIMERJSLAUNCHER and the value of the variable is firefox. 3Get Web application configuration
Two configurations have been added to WEB-INF/raqsoftConfig.xml.
/ / slimerjsDir configure the installation directory of SlimerJS. If this item is not configured, the application will not have the ability to print and export Echarts / / slimerjsDir configuration SlimerJS installation directory. If this item is not configured, the application will not have the ability to print and export Echarts / / slimerjsDir configuration SlimerJS installation directory. If this item is not configured, the application will not have the ability to print and export Echarts / / slimerjsDir configuration SlimerJS installation directory. If this item is not configured, the application will not have the ability to print and export Echarts. Step 2: make a report containing Echarts graphics
Step 3: export and print
Now click the menu bar button at the top of the report rendering interface to export and print.
Export: dry report can output the report file with statistical chart to Excel file, PDF file, WORD file without distortion.
Printing: dry report can print the report file with statistical chart by Applet, Flash and PDF.
As you can see, this method also applies to other types of Javascript graphics. Dry reports have integrated a variety of third-party open source graphics packages, including echarts, chart.js, D3, and so on. Export and print are used in the same way as the above Echarts graphics, and the chart script used can be written directly in the JavaScript code area shown in the following figure.
Thank you for your reading, the above is the "Echarts graphics print export how to achieve" the content, after the study of this article, I believe you on the Echarts graphics print and export how to achieve this problem has a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.