Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize print and Export of echarts Statistical Chart

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the echarts statistical chart how to achieve print export, the article is very detailed, has a certain reference value, interested friends must read it!

The specific operations are as follows:

Step 1: get and install slimerjs

Step 1: get the slimerjs installation package

Users can obtain the installation package in two ways:

(1) the report comes with the installation package [installation root]\ report5\ web\ webapps\ demo\ raqsoft\ slimerjs-0.10.3.zip

(2) users download it on slimerjs's official website https://slimerjs.org/download.html

Step * * 2VRV installation *

Unpack the zip installation package to your computer's hard disk and install it in the same way for different operating systems.

Step 2: install firefox

Download and install the version of Firefox corresponding to the operating system from firefox's official website http://www.firefox.com.cn/download/.

Currently, slimerjs can only support firefox 38-52 or earlier, so do not download and install the latest version. A later version of slimerjs may support a higher version of firefox.

The following is the recommended address for downloading earlier versions:

Firefox49.0 version: http://ftp.mozilla.org/pub/firefox/releases/49.0/

Firefox50.0 version: http://ftp.mozilla.org/pub/firefox/releases/50.0/

Step 3: set environment variables

* under the windows operating system:

The following environment variable configuration process takes the win10 system as an example

1. Right-click "this computer" in Explorer, select Properties, and the following window pops up:

two。 Click Advanced system Settings, click the environment variable in the pop-up window, and then pop up the following window:

3. Select the new environment variable and set the installation path where the variable is named SLIMERJSLAUNCHER and the value of the variable is firefox in the pop-up window.

* under linux/MacOS** operating system:

Execute the following command on the command line: the variable value is the full path of the firefox execution file.

Export SLIMERJSLAUNCHER=/usr/bin/firefox

Users can also set this environment variable in the local .profile or .bashrc file.

Step 4: copy calcEcharts.js

If you downloaded the installation package on the slimerjs official website, you need to find the [installation root directory\ report5\ web\ webapps\ demo\ raqsoft\ calcEcharts.js file after the installation report, and then copy it to the installation directory of slimerjs.

Note: if you use the slimerjs installation package provided by the reporting system, you do not need to do this.

Step 5: authorization file executable permissions

Note: this step is not required in windows

From the command line, go to the installation directory of slimerjs and execute the following command:

Chmod 777. / slimerjs

Chmod 777. / calcEcharts.js

Step 6: IDE configuration

Open the report, [menu bar-tools-options] open the file configuration window, and then set the slimerjs installation directory.

Step 7: Web application configuration

Two configurations have been added to WEB-INF/raqsoftConfig.xml.

1. SlimerjsDir configure the installation directory of slimerjs.

Note: this item is not configured and the app does not have the ability to print and export echarts.

2. EchartsJSUrlPrefix configure the access address of the parent directory where the js of the echarts graph is located, that is, the raqsoft directory shown in the following figure:

Users can configure it in the form of absolute path to the file, or it can be configured in http mode.

Note: when the application is released as a war package, this must be configured and must be configured in http mode.

When it is not released as a war package, you do not have to configure this item, the program will automatically set this item.

You need to restart the computer to take effect after the configuration is completed!

The above is all the contents of the article "how to print and export echarts statistical charts". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report