CN110647573A - Chart visual editing method and system based on database technology - Google Patents
Chart visual editing method and system based on database technology Download PDFInfo
- Publication number
- CN110647573A CN110647573A CN201910884451.9A CN201910884451A CN110647573A CN 110647573 A CN110647573 A CN 110647573A CN 201910884451 A CN201910884451 A CN 201910884451A CN 110647573 A CN110647573 A CN 110647573A
- Authority
- CN
- China
- Prior art keywords
- chart
- data
- editing
- database
- instruction
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/26—Visual data mining; Browsing structured data
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请公开了一种基于数据库技术的图表可视化编辑方法和系统,涉及图表处理技术领域,方法包括:后台程序获取图表数据,渲染到前台可视化图表并转换为字符串格式,存储到后台数据库进行ID标识;等待接收对目标图表进行编辑的指令,收到指令时根据目标图表ID在后台数据库读取对应的图表数据,使图表数据转换格式展示在图表编辑框;等待接收对图表编辑框中的数据进行修改的指令,收到指令时根据指令对数据进行修改;等待接收对图表编辑框中的数据进行保存的指令,收到指令时将图表编辑框中的数据进行保存;将保存后的数据渲染到前台可视化图表,并将其再次转换为字符串存储到后台数据库。有利于对图表中编辑后的数据进行持久化的储存和展示。
The present application discloses a method and system for visualizing graph editing based on database technology, and relates to the technical field of graph processing. Identification; waiting to receive an instruction to edit the target chart, when receiving the command, read the corresponding chart data in the background database according to the target chart ID, so that the chart data conversion format is displayed in the chart editing box; waiting to receive the data in the chart editing box Modify the command, modify the data according to the command when receiving the command; wait for receiving the command to save the data in the chart edit box, save the data in the chart edit box when receiving the command; render the saved data Go to the foreground to visualize the chart and convert it to a string again and store it in the background database. It is conducive to persistent storage and display of edited data in the chart.
Description
技术领域technical field
本申请涉及图表处理技术领域,具体地说,涉及一种基于数据库技术的图表可视化编辑方法和系统。The present application relates to the technical field of chart processing, and in particular, to a method and system for visual editing of charts based on database technology.
背景技术Background technique
在软件系统的开发过程中,图表作为可视化工具是系统中不可缺少的一部分,图表形式的展示可以将数据情况直观的传达给用户,通过对数据的整合分类使数据更易于理解,不同的图表样式以及颜色也使得系统页面更加友好丰富,对软件整体的效果提升有极大的帮助。In the development process of the software system, the chart is an indispensable part of the system as a visualization tool. The display of the chart can convey the data situation to the user intuitively. Through the integration and classification of the data, the data is easier to understand. Different chart styles And the color also makes the system page more friendly and rich, which is of great help to the overall effect of the software.
当前图表工具非常丰富,软件中常用到的图表工具有ECharts、FusionCharts、HighCharts、Datatables等;常用的工具除了提供多样的图表也可以进行前台数据的编辑工作;但是当前的图表编辑无法在数据库中持久化储存,导致下一次图表展示的时候数据还会返回原始的数据集,因此无法满足部分用户对图表可编辑的要求。The current charting tools are very rich. The commonly used charting tools in the software include ECharts, FusionCharts, HighCharts, Datatables, etc. In addition to providing a variety of charts, the commonly used tools can also edit the foreground data; however, the current chart editing cannot be persistent in the database. Therefore, the data will return to the original data set when the graph is displayed next time, so it cannot meet the requirements of some users that the graph can be edited.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本申请提供了一种基于数据库技术的图表可视化编辑方法和系统,能够将编辑、修改、保存后的数据渲染到前台可视化图表,并将数据转换为字符串存储到后台数据库;有利于对图表编辑框的数据进行持久化的存储。In view of this, the present application provides a method and system for visual editing of charts based on database technology, which can render edited, modified and saved data to a visual chart in the foreground, and convert the data into strings and store them in a background database; It is convenient for persistent storage of data in the edit box of the chart.
为了解决上述技术问题,本申请有如下技术方案:In order to solve the above-mentioned technical problems, the application has the following technical solutions:
第一方面,一种基于数据库技术的图表可视化编辑方法,包括:A first aspect provides a method for visual editing of charts based on database technology, including:
后台程序通过分析整合获取图表数据;The background program obtains chart data through analysis and integration;
将所述图表数据渲染到前台可视化图表,并将所述图表数据转换为字符串格式;rendering the chart data to the front-end visual chart, and converting the chart data into a string format;
将所述字符串格式的图表数据存储到后台数据库的对应字段中,并对所述字符串格式的图表数据进行ID标识;storing the chart data in the string format in the corresponding field of the background database, and performing ID identification on the chart data in the string format;
等待接收用户输入的对目标图表进行编辑的编辑指令:若未接收到所述编辑指令,则继续等待;若接收到所述编辑指令,则根据所述目标图表对应的ID在所述后台数据库中读取该目标图表对应的图表数据,将所述目标图表对应的图表数据根据不同的字符串格式进行拆分和转换,使所述目标图表对应的图表数据转换为图表可使用的对应格式展示在图表编辑框中;Waiting to receive an editing instruction for editing the target chart input by the user: if the editing instruction is not received, continue to wait; if the editing instruction is received, the ID corresponding to the target chart is stored in the background database Read the chart data corresponding to the target chart, split and convert the chart data corresponding to the target chart according to different string formats, so that the chart data corresponding to the target chart is converted into a corresponding format that can be used by the chart and displayed in the Chart edit box;
等待接收用户输入的对所述图表编辑框中的数据进行修改的修改指令,若未接收到所述修改指令,则继续等待;若接收到所述修改指令,则根据所述修改指令对所述图表编辑框中的数据进行修改;Waiting to receive a modification instruction input by the user to modify the data in the chart editing box, if the modification instruction is not received, continue to wait; if the modification instruction is received, the modification instruction is performed according to the modification instruction. Modify the data in the chart edit box;
等待接收用户输入的对所述图表编辑框中的数据进行保存的保存指令,若未接收到所述保存指令,则继续等待;若接收到所述保存指令,则将图表编辑框中的数据进行保存;Waiting to receive a save instruction input by the user to save the data in the graph editing box, if the saving instruction is not received, continue to wait; if the saving instruction is received, the data in the graph editing box will be stored. save;
将保存后的数据渲染到前台可视化图表中,并将编辑完成后的数据再次转换为字符串存储到后台数据库。Render the saved data to the front-end visualization chart, and convert the edited data into strings again and store it in the back-end database.
可选地,其中:Optionally, where:
等待接收用户输入的对已存储到后台数据库的图表数据进行调取的调取指令;若未接收到所述调取指令,则继续等待;若接收到所述调取指令,则直接从后台数据库中调取所述图表数据,将所述图表数据渲染到前台可视化图表中展示。Waiting to receive the call command input by the user to call the chart data that has been stored in the background database; if the call command is not received, continue to wait; if the call command is received, directly from the background database The chart data is retrieved from the middle, and the chart data is rendered into the foreground visual chart for display.
可选地,其中:Optionally, where:
所述图表数据包括图数据和表格数据,其中,The graph data includes graph data and tabular data, wherein,
所述图数据包括:柱状图、折线图、饼状图和散点图;The graph data includes: bar graph, line graph, pie graph and scatter graph;
所述表格数据包括:元素、标题、展示颜色和图表说明。The table data includes: elements, titles, display colors and chart descriptions.
可选地,其中:Optionally, where:
所述图数据以逗号和分号的形式存储到后台数据库中。The graph data is stored in the backend database in the form of commas and semicolons.
可选地,其中:Optionally, where:
所述表格数据以数组的形式进行存储,所述表格数据中的单条对象以大括号进行存储,单条对象之间通过逗号进行分隔,单元格数据以键值对的形式进行存储。The table data is stored in the form of an array, the single objects in the table data are stored in curly brackets, the single objects are separated by commas, and the cell data is stored in the form of key-value pairs.
第二方面,一种基于数据库技术的图表可视化编辑系统,包括:分析整合模块、数据渲染模块、数据存储模块、数据转换模块和数据编辑模块;In a second aspect, a visualization editing system for charts based on database technology, comprising: an analysis integration module, a data rendering module, a data storage module, a data conversion module, and a data editing module;
所述分析整合模块用于后台程序通过分析整合获取图表数据;The analysis integration module is used for the background program to obtain chart data through analysis integration;
所述数据渲染模块用于将所述图表数据渲染到前台可视化图表,并将所述图表数据转换为字符串格式;The data rendering module is used for rendering the chart data to the foreground visualization chart, and converting the chart data into a string format;
所述数据存储模块用于将所述字符串格式的图表数据存储到后台数据库的对应字段中,并对所述字符串格式的图表数据进行ID标识;The data storage module is used for storing the chart data in the string format in the corresponding field of the background database, and performing ID identification on the chart data in the string format;
所述数据转换模块在接收到用户输入的对目标图表进行编辑的编辑指令时,根据所述目标图表对应的ID在所述后台数据库中读取该目标图表对应的图表数据,将所述目标图表对应的图表数据根据不同的字符串格式进行拆分和转换,使所述目标图表对应的图表数据转换为图表可使用的对应格式展示在图表编辑框中;When the data conversion module receives the editing instruction for editing the target chart input by the user, it reads the chart data corresponding to the target chart in the background database according to the ID corresponding to the target chart, and converts the target chart into The corresponding chart data is split and converted according to different string formats, so that the chart data corresponding to the target chart is converted into a corresponding format usable by the chart and displayed in the chart editing box;
所述数据编辑模块用于在接收用户输入的对所述图表编辑框中的数据进行修改的修改指令时,根据所述修改指令对所述图表编辑框中的数据进行修改;The data editing module is configured to modify the data in the diagram editing box according to the modification instruction when receiving a modification instruction input by the user to modify the data in the diagram editing box;
所述数据存储模块还用于在接收用户输入的对所述图表编辑框中的数据进行保存的保存指令时,将图表编辑框中的数据进行保存;并将编辑完成后的数据再次转换为字符串存储到后台数据库;The data storage module is further configured to save the data in the graph edit box when receiving the save instruction input by the user to save the data in the graph edit box; and convert the edited data into characters again The string is stored in the background database;
所述数据渲染模块还用于将保存后的数据渲染到前台可视化图表中。The data rendering module is also used for rendering the saved data to the front-end visualization chart.
可选地,其中:Optionally, where:
所述基于数据库技术的图表可视化编辑系统还包括数据调取模块,所述数据调取模块用于当接收到用户输入的对已存储到后台数据库的图表数据进行调取的调取指令时,直接从后台数据库中调取所述图表数据,将所述图表数据渲染到前台可视化图表中展示。The database technology-based chart visualization editing system further includes a data retrieval module, and the data retrieval module is configured to, when receiving a retrieval instruction input by the user to retrieve the chart data stored in the background database, directly The chart data is retrieved from the background database, and the chart data is rendered into the foreground visual chart for display.
可选地,其中:Optionally, where:
所述图表数据包括图数据和表格数据,其中,The graph data includes graph data and tabular data, wherein,
所述图数据包括:柱状图、折线图、饼状图和散点图;The graph data includes: bar graph, line graph, pie graph and scatter graph;
所述表格数据包括:元素、标题、展示颜色和图表说明。The table data includes: elements, titles, display colors and chart descriptions.
可选地,其中:Optionally, where:
所述图数据以逗号和分号的形式存储到后台数据库中。The graph data is stored in the backend database in the form of commas and semicolons.
可选地,其中:Optionally, where:
所述表格数据以数组的形式进行存储,所述表格数据中的单条对象以大括号进行存储,单条对象之间通过逗号进行分隔,单元格数据以键值对的形式进行存储。The table data is stored in the form of an array, the single objects in the table data are stored in curly brackets, the single objects are separated by commas, and the cell data is stored in the form of key-value pairs.
与现有技术相比,本申请所述的基于数据库技术的图表可视化编辑方法和系统,达到了如下效果:Compared with the prior art, the method and system for visual editing of charts based on database technology described in this application achieve the following effects:
本申请提供的基于数据库技术的图表可视化编辑方法和系统,通过将后台程序分析整合获取的图表数据渲染到前台可视化图表,并将图表数据转换为字符串格式;将字符串格式的图表数据存储到后台数据库,并对此图表数据进行ID标识;当接收到用户输入的对目标图表进行编辑的编辑指令时,根据目标图表的ID在后台数据库中读取目标图表对应的图表数据,并对其进行拆分和转换,使目标图表对应的图表数据转换为图表可用格式展示于图表编辑框中;当接收到用户输入的对图表编辑框中数据进行修改的修改指令时,根据修改指令对图表编辑框中的数据进行修改;当接收到用户输入的对图表编辑框中的数据进行保存的保存指令时,将图表编辑框中的数据进行保存;保存后的数据进一步渲染到前台可视化图表中,并将所述数据再次转换为字符串存储到后台数据库中;如此,实现了在对图表进行数据编辑、修改的同时,也能够将更新后的数据进行保存,有利于对图表中编辑过后的数据进行持久化的储存,进而也能够保证图表数据在前台可视化图表中的持久展示,即便页面切换后仍旧可以展示切换前的数据,满足用户对于图形和表格数据的可视化编辑的要求。The method and system for visual editing of charts based on database technology provided by this application, by rendering the chart data obtained by the background program analysis and integration to the foreground visual chart, and converting the chart data into a string format; storing the chart data in the string format in a The background database, and ID identification of the chart data; when receiving the editing instruction to edit the target chart input by the user, read the chart data corresponding to the target chart in the background database according to the ID of the target chart, and perform Split and convert, so that the chart data corresponding to the target chart is converted into a usable format of the chart and displayed in the chart edit box; when receiving the modification instruction input by the user to modify the data in the chart edit box, the chart edit box is modified according to the modification instruction. Modify the data in the chart; when receiving the save instruction input by the user to save the data in the chart editing box, save the data in the chart editing box; the saved data is further rendered into the foreground visual chart, and the The data is converted into character strings again and stored in the background database; in this way, while editing and modifying the data of the chart, the updated data can also be saved, which is beneficial to the persistence of the edited data in the chart. It can also ensure the persistent display of the chart data in the front-end visual chart, even after the page is switched, the data before the switch can still be displayed, which meets the user's requirements for visual editing of graphic and table data.
附图说明Description of drawings
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The schematic embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the attached image:
图1所示为本申请实施例所提供的基于数据库技术的图表可视化编辑方法流程图;Fig. 1 shows the flowchart of the visualization editing method of chart based on database technology provided by the embodiment of the present application;
图2所示为本申请实施例所提供的图表编辑框的示意图;FIG. 2 is a schematic diagram of a chart editing frame provided by an embodiment of the present application;
图3所示为本申请实施例所提供的图数据示意图;FIG. 3 shows a schematic diagram of graph data provided by an embodiment of the present application;
图4所示为本申请实施例所提供的表格数据示意图;FIG. 4 shows a schematic diagram of table data provided by the embodiment of the present application;
图5所示为本申请实施例所提供的基于数据库技术的图表可视化编辑方法的另一种流程图;FIG. 5 shows another flowchart of the method for visual editing of charts based on database technology provided by the embodiment of the present application;
图6所示为本申请实施例所提供的基于数据库技术的图表可视化编辑系统模块图。FIG. 6 shows a module diagram of a system for visualizing chart editing based on database technology provided by an embodiment of the present application.
具体实施方式Detailed ways
如在说明书及权利要求当中使用了某些词汇来指称特定组件。本领域技术人员应可理解,硬件制造商可能会用不同名词来称呼同一个组件。本说明书及权利要求并不以名称的差异来作为区分组件的方式,而是以组件在功能上的差异来作为区分的准则。如在通篇说明书及权利要求当中所提及的“包含”为一开放式用语,故应解释成“包含但不限定于”。“大致”是指在可接收的误差范围内,本领域技术人员能够在一定误差范围内解决所述技术问题,基本达到所述技术效果。说明书后续描述为实施本申请的较佳实施方式,然所述描述乃以说明本申请的一般原则为目的,并非用以限定本申请的范围。本申请的保护范围当视所附权利要求所界定者为准。As used in the specification and claims, certain terms are used to refer to particular components. It should be understood by those skilled in the art that hardware manufacturers may refer to the same component by different nouns. The description and claims do not use the difference in name as a way to distinguish components, but use the difference in function of the components as a criterion for distinguishing. As mentioned in the entire specification and claims, "comprising" is an open-ended term, so it should be interpreted as "including but not limited to". "Approximately" means that within an acceptable error range, those skilled in the art can solve the technical problem within a certain error range, and basically achieve the technical effect. Subsequent descriptions in the specification are preferred embodiments for implementing the present application. However, the descriptions are for the purpose of illustrating the general principles of the present application and are not intended to limit the scope of the present application. The scope of protection of this application should be determined by the appended claims.
当前图表工具非常丰富,软件中常用到的图表工具有ECharts、FusionCharts、HighCharts、Datatables等;常用的工具除了提供多样的图表也可以进行前台数据的编辑工作;但是当前的图表编辑无法在数据库中持久化储存,导致下一次图表展示的时候数据还会返回原始的数据集,因此无法满足部分用户对图表可编辑的要求。The current charting tools are very rich. The commonly used charting tools in the software include ECharts, FusionCharts, HighCharts, Datatables, etc. In addition to providing a variety of charts, the commonly used tools can also edit the foreground data; however, the current chart editing cannot be persistent in the database. Therefore, the data will return to the original data set when the graph is displayed next time, so it cannot meet the requirements of some users that the graph can be edited.
有鉴于此,本申请提供了一种基于数据库技术的图表可视化编辑方法和系统,能够将编辑、修改、保存后的数据渲染到前台可视化图表,并将数据转换为字符串存储到后台数据库;有利于对图表编辑框的数据进行持久化的存储。In view of this, the present application provides a method and system for visual editing of charts based on database technology, which can render edited, modified and saved data to a visual chart in the foreground, and convert the data into strings and store them in a background database; It is convenient for persistent storage of data in the edit box of the chart.
以下结合附图和具体实施例进行详细说明。The following detailed description will be given in conjunction with the accompanying drawings and specific embodiments.
图1所示为本申请实施例所提供的基于数据库技术的图表可视化编辑方法流程图,请参照图1,本申请提供了一种基于数据库技术的图表可视化编辑方法,包括:FIG. 1 shows a flowchart of a method for visualizing graph editing based on database technology provided by an embodiment of the present application. Please refer to FIG. 1. The present application provides a method for visualizing graph editing based on database technology, including:
步骤101、后台程序通过分析整合获取图表数据;
步骤102、将图表数据渲染到前台可视化图表,并将图表数据转换为字符串格式;
步骤103、将字符串格式的图表数据存储到后台数据库的对应字段中,并对字符串格式的图表数据进行ID标识;
步骤104、等待接收用户输入的对目标图表进行编辑的编辑指令:若未接收到编辑指令,则继续等待;若接收到编辑指令,则根据目标图表对应的ID在后台数据库中读取该目标图表对应的图表数据,将目标图表对应的图表数据根据不同的字符串格式进行拆分和转换,使目标图表对应的图表数据转换为图表可使用的对应格式展示在图表编辑框中;
步骤105、等待接收用户输入的对图表编辑框中的数据进行修改的修改指令,若未接收到修改指令,则继续等待;若接收到修改指令,则根据修改指令对图表编辑框中的数据进行修改;Step 105: Waiting to receive a modification instruction input by the user to modify the data in the chart editing box, if the modification instruction is not received, continue to wait; Revise;
步骤106、等待接收用户输入的对图表编辑框中的数据进行保存的保存指令,若未接收到保存指令,则继续等待;若接收到保存指令,则将图表编辑框中的数据进行保存;
步骤107、将保存后的数据渲染到前台可视化图表中,并将编辑完成后的数据再次转换为字符串存储到后台数据库。Step 107: Render the saved data to the front-end visual chart, and convert the edited data into strings again and store them in the back-end database.
具体地,请继续参照如1,为了满足用户对于图表编辑时,能够将图表编辑后的数据在数据库中持久化存储的要求,本申请提供了一种基于数据库技术的图表可视化编辑方法,步骤101使后台程序通过分析整合获取图表数据,进而通过步骤102将步骤101获取到的图表数据渲染到前台可视化图表中进行展示,同时步骤102还将步骤101获取到的图表数据转换为字符串格式的数据;步骤103为将步骤102中转换为字符串格式的图表数据存储到后台数据库的对应字段中,并对所存储的图表数据进行ID标识;此处的数据库可选为Oracle数据库,字段类型为clob。Specifically, please continue to refer to 1. In order to meet the user's requirement that the edited data of the graph can be persistently stored in the database when editing the graph, the present application provides a method for visualizing graph editing based on database technology, step 101 Make the background program obtain the chart data through analysis and integration, and then render the chart data obtained in
步骤104为,当用户点击图表中对应的编辑按钮,即用户输入了对目标图表进行编辑的编辑指令后,根据目标图表对应的标识ID在后台数据库中查找、并读取该目标图表对应的图表数据,将读取到的图表数据转换为前台可视化图表能够使用的格式展示到图表编辑框中,进而等待用户对于此数据的查看和进一步修改等操作;步骤105为用户根据自身需求对图表编辑框中的数据进行修改和调整,通过步骤106点击图表编辑框对应的保存/确认按钮,对步骤105中修改后的图表编辑框中的数据进行保存,若用户不想保存修改后的数据则点击取消按钮即可返回到步骤104中所读取的图表数据,图表编辑框请参照图2所示;步骤107为将步骤106中保存的数据渲染到前台可视化图表中进行展示,同时将编辑、修改、保存后的数据再次转换为字符串存储到后台数据库中。Step 104 is, when the user clicks the corresponding edit button in the chart, that is, after the user inputs an editing instruction to edit the target chart, search for and read the chart corresponding to the target chart in the background database according to the identification ID corresponding to the target chart. Data, convert the read chart data into a format that can be used by the front-end visual chart and display it in the chart editing box, and then wait for the user to view and further modify the data. Step 105 is for the user to edit the chart editing box according to their own needs To modify and adjust the data in the chart edit box, click the save/confirm button corresponding to the chart edit box in
本申请提供了能够将编辑、修改、保存后的数据进行存储的方法,有利于对图表中编辑过后的数据进行持久化的储存,进而也能够保证图表数据在前台可视化图表中的持久展示,即便页面切换后仍旧可以展示切换前的数据,满足用户对于图形和表格数据的可视化编辑的要求。The present application provides a method for storing edited, modified and saved data, which is conducive to persistent storage of the edited data in the chart, and can also ensure the persistent display of the chart data in the front-end visual chart, even if After the page is switched, the data before the switch can still be displayed, which meets the user's requirements for visual editing of graph and table data.
可选地,本申请还提供了一种可以查看存储到后台数据库中的修改过的图表数据的方法,具体为:等待接收用户输入的对已存储到后台数据库的图表数据进行调取的调取指令;若未接收到调取指令,则继续等待;若接收到调取指令,则直接从后台数据库中调取图表数据,将图表数据渲染到前台可视化图表中展示。Optionally, the present application also provides a method for viewing the modified chart data stored in the background database, specifically: waiting to receive a user input to retrieve the chart data that has been stored in the background database. command; if the call command is not received, continue to wait; if the call command is received, the chart data is directly called from the background database, and the chart data is rendered to the foreground visual chart for display.
可选地,请参照图3和图4,图3所示为本申请实施例所提供的图数据示意图;图4所示为本申请实施例所提供的表格数据示意图,图表数据包括图数据和表格数据,其中,图数据包括:柱状图、折线图、饼状图和散点图等,例如图3所展示的就是一种折线图;表格数据包括:元素、标题、展示颜色和图表说明等,例如图4所展示的表格中含有标题和元素等信息。Optionally, please refer to FIG. 3 and FIG. 4 , FIG. 3 shows a schematic diagram of graph data provided by an embodiment of the present application; FIG. 4 shows a schematic diagram of table data provided by an embodiment of the present application, and the graph data includes graph data and Tabular data, in which the graph data includes: histogram, line graph, pie chart, and scatter chart, etc. For example, Figure 3 shows a kind of line graph; the tabular data includes: elements, titles, display colors, and chart descriptions, etc. , for example, the table shown in Figure 4 contains information such as titles and elements.
可选地,图数据以逗号和分号的形式存储到后台数据库中;格式例如:“1季度,2季度,3季度,4季度;200,100,300,400”;上述格式中的内容,相当于图数据对象1为:1季度,2季度,3季度,4季度;图数据对象2为200,100,300,400;其中对象1和对象2的数据相互对应;例如对象1的第一个子对象“1季度”对应对象2的第一个子对象“200”,对象1的第二个子对象“2季度”对应对象2的第二个子对象“100”;上述数据应用到实际案例中时,例如可以代表业务数据1季度企业税收200万元,2季度企业税收100万元,3季度企业税收300万元,4季度企业税收400万元;以上述数据来绘制对应的图数据,例如柱状图、折线图等。Optionally, the graph data is stored in the backend database in the form of commas and semicolons; the format is for example: "Q1, Q2, Q3, Q4; 200, 100, 300, 400"; the content in the above format, The equivalent graph data object 1 is: 1st quarter, 2nd quarter, 3rd quarter, 4th quarter; graph data object 2 is 200, 100, 300, 400; the data of
可选地,表格数据以数组的形式进行存储,表格数据中的单条对象以大括号进行存储,单条对象之间通过逗号进行分隔,单元格数据以键值对的形式进行存储;Optionally, the table data is stored in the form of an array, the single object in the table data is stored in curly brackets, the single objects are separated by commas, and the cell data is stored in the form of key-value pairs;
格式例如:“[{‘name’:’zhangsan’,’age’:’18’},{‘name’:’lisi’,’age’:’19’}]”表中的单条记录存放在{}中,多条数据构成的表格数据存放在[]中,但最终存放在数据库中都是字符串的形式(非数组形式),{}和[]用于获取表格字符串后在前台用来拆分字符,在存储时不存在数组之类的概念。The format is for example: "[{'name': 'zhangsan', 'age': '18'}, {'name': 'lisi', 'age': '19'}]" A single record in the table is stored in { }, the table data composed of multiple pieces of data is stored in [], but it is ultimately stored in the database in the form of a string (not an array), {} and [] are used to obtain the table string and then used in the foreground Split characters, there are no concepts like arrays when stored.
图5所示为本申请实施例所提供的基于数据库技术的图表可视化编辑方法的另一种流程图,请参照图5,步骤201为后台程序通过分析整合获取图表数据,进而步骤202和步骤203同时进行,步骤202为将步骤201中获取的图表数据渲染到前台可视化图表中进行展示,步骤203为将步骤201获取的图表数据转换为字符串格式,并通过步骤204存储到数据库中;当点击前台可视化图表中的编辑按钮时,通过步骤205将数据库中的数据获取到编辑框中,通过步骤206对编辑框中的数据进行编辑,编辑完成后点击页面上的保存/确认按钮,步骤207为对编辑框中的数据进行编辑、保存完成的步骤,进而将保存后的数据转换为字符串存储到数据库中,并将保存后的数据渲染到前台可视化图表中进行展示。FIG. 5 shows another flowchart of the method for visualizing chart editing based on database technology provided by the embodiment of the present application. Please refer to FIG. 5 . Step 201 is that the background program obtains chart data through analysis and integration, and then steps 202 and 203 At the same time,
基于同一发明构思,本申请还提供了一种基于数据库技术的图表可视化编辑系统,图6所示为本申请实施例所提供的基于数据库技术的图表可视化编辑系统模块图,请参照图6,系统100包括:分析整合模块10、数据渲染模块20、数据存储模块30、数据转换模块40和数据编辑模块50;Based on the same inventive concept, the present application also provides a database technology-based chart visualization editing system. FIG. 6 shows a module diagram of the database technology-based chart visualization editing system provided by the embodiment of the present application. 100 includes: an
分析整合模块10用于后台程序通过分析整合获取图表数据;The analysis and
数据渲染模块20用于将图表数据渲染到前台可视化图表,并将图表数据转换为字符串格式;此处的图表数据包括图数据和表格数据,图数据包括:柱状图、折线图、饼状图和散点图等,表格数据包括:元素、标题、展示颜色和图表说明等;The
图数据以逗号和分号的形式存储到后台数据库中;格式例如:“1季度,2季度,3季度,4季度;200,100,300,400”;上述格式中的内容,相当于图数据对象1为:1季度,2季度,3季度,4季度;图数据对象2为200,100,300,400;其中对象1和对象2的数据相互对应;例如对象1的第一个子对象“1季度”对应对象2的第一个子对象“200”,对象1的第二个子对象“2季度”对应对象2的第二个子对象“100”;上述数据应用到实际案例中时,例如可以代表业务数据1季度企业税收200万元,2季度企业税收100万元,3季度企业税收300万元,4季度企业税收400万元;以上述数据来绘制对应的图数据,例如柱状图、折线图等。表格数据以数组的形式进行存储,表格数据中的单条对象以大括号进行存储,单条对象之间通过逗号进行分隔,单元格数据以键值对的形式进行存储;格式例如:“[{‘name’:’zhangsan’,’age’:’18’},{‘name’:’lisi’,’age’:’19’}]”;表中的单条记录存放在{}中,多条数据构成的表格数据存放在[]中,但最终存放在数据库中都是字符串的形式(非数组形式),{}和[]用于获取表格字符串后在前台用来拆分字符,在存储时不存在数组之类的概念。The graph data is stored in the backend database in the form of commas and semicolons; the format is for example: "Q1, Q2, Q3, Q4; 200, 100, 300, 400"; the content in the above format is equivalent to the
数据存储模块30用于将字符串格式的图表数据存储到后台数据库的对应字段中,并对字符串格式的图表数据进行ID标识;此处的数据库可选为Oracle数据库,字段类型为clob;The
数据转换模块40在接收到用户输入的对目标图表进行编辑的编辑指令时,根据目标图表对应的ID在后台数据库中读取该目标图表对应的图表数据,将目标图表对应的图表数据根据不同的字符串格式进行拆分和转换,使目标图表对应的图表数据转换为图表可使用的对应格式展示在图表编辑框中;When the
数据编辑模块50用于在接收用户输入的对图表编辑框中的数据进行修改的修改指令时,根据修改指令对图表编辑框中的数据进行修改;The
数据存储模块30还用于在接收用户输入的对图表编辑框中的数据进行保存的保存指令时,将图表编辑框中的数据进行保存;并将编辑完成后的数据再次转换为字符串存储到后台数据库;The
数据渲染模块20还用于将保存后的数据渲染到前台可视化图表中。The
可选地,本申请基于数据库技术的图表可视化编辑系统100除了上述模块外,还包括数据调取模块,数据调取模块用于当接收到用户输入的对已存储到后台数据库的图表数据进行调取的调取指令时,直接从后台数据库中调取图表数据,将图表数据渲染到前台可视化图表中展示。有利于对图表中编辑过后的数据进行持久化的储存,满足用户对于图形和表格数据的可视化编辑的要求。Optionally, in addition to the above-mentioned modules, the
通过以上各实施例可知,本申请存在的有益效果是:It can be known from the above embodiments that the beneficial effects of the present application are:
本申请提供的基于数据库技术的图表可视化编辑方法和系统,通过将后台程序分析整合获取的图表数据渲染到前台可视化图表,并将图表数据转换为字符串格式;将字符串格式的图表数据存储到后台数据库,并对此图表数据进行ID标识;当接收到用户输入的对目标图表进行编辑的编辑指令时,根据目标图表的ID在后台数据库中读取目标图表对应的图表数据,并对其进行拆分和转换,使目标图表对应的图表数据转换为图表可用格式展示于图表编辑框中;当接收到用户输入的对图表编辑框中数据进行修改的修改指令时,根据修改指令对图表编辑框中的数据进行修改;当接收到用户输入的对图表编辑框中的数据进行保存的保存指令时,将图表编辑框中的数据进行保存;保存后的数据进一步渲染到前台可视化图表中,并将所述数据再次转换为字符串存储到后台数据库中;如此,实现了在对图表进行数据编辑、修改的同时,也能够将更新后的数据进行保存,有利于对图表中编辑过后的数据进行持久化的储存,进而也能够保证图表数据在前台可视化图表中的持久展示,即便页面切换后仍旧可以展示切换前的数据,满足用户对于图形和表格数据的可视化编辑的要求。The method and system for visual editing of charts based on database technology provided by this application, by rendering the chart data obtained by the background program analysis and integration to the foreground visual chart, and converting the chart data into a string format; storing the chart data in the string format in a The background database, and ID identification of the chart data; when receiving the editing instruction to edit the target chart input by the user, read the chart data corresponding to the target chart in the background database according to the ID of the target chart, and perform Split and convert, so that the chart data corresponding to the target chart is converted into a usable format of the chart and displayed in the chart edit box; when receiving the modification instruction input by the user to modify the data in the chart edit box, the chart edit box is modified according to the modification instruction. Modify the data in the chart; when receiving the save instruction input by the user to save the data in the chart editing box, save the data in the chart editing box; the saved data is further rendered into the foreground visual chart, and the The data is converted into character strings again and stored in the background database; in this way, while editing and modifying the data of the chart, the updated data can also be saved, which is beneficial to the persistence of the edited data in the chart. It can also ensure the persistent display of the chart data in the front-end visual chart, even after the page is switched, the data before the switch can still be displayed, which meets the user's requirements for visual editing of graphic and table data.
本领域内的技术人员应明白,本申请的实施例可提供为方法、装置、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。It should be understood by those skilled in the art that the embodiments of the present application may be provided as a method, an apparatus, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
上述说明示出并描述了本申请的若干优选实施例,但如前所述,应当理解本申请并非局限于本文所披露的形式,不应看作是对其他实施例的排除,而可用于各种其他组合、修改和环境,并能够在本文所述发明构想范围内,通过上述教导或相关领域的技术或知识进行改动。而本领域人员所进行的改动和变化不脱离本申请的精神和范围,则都应在本申请所附权利要求的保护范围内。The above description shows and describes several preferred embodiments of the present application, but as mentioned above, it should be understood that the present application is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various and other combinations, modifications and environments, and can be modified within the scope of the inventive concepts described herein, from the above teachings or from skill or knowledge in the relevant art. However, modifications and changes made by those skilled in the art do not depart from the spirit and scope of the present application, and should all fall within the protection scope of the appended claims of the present application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910884451.9A CN110647573B (en) | 2019-09-17 | 2019-09-17 | Chart visualization editing method and system based on database technology |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910884451.9A CN110647573B (en) | 2019-09-17 | 2019-09-17 | Chart visualization editing method and system based on database technology |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110647573A true CN110647573A (en) | 2020-01-03 |
| CN110647573B CN110647573B (en) | 2023-04-07 |
Family
ID=68991446
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910884451.9A Active CN110647573B (en) | 2019-09-17 | 2019-09-17 | Chart visualization editing method and system based on database technology |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110647573B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111444696A (en) * | 2020-03-26 | 2020-07-24 | 中国银行股份有限公司 | Report display and editing method and device |
| CN111722844A (en) * | 2020-05-29 | 2020-09-29 | 北京宝兰德软件股份有限公司 | Web-based dynamic rich text component design method and device |
Citations (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6151609A (en) * | 1996-08-16 | 2000-11-21 | Electronic Data Systems Corporation | Remote editor system |
| CN101625677A (en) * | 2009-08-25 | 2010-01-13 | 深圳市思考者科技有限公司 | Graph processing system |
| CN103092621A (en) * | 2013-03-08 | 2013-05-08 | 广州市西美信息科技有限公司 | Chart creating method and device |
| CN103345533A (en) * | 2013-07-26 | 2013-10-09 | 北京中电普华信息技术有限公司 | Data storage method and device |
| CN104850902A (en) * | 2015-05-08 | 2015-08-19 | 西安理工大学 | Regional agricultural key farming season online visualization prediction method |
| CN107391468A (en) * | 2017-06-15 | 2017-11-24 | 华为技术有限公司 | A kind of method, apparatus and equipment for adding chart |
| CN107908396A (en) * | 2017-10-17 | 2018-04-13 | 广东广业开元科技有限公司 | A kind of chart data Online Processing System and method based on browser |
| CN108228169A (en) * | 2017-12-08 | 2018-06-29 | 平安科技(深圳)有限公司 | Chart production method, apparatus, equipment and medium based on eCharts tools |
| CN109101500A (en) * | 2017-06-20 | 2018-12-28 | 北京国双科技有限公司 | A kind of methods of exhibiting and device of file data |
| CN109522533A (en) * | 2018-10-12 | 2019-03-26 | 平安科技(深圳)有限公司 | Table edit method, apparatus, equipment and medium based on web data |
| CN109710237A (en) * | 2019-01-10 | 2019-05-03 | 厦门商集网络科技有限责任公司 | A kind of online modification method of calibration and equipment based on customized two-dimentional report |
-
2019
- 2019-09-17 CN CN201910884451.9A patent/CN110647573B/en active Active
Patent Citations (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6151609A (en) * | 1996-08-16 | 2000-11-21 | Electronic Data Systems Corporation | Remote editor system |
| CN101625677A (en) * | 2009-08-25 | 2010-01-13 | 深圳市思考者科技有限公司 | Graph processing system |
| CN103092621A (en) * | 2013-03-08 | 2013-05-08 | 广州市西美信息科技有限公司 | Chart creating method and device |
| CN103345533A (en) * | 2013-07-26 | 2013-10-09 | 北京中电普华信息技术有限公司 | Data storage method and device |
| CN104850902A (en) * | 2015-05-08 | 2015-08-19 | 西安理工大学 | Regional agricultural key farming season online visualization prediction method |
| CN107391468A (en) * | 2017-06-15 | 2017-11-24 | 华为技术有限公司 | A kind of method, apparatus and equipment for adding chart |
| CN109101500A (en) * | 2017-06-20 | 2018-12-28 | 北京国双科技有限公司 | A kind of methods of exhibiting and device of file data |
| CN107908396A (en) * | 2017-10-17 | 2018-04-13 | 广东广业开元科技有限公司 | A kind of chart data Online Processing System and method based on browser |
| CN108228169A (en) * | 2017-12-08 | 2018-06-29 | 平安科技(深圳)有限公司 | Chart production method, apparatus, equipment and medium based on eCharts tools |
| CN109522533A (en) * | 2018-10-12 | 2019-03-26 | 平安科技(深圳)有限公司 | Table edit method, apparatus, equipment and medium based on web data |
| CN109710237A (en) * | 2019-01-10 | 2019-05-03 | 厦门商集网络科技有限责任公司 | A kind of online modification method of calibration and equipment based on customized two-dimentional report |
Non-Patent Citations (1)
| Title |
|---|
| 马莉,朱理达: "利用MSFlexGrid控件建立、编辑Fuzzy规则库" * |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111444696A (en) * | 2020-03-26 | 2020-07-24 | 中国银行股份有限公司 | Report display and editing method and device |
| CN111444696B (en) * | 2020-03-26 | 2024-04-19 | 中国银行股份有限公司 | Report form display and editing method and device |
| CN111722844A (en) * | 2020-05-29 | 2020-09-29 | 北京宝兰德软件股份有限公司 | Web-based dynamic rich text component design method and device |
| CN111722844B (en) * | 2020-05-29 | 2024-05-03 | 北京宝兰德软件股份有限公司 | Design method and device of dynamic rich text component based on Web |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110647573B (en) | 2023-04-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20230385033A1 (en) | Storing logical units of program code generated using a dynamic programming notebook user interface | |
| CN1749958B (en) | Common diagrams using shapes | |
| US5404435A (en) | Non-text object storage and retrieval | |
| US5734888A (en) | Apparatus and method of modifying a database query | |
| US8010530B2 (en) | Presentation of multilingual metadata | |
| JP2006228210A (en) | Using existing content to generate active content wizard executable file for execution of task | |
| CN118093632B (en) | Graph database query method and device based on large language model and graph structure | |
| US20070061703A1 (en) | Method and apparatus for annotating a document | |
| JP5345963B2 (en) | Method for generating tag data to search for images | |
| CN110647573A (en) | Chart visual editing method and system based on database technology | |
| CN117033309A (en) | Data conversion method and device, electronic equipment and readable storage medium | |
| CN119669345A (en) | Data processing method, device and electronic equipment based on visual database | |
| CN114579658A (en) | Data sheet processing method and equipment | |
| JPH07282079A (en) | Link display method | |
| US12423364B2 (en) | Using artificial intelligence and machine learning to recommend supporting material for media projects | |
| CN116090416B (en) | Standard writing method, system, equipment and medium based on standard knowledge graph | |
| JP2002041571A (en) | Information retrieving device | |
| CN111626023A (en) | Automatic generation method, device and system for visualization chart highlighting and annotation | |
| CN114143480A (en) | Chart video generation method, device, device, storage medium and program | |
| JP3298456B2 (en) | Visual simulation support method and apparatus | |
| JPH0488469A (en) | Device for issuing business management document or the like | |
| Jelen | Microsoft Excel Pivot Table Data Crunching Including Dynamic Arrays, Power Query, and Copilot | |
| CN114780091A (en) | Page code generation method and device, computing equipment and storage medium | |
| CN117765552A (en) | Text content recognition method, text content recognition device, computer equipment and storage medium | |
| CN118013034A (en) | Medical professional accurate mark corpus construction method and system based on large language model |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: Visualization Editing Method and System for Charts Based on Database Technology Granted publication date: 20230407 Pledgee: Agricultural Bank of China Limited Jinan Lixia Branch Pledgor: TELCHINA WISDOM INDUSTRY GROUP Co.,Ltd. Registration number: Y2025980001112 |
|
| PE01 | Entry into force of the registration of the contract for pledge of patent right |