CN113869016A - Chart configuration method, device and computer program product - Google Patents

Chart configuration method, device and computer program product Download PDF

Info

Publication number
CN113869016A
CN113869016A CN202111145799.XA CN202111145799A CN113869016A CN 113869016 A CN113869016 A CN 113869016A CN 202111145799 A CN202111145799 A CN 202111145799A CN 113869016 A CN113869016 A CN 113869016A
Authority
CN
China
Prior art keywords
application
code
component
application code
chart
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
CN202111145799.XA
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.)
CCI China Co Ltd
Original Assignee
CCI China 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 CCI China Co Ltd filed Critical CCI China Co Ltd
Priority to CN202111145799.XA priority Critical patent/CN113869016A/en
Publication of CN113869016A publication Critical patent/CN113869016A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • 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
    • G06F9/44526Plug-ins; Add-ons

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a chart configuration method, a chart configuration device and a computer program product, wherein the method comprises the following steps: generating application components, creating a first application code for each application component, generating a code loading command of the first application code, and storing the first application code in an application code storage library; acquiring and analyzing the code loading command to obtain a unique identifier and a component version number of the application component, and sending a request information request to the application code repository to request the first application code corresponding to the application component according to the unique identifier and the component version number; and carrying out secondary development on the acquired first application code to obtain a second application code. According to the method and the device, the first application code can be developed for the second time in the code editor, and the second application code obtained through loading and development calls the corresponding application component to perform chart rendering. Therefore, the development efficiency and the expandability of application codes are obviously improved.

Description

