CN110764842A - Method for automatically generating analysis diagram and loading document by java background - Google Patents

Method for automatically generating analysis diagram and loading document by java background Download PDF

Info

Publication number
CN110764842A
CN110764842A CN201910986283.4A CN201910986283A CN110764842A CN 110764842 A CN110764842 A CN 110764842A CN 201910986283 A CN201910986283 A CN 201910986283A CN 110764842 A CN110764842 A CN 110764842A
Authority
CN
China
Prior art keywords
graph
template
type
graphic
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910986283.4A
Other languages
Chinese (zh)
Inventor
刘发朋
徐兵兵
李铁军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Inspur Business System Co Ltd
Original Assignee
Shandong Inspur Business System Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Inspur Business System Co Ltd filed Critical Shandong Inspur Business System Co Ltd
Priority to CN201910986283.4A priority Critical patent/CN110764842A/en
Publication of CN110764842A publication Critical patent/CN110764842A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Generation (AREA)

Abstract

The invention discloses a method for automatically generating an analysis graph and loading a document by a java background, which relates to the technical field of graphic processing; establishing a graph template according to the graph type, defining a required data structure and parameter configuration in the graph template, processing data into the data structure required by the corresponding graph template according to the graph type, reading the graph template in a data stream mode according to the graph type, loading the processed data and the configuration parameters into the graph template for graph drawing, outputting the generated graph in a file output stream mode, returning an output address, and generating a report file for reading after obtaining the output address; the method of the invention provides a convenient method for generating high-quality customized analysis graphs for developers, and the complex data can be subjected to graph drawing through the graph template and displayed, so that the information such as the relation or trend among the analysis data can be observed, and a basis is provided for optimizing the industrial structure and predicting the future development.

Description

