Unlock instant, AI-driven research and patent intelligence for your innovation.

A packaging method to simplify echarts calls

An encapsulation method and module encapsulation technology, applied in the direction of program control devices, execution examples, etc., can solve problems such as waste of efficiency, inability to invest time and manpower, and inefficiency, so as to simplify the number and complexity, reduce the amount of code, and improve development efficiency effect

Active Publication Date: 2019-04-26
G CLOUD TECH
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The result is that every time developers call echarts to generate charts, they need to bring many fixed and the same style parameters. Obviously, this calling method is a waste of efficiency.
Once the graphical report style of the system needs to be changed, developers have to search for each call and modify the style of each call. Obviously, precious time and manpower cannot be invested in this inefficient modification in project development.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A packaging method to simplify echarts calls
  • A packaging method to simplify echarts calls
  • A packaging method to simplify echarts calls

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] The present invention constructs a batch of json data with html element ID values ​​and corresponding echarts configuration parameters through parameter classification, simplified mapping, definition of default values, and module encapsulation processing; wherein echarts configuration parameters are simplified or original ecological configuration parameters, and call encapsulation The interface in the program parses the json data, and uses echarts to generate charts in batches;

[0032] The batch json data is similar to the following form:

[0033] var config = {"chart1":chart1_config};

[0034] Among them, the key value, chart1, is the ID value of the html element that needs to display the chart, and chart1_config is the echarts configuration parameter corresponding to chart1, which also uses the json format. The configuration parameter is the encapsulated json data and / or the original json data, call the function Determine the type of the current configuration parame...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The present invention relates to the field of front-end development technologies, and especially to an encapsulating method for simplifying echarts invocation. In the present invention, echarts parameters are divided into four categories: a fixed pattern parameter, a data display parameter, a functional module parameter and a less common parameter. The method comprises: using processing such as simplification, mapping, module encapsulation and parameter curing, performing a corresponding processing manner on various parameters, and encapsulating an echarts invocation module; and introducing json data with an ID value of an html element being key and a configuration parameter being value, so as to generate echarts charts in batches. According to the present invention, manners such as simplified mapping and defining a global default pattern are used in encapsulation logic, to enable a developer to invoke echarts to generate charts in batches by using a simple and rapid method. The present invention is well suitable for an occasion in which echarts are called for many times to generate charts for display.

Description

technical field [0001] The invention relates to the technical field of front-end development, in particular to an encapsulation method for simplifying echarts calling. Background technique [0002] In recent years, with the development of front-end technology and people's emphasis on big data, various big data chart display tools have increasingly appeared in the vision of developers. Baidu also provides an excellent open source echarts. With its powerful and rich chart display and highly customized configuration parameters, echarts is increasingly appearing in various data display projects. echarts also adopts the popular AMD development standard. The echarts example provides instructions, but the AMD loading method is very unfamiliar to many developers, and it takes extra time to understand AMD. Each call needs to correctly configure the location of echarts and require to load the necessary modules. Obviously, repeating complex loading information is not an efficient deve...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/448
Inventor 陈健豪艾建文孙傲冰季统凯
Owner G CLOUD TECH