Chart configuration method, device and computer program product
Technical Field
The present application relates to the field of front-end data visualization, and in particular, to a method and an apparatus for chart configuration and a computer program product.
Background
"data visualization" refers to converting data into graphics or images to be displayed on a screen, so as to help us quickly and accurately understand the data, which has been the hot direction. In which the common means of data "data visualization" is presented in the form of a chart.
The EChats is a Javascript-based data visualization chart library and provides visual, vivid, interactive and personalizable data visualization charts. Although the configuration items of the ECharts are rich, the corresponding parameters are configured too much and complicated in hierarchy, so that the configuration items are difficult to find and accurately memorize. A collection of componentized systems, represented by v-charts, are thus emerging in the market that rapidly generate echarts charts through the generation of data and a small number of configurations. Further, in order to reduce the development threshold, a lot of low-code systems based on the v-charts are appeared in the market, for example, the chinese patent with application number 202010650518.5 provides a method for directly packaging ECharts configuration items, generating logic inside components, and avoiding the direct generation of cumbersome configuration items by developers.
The above-mentioned componentization system generates echarts charts by way of configuration, which is optimized from the viewpoint of lowering echarts development thresholds. For javascript developers, the components are often required to be flexibly applied when using a componentized system, and therefore, application codes of the components need to be finely adjusted or expanded and developed. Therefore, the core requirements of the component are that the application code of the component supports secondary development, flexible expansibility and development efficiency improvement.
In summary, an effective solution is not yet obtained to the problem that the existing diagram configuration method based on the component library cannot edit the application code of the component, which reduces the development threshold but has poor expansibility for developers.
Disclosure of Invention
The embodiment of the application provides a diagram configuration method, a diagram configuration device and a computer program product, aiming at the problem that the application codes of components cannot be edited by the existing diagram configuration method based on a component library, although the development threshold is reduced, the expansibility of developers is poor, the application codes of the application components are quickly obtained in a command mode, and the beneficial effect of improving the expansibility of the application codes is realized by directly using or carrying out secondary expansion development on the application codes.
In a first aspect, an embodiment of the present application provides a diagram configuration method, where the method includes: creating a basic component, generating at least one application component corresponding to the basic component by taking the basic component as a parent class, creating a first application code for each application component, generating a code loading command of the first application code, and storing the first application code in an application code repository, wherein the first application code is represented as a specific calling code of the application component; acquiring and analyzing the code loading command to obtain a unique identifier and a component version number of the application component, and sending a request information request to the application code repository to request the first application code corresponding to the application component according to the unique identifier and the component version number; and carrying out secondary development on the acquired first application code to obtain a second application code, and executing chart rendering by using the application component by loading the second application code.
In some embodiments, building a first configuration item in an application component, performing secondary development on the first loaded application code to obtain a second configuration item, and performing graph rendering using the application component by loading the second application code includes: the second application code calls the application component, wherein the application component inherits a parameter combination method and a chart rendering method which are included by the basic component; and merging the first configuration item and the second configuration item through the parameter merging method to obtain target parameter configuration, and transmitting the target parameter configuration into the chart rendering method to perform chart rendering.
In some embodiments, the code loading command is composed of the unique identifier for distinguishing each application component, the component version number for representing the version of each application component, and the specific identifier for identifying the code loading command.
In some embodiments, after "generating the application component", the method further comprises: the unique identification is distributed to the application component, the component version number of the application component is generated according to the version of the application component, and the application component is stored in a componentized system, wherein the componentized system is used for storing the application component, and a first configuration item for generating a chart is arranged in the application component.
In some of these embodiments, the application code repository stores the first application code for the application component based on the unique identification of the application component and the component version number.
In some of these embodiments, the method further comprises: and creating a first application code generation plug-in to receive and analyze the code loading command, wherein the first application code generation plug-in is used for loading the first application code returned by the application code storage library into the code editor.
In a second aspect, an embodiment of the present application provides a chart configuration apparatus, including: the component generation module is used for creating a basic component, generating at least one application component corresponding to the basic component by taking the basic component as a parent class, creating a first application code for each application component, generating a code loading command of the first application code, and storing the first application code in an application code repository, wherein the first application code is expressed as a specific calling code of the application component; a code obtaining module, configured to obtain and analyze the code loading command to obtain a unique identifier and a component version number of the application component, and send a request information request to the application code repository to request the first application code corresponding to the application component according to the unique identifier and the component version number; and the code development module is used for carrying out secondary development on the acquired first application code to obtain a second application code, and executing chart rendering by using the application component by loading the second application code.
In a third aspect, an embodiment of the present application provides an electronic apparatus, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program to perform the chart configuring method according to any one of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer program product comprising software code portions for performing the graph configuration method according to any one of the first aspect when the computer program product is run on a computer.
In a fifth aspect, the present application provides a readable storage medium, in which a computer program is stored, the computer program including program code for controlling a process to execute a process, the process including the chart configuration method according to any one of the first aspect.
The main contributions and innovation points of the embodiment of the application are as follows:
the embodiment of the application assigns a unique identifier and a component version number to the generated application component, and forms a code loading command for calling a first application code of the application component through the unique identifier and the component version number. After a code loading command is input into the code editor by the client, the unique identifier and the component version number in the code loading command can be analyzed, corresponding resources are inquired in an application code repository for storing the first application component, and the returned first application code is acquired and then can be directly loaded in a safe operation environment so as to call the corresponding application component to render the chart. Or carrying out secondary development on the first application code in the code editor, and loading the developed second application code to call the corresponding application component to execute chart rendering. Therefore, the development efficiency and the expandability of application codes are obviously improved.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart diagram of a chart configuration method according to an embodiment of the application;
FIG. 2 is a diagram of an application system architecture to which a schema configuration method is applied, according to an embodiment of the present application;
FIG. 3 is a block diagram of a schematic configuration apparatus according to an embodiment of the present application;
fig. 4 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of one or more embodiments of the specification, as detailed in the claims which follow.
It should be noted that: in other embodiments, the steps of the corresponding methods are not necessarily performed in the order shown and described herein. In some other embodiments, the method may include more or fewer steps than those described herein. Moreover, a single step described in this specification may be broken down into multiple steps for description in other embodiments; multiple steps described in this specification may be combined into a single step in other embodiments.
Example one
An embodiment of the present application provides a method for configuring a graph, and with reference to fig. 1, the method includes:
step S101, creating a basic component, generating at least one application component corresponding to the basic component by taking the basic component as a parent class, creating a first application code for each application component, generating a code loading command of the first application code, and storing the first application code in an application code repository, wherein the first application code is represented as a specific calling code of the application component.
In the step, the application components related to the service are inherited from the basic components, the chart rendering method and the parameter merging method in the basic components are shared, the method arranged in the basic components can be directly executed when the application components are called, and the writing of repeated code segments during development is avoided.
In this step, the application component refers to a component that renders the chart conforming to the business scene so that the chart can be presented on the webpage side. The graph related to the service scenario may specifically be a monthly vaccination amount graph, a bayonet population flow graph, an annual average rainfall graph, and the like. The application component is internally provided with configuration parameters of a chart and a rendering method, and the rendering method receives the configuration parameters and can display the chart similar to the example in the front end through an embedded echarts instance.
In the step, an ECharts chart library is adopted for chart configuration, specifically, various ECharts basic components are stored in the ECharts chart library, the basic components in the ECharts can be directly loaded in a safe running environment to serve as application components, the basic components can also be loaded in a code editor, and the relevant configuration of service scenes is carried out in codes of the basic components to enable the basic components to serve as the application components.
After the application component is generated, a corresponding application code needs to be created and called, specifically, under the condition that the basic component is directly loaded as the application component, the application code of the ECharts self-carrying device can be directly adopted, and under the condition that the application component related to the service is loaded, the application code of the ECharts self-carrying device is expanded according to the service requirement, so that the first application code is obtained.
In this step, the application code repository stores the first application code of the application component based on the unique identification of the application component and the component version number.
Step S102, obtaining and analyzing the code loading command to obtain the unique identifier and the component version number of the application component, and sending a request message to the application code repository to request the first application code corresponding to the application component according to the unique identifier and the component version number.
In this step, after the application component and the first application code are generated, when the graph rendered by the application component needs to be reused, the corresponding first application code needs to be acquired. Inputting a code loading command for loading a first application code, analyzing the command by a code editor to obtain identification information of the first application code, sending request information to an application code repository in which the first application code is stored and carrying the identification information, inquiring the corresponding first application code according to the identification information of the first application code after the application code repository obtains the request information, and returning the first application code to a requesting party.
Specifically, for an application component, the identification information refers to the unique identification of the application component and the component version number.
The application component is correspondingly configured with a plurality of first application codes corresponding to different versions in the version iteration process, and the identification information of the first application codes needs to be verified through the unique identification and the version number together. Specifically, the unique identifier is used to distinguish each application component, for example, the unique identifier of component a is 0001, and the unique identifier of component B is 0002; the component version number is used to indicate the version of each application component, which facilitates iterative updating of the application components, e.g., the current version of component a is v2.0 and the last version of component a is v1.0. And querying the unique identifier and the component version number in the library, returning if the result is queried, and indicating that the identification information is not in accordance and acquiring the application code of the request if the result is not queried.
In this step, the request information may be an http request, http is a protocol used by the client to request the resource from the server, and the unique identifier and the component version number of the requested resource are encapsulated in a request text and sent to the application code repository. Specifically, the client sends an http request to the application code repository and carries the unique identifier and version number of the application component, and the application code repository returns the first application code of the application component of the corresponding version. Step S103, carrying out secondary development on the acquired first application code to obtain a second application code, and executing chart rendering by using the application component by loading the second application code.
In this step, the secondary development is used for modifying and expanding functions on the basis of the original first application code so as to achieve the required functions. Specifically, the first application code is input into a code editor after being acquired, the code editor is used for modifying to obtain a second application code, and the second application code is loaded to use a corresponding application component to perform chart rendering through the unique identifier and the component version number.
Furthermore, the Code editor takes VS Code as an example, a VS Code plugin can be installed in the VS Code editor, so that the VS Code editor can accept a loading command of an application Code of a component, the Code loading command is input and selected by a keyboard, a right-key popup menu is clicked, and a button of "generating a component application Code" in the menu is clicked, so that the application Code of a version corresponding to the component in the currently selected Code loading command can be obtained, the application Code is automatically input into an editor interface, and the first application Code can be developed secondarily in the editor interface.
In summary, for the above S101 to S103, the present embodiment provides a technical solution capable of performing any secondary extension development on the first application code of the application component in the code editor. Specifically, in the embodiment, the application component and the first application code capable of calling the application component are generated, the unique identifier is generated for each application component, then the component version number is generated according to the current version of the application component, and then the first application code is stored in the application code repository through the unique identifier and the component version number. When any user side sends request information and carries the unique identifier and the component version number to request resources from the application code repository, the application code repository sends the inquired corresponding first application code to the user side initiating the request, so that the user side can directly use or carry out secondary development according to the returned first application code. The application has the technical point that the EChats business class diagram can be generated directly based on the first application code under the condition of no configuration, and the developer can also expand the functions of the application components according to the actual business needs. Compared with the prior art, the chart configuration method is more flexible under the condition of reducing development code amount, and can be directly used or expanded according to the development actual condition, so that the development efficiency is greatly improved.
In some embodiments, the application component is stored in a componentized system by assigning the unique identifier to the application component, generating the component version number of the application component according to the version of the application component, wherein the componentized system is used for storing the application component, and the application component is internally provided with a first configuration item for generating a chart.
Specifically, a componentization system for storing the components is created, wherein the componentization system comprises a basic component and an application component, the basic component refers to a parent component of all the application components, the application components inherit from the basic component, and the ECharts configuration related to a specific service scene is set in the application components. A unique identification is created and a component version number is assigned for each application component in the componentized system.
Illustratively, a default rendering method such as checking, highlighting, carousel and the like is provided in the basic component, and a plurality of extended application components are solidified based on the basic component to form a component library. The basic components and the application components form a nested architecture, and the architecture is improved from the outer code level to the inner code level. The external application component relies on the internal base component-defined approach, the outermost topic is based on the next-to-outer defined topic, and so on. Through the mode of the solidified configuration, the repeated code segment writing in the development process can be avoided, the development amount is reduced, and the maintenance is convenient.
In some embodiments, building a first configuration item in an application component, performing secondary development on the first loaded application code to obtain a second configuration item, and performing graph rendering using the application component by loading the second application code includes: the second application code calls the application component, wherein the application component inherits a parameter combination method and a chart rendering method which are included by the basic component; and merging the first configuration item and the second configuration item through the parameter merging method to obtain target parameter configuration, and transmitting the target parameter configuration into the chart rendering method to perform chart rendering.
The first configuration item and the second configuration item refer to elements required for completing a certain service, for example, many modules need to be called to complete the running process of a program, and these modules may be configuration items of the program.
In this embodiment, a first configuration item built in an application component is merged with a second configuration item set by a user for secondary development through a parameter merging method, for example, a basic theme is defined in an original application component, and a business theme is defined during secondary development, so that the basic theme and the business theme are merged and then serve as a theme basis of the application component, so that all chart contents can be rendered only once in the following process.
In some of these embodiments, the code load command consists of the unique identification and the component version number and a specific identifier, wherein the specific identifier is used to identify the code load command.
Specifically, the specific identifier is used to identify that the instruction input in the code editor is an instruction for loading an application code, for example, cci is defined as a specific identifier of a code loading command, whether the instruction is a code loading command is determined by whether cci is acquired during analysis, and if so, the unique identifier and the component version number in the code loading command are extracted.
In this embodiment, the unique identifier and the component version number may be concatenated to serve as the identification information for querying the first application code, for example, taking the specific identifier cci as an example, the map of the evaporation amount and the precipitation amount of the area with the unique identifier 000_0001 of the application component a is given, the map of the loading command is cci000_0001v1.0.0 if the version is v1.0.0, the map of the population flow of the bayonet with the unique identifier 000_0002 of the application component B is given, and the map of the version is v2.0.0, the loading command is cci0000_0002 v2.0.0.
Illustratively, still taking a map of regional evaporation and precipitation volumes as an example, the unique identifier is 000_0001, and its internal default configuration is
Figure BDA0003285372800000071
Figure BDA0003285372800000081
Figure BDA0003285372800000091
When stored in the application code repository, examples of the data stored therein are:
Figure BDA0003285372800000092
Figure BDA0003285372800000101
in some of these embodiments, the method further comprises: and creating a first application code generation plug-in to receive and analyze the code loading command, wherein the first application code generation plug-in is used for loading the first application code returned by the application code storage library into the code editor.
Referring to fig. 2, a visualization component system, i.e., a component library, in which a plurality of application components and a base component are stored, generates first application code for the application components, and stores the generated first application code in a component application code database.
First, the local user can directly render the chart by referring to the corresponding application component through the generated first application code loading.
And secondly, other user sides can acquire the first application Code in the application Code repository through the Code loading command generated by the VS Code plug-in, and load the first application Code to obtain a corresponding application component to render the chart.
And thirdly, after acquiring the first application Code, other user sides can develop the first application Code for the second time through a VS Code editor to obtain a new second application Code, and the chart rendering is executed by loading the second application Code and using the corresponding application component.
Illustratively, taking a VS Code editor as an example, after installing an application Code generation plug-in the VS Code editor, inputting and selecting the listed Code loading command, clicking a right-click pop-up menu, and clicking a "generate component application Code" button in the menu, so as to obtain an application Code of a version corresponding to a component in the currently selected Code loading command, and automatically inputting the application Code into an editor interface.
In summary, the embodiments of the present application provide a method for configuring a graph, and in the method, a basic configuration item is solidified by a nesting architecture between a base component and an application component, and an outer layer application component and an inner layer base component share a parameter merging method and a graph rendering method, thereby avoiding repeated writing of code segments. Meanwhile, the basic configuration of the inner layer cannot be influenced by the expansion of the application components of the outer layer, so that the maintenance is convenient. Thirdly, the method allocates a unique identifier and a component version number to the generated application component, and forms a code loading command with the first application code for calling the application component through the unique identifier and the component version number. After a code loading command is input into the code editor by the client, the unique identifier and the component version number in the code loading command can be analyzed, corresponding resources are inquired in an application code repository for storing the first application component, and the returned first application code is acquired and then can be directly loaded in a safe operation environment so as to call the corresponding application component to render the chart. Or carrying out secondary development on the first application code in the code editor, and loading the developed second application code to call the corresponding application component to execute chart rendering. Thereby realizing the beneficial effect of improving the expansibility of the application code.
Example two
The present application also proposes a chart configuration apparatus, as shown in fig. 3, including:
the component generating module 301 is configured to create a base component, generate at least one application component corresponding to the base component for a parent class by using the base component, create a first application code for each application component, generate a code loading command of the first application code, and store the first application code in an application code repository, where the first application code is represented as a specific invocation code of the application component.
A code obtaining module 302, configured to obtain and analyze the code loading command to obtain a unique identifier and a component version number of the application component, and send a request message to the application code repository to request the first application code corresponding to the application component according to the unique identifier and the component version number.
The code development module 303 is configured to perform secondary development on the acquired first application code to obtain a second application code, and perform graph rendering using the application component by loading the second application code.
EXAMPLE III
The present embodiment also provides an electronic device, referring to fig. 4, comprising a memory 404 and a processor 402, wherein the memory 404 stores a computer program, and the processor 402 is configured to execute the computer program to perform the steps of any of the above method embodiments.
Specifically, the processor 402 may include a Central Processing Unit (CPU), or A Specific Integrated Circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
Memory 404 may include, among other things, mass storage 404 for data or instructions. By way of example, and not limitation, memory 404 may include a hard disk drive (hard disk drive, HDD for short), a floppy disk drive, a solid state drive (SSD for short), flash memory, an optical disk, a magneto-optical disk, tape, or a Universal Serial Bus (USB) drive or a combination of two or more of these. Memory 404 may include removable or non-removable (or fixed) media, where appropriate. The memory 404 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 404 is a Non-Volatile (Non-Volatile) memory. In particular embodiments, memory 404 includes Read-only memory (ROM) and Random Access Memory (RAM). The ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or FLASH memory (FLASH), or a combination of two or more of these, where appropriate. The RAM may be a static random-access memory (SRAM) or a dynamic random-access memory (DRAM), where the DRAM may be a fast page mode dynamic random-access memory 404 (FPMDRAM), an extended data output dynamic random-access memory (EDODRAM), a synchronous dynamic random-access memory (SDRAM), or the like.
Memory 404 may be used to store or cache various data files for processing and/or communication use, as well as possibly computer program instructions for execution by processor 402.
The processor 402 may implement any of the above described methods of graph configuration by reading and executing computer program instructions stored in the memory 404.
Optionally, the electronic apparatus may further include a transmission device 406 and an input/output device 408, where the transmission device 406 is connected to the processor 402, and the input/output device 408 is connected to the processor 402.
The transmitting device 406 may be used to receive or transmit data via a network. Specific examples of the network described above may include wired or wireless networks provided by communication providers of the electronic devices. In one example, the transmission device includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmitting device 406 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
The input and output devices 408 are used to input or output information. In this embodiment, the input information may be the acquired basic component, application component, first application code, code loading command, and the like, and the output information may be a unique identifier, a component version number, second application code, a chart rendering result, and the like.
Optionally, in this embodiment, the processor 402 may be configured to execute the following steps by a computer program:
s101, creating a basic component, generating at least one application component corresponding to the basic component by taking the basic component as a parent class, creating a first application code for each application component, generating a code loading command of the first application code, and storing the first application code in an application code repository, wherein the first application code is represented as a specific calling code of the application component.
S102, obtaining and analyzing the code loading command to obtain a unique identifier and a component version number of the application component, and sending a request message to the application code repository to request the first application code corresponding to the application component according to the unique identifier and the component version number.
S103, carrying out secondary development on the acquired first application code to obtain a second application code, and executing chart rendering by using the application component by loading the second application code.
It should be noted that, for specific examples in this embodiment, reference may be made to examples described in the foregoing embodiments and optional implementations, and details of this embodiment are not described herein again.
In general, the various embodiments may be implemented in hardware or special purpose circuits, software, logic or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor or other computing device, although the invention is not limited thereto. While various aspects of the invention may be illustrated and described as block diagrams, flow charts, or using some other pictorial representation, it is well understood that these blocks, apparatus, systems, techniques or methods described herein may be implemented in, as non-limiting examples, hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controller or other computing devices, or some combination thereof.
Embodiments of the invention may be implemented by computer software executable by a data processor of the mobile device, such as in a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets and/or macros can be stored in any device-readable data storage medium and they include program instructions for performing particular tasks. The computer program product may comprise one or more computer-executable components configured to perform embodiments when the program is run. The one or more computer-executable components may be at least one software code or a portion thereof. Further in this regard it should be noted that any block of the logic flow as in the figures may represent a program step, or an interconnected logic circuit, block and function, or a combination of a program step and a logic circuit, block and function. The software may be stored on physical media such as memory chips or memory blocks implemented within the processor, magnetic media such as hard or floppy disks, and optical media such as, for example, DVDs and data variants thereof, CDs. The physical medium is a non-transitory medium.
It should be understood by those skilled in the art that various features of the above embodiments can be combined arbitrarily, and for the sake of brevity, all possible combinations of the features in the above embodiments are not described, but should be considered as within the scope of the present disclosure as long as there is no contradiction between the combinations of the features.
The above examples are merely illustrative of several embodiments of the present application, and the description is more specific and detailed, but not to be construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A chart configuration method, comprising the steps of:
creating a basic component, generating at least one application component corresponding to the basic component by taking the basic component as a parent class, creating a first application code for each application component, generating a code loading command of the first application code, and storing the first application code in an application code repository, wherein the first application code is represented as a specific calling code of the application component;
acquiring and analyzing the code loading command to obtain a unique identifier and a component version number of the application component, and sending a request information request to the application code repository to request the first application code corresponding to the application component according to the unique identifier and the component version number;
and carrying out secondary development on the acquired first application code to obtain a second application code, and executing chart rendering by using the application component by loading the second application code.
2. The chart arranging method according to claim 1,
setting a first configuration item in an application component, carrying out secondary development on the first loaded application code to obtain a second configuration item, and carrying out chart rendering by using the application component by loading the second application code comprises the following steps:
the second application code calls the application component, wherein the application component inherits a parameter combination method and a chart rendering method which are included by the basic component;
and merging the first configuration item and the second configuration item through the parameter merging method to obtain target parameter configuration, and transmitting the target parameter configuration into the chart rendering method to perform chart rendering.
3. The chart configuration method according to claim 1, wherein the code load command is composed of the unique identifier for distinguishing each application component, the component version number for indicating a version of each application component, and the specific identifier for identifying the code load command.
4. The chart configuration method according to claim 1, wherein after "generating application components", the method further comprises:
the unique identification is distributed to the application component, the component version number of the application component is generated according to the version of the application component, and the application component is stored in a componentized system, wherein the componentized system is used for storing the application component, and a first configuration item for generating a chart is arranged in the application component.
5. The chart configuration method of claim 1 wherein the application code repository stores the first application code for the application component based on the unique identification of the application component and the component version number.
6. The chart configuration method according to claim 1, the method further comprising: and creating a first application code generation plug-in to receive and analyze the code loading command, wherein the first application code generation plug-in is used for loading the first application code returned by the application code storage library into the code editor.
7. A chart arranging apparatus, comprising:
the component generation module is used for creating a basic component, generating at least one application component corresponding to the basic component by taking the basic component as a parent class, creating a first application code for each application component, generating a code loading command of the first application code, and storing the first application code in an application code repository, wherein the first application code is expressed as a specific calling code of the application component;
a code obtaining module, configured to obtain and analyze the code loading command to obtain a unique identifier and a component version number of the application component, and send a request information request to the application code repository to request the first application code corresponding to the application component according to the unique identifier and the component version number;
and the code development module is used for carrying out secondary development on the acquired first application code to obtain a second application code, and executing chart rendering by using the application component by loading the second application code.
8. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is configured to execute the computer program to perform the chart configuration method of any of claims 1 to 6.
9. A computer program product, characterized in that it comprises software code portions for performing the chart configuration method according to any one of claims 1 to 6 when the computer program product is run on a computer.
10. A readable storage medium, characterized in that a computer program is stored therein, the computer program comprising program code for controlling a process to execute a process, the process comprising the chart arranging method according to any one of claims 1 to 6.
CN202111145799.XA 2021-09-28 2021-09-28 Chart configuration method, device and computer program product Pending CN113869016A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111145799.XA CN113869016A (en) 2021-09-28 2021-09-28 Chart configuration method, device and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111145799.XA CN113869016A (en) 2021-09-28 2021-09-28 Chart configuration method, device and computer program product