Method for automatically generating analysis diagram and loading document by java background
Technical Field
The invention discloses a method for automatically generating an analysis graph and loading a document by a java background, and relates to the technical field of graphic processing.
Background
With the advent of the information age, various industries generate huge amounts of relevant data, and it is necessary to perform data mining analysis on the huge amounts of relevant data by using various data analysis technologies and then visually display the huge amounts of relevant data. The data display aspect is commonly used by a line graph, a bar graph, a pie graph, a custom special graph and the like, mature components such as echarts and highcharts are displayed on a foreground page, but in many projects, analysis data is often required to be directly generated into an analysis graph for generating reports in a java background, but the components cannot be directly used in the background. Although the components for directly generating the analysis graph in the java background have jfreechart and other tools, the generated picture quality is poor, and the configurable items are fewer and difficult to meet the requirements of customers. The invention discloses a method for automatically generating an analysis diagram and loading a document by a java background, which indirectly uses an echarts tool or a G2 native drawing tool to generate the analysis diagram with high quality and multiple optional configuration functions in the background and is convenient for loading the document by the diagram.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method for automatically generating an analysis chart and loading a document by a java background, which has the characteristics of strong universality, simple and convenient implementation and the like and has wide application prospect.
The specific scheme provided by the invention is as follows:
a method for automatically generating analysis diagram and loading document by java background includes creating graphic template according to graphic type,
defining the required data structure and parameter configuration in the graphic template,
processing the data into the data structure required by the corresponding graphic template according to the graphic type,
reading the graph template in a data stream mode according to the graph type, loading the processed data and the configuration parameters into the graph template for graph drawing, outputting the generated graph in a file output stream mode, returning the output address, and generating a report file for reading after obtaining the output address.
In the method, the basic graph in the graph type uses an echarts tool to establish a graph template.
In the method, the customized graphics in the graphics type use a G2 drawing tool to establish a graphics template.
The method comprises the following specific steps:
s1: establishing an html graph template according to the graph type,
s2: defining the required data structure and parameter configuration in the graphic template,
s3: processing the data into the data structure required by the corresponding graphic template according to the graphic type,
s4: reading the graphic template in the form of data stream according to the graphic type, loading the processed data and configuration parameters into the graphic template for graphic drawing,
s5: and outputting the generated graph as a png or jpg type file in a file output stream mode, returning the png or jpg type file output address, and generating a report file for reading after acquiring the output address.
A tool for realizing automatic generation of an analysis diagram and loading of a document by a java background comprises a template module, a processing module and a generation module,
the template module establishes a graph template according to the graph type, defines the required data structure and parameter configuration in the graph template,
the processing module processes data into a data structure required by a corresponding graph template according to the graph type, the generating module reads the graph template in a data stream mode according to the graph type, loads the processed data and configuration parameters into the graph template for graph drawing, outputs the generated graph in a file output stream mode, returns an output address, and generates a report file for reading after acquiring the output address.
And the template module in the tool uses an echarts tool to establish a graph template of a basic graph in the graph type.
The template module in the tool uses a G2 drawing tool to establish a graphic template of a custom graphic in a graphic type.
And the generating module in the tool outputs the generated graph as a png or jpg type file in a file output stream mode, returns the output address of the png or jpg type file, and generates a report file for reading after acquiring the output address.
The invention has the advantages that:
the invention provides a method for automatically generating an analysis graph and loading a document by a java background, which comprises the steps of establishing a graph template according to a graph type, defining a required data structure and parameter configuration in the graph template, processing data into the data structure required by a corresponding graph template according to the graph type, reading the graph template in a data stream mode according to the graph type, loading the processed data and configuration parameters into the graph template for graph drawing, outputting the generated graph in a file output stream mode, returning an output address, and generating a report file for reading after obtaining the output address; the method of the invention provides a convenient method for generating high-quality customized analysis graphs for developers, and can draw the complex data through the graph template and clearly and intuitively display the complex data so as to observe the information such as the relationship or trend among the analysis data and provide a basis for optimizing the industrial structure and predicting the future development.
Drawings
FIG. 1 is a schematic flow diagram of the process of the present invention.
Detailed Description
The invention provides a method for automatically generating an analysis graph and loading a document by a java background, which comprises the steps of establishing a graph template according to the graph type,
defining the required data structure and parameter configuration in the graphic template,
processing the data into the data structure required by the corresponding graphic template according to the graphic type,
reading the graph template in a data stream mode according to the graph type, loading the processed data and the configuration parameters into the graph template for graph drawing, outputting the generated graph in a file output stream mode, returning the output address, and generating a report file for reading after obtaining the output address.
Meanwhile, a tool for realizing automatic generation of an analysis diagram and loading of a document by a java background corresponding to the method is provided, and comprises a template module, a processing module and a generating module,
the template module establishes a graph template according to the graph type, defines the required data structure and parameter configuration in the graph template,
the processing module processes data into a data structure required by a corresponding graph template according to the graph type, the generating module reads the graph template in a data stream mode according to the graph type, loads the processed data and configuration parameters into the graph template for graph drawing, outputs the generated graph in a file output stream mode, returns an output address, and generates a report file for reading after acquiring the output address.
The present invention is further described below in conjunction with the following figures and specific examples so that those skilled in the art may better understand the present invention and practice it, but the examples are not intended to limit the present invention.
The method of the invention is utilized to automatically generate an analysis chart in a java background and load a document, and comprises the following specific steps:
s1: establishing an html graph template according to the graph type, wherein the graph template is divided into a line graph, a bar graph, a pie graph, a radar graph, a scatter graph, a user-defined special graph and the like according to the graph type, the basic graph in the graph type uses an echarts tool to establish the graph template, the user-defined special graph in the graph type uses a G2 drawing tool to establish the graph template, the required data and configuration in the graph template can be highly parameterized,
s2: defining the required data structure and parameter configuration in the graphic template,
s3: processing the data into a data structure required by a corresponding graph template according to the graph type, namely processing and sorting the data according to the graph type to be drawn after analyzing the data so as to meet the data structure required by the graph template,
s4: reading a graphic template in a data stream mode according to the graphic type, loading the processed data and configured parameters into the graphic template for drawing the graphic, wherein the configured parameters comprise parameters such as graphic type marks, horizontal and vertical coordinate units, and whether a legend is enabled or not,
s5: and outputting the generated graph as a png or jpg type file in a file output stream mode, returning the png or jpg type file output address, and generating a report file for reading after acquiring the output address.
When the tool is used, an analysis graph is automatically generated in a java background and a document is loaded, and the specific process comprises the following steps:
the template module establishes an html graph template according to the graph type, the graph template is divided into a line graph, a bar graph, a pie graph, a radar graph, a scatter graph, a user-defined special graph and the like according to the graph type, a basic graph in the graph type uses an echarts tool to establish the graph template, the user-defined special graph in the graph type uses a G2 drawing tool to establish the graph template, the required data and configuration in the graph template can be highly parameterized,
and define the required data structure and parameter configuration in the graphic template,
the processing module can process the data into the data structure required by the corresponding graphic template by utilizing the components according to the graphic type, namely, the data is processed and sorted according to the graphic type to be drawn after the data is analyzed so as to meet the data structure required by the graphic template,
the generating module can utilize the components to read the graphic template in the form of data stream according to the graphic type, load the processed data and the configured parameters into the graphic template for graphic drawing, the configured parameters such as graphic type marks, horizontal and vertical coordinate units, whether to enable legends and other parameters,
and outputting the generated graph as a png or jpg type file in a file output stream mode, returning the png or jpg type file output address, and generating a report file for reading after acquiring the output address.
By utilizing the method or the tool, the high-quality analysis graph can be provided for the background generated report document, the basic images such as the line graph, the bar graph, the pie graph, the radar chart and the like can be drawn by establishing the graph template by using an echarts drawing tool, and some customized special graphs can be drawn by establishing the graph template by using a G2 tool, so that the method or the tool is convenient and quick.
The above-mentioned embodiments are merely preferred embodiments for fully illustrating the present invention, and the scope of the present invention is not limited thereto. The equivalent substitution or change made by the technical personnel in the technical field on the basis of the invention is all within the protection scope of the invention. The protection scope of the invention is subject to the claims.