Publications (1)

Publication Number Publication Date
CN113869016A true CN113869016A (en) 2021-12-31

Family

ID=78992134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111145799.XA Pending CN113869016A (en) 2021-09-28 2021-09-28 Chart configuration method, device and computer program product

Country Status (1)

Country Link
CN (1) CN113869016A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413022A (en) * 2011-12-31 2012-04-11 北京新媒传信科技有限公司 Application debugging method and system
CN109358851A (en) * 2018-07-19 2019-02-19 平安科技(深圳)有限公司 Creation method, device and the computer readable storage medium of chart components
CN109857657A (en) * 2019-01-18 2019-06-07 深圳壹账通智能科技有限公司 Code detection method, device, computer equipment and storage medium
CN110580147A (en) * 2018-06-07 2019-12-17 阿里巴巴集团控股有限公司 application program development method and device
CN111562912A (en) * 2020-04-08 2020-08-21 北京邮电大学 Front-end component development method and system for data visualization
CN111666328A (en) * 2020-04-29 2020-09-15 中国平安财产保险股份有限公司 Method and device for displaying visual chart in real time, computer equipment and storage medium
CN112732246A (en) * 2021-01-13 2021-04-30 臧主峰 Data visualization method and device based on HTML template and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413022A (en) * 2011-12-31 2012-04-11 北京新媒传信科技有限公司 Application debugging method and system
CN110580147A (en) * 2018-06-07 2019-12-17 阿里巴巴集团控股有限公司 application program development method and device
CN109358851A (en) * 2018-07-19 2019-02-19 平安科技(深圳)有限公司 Creation method, device and the computer readable storage medium of chart components
CN109857657A (en) * 2019-01-18 2019-06-07 深圳壹账通智能科技有限公司 Code detection method, device, computer equipment and storage medium
CN111562912A (en) * 2020-04-08 2020-08-21 北京邮电大学 Front-end component development method and system for data visualization
CN111666328A (en) * 2020-04-29 2020-09-15 中国平安财产保险股份有限公司 Method and device for displaying visual chart in real time, computer equipment and storage medium
CN112732246A (en) * 2021-01-13 2021-04-30 臧主峰 Data visualization method and device based on HTML template and electronic equipment