Claims (8)

1. A method for automatically generating analysis diagram and loading document by java background is characterized by that a graphic template is created according to the graphic type,
defining the required data structure and parameter configuration in the graphic template,
processing the data into the data structure required by the corresponding graphic template according to the graphic type,
reading the graph template in a data stream mode according to the graph type, loading the processed data and the configuration parameters into the graph template for graph drawing, outputting the generated graph in a file output stream mode, returning the output address, and generating a report file for reading after obtaining the output address.
2. The method of claim 1, wherein the base graph in the graph type is created using an echarts tool.
3. The method of claim 1 or 2, wherein the custom graphics in the graphic type are created using G2 drawing tools to create graphic templates.
4. The method as claimed in claim 3, characterized by the specific steps of:
s1: establishing an html graph template according to the graph type,
s2: defining the required data structure and parameter configuration in the graphic template,
s3: processing the data into the data structure required by the corresponding graphic template according to the graphic type,
s4: reading the graphic template in the form of data stream according to the graphic type, loading the processed data and configuration parameters into the graphic template for graphic drawing,
s5: and outputting the generated graph as a png or jpg type file in a file output stream mode, returning the png or jpg type file output address, and generating a report file for reading after acquiring the output address.
5. A tool for realizing automatic generation of an analysis graph and loading of a document by a java background is characterized by comprising a template module, a processing module and a generation module,
the template module establishes a graph template according to the graph type, defines the required data structure and parameter configuration in the graph template,
the processing module processes data into a data structure required by a corresponding graph template according to the graph type, the generating module reads the graph template in a data stream mode according to the graph type, loads the processed data and configuration parameters into the graph template for graph drawing, outputs the generated graph in a file output stream mode, returns an output address, and generates a report file for reading after acquiring the output address.
6. The tool of claim 5, wherein the template module uses an echarts tool to create a graph template of a base graph in the graph type.
7. The tool of claim 5 or 6, wherein the template module uses the G2 drawing tool to create a graphic template of a custom graphic in the graphic type.
8. The tool of claim 7, wherein the generating module outputs the generated graph as a png or jpg type file in a file output stream, returns the png or jpg type file output address, and generates the report file for reading after acquiring the output address.
CN201910986283.4A 2019-10-17 2019-10-17 Method for automatically generating analysis diagram and loading document by java background Pending CN110764842A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910986283.4A CN110764842A (en) 2019-10-17 2019-10-17 Method for automatically generating analysis diagram and loading document by java background

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910986283.4A CN110764842A (en) 2019-10-17 2019-10-17 Method for automatically generating analysis diagram and loading document by java background

Publications (1)

Publication Number Publication Date
CN110764842A true CN110764842A (en) 2020-02-07

Family

ID=69332088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910986283.4A Pending CN110764842A (en) 2019-10-17 2019-10-17 Method for automatically generating analysis diagram and loading document by java background