Similar Documents

Publication Publication Date Title
CN110221872B (en) Page jump method and device, electronic equipment and storage medium
EP3605323B1 (en) Method for generating network slice template and for applying network slice template, and apparatus
CN109062563B (en) Method and device for generating page
CN107609004B (en) Application program embedding method and device, computer equipment and storage medium
CN111563220A (en) Business website project construction method and device, computer equipment and storage medium
CN107276842B (en) Interface test method and device and electronic equipment
CN107783766B (en) Method and device for cleaning files of application program
CN111475161B (en) Method, device and equipment for accessing component
CN105335132A (en) Method, apparatus and system for user-defined application function
CN108279882B (en) Framework generation method, device, equipment and computer readable medium
CN110895471A (en) Installation package generation method, device, medium and electronic equipment
CN108549537A (en) The method and system of user data acquisition based on Android terminal
CN104268229A (en) Resource obtaining method and device based on multi-process browser
CN111124480A (en) Application package generation method and device, electronic equipment and storage medium
CN111694733A (en) API (application programming interface) testing method and device for software development kit SDK (software development kit)
CN113268243A (en) Memory prediction method and device, storage medium and electronic equipment
CN110968314A (en) Page generation method and device
CN113760276A (en) Method and device for generating page code
CN112087370A (en) Method, system, electronic device and computer-readable storage medium for issuing GitHub Issues
CN111984259A (en) Interface creating method, device, equipment and storage medium
CN110955449B (en) Gray scale release method and device for client
CN110083351B (en) Method and device for generating code
CN111414168A (en) Web application development method and device based on mind map and electronic equipment
CN113869016A (en) Chart configuration method, device and computer program product
CN115878860A (en) Menu generation method, device, server equipment and medium

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