Country Status (1)

Country Link
CN (1) CN110764842A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035313A (en) * 2020-07-27 2020-12-04 珠海格力电器股份有限公司 Report generation method and device, template customization method and device, and monitoring system
CN115328486A (en) * 2022-10-17 2022-11-11 北京安盟信息技术股份有限公司 Echarts calling and packaging method, device, medium and equipment based on dynamic incoming data

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102734A (en) * 2014-07-28 2014-10-15 中国科学院深圳先进技术研究院 Data display method and system
CN105512265A (en) * 2015-12-04 2016-04-20 浪潮通用软件有限公司 Method and device for displaying data through figure
US20170132817A1 (en) * 2015-11-10 2017-05-11 Impetus Technologies, Inc. System and Method for Visualizing Data Analytics Models
CN106776742A (en) * 2016-11-18 2017-05-31 南京越博动力系统股份有限公司 A kind of pure electric vehicle VCU data processings and analysis method
CN107908604A (en) * 2017-08-25 2018-04-13 上海壹账通金融科技有限公司 Report pattern generation method, device, computer equipment and storage medium
CN109885301A (en) * 2019-01-21 2019-06-14 新奥特(北京)视频技术有限公司 A kind of generation method of scalable vector graphics, device, storage medium and equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102734A (en) * 2014-07-28 2014-10-15 中国科学院深圳先进技术研究院 Data display method and system
US20170132817A1 (en) * 2015-11-10 2017-05-11 Impetus Technologies, Inc. System and Method for Visualizing Data Analytics Models
CN105512265A (en) * 2015-12-04 2016-04-20 浪潮通用软件有限公司 Method and device for displaying data through figure
CN106776742A (en) * 2016-11-18 2017-05-31 南京越博动力系统股份有限公司 A kind of pure electric vehicle VCU data processings and analysis method
CN107908604A (en) * 2017-08-25 2018-04-13 上海壹账通金融科技有限公司 Report pattern generation method, device, computer equipment and storage medium
CN109885301A (en) * 2019-01-21 2019-06-14 新奥特(北京)视频技术有限公司 A kind of generation method of scalable vector graphics, device, storage medium and equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035313A (en) * 2020-07-27 2020-12-04 珠海格力电器股份有限公司 Report generation method and device, template customization method and device, and monitoring system
CN115328486A (en) * 2022-10-17 2022-11-11 北京安盟信息技术股份有限公司 Echarts calling and packaging method, device, medium and equipment based on dynamic incoming data

Similar Documents

Publication Publication Date Title
CN107908690B (en) Data processing method based on big data operation analysis
CN104778241A (en) Report generation method and system
CN110764842A (en) Method for automatically generating analysis diagram and loading document by java background
CN111433762A (en) Graphically organizing content in a user interface of a software application
CN102870108A (en) Method of generating electronic report
CN105488089A (en) Automatic generation method and system of quality evaluation report
CN112800165A (en) Industrial cluster positioning method and device based on clustering algorithm and electronic equipment
CN110837703A (en) Pro/E-based hydraulic cylinder rapid design system and method
CN106776994B (en) Application method and system of engineering symbols in engineering report forms and web pages
CN111859053A (en) Data definition method of visual chart and chart library realized by data definition method
CN107038199A (en) A kind of drawing practice and device
CN103218413B (en) A kind of electronic document synthetic method and device
CN116257666A (en) Echarts-based data dynamic rendering display method and system
US20100313109A1 (en) System and method for generating a periodic report
CN113360148B (en) Graph processing method and device and electronic equipment
CN110930210A (en) Sewing process automatic generation method and system
EP3301529A1 (en) Method and apparatus for displaying monitoring information
CN112487771A (en) Report generation method, report generation device and terminal
KR102099362B1 (en) Device and method for a data preparation using a micro service
CN108803995B (en) SVG-based chart data display system
US20050262040A1 (en) Software Systems and Methods for Programmatically creating Graphical and Text Elements using OLE and/or Macro Functionality of Commercially Available Software Applications in the Background
CN111324646A (en) Policy information importing and analyzing method based on dynamic mapping
CN111538661A (en) Method for recording, arranging and executing visual script based on appium
CN111401022A (en) Management standard template rapid generation system and method
CN115221841B (en) WEB-based engineering symbol processing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination