WO2020015166A1 - 图表组件的创建方法、装置及计算机可读存储介质 - Google Patents

图表组件的创建方法、装置及计算机可读存储介质 Download PDF

Info

Publication number
WO2020015166A1
WO2020015166A1 PCT/CN2018/107681 CN2018107681W WO2020015166A1 WO 2020015166 A1 WO2020015166 A1 WO 2020015166A1 CN 2018107681 W CN2018107681 W CN 2018107681W WO 2020015166 A1 WO2020015166 A1 WO 2020015166A1
Authority
WO
WIPO (PCT)
Prior art keywords
user terminal
chart
component
chart component
data
Prior art date
Application number
PCT/CN2018/107681
Other languages
English (en)
French (fr)
Inventor
祝亮
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020015166A1 publication Critical patent/WO2020015166A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing

Definitions

  • the present application relates to the field of computer technology, and in particular, to a method, a device, and a computer-readable storage medium for creating a chart component.
  • Reports are an indispensable data display method in enterprise application systems. It can provide users, especially middle and high-level users, with intuitive data views, and provide users with a basis and basis for making business plans and decisions. Reports are also one of the ways to visualize data in business intelligence applications.
  • the present application provides a method, a device, and a computer-readable storage medium for creating a chart component, the main purpose of which is to solve the technical problem that the flexible configuration of the chart component cannot be achieved in the prior art.
  • the present application further provides a method for creating a chart component, which includes:
  • the chart component code is stored in a component library.
  • the present application further provides a device for creating a chart component.
  • the device includes a memory and a processor.
  • the memory stores a component creation program that can be run on the processor.
  • the component creation When the program is executed by the processor, the following steps are implemented:
  • the chart component code is stored in a component library.
  • the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores a component creation program, and the component creation program can be executed by one or more processors to implement The steps of the method for creating a chart component as described above.
  • the method, device, and computer-readable storage medium for creating a chart component when receiving a request for creating a chart component from a user terminal, send the chart component editing interface to the user terminal for display.
  • the chart component editing interface includes a pre- Set the drawing function; determine the drawing function selected by the user terminal based on the chart component editing interface and the input parameter values set for the drawing function; draw corresponding chart elements according to the drawing function and input parameter values, and send the chart elements to the user terminal for display,
  • the chart element is displayed in the chart preview area that matches the chart component editing interface on the user terminal.
  • the input parameter value of the package encapsulates the determined drawing function and its corresponding input parameter value into a chart component code; stores the chart component code in the component library.
  • the solution of the present application provides users to draw each element that composes a chart component through a drawing function, and then forms the chart component they want through the combination of these elements to meet the user's requirements for chart diversity and achieve flexible configuration of the chart component.
  • FIG. 1 is a schematic flowchart of a chart component creation method according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of an internal structure of a device for creating a chart component according to an embodiment of the present application
  • FIG. 3 is a schematic block diagram of a component creation program in a device for creating a chart component according to an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a method for creating a chart component according to an embodiment of the present application. The method may be performed by a device, which may be implemented by software and / or hardware.
  • a method for creating a chart component includes:
  • step S10 when a request for creating a chart component sent by a user terminal is received, a chart component editing interface is sent to the user terminal for display, and the chart component editing interface includes a preset drawing function.
  • the scheme is described by using a chart component creation device as an execution subject.
  • the user terminal establishes a remote communication connection with the creation device of the chart component.
  • the user terminal sends a creation request of the chart component to the creation device, and the creation device provides the user terminal with a function of creating a chart component in response to the request.
  • the drawing function can be used to draw a variety of charts, such as financial charts, mathematical analysis charts, etc.
  • a single drawing function is mainly used to draw the basic constituent elements of the chart.
  • basic constituent elements such as the basic line, the number of hands, the coordinate axis, and the K-line.
  • These drawing functions can be drawing coordinate functions, drawing point functions, line drawing functions, fill color functions, etc.
  • These drawing functions are functional formulas without specific input parameter values, and are stored in a pre-built JavaScript library, which is deployed in Creation device for chart components.
  • a control or link for creating a chart component is provided on the user terminal.
  • the user terminal sends a request for creating a chart component to a device for creating the chart component.
  • the creation device receives a request for creating a chart component, it sends a preset chart component editing interface to a user terminal for display.
  • the chart component editing interface includes a preset drawing function for the user to select.
  • Step S20 Determine a drawing function selected by the user terminal based on the chart component editing interface and an input parameter value set for the drawing function.
  • Step S30 draw a corresponding chart element according to the drawing function and the input parameter value, and send the chart element to the user terminal for display, and match the chart component editing interface on the user terminal.
  • the chart preview area displays the chart elements.
  • the user can select the corresponding drawing function according to the chart element to be drawn, without assigning a drawing function, that is, setting input parameter values to obtain specific chart elements. In this way, the user selects multiple drawing functions from the chart component editing interface to draw the chart.
  • the assignment of the input parameter values of the drawing function is the assignment of the attributes of the corresponding chart elements, for example, drawing a circular image. At this time, the coordinates of the center of the circle and the size of the radius are assigned.
  • the user terminal After the user assigns a value to the drawing function, the user terminal sends the assigned drawing function to the creation device, and the creation device determines the drawing function selected by the user and the input parameter value set for the drawing function, and then draws out according to the drawing function and the input parameter value
  • the corresponding chart element is sent to the user terminal.
  • the user terminal displays the chart element in real time in the chart preview area matching the chart component editing interface, so that the user can see the display effect of the chart element drawn by himself in real time. Then adjust the input parameter values of the drawing function.
  • the user can continuously repeat the above operations to assign values to multiple drawing functions, thereby creating multiple chart elements to complete the drawing of the chart components.
  • the drawing completion instruction is triggered based on the drawing completion control on the editing interface.
  • Step S40 When receiving a drawing completion instruction sent by the user based on the chart component editing interface, determine all drawing functions selected by the user terminal and input parameter values corresponding to each drawing function, and determine the determined drawing function and its corresponding input. Parameter values are encapsulated as chart component code.
  • step S50 the chart component code is stored in a component library.
  • the creation device When the creation device receives the drawing completion instruction sent by the user terminal, it determines all drawing functions selected by the user in the process of drawing the chart, encapsulates these drawing functions and the input parameter values set by the user for these drawing functions, and obtains the chart component code. . Store the chart component code into a preset chart code library, and add the corresponding visualization chart to the chart template list for users to call directly from the chart template.
  • the method before the chart component code is stored in the component library, the method further includes the steps of: performing a security check and an availability check on the packaged chart component code; if the security check and Said availability check, the step of storing said chart component code in said component library is executed; if the security check and said availability check are not passed, corresponding prompt information is sent to said user terminal.
  • the user can set the edited chart component to display a specific format or specific type of data, and the system associates the chart component uploaded by the user with a specific format or specific type of data and stores it.
  • the step of storing the chart component code in a component library includes: adding identification information to the chart component code to mark the chart component code as an editable chart component; adding The chart component code having the identification information is stored in the component library.
  • the user can re-edit these chart components during use.
  • the system receives the chart component modification instruction sent by the user based on the editable chart component, the corresponding chart component code is obtained from the chart code library and the drawing in it is displayed. Function, for the user to modify the input parameter values of the drawing function, and then modify the display effect of the chart.
  • the method further includes steps:
  • the report data configuration interface includes parameter input boxes and data source information
  • the report data configuration interface includes an input box for query parameters.
  • the parameter input box includes a data source name input box, a database name input box, a data table name input box, a filter condition input box, and a query result field input box.
  • the setting interface contains multiple data sources currently connected to the reporting system for users to select. After the user selects the data source, the data source selected by the user is displayed on the setting interface, and the user fills the database parameters, data table parameters, data column parameters, and filter conditions to be displayed in the corresponding parameter input boxes through drag and drop operations. .
  • the user terminal generates a data query request based on the parameters and sends the data query request to the creating device.
  • the creation device of the chart component obtains query parameters and query conditions from the data query request, where the query parameters include the data source name, database name, data table name, query result fields, etc., and generates SQL (Structured Query Language, structured) based on these parameters.
  • SQL Structured Query Language, structured
  • Query language data query statement, based on which the data query statement is used to obtain corresponding report data from a corresponding data source.
  • the method before the step of sending the acquired report data to the user terminal, the method further includes the steps:
  • the step of sending the obtained report data to the user terminal includes:
  • the user may be set to access the report data, for example, the access right is granted in a data column or a data behavior unit.
  • the access permission information defines the data rows or columns that the user has permission to access. For example, xx users have xx reports. xx column access permissions; according to the access permission information, filtering the found report data in memory, filtering out data columns that do not match the access permission information, and retaining data columns that match the access permission information .
  • the filtered data is sent to the user terminal for the front-end report component of the user terminal to display the report data.
  • the method for creating a chart component proposes a chart component editing interface to a user terminal for display when a chart component creation request is received from a user terminal, and the chart component editing interface includes a preset drawing function; determining a user
  • the terminal uses the drawing function selected by the chart component editing interface and the input parameter values set for the drawing function; draws the corresponding chart element according to the drawing function and the input parameter value, and sends the chart element to the user terminal for display, and on the user terminal and the chart
  • the chart preview area matching the component editing interface displays the chart element; when the drawing completion instruction sent by the user based on the chart component editing interface is received, all drawing functions selected by the user terminal and the input parameter values corresponding to each drawing function will be determined, and will be determined
  • the drawing function and its corresponding input parameter values are packaged as chart component code; the chart component code is stored in the component library.
  • the application also provides a device for creating a chart component.
  • a device for creating a chart component Referring to FIG. 2, a schematic diagram of an internal structure of a device for creating a chart component according to an embodiment of the present application is shown.
  • the device 1 for creating a chart component may be a PC (Personal Computer) or a terminal device such as a smart phone, a tablet computer, or a portable computer.
  • the chart component creation device 1 includes at least a memory 11, a processor 12, a network interface 13, and a communication bus.
  • the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like.
  • the memory 11 may be an internal storage unit of the chart component creation device 1 in some embodiments, such as a hard disk of the chart component creation device 1.
  • the memory 11 may also be an external storage device of the chart component creating device 1 in other embodiments, for example, a plug-in hard disk, a Smart Memory Card (SMC), and a secure digital device provided on the chart component creating device 1. (Secure Digital, SD) card, Flash card, etc.
  • the memory 11 may include both the internal storage unit of the chart component creation device 1 and an external storage device.
  • the memory 11 can be used not only to store application software and various types of data installed in the chart component creation device 1, such as the code of the component creation program 01, but also to temporarily store data that has been or will be output.
  • the processor 12 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments, and is configured to run program codes or processes stored in the memory 11 Data, such as execution component creation program 01.
  • the network interface 13 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), and is generally used to establish a communication connection between the device 1 and other electronic devices.
  • a standard wired interface such as a WI-FI interface
  • the communication bus is used to implement connection communication between these components.
  • the device 1 may further include a user interface.
  • the user interface may include a display, an input unit such as a keyboard, and the optional user interface may further include a standard wired interface and a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-type liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light emitting diode) touch device, or the like.
  • the display may also be appropriately referred to as a display screen or a display unit for displaying information processed in the chart component creation device 1 and a user interface for displaying visualization.
  • FIG. 2 only shows the chart component creation device 1 having the components 11-13 and the component creation program 01. Those skilled in the art can understand that the structure shown in FIG. 1 does not constitute the chart component creation device 1
  • the definition may include fewer or more components than shown, or some components may be combined, or different component arrangements.
  • the component creation program 01 is stored in the memory 11; when the processor 12 executes the component creation program 01 stored in the memory 11, the following steps are implemented:
  • a chart component editing interface is sent to the user terminal for display, and the chart component editing interface includes a preset drawing function.
  • a drawing function selected by the user terminal based on the chart component editing interface and an input parameter value set for the drawing function are determined.
  • the chart component code is stored in a component library.
  • the user terminal establishes a remote communication connection with the creation device of the chart component.
  • the user terminal sends a creation request of the chart component to the creation device, and the creation device provides the user terminal with a function of creating a chart component in response to the request.
  • the drawing function can be used to draw a variety of charts, such as financial charts, mathematical analysis charts, etc.
  • a single drawing function is mainly used to draw the basic constituent elements of the chart.
  • basic constituent elements such as the basic line, the number of hands, the coordinate axis, and the K-line.
  • These drawing functions can be drawing coordinate functions, drawing point functions, line drawing functions, fill color functions, etc.
  • These drawing functions are functional formulas without specific input parameter values, and are stored in a pre-built JavaScript library, which is deployed in Creation device for chart components.
  • a control or link for creating a chart component is provided on the user terminal.
  • the user terminal sends a request for creating a chart component to a device for creating the chart component.
  • the creation device receives a request for creating a chart component, it sends a preset chart component editing interface to a user terminal for display.
  • the chart component editing interface includes a preset drawing function for the user to select.
  • the user can select the corresponding drawing function according to the chart element to be drawn, without assigning a drawing function, that is, setting input parameter values to obtain specific chart elements. In this way, the user selects multiple drawing functions from the chart component editing interface to draw the chart.
  • the assignment of the input parameter values of the drawing function is the assignment of the attributes of the corresponding chart elements, for example, drawing a circular image. At this time, the coordinates of the center of the circle and the size of the radius are assigned.
  • the user terminal After the user assigns a value to the drawing function, the user terminal sends the assigned drawing function to the creation device, and the creation device determines the drawing function selected by the user and the input parameter value set for the drawing function, and then draws out according to the drawing function and the input parameter value
  • the corresponding chart element is sent to the user terminal.
  • the user terminal displays the chart element in real time in the chart preview area matching the chart component editing interface, so that the user can see the display effect of the chart element drawn by himself in real time. Then adjust the input parameter values of the drawing function.
  • the user can continuously repeat the above operations to assign values to multiple drawing functions, thereby creating multiple chart elements to complete the drawing of the chart components.
  • a drawing completion instruction is triggered based on the drawing completion control on the editing interface.
  • the creation device When the creation device receives the drawing completion instruction sent by the user terminal, it determines all drawing functions selected by the user in the process of drawing the chart, encapsulates these drawing functions and the input parameter values set by the user for these drawing functions, and obtains the chart component code. . Store the chart component code into a preset chart code library, and add the corresponding visualization chart to the chart template list for users to call directly from the chart template.
  • the component creation program 01 may also be executed by the processor 12 to implement the following steps before storing the chart component code in the component library: performing a security check on the packaged chart component code and Availability check; if the security check and the availability check are passed, the step of storing the chart component code to the component library is performed; if the security check and the availability check are not passed, then Sending corresponding prompt information to the user terminal.
  • the user can set the edited chart component to display a specific format or specific type of data, and the system associates the chart component uploaded by the user with a specific format or specific type of data and stores it.
  • the step of storing the chart component code in a component library includes: adding identification information to the chart component code to mark the chart component code as an editable chart component; adding The chart component code having the identification information is stored in the component library.
  • the user can re-edit these chart components during use.
  • the system receives the chart component modification instruction sent by the user based on the editable chart component, the corresponding chart component code is obtained from the chart code library and the drawing in it is displayed. Function, for the user to modify the input parameter values of the drawing function, and then modify the display effect of the chart.
  • the component creation program 01 may also be executed by the processor 12 to implement the following steps:
  • the report data configuration interface includes parameter input boxes and data source information
  • the report data configuration interface includes an input box for query parameters.
  • the parameter input box includes a data source name input box, a database name input box, a data table name input box, a filter condition input box, and a query result field input box.
  • the setting interface contains multiple data sources currently connected to the reporting system for users to select. After the user selects the data source, the data source selected by the user is displayed on the setting interface, and the user fills the database parameters, data table parameters, data column parameters, and filter conditions to be displayed in the corresponding parameter input boxes through drag and drop operations. .
  • the user terminal generates a data query request based on the parameters and sends the data query request to the creating device.
  • the creation device of the chart component obtains query parameters and query conditions from the data query request, where the query parameters include the data source name, database name, data table name, query result fields, etc., and generates SQL data query statements based on these parameters, based on the data
  • the query statement obtains the corresponding report data from the corresponding data source.
  • the component creation program 01 may also be executed by the processor 12 to implement the following steps before the step of sending the obtained report data to the user terminal:
  • the step of sending the obtained report data to the user terminal includes:
  • the user may be set to access the report data, for example, the access right is granted in a data column or a data behavior unit.
  • the access permission information defines the data rows or columns that the user has permission to access. For example, xx users have xx reports. xx column access permissions; according to the access permission information, filtering the found report data in memory, filtering out data columns that do not match the access permission information, and retaining data columns that match the access permission information .
  • the filtered data is sent to the user terminal for the front-end report component of the user terminal to display the report data.
  • the device for creating a chart component sends a chart component editing interface to the user terminal for display when a chart component creation request is received from a user terminal.
  • the chart component editing interface includes a preset drawing function;
  • the terminal uses the drawing function selected by the chart component editing interface and the input parameter values set for the drawing function; draws the corresponding chart element according to the drawing function and the input parameter value, and sends the chart element to the user terminal for display, and on the user terminal and the chart
  • the chart preview area matching the component editing interface displays the chart element; when the drawing completion instruction sent by the user based on the chart component editing interface is received, all drawing functions selected by the user terminal and the input parameter values corresponding to each drawing function will be determined, and will be determined
  • the drawing function and its corresponding input parameter values are packaged as chart component code; the chart component code is stored in the component library.
  • the component creation program may also be divided into one or more modules, and the one or more modules are stored in the memory 11 and implemented by one or more processors (in this embodiment, The processor 12) executes to complete this application.
  • the modules referred to in this application refer to a series of computer program instruction segments capable of performing specific functions, and are used to describe the execution process of the component creation program in the creation device of the chart component.
  • FIG. 3 it is a schematic diagram of a program module of a component creation program in an embodiment of a device for creating a chart component of the present application.
  • the component creation program can be divided into modules. 20.
  • the second sending module 30, the code encapsulation module 40, and the code storage module 50 for example:
  • the first sending module 10 is configured to: when a request for creating a chart component sent by a user terminal is received, send a chart component editing interface to the user terminal for display, and the chart component editing interface includes a preset drawing function;
  • the parameter determining module 20 is configured to determine a drawing function selected by the user terminal based on the graphic component editing interface and an input parameter value set for the drawing function;
  • the second sending module 30 is configured to draw a corresponding chart element according to the drawing function and the input parameter value, and send the chart element to the user terminal for display, and communicate with the chart on the user terminal.
  • the chart preview area matching the component editing interface displays the chart element;
  • the code encapsulation module 40 is configured to: when receiving a drawing completion instruction sent by the user based on the chart component editing interface, determine all drawing functions selected by the user terminal and input parameter values corresponding to each drawing function, and determine the determined drawing function and The corresponding input parameter values are encapsulated as chart component code;
  • the code storage module 50 is configured to store the chart component code in a component library.
  • an embodiment of the present application further provides a computer-readable storage medium.
  • the computer-readable storage medium stores a component creation program, and the component creation program can be executed by one or more processors to implement the following operations:
  • the chart component code is stored in a component library.
  • the methods in the above embodiments can be implemented by means of software plus a necessary universal hardware platform, and of course, also by hardware, but in many cases the former is better.
  • Implementation Based on such an understanding, the technical solution of this application that is essentially or contributes to the existing technology can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium such as ROM / RAM as described above. , Magnetic disk, optical disc), including a number of instructions to enable a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the embodiments of this application.

Landscapes

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

Abstract

一种图表组件的创建方法,该方法包括:当接收到用户终端发送的图表组件的创建请求时,将图表组件编辑界面发送至所述用户终端显示,所述图表组件编辑界面上包含预先设置的绘图函数(S10);确定用户终端基于所述图表组件编辑界面选择的绘图函数以及为所述绘图函数设置的输入参数值(S20);根据所述绘图函数和所述输入参数值绘制对应的图表元素,并将所述图表元素发送至所述用户终端显示,并在所述用户终端上与所述图表组件编辑界面匹配的图表预览区域显示所述图表元素(S30);当接收到用户基于所述图表组件编辑界面发送的绘制完成指令时,确定用户终端选择的全部绘图函数以及与各个绘图函数对应的输入参数值,将确定的绘图函数和其对应的输入参数值封装为图表组件代码(S40);将图表组件代码存储至组件库(S50)。上述方法解决了无法实现图表组件的灵活配置的技术问题。

Description

图表组件的创建方法、装置及计算机可读存储介质
本申请要求于2018年7月19日提交中国专利局,申请号为201810797164.X、发明名称为“图表组件的创建方法、装置及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及一种图表组件的创建方法、装置及计算机可读存储介质。
背景技术
报表是企业应用系统中不可缺少的一种数据展现方式,它可以为用户特别是企业中高层用户提供直观的数据视图,为用户制定商业计划和决策提供基础和依据。报表同时也是商业智能应用中实现数据可视化的方式之一。
现有的报表系统的多是预先定制好各种模板化的图表组件供用户使用,其图表组件中所展示的布局、色调、形状等都是固定不变的,用户将数据导入到图表组件中进行展示,不支持用户对图表组件的自定义功能,当用户有新的需求时,需要提交到开发人员处,由开发人员进行图表组件的开发设计等,开发周期长且流程复杂,无法实现图表组件的灵活配置。
发明内容
本申请提供一种图表组件的创建方法、装置及计算机可读存储介质,其主要目的在于解决现有技术中无法实现图表组件的灵活配置的技术问题。
为实现上述目的,本申请还提供一种图表组件的创建方法,该方法包括:
当接收到用户终端发送的图表组件的创建请求时,将图表组件编辑界面发送至所述用户终端显示,所述图表组件编辑界面上包含预先设置的绘图函数;
确定用户终端基于所述图表组件编辑界面选择的绘图函数以及为所述绘图函数设置的输入参数值;
根据所述绘制函数和所述输入参数值绘制对应的图表元素,并将所述图 表元素发送至所述用户终端显示,并在所述用户终端上与所述图表组件编辑界面匹配的图表预览区域显示所述图表元素;
当接收到用户基于所述图表组件编辑界面发送的绘制完成指令时,确定用户终端选择的全部绘图函数以及与各个绘图函数对应的输入参数值,将确定的绘图函数和其对应的输入参数值封装为图表组件代码;
将所述图表组件代码存储至组件库。
此外,为实现上述目的,本申请还提供一种图表组件的创建装置,该装置包括存储器和处理器,所述存储器中存储有可在所述处理器上运行的组件创建程序,所述组件创建程序被所述处理器执行时实现如下步骤:
当接收到用户终端发送的图表组件的创建请求时,将图表组件编辑界面发送至所述用户终端显示,所述图表组件编辑界面上包含预先设置的绘图函数;
确定用户终端基于所述图表组件编辑界面选择的绘图函数以及为所述绘图函数设置的输入参数值;
根据所述绘制函数和所述输入参数值绘制对应的图表元素,并将所述图表元素发送至所述用户终端显示,并在所述用户终端上与所述图表组件编辑界面匹配的图表预览区域显示所述图表元素;
当接收到用户基于所述图表组件编辑界面发送的绘制完成指令时,确定用户终端选择的全部绘图函数以及与各个绘图函数对应的输入参数值,将确定的绘图函数和其对应的输入参数值封装为图表组件代码;
将所述图表组件代码存储至组件库。
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有组件创建程序,所述组件创建程序可被一个或者多个处理器执行,以实现如上所述的图表组件的创建方法的步骤。
本申请提出的图表组件的创建方法、装置及计算机可读存储介质,当接收到用户终端发送的图表组件的创建请求时,将图表组件编辑界面发送至用户终端显示,图表组件编辑界面上包含预先设置的绘图函数;确定用户终端基于图表组件编辑界面选择的绘图函数以及为绘图函数设置的输入参数值;根据绘制函数和输入参数值绘制对应的图表元素,并将图表元素发送至用户终端显示,并在用户终端上与图表组件编辑界面匹配的图表预览区域显示该 图表元素;当接收到用户基于图表组件编辑界面发送的绘制完成指令时,确定用户终端选择的全部绘图函数以及与各个绘图函数对应的输入参数值,将确定的绘图函数和其对应的输入参数值封装为图表组件代码;将图表组件代码存储至组件库。本申请的方案提供给用户通过绘制函数绘制组成图表组件的各个元素,进而通过这些元素的组合形成自己想要的图表组件,满足用户对图表多样性的要求,实现图表组件的灵活配置。
附图说明
图1为本申请一实施例提供的图表组件的创建方法的流程示意图;
图2为本申请一实施例提供的图表组件的创建装置的内部结构示意图;
图3为本申请一实施例提供的图表组件的创建装置中组件创建程序的模块示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供一种图表组件的创建方法。参照图1所示,为本申请一实施例提供的图表组件的创建方法的流程示意图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。
在本实施例中,图表组件的创建方法包括:
步骤S10,当接收到用户终端发送的图表组件的创建请求时,将图表组件编辑界面发送至所述用户终端显示,所述图表组件编辑界面上包含预先设置的绘图函数。
在本申请的方法实施例中,以图表组件的创建装置作为执行主体描述本方案。用户终端与图表组件的创建装置建立远程通讯连接。用户终端向创建装置发送图表组件的创建请求,创建装置响应该请求为用户终端提供创建图表组件的功能。
该实施例中,绘图函数可以用于多种图表的绘制,例如金融图表、数学 分析图表等,单个的绘图函数主要是用于实现图表的基础组成元素的绘制,例如,对于金融K线图来说,可以实现基础线、手数、坐标轴、K线等基础组成元素的绘制。这些绘制函数可以是画坐标函数,画点函数,画线函数,填充颜色函数等,这些绘图函数是未设置具体输入参数值的函数式,存储在预先构建的JavaScript库中,该JavaScript库部署在图表组件的创建装置。
用户终端上提供有创建图表组件的控件或者链接,当用户点击该控件或者链接时,用户终端向图表组件的创建装置发送图表组件的创建请求。当创建装置接收到图表组件的创建请求时,将预先设置的图表组件编辑界面发送至用户终端显示,该图表组件编辑界面上包含有预先设置的绘图函数,以供用户选择。
步骤S20,确定用户终端基于所述图表组件编辑界面选择的绘图函数以及为所述绘图函数设置的输入参数值。
步骤S30,根据所述绘制函数和所述输入参数值绘制对应的图表元素,并将所述图表元素发送至所述用户终端显示,并在所述用户终端上与所述图表组件编辑界面匹配的图表预览区域显示所述图表元素。
用户可以根据自己要绘制的图表元素,选择对应的绘制函数,并未绘制函数赋值,即设置输入参数值,得到具体的图表元素。通过这种方式用户从图表组件编辑界面上选择多个绘制函数进行图表的绘制,其中,对绘图函数的输入参数值进行赋值即是对对应的图表元素的属性进行赋值,例如,绘制圆形图像时,对圆心的坐标和半径的大小进行赋值。在用户为绘制函数赋值后,用户终端将赋值后的绘制函数发送至创建装置,创建装置确定用户选择的绘图函数以及为该绘图函数设置的输入参数值,然后根据绘制函数和输入参数值绘制出对应的图表元素,将该图表元素发送至用户终端,用户终端在于图表组件编辑界面匹配的图表预览区域实时地展示该图表元素,以使用户可以实时地看到自己绘制的图表元素的显示效果,进而对绘制函数的输入参数值进行调整。用户可以不断重复上述操作以对多个绘制函数进行赋值,从而创建出多个图表元素,以完成图表组件的绘制。当用户完成图表的完成后,基于该编辑界面上的绘制完成控件触发绘制完成指令。
步骤S40,当接收到用户基于所述图表组件编辑界面发送的绘制完成指令时,确定用户终端选择的全部绘图函数以及与各个绘图函数对应的输入参数 值,将确定的绘图函数和其对应的输入参数值封装为图表组件代码。
步骤S50,将所述图表组件代码存储至组件库。
当创建装置接收到用户终端发送的绘制完成指令时,确定用户在绘制图表的过程中选择的全部绘制函数,将这些绘制函数以及用户为这些绘制函数设置的输入参数值进行封装,得到图表组件代码。将该图表组件代码存储至预先设置的图表代码库,同时将对应的可视化图表添加至图表模板列表中,以供用户直接从图表模板中调用。
进一步地,在一实施例中,在将图表组件代码存储至组件库之前,该方法还包括步骤:对封装好的图表组件代码进行安全性检查和可用性检查;若通过所述安全性检查和所述可用性检查,则执行所述将所述图表组件代码存储至所述组件库的步骤;若未通过所述安全性检查和所述可用性检查,则向所述用户终端发送对应的提示信息。
进一步地,用户可以为编辑的图表组件设置为用于展示特定格式或者特定类型的数据,系统将用户上传的图表组件与特定格式或者特定类型的数据关联后存储。
可选地,在其他实施例中,将所述图表组件代码存储至组件库的步骤包括:为所述图表组件代码添加标识信息,以将所述图表组件代码标记为可编辑图表组件;将添加有所述标识信息的图表组件代码存储至所述组件库。
用户在使用过程中,可以对这些图表组件进行重新编辑,当系统接收到用户基于可编辑图表组件发送的图表组件修改指令时,从图表代码库中获取对应的图表组件代码,并显示其中的绘图函数,以供用户对其中的绘图函数的输入参数值进行修改,进而实现对图表的显示效果的修改。
可选地,在其他实施例中,该方法还包括步骤:
当接收用户终端发送的图表组件选择指令时,确定与所述图表组件选择指令对应的图表组件;
从组件库中获取所述图表组件的代码,根据获取的代码将所述图表组件发送至所述用户终端展示,并将与该图表组件对应的报表数据配置界面发送至所述用户终端展示,所述报表数据配置界面上包括参数输入框以及数据源信息;
当接收到所述用户终端基于所述报表数据配置界面发送的数据查询请求 时,从所述数据查询请求中获取查询参数和查询条件,根据所述查询参数和查询条件生成数据查询语句,并基于所述数据查询语句从与所述数据源信息对应的数据源中获取对应的报表数据;
将获取到的报表数据发送至所述用户终端,以供所述用户终端将所述报表数据展示在所述图表组件中。
具体地,在报表数据配置界面上包含有查询参数的输入框,参数输入框包括数据源名称输入框、数据库名输入框、数据表名输入框、过滤条件输入框、查询结果字段输入框等。此外,该设置界面上包含有当前与报表系统对接的多个数据源以供用户选择。用户在选择数据源之后,将用户选择的数据源展示在设置界面上,用户通过拖拽操作将要展示的数据库参数、数据表参数、数据列参数以及过滤条件等填充至上述对应的参数输入框中。用户终端基于上述参数生成数据查询请求发送至上述创建装置。图表组件的创建装置从该数据查询请求中获取查询参数和查询条件,其中查询参数包括数据源名称、数据库名、数据表名、查询结果字段等,根据这些参数生成SQL(Structured Query Language,结构化查询语言)数据查询语句,基于该数据查询语句从对应的数据源中获取对应的报表数据。
可选地,在所述将获取到的报表数据发送至所述用户终端的步骤之前,所述方法还包括步骤:
从所述数据查询请求中获取用户标识信息,并获取存储的权限配置文件;
根据所述权限配置文件确定与所述用户标识信息对应的访问权限信息;
根据所述访问权限信息,在内存中对获取到的报表数据进行筛选,过滤掉与所述访问权限信息不匹配的报表数据,保留与所述访问权限信息匹配的报表数据;
所述将获取到的报表数据发送至所述用户终端的步骤包括:
将保留的与所述访问权限信息匹配的报表数据发送至所述用户终端。
具体地,可以为用户设置对报表数据的访问权限,例如,以数据列或者数据行为单位授予访问权限。预先创建权限配置文件,该权限配置文件中设置了每一个用户标识信息对应的访问权限信息,该访问权限信息中限定了用户有权限访问的数据行或者数据列,例如,xx用户有xx报表的xx列的访问权限;根据所述访问权限信息,在内存中对查找到的报表数据进行筛选,过 滤掉与所述访问权限信息不匹配的数据列,保留与所述访问权限信息匹配的数据列。并将经过滤处理后的数据发送至用户终端,以供用户终端的前端报表组件显示报表数据。
本实施例提出的图表组件的创建方法,当接收到用户终端发送的图表组件的创建请求时,将图表组件编辑界面发送至用户终端显示,图表组件编辑界面上包含预先设置的绘图函数;确定用户终端基于图表组件编辑界面选择的绘图函数以及为绘图函数设置的输入参数值;根据绘制函数和输入参数值绘制对应的图表元素,并将图表元素发送至用户终端显示,并在用户终端上与图表组件编辑界面匹配的图表预览区域显示该图表元素;当接收到用户基于图表组件编辑界面发送的绘制完成指令时,确定用户终端选择的全部绘图函数以及与各个绘图函数对应的输入参数值,将确定的绘图函数和其对应的输入参数值封装为图表组件代码;将图表组件代码存储至组件库。本申请的方案提供给用户通过绘制函数绘制组成图表组件的各个元素,进而通过这些元素的组合形成自己想要的图表组件,满足用户对图表多样性的要求,实现图表组件的灵活配置。
本申请还提供一种图表组件的创建装置。参照图2所示,为本申请一实施例提供的图表组件的创建装置的内部结构示意图。
在本实施例中,图表组件的创建装置1可以是PC(Personal Computer,个人电脑),也可以是智能手机、平板电脑、便携计算机等终端设备。该图表组件的创建装置1至少包括存储器11、处理器12,网络接口13以及通信总线。
其中,存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、磁性存储器、磁盘、光盘等。存储器11在一些实施例中可以是图表组件的创建装置1的内部存储单元,例如该图表组件的创建装置1的硬盘。存储器11在另一些实施例中也可以是图表组件的创建装置1的外部存储设备,例如图表组件的创建装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括图表组件的创建装置1的内部存储单元也包括外部存储设 备。存储器11不仅可以用于存储安装于图表组件的创建装置1的应用软件及各类数据,例如组件创建程序01的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行组件创建程序01等。
网络接口13可选的可以包括标准的有线接口、无线接口(如WI-FI接口),通常用于在该装置1与其他电子设备之间建立通信连接。
通信总线用于实现这些组件之间的连接通信。
可选地,该装置1还可以包括用户接口,用户接口可以包括显示器(Display)、输入单元比如键盘(Keyboard),可选的用户接口还可以包括标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在图表组件的创建装置1中处理的信息以及用于显示可视化的用户界面。
图2仅示出了具有组件11-13以及组件创建程序01的图表组件的创建装置1,本领域技术人员可以理解的是,图1示出的结构并不构成对图表组件的创建装置1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
在图2所示的装置1实施例中,存储器11中存储有组件创建程序01;处理器12执行存储器11中存储的组件创建程序01时实现如下步骤:
当接收到用户终端发送的图表组件的创建请求时,将图表组件编辑界面发送至所述用户终端显示,所述图表组件编辑界面上包含预先设置的绘图函数。
确定用户终端基于所述图表组件编辑界面选择的绘图函数以及为所述绘图函数设置的输入参数值。
根据所述绘制函数和所述输入参数值绘制对应的图表元素,并将所述图表元素发送至所述用户终端显示,并在所述用户终端上与所述图表组件编辑界面匹配的图表预览区域显示所述图表元素。
当接收到用户基于所述图表组件编辑界面发送的绘制完成指令时,确定用户终端选择的全部绘图函数以及与各个绘图函数对应的输入参数值,将确定的绘图函数和其对应的输入参数值封装为图表组件代码。
将所述图表组件代码存储至组件库。
在以下实施例中,用户终端与图表组件的创建装置建立远程通讯连接。用户终端向创建装置发送图表组件的创建请求,创建装置响应该请求为用户终端提供创建图表组件的功能。
该实施例中,绘图函数可以用于多种图表的绘制,例如金融图表、数学分析图表等,单个的绘图函数主要是用于实现图表的基础组成元素的绘制,例如,对于金融K线图来说,可以实现基础线、手数、坐标轴、K线等基础组成元素的绘制。这些绘制函数可以是画坐标函数,画点函数,画线函数,填充颜色函数等,这些绘图函数是未设置具体输入参数值的函数式,存储在预先构建的JavaScript库中,该JavaScript库部署在图表组件的创建装置。
用户终端上提供有创建图表组件的控件或者链接,当用户点击该控件或者链接时,用户终端向图表组件的创建装置发送图表组件的创建请求。当创建装置接收到图表组件的创建请求时,将预先设置的图表组件编辑界面发送至用户终端显示,该图表组件编辑界面上包含有预先设置的绘图函数,以供用户选择。
用户可以根据自己要绘制的图表元素,选择对应的绘制函数,并未绘制函数赋值,即设置输入参数值,得到具体的图表元素。通过这种方式用户从图表组件编辑界面上选择多个绘制函数进行图表的绘制,其中,对绘图函数的输入参数值进行赋值即是对对应的图表元素的属性进行赋值,例如,绘制圆形图像时,对圆心的坐标和半径的大小进行赋值。在用户为绘制函数赋值后,用户终端将赋值后的绘制函数发送至创建装置,创建装置确定用户选择的绘图函数以及为该绘图函数设置的输入参数值,然后根据绘制函数和输入参数值绘制出对应的图表元素,将该图表元素发送至用户终端,用户终端在于图表组件编辑界面匹配的图表预览区域实时地展示该图表元素,以使用户可以实时地看到自己绘制的图表元素的显示效果,进而对绘制函数的输入参数值进行调整。用户可以不断重复上述操作以对多个绘制函数进行赋值,从而创建出多个图表元素,以完成图表组件的绘制。当用户完成图表的完成后, 基于该编辑界面上的绘制完成控件触发绘制完成指令。
当创建装置接收到用户终端发送的绘制完成指令时,确定用户在绘制图表的过程中选择的全部绘制函数,将这些绘制函数以及用户为这些绘制函数设置的输入参数值进行封装,得到图表组件代码。将该图表组件代码存储至预先设置的图表代码库,同时将对应的可视化图表添加至图表模板列表中,以供用户直接从图表模板中调用。
进一步地,在一实施例中,组件创建程序01还可被处理器12执行,以在将图表组件代码存储至组件库之前,还实现如下步骤:对封装好的图表组件代码进行安全性检查和可用性检查;若通过所述安全性检查和所述可用性检查,则执行所述将所述图表组件代码存储至所述组件库的步骤;若未通过所述安全性检查和所述可用性检查,则向所述用户终端发送对应的提示信息。
进一步地,用户可以为编辑的图表组件设置为用于展示特定格式或者特定类型的数据,系统将用户上传的图表组件与特定格式或者特定类型的数据关联后存储。
可选地,在其他实施例中,将所述图表组件代码存储至组件库的步骤包括:为所述图表组件代码添加标识信息,以将所述图表组件代码标记为可编辑图表组件;将添加有所述标识信息的图表组件代码存储至所述组件库。
用户在使用过程中,可以对这些图表组件进行重新编辑,当系统接收到用户基于可编辑图表组件发送的图表组件修改指令时,从图表代码库中获取对应的图表组件代码,并显示其中的绘图函数,以供用户对其中的绘图函数的输入参数值进行修改,进而实现对图表的显示效果的修改。
可选地,在其他实施例中,组件创建程序01还可被处理器12执行,以实现如下步骤:
当接收用户终端发送的图表组件选择指令时,确定与所述图表组件选择指令对应的图表组件;
从组件库中获取所述图表组件的代码,根据获取的代码将所述图表组件发送至所述用户终端展示,并将与该图表组件对应的报表数据配置界面发送至所述用户终端展示,所述报表数据配置界面上包括参数输入框以及数据源信息;
当接收到所述用户终端基于所述报表数据配置界面发送的数据查询请求 时,从所述数据查询请求中获取查询参数和查询条件,根据所述查询参数和查询条件生成数据查询语句,并基于所述数据查询语句从与所述数据源信息对应的数据源中获取对应的报表数据;
将获取到的报表数据发送至所述用户终端,以供所述用户终端将所述报表数据展示在所述图表组件中。
具体地,在报表数据配置界面上包含有查询参数的输入框,参数输入框包括数据源名称输入框、数据库名输入框、数据表名输入框、过滤条件输入框、查询结果字段输入框等。此外,该设置界面上包含有当前与报表系统对接的多个数据源以供用户选择。用户在选择数据源之后,将用户选择的数据源展示在设置界面上,用户通过拖拽操作将要展示的数据库参数、数据表参数、数据列参数以及过滤条件等填充至上述对应的参数输入框中。用户终端基于上述参数生成数据查询请求发送至上述创建装置。图表组件的创建装置从该数据查询请求中获取查询参数和查询条件,其中查询参数包括数据源名称、数据库名、数据表名、查询结果字段等,根据这些参数生成SQL数据查询语句,基于该数据查询语句从对应的数据源中获取对应的报表数据。
可选地,组件创建程序01还可被处理器12执行,以在所述将获取到的报表数据发送至所述用户终端的步骤之前,还实现如下步骤:
从所述数据查询请求中获取用户标识信息,并获取存储的权限配置文件;
根据所述权限配置文件确定与所述用户标识信息对应的访问权限信息;
根据所述访问权限信息,在内存中对获取到的报表数据进行筛选,过滤掉与所述访问权限信息不匹配的报表数据,保留与所述访问权限信息匹配的报表数据;
所述将获取到的报表数据发送至所述用户终端的步骤包括:
将保留的与所述访问权限信息匹配的报表数据发送至所述用户终端。
具体地,可以为用户设置对报表数据的访问权限,例如,以数据列或者数据行为单位授予访问权限。预先创建权限配置文件,该权限配置文件中设置了每一个用户标识信息对应的访问权限信息,该访问权限信息中限定了用户有权限访问的数据行或者数据列,例如,xx用户有xx报表的xx列的访问权限;根据所述访问权限信息,在内存中对查找到的报表数据进行筛选,过滤掉与所述访问权限信息不匹配的数据列,保留与所述访问权限信息匹配的 数据列。并将经过滤处理后的数据发送至用户终端,以供用户终端的前端报表组件显示报表数据。
本实施例提出的图表组件的创建装置,当接收到用户终端发送的图表组件的创建请求时,将图表组件编辑界面发送至用户终端显示,图表组件编辑界面上包含预先设置的绘图函数;确定用户终端基于图表组件编辑界面选择的绘图函数以及为绘图函数设置的输入参数值;根据绘制函数和输入参数值绘制对应的图表元素,并将图表元素发送至用户终端显示,并在用户终端上与图表组件编辑界面匹配的图表预览区域显示该图表元素;当接收到用户基于图表组件编辑界面发送的绘制完成指令时,确定用户终端选择的全部绘图函数以及与各个绘图函数对应的输入参数值,将确定的绘图函数和其对应的输入参数值封装为图表组件代码;将图表组件代码存储至组件库。本申请的方案提供给用户通过绘制函数绘制组成图表组件的各个元素,进而通过这些元素的组合形成自己想要的图表组件,满足用户对图表多样性的要求,实现图表组件的灵活配置。
可选地,在其他的实施例中,组件创建程序还可以被分割为一个或者多个模块,一个或者多个模块被存储于存储器11中,并由一个或多个处理器(本实施例为处理器12)所执行以完成本申请,本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段,用于描述组件创建程序在图表组件的创建装置中的执行过程。
例如,参照图3所示,为本申请图表组件的创建装置一实施例中的组件创建程序的程序模块示意图,该实施例中,组件创建程序可以被分割为模块第一发送10、参数确定模块20、第二发送模块30、代码封装模块40和代码存储模块50,示例性地:
第一发送模块10用于:当接收到用户终端发送的图表组件的创建请求时,将图表组件编辑界面发送至所述用户终端显示,所述图表组件编辑界面上包含预先设置的绘图函数;
参数确定模块20用于:确定用户终端基于所述图表组件编辑界面选择的绘图函数以及为所述绘图函数设置的输入参数值;
第二发送模块30用于:根据所述绘制函数和所述输入参数值绘制对应的 图表元素,并将所述图表元素发送至所述用户终端显示,并在所述用户终端上与所述图表组件编辑界面匹配的图表预览区域显示所述图表元素;
代码封装模块40用于:当接收到用户基于所述图表组件编辑界面发送的绘制完成指令时,确定用户终端选择的全部绘图函数以及与各个绘图函数对应的输入参数值,将确定的绘图函数和其对应的输入参数值封装为图表组件代码;
代码存储模块50用于:将所述图表组件代码存储至组件库。
上述第一发送10、参数确定模块20、第二发送模块30、代码封装模块40和代码存储模块50等程序模块被执行时所实现的功能或操作步骤与上述实施例大体相同,在此不再赘述。
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有组件创建程序,所述组件创建程序可被一个或多个处理器执行,以实现如下操作:
当接收到用户终端发送的图表组件的创建请求时,将图表组件编辑界面发送至所述用户终端显示,所述图表组件编辑界面上包含预先设置的绘图函数;
确定用户终端基于所述图表组件编辑界面选择的绘图函数以及为所述绘图函数设置的输入参数值;
根据所述绘制函数和所述输入参数值绘制对应的图表元素,并将所述图表元素发送至所述用户终端显示,并在所述用户终端上与所述图表组件编辑界面匹配的图表预览区域显示所述图表元素;
当接收到用户基于所述图表组件编辑界面发送的绘制完成指令时,确定用户终端选择的全部绘图函数以及与各个绘图函数对应的输入参数值,将确定的绘图函数和其对应的输入参数值封装为图表组件代码;
将所述图表组件代码存储至组件库。
本申请计算机可读存储介质具体实施方式与上述图表组件的创建装置和方法各实施例基本相同,在此不作累述。
需要说明的是,上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。并且本文中的术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅 包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种图表组件的创建方法,其特征在于,所述方法包括:
    当接收到用户终端发送的图表组件的创建请求时,将图表组件编辑界面发送至所述用户终端显示,所述图表组件编辑界面上包含预先设置的绘图函数;
    确定用户终端基于所述图表组件编辑界面选择的绘图函数以及为所述绘图函数设置的输入参数值;
    根据所述绘制函数和所述输入参数值绘制对应的图表元素,并将所述图表元素发送至所述用户终端显示,并在所述用户终端上与所述图表组件编辑界面匹配的图表预览区域显示所述图表元素;
    当接收到用户基于所述图表组件编辑界面发送的绘制完成指令时,确定用户终端选择的全部绘图函数以及与各个绘图函数对应的输入参数值,将确定的绘图函数和其对应的输入参数值封装为图表组件代码;
    将所述图表组件代码存储至组件库。
  2. 如权利要求1所述的图表组件的创建方法,其特征在于,所述将所述图表组件代码存储至组件库的步骤之前,所述图表组件的创建方法还包括步骤:
    对封装好的图表组件代码进行安全性检查和可用性检查;
    若通过所述安全性检查和所述可用性检查,则执行所述将所述图表组件代码存储至所述组件库的步骤;
    若未通过所述安全性检查和所述可用性检查,则向所述用户终端发送对应的提示信息。
  3. 如权利要求1所述的图表组件的创建方法,其特征在于,所述将所述图表组件代码存储至组件库的步骤包括:
    为所述图表组件代码添加标识信息,以将所述图表组件代码标记为可编辑图表组件;
    将添加有所述标识信息的图表组件代码存储至所述组件库。
  4. 如权利要求1所述的图表组件的创建方法,其特征在于,所述图表组件的创建方法还包括步骤:
    当接收用户终端发送的图表组件选择指令时,确定与所述图表组件选择 指令对应的图表组件;
    从组件库中获取所述图表组件的代码,根据获取的代码将所述图表组件发送至所述用户终端展示,并将与该图表组件对应的报表数据配置界面发送至所述用户终端展示,所述报表数据配置界面上包括参数输入框以及数据源信息;
    当接收到所述用户终端基于所述报表数据配置界面发送的数据查询请求时,从所述数据查询请求中获取查询参数和查询条件,根据所述查询参数和查询条件生成数据查询语句,并基于所述数据查询语句从与所述数据源信息对应的数据源中获取对应的报表数据;
    将获取到的报表数据发送至所述用户终端,以供所述用户终端将所述报表数据展示在所述图表组件中。
  5. 如权利要求2所述的图表组件的创建方法,其特征在于,所述图表组件的创建方法还包括步骤:
    当接收用户终端发送的图表组件选择指令时,确定与所述图表组件选择指令对应的图表组件;
    从组件库中获取所述图表组件的代码,根据获取的代码将所述图表组件发送至所述用户终端展示,并将与该图表组件对应的报表数据配置界面发送至所述用户终端展示,所述报表数据配置界面上包括参数输入框以及数据源信息;
    当接收到所述用户终端基于所述报表数据配置界面发送的数据查询请求时,从所述数据查询请求中获取查询参数和查询条件,根据所述查询参数和查询条件生成数据查询语句,并基于所述数据查询语句从与所述数据源信息对应的数据源中获取对应的报表数据;
    将获取到的报表数据发送至所述用户终端,以供所述用户终端将所述报表数据展示在所述图表组件中。
  6. 如权利要求3所述的图表组件的创建方法,其特征在于,所述图表组件的创建方法还包括步骤:
    当接收用户终端发送的图表组件选择指令时,确定与所述图表组件选择指令对应的图表组件;
    从组件库中获取所述图表组件的代码,根据获取的代码将所述图表组件 发送至所述用户终端展示,并将与该图表组件对应的报表数据配置界面发送至所述用户终端展示,所述报表数据配置界面上包括参数输入框以及数据源信息;
    当接收到所述用户终端基于所述报表数据配置界面发送的数据查询请求时,从所述数据查询请求中获取查询参数和查询条件,根据所述查询参数和查询条件生成数据查询语句,并基于所述数据查询语句从与所述数据源信息对应的数据源中获取对应的报表数据;
    将获取到的报表数据发送至所述用户终端,以供所述用户终端将所述报表数据展示在所述图表组件中。
  7. 如权利要求4-6任一项所述的图表组件的创建方法,其特征在于,所述将获取到的报表数据发送至所述用户终端的步骤之前,所述方法还包括步骤:
    从所述数据查询请求中获取用户标识信息,并获取存储的权限配置文件;
    根据所述权限配置文件确定与所述用户标识信息对应的访问权限信息;
    根据所述访问权限信息,在内存中对获取到的报表数据进行筛选,过滤掉与所述访问权限信息不匹配的报表数据,保留与所述访问权限信息匹配的报表数据;
    所述将获取到的报表数据发送至所述用户终端的步骤包括:
    将保留的与所述访问权限信息匹配的报表数据发送至所述用户终端。
  8. 一种图表组件的创建装置,其特征在于,所述装置包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的组件创建程序,所述组件创建程序被所述处理器执行时实现如下步骤:
    当接收到用户终端发送的图表组件的创建请求时,将图表组件编辑界面发送至所述用户终端显示,所述图表组件编辑界面上包含预先设置的绘图函数;
    确定用户终端基于所述图表组件编辑界面选择的绘图函数以及为所述绘图函数设置的输入参数值;
    根据所述绘制函数和所述输入参数值绘制对应的图表元素,并将所述图表元素发送至所述用户终端显示,并在所述用户终端上与所述图表组件编辑界面匹配的图表预览区域显示所述图表元素;
    当接收到用户基于所述图表组件编辑界面发送的绘制完成指令时,确定用户终端选择的全部绘图函数以及与各个绘图函数对应的输入参数值,将确定的绘图函数和其对应的输入参数值封装为图表组件代码;
    将所述图表组件代码存储至组件库。
  9. 如权利要求8所述的图表组件的创建装置,其特征在于,所述组件创建程序还可被所述处理器执行,以在所述将所述图表组件代码存储至组件库的步骤之前,还实现如下步骤:
    对封装好的图表组件代码进行安全性检查和可用性检查;
    若通过所述安全性检查和所述可用性检查,则执行所述将所述图表组件代码存储至所述组件库的步骤;
    若未通过所述安全性检查和所述可用性检查,则向所述用户终端发送对应的提示信息。
  10. 如权利要求8所述的图表组件的创建装置,其特征在于,所述将所述图表组件代码存储至组件库的步骤包括:
    为所述图表组件代码添加标识信息,以将所述图表组件代码标记为可编辑图表组件;
    将添加有所述标识信息的图表组件代码存储至所述组件库。
  11. 如权利要求8所述的图表组件的创建装置,其特征在于,所述图表组件的创建方法还包括步骤:
    当接收用户终端发送的图表组件选择指令时,确定与所述图表组件选择指令对应的图表组件;
    从组件库中获取所述图表组件的代码,根据获取的代码将所述图表组件发送至所述用户终端展示,并将与该图表组件对应的报表数据配置界面发送至所述用户终端展示,所述报表数据配置界面上包括参数输入框以及数据源信息;
    当接收到所述用户终端基于所述报表数据配置界面发送的数据查询请求时,从所述数据查询请求中获取查询参数和查询条件,根据所述查询参数和查询条件生成数据查询语句,并基于所述数据查询语句从与所述数据源信息对应的数据源中获取对应的报表数据;
    将获取到的报表数据发送至所述用户终端,以供所述用户终端将所述报 表数据展示在所述图表组件中。
  12. 如权利要求9所述的图表组件的创建装置,其特征在于,所述图表组件的创建方法还包括步骤:
    当接收用户终端发送的图表组件选择指令时,确定与所述图表组件选择指令对应的图表组件;
    从组件库中获取所述图表组件的代码,根据获取的代码将所述图表组件发送至所述用户终端展示,并将与该图表组件对应的报表数据配置界面发送至所述用户终端展示,所述报表数据配置界面上包括参数输入框以及数据源信息;
    当接收到所述用户终端基于所述报表数据配置界面发送的数据查询请求时,从所述数据查询请求中获取查询参数和查询条件,根据所述查询参数和查询条件生成数据查询语句,并基于所述数据查询语句从与所述数据源信息对应的数据源中获取对应的报表数据;
    将获取到的报表数据发送至所述用户终端,以供所述用户终端将所述报表数据展示在所述图表组件中。
  13. 如权利要求10所述的图表组件的创建装置,其特征在于,所述图表组件的创建方法还包括步骤:
    当接收用户终端发送的图表组件选择指令时,确定与所述图表组件选择指令对应的图表组件;
    从组件库中获取所述图表组件的代码,根据获取的代码将所述图表组件发送至所述用户终端展示,并将与该图表组件对应的报表数据配置界面发送至所述用户终端展示,所述报表数据配置界面上包括参数输入框以及数据源信息;
    当接收到所述用户终端基于所述报表数据配置界面发送的数据查询请求时,从所述数据查询请求中获取查询参数和查询条件,根据所述查询参数和查询条件生成数据查询语句,并基于所述数据查询语句从与所述数据源信息对应的数据源中获取对应的报表数据;
    将获取到的报表数据发送至所述用户终端,以供所述用户终端将所述报表数据展示在所述图表组件中。
  14. 如权利要求11-13任一项所述的图表组件的创建装置,其特征在于, 所述将获取到的报表数据发送至所述用户终端的步骤之前,还包括步骤:
    从所述数据查询请求中获取用户标识信息,并获取存储的权限配置文件;
    根据所述权限配置文件确定与所述用户标识信息对应的访问权限信息;
    根据所述访问权限信息,在内存中对获取到的报表数据进行筛选,过滤掉与所述访问权限信息不匹配的报表数据,保留与所述访问权限信息匹配的报表数据;
    所述将获取到的报表数据发送至所述用户终端的步骤包括:
    将保留的与所述访问权限信息匹配的报表数据发送至所述用户终端。
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有组件创建程序,所述组件创建程序可被一个或者多个处理器执行,以实现如下步骤:
    当接收到用户终端发送的图表组件的创建请求时,将图表组件编辑界面发送至所述用户终端显示,所述图表组件编辑界面上包含预先设置的绘图函数;
    确定用户终端基于所述图表组件编辑界面选择的绘图函数以及为所述绘图函数设置的输入参数值;
    根据所述绘制函数和所述输入参数值绘制对应的图表元素,并将所述图表元素发送至所述用户终端显示,并在所述用户终端上与所述图表组件编辑界面匹配的图表预览区域显示所述图表元素;
    当接收到用户基于所述图表组件编辑界面发送的绘制完成指令时,确定用户终端选择的全部绘图函数以及与各个绘图函数对应的输入参数值,将确定的绘图函数和其对应的输入参数值封装为图表组件代码;
    将所述图表组件代码存储至组件库。
  16. 如权利要求15所述的计算机可读存储介质,其特征在于,所述组件创建程序还可被所述处理器执行,以在所述将所述图表组件代码存储至组件库的步骤之前,还实现如下步骤:
    对封装好的图表组件代码进行安全性检查和可用性检查;
    若通过所述安全性检查和所述可用性检查,则执行所述将所述图表组件代码存储至所述组件库的步骤;
    若未通过所述安全性检查和所述可用性检查,则向所述用户终端发送对 应的提示信息。
  17. 如权利要求15所述的计算机可读存储介质,其特征在于,所述将所述图表组件代码存储至组件库的步骤包括:
    为所述图表组件代码添加标识信息,以将所述图表组件代码标记为可编辑图表组件;
    将添加有所述标识信息的图表组件代码存储至所述组件库。
  18. 如权利要求15所述的计算机可读存储介质,其特征在于,所述图表组件的创建方法还包括步骤:
    当接收用户终端发送的图表组件选择指令时,确定与所述图表组件选择指令对应的图表组件;
    从组件库中获取所述图表组件的代码,根据获取的代码将所述图表组件发送至所述用户终端展示,并将与该图表组件对应的报表数据配置界面发送至所述用户终端展示,所述报表数据配置界面上包括参数输入框以及数据源信息;
    当接收到所述用户终端基于所述报表数据配置界面发送的数据查询请求时,从所述数据查询请求中获取查询参数和查询条件,根据所述查询参数和查询条件生成数据查询语句,并基于所述数据查询语句从与所述数据源信息对应的数据源中获取对应的报表数据;
    将获取到的报表数据发送至所述用户终端,以供所述用户终端将所述报表数据展示在所述图表组件中。
  19. 如权利要求16所述的计算机可读存储介质,其特征在于,所述图表组件的创建方法还包括步骤:
    当接收用户终端发送的图表组件选择指令时,确定与所述图表组件选择指令对应的图表组件;
    从组件库中获取所述图表组件的代码,根据获取的代码将所述图表组件发送至所述用户终端展示,并将与该图表组件对应的报表数据配置界面发送至所述用户终端展示,所述报表数据配置界面上包括参数输入框以及数据源信息;
    当接收到所述用户终端基于所述报表数据配置界面发送的数据查询请求时,从所述数据查询请求中获取查询参数和查询条件,根据所述查询参数和 查询条件生成数据查询语句,并基于所述数据查询语句从与所述数据源信息对应的数据源中获取对应的报表数据;
    将获取到的报表数据发送至所述用户终端,以供所述用户终端将所述报表数据展示在所述图表组件中。
  20. 如权利要求17所述的计算机可读存储介质,其特征在于,所述图表组件的创建方法还包括步骤:
    当接收用户终端发送的图表组件选择指令时,确定与所述图表组件选择指令对应的图表组件;
    从组件库中获取所述图表组件的代码,根据获取的代码将所述图表组件发送至所述用户终端展示,并将与该图表组件对应的报表数据配置界面发送至所述用户终端展示,所述报表数据配置界面上包括参数输入框以及数据源信息;
    当接收到所述用户终端基于所述报表数据配置界面发送的数据查询请求时,从所述数据查询请求中获取查询参数和查询条件,根据所述查询参数和查询条件生成数据查询语句,并基于所述数据查询语句从与所述数据源信息对应的数据源中获取对应的报表数据;
    将获取到的报表数据发送至所述用户终端,以供所述用户终端将所述报表数据展示在所述图表组件中。
PCT/CN2018/107681 2018-07-19 2018-09-26 图表组件的创建方法、装置及计算机可读存储介质 WO2020015166A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810797164.XA CN109358851B (zh) 2018-07-19 2018-07-19 图表组件的创建方法、装置及计算机可读存储介质
CN201810797164.X 2018-07-19

Publications (1)

Publication Number Publication Date
WO2020015166A1 true WO2020015166A1 (zh) 2020-01-23

Family

ID=65349727

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/107681 WO2020015166A1 (zh) 2018-07-19 2018-09-26 图表组件的创建方法、装置及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN109358851B (zh)
WO (1) WO2020015166A1 (zh)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110032590A (zh) * 2019-04-15 2019-07-19 重庆天蓬网络有限公司 一种数据可视化系统、方法、服务器及存储介质
CN110647666B (zh) * 2019-09-03 2023-12-19 平安科技(深圳)有限公司 模板与公式的智能匹配方法、装置及计算机可读存储介质
CN110688423A (zh) * 2019-09-06 2020-01-14 中国平安财产保险股份有限公司 数据处理及展示方法、系统、设备及存储介质
CN112486378A (zh) * 2019-09-11 2021-03-12 腾讯科技(深圳)有限公司 图形生成方法、装置、终端及存储介质
CN110716714B (zh) * 2019-09-30 2024-03-08 奇安信科技集团股份有限公司 组件创建方法、装置、计算机系统和计算机可读存储介质
CN110908649B (zh) * 2019-10-14 2023-07-04 成都西山居世游科技有限公司 一种可拆分及合并的图表绘制方法和系统
CN110764761B (zh) * 2019-10-30 2023-12-29 网易(杭州)网络有限公司 数组可视化编辑方法与装置、电子设备、存储介质
CN111159108A (zh) * 2019-12-18 2020-05-15 北京达佳互联信息技术有限公司 一种组件管理方法、装置、电子设备及存储介质
CN110989891B (zh) * 2019-12-23 2021-12-14 深圳市金蝶天燕云计算股份有限公司 一种图表编辑器中组件部署方法、图表编辑器及相关设备
CN111427560B (zh) * 2020-02-27 2022-05-20 平安医疗健康管理股份有限公司 规则代码的可视化创建方法、装置和计算机设备
CN111522537B (zh) * 2020-04-30 2023-08-04 大唐湘潭发电有限责任公司 电气二次回路图的参数化绘制方法
CN111722844B (zh) * 2020-05-29 2024-05-03 北京宝兰德软件股份有限公司 基于Web的动态富文本组件的设计方法及装置
CN112114914A (zh) * 2020-08-03 2020-12-22 广州太平洋电脑信息咨询有限公司 生成报表的方法、装置、计算机设备和存储介质
CN112286524B (zh) * 2020-09-23 2024-01-02 北京中科院软件中心有限公司 Lqcd程序的图示化配置方法、装置、电子设备及存储介质
CN112416304B (zh) * 2020-11-23 2022-11-25 西安西热电站信息技术有限公司 一种将echarts扩展为html标准组件的方法
CN113703751A (zh) * 2021-11-01 2021-11-26 树根互联股份有限公司 工业指标组件的图形化生成方法、装置和电子设备
CN115526952A (zh) * 2022-05-17 2022-12-27 北京字跳网络技术有限公司 视图绘制方法、装置、电子设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103440127A (zh) * 2013-08-19 2013-12-11 中国电子科技集团公司第十五研究所 软件图形界面绘制方法和系统
CN103677777A (zh) * 2012-09-19 2014-03-26 腾讯科技(深圳)有限公司 调用应用程序组件的方法及装置
CN108228169A (zh) * 2017-12-08 2018-06-29 平安科技(深圳)有限公司 基于eCharts工具的图表制作方法、装置、设备及介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102070136B1 (ko) * 2013-05-03 2020-01-28 삼성전자주식회사 프리페치를 위한 캐시 제어 장치 및 그 캐시 제어 장치를 이용한 프리페치 방법
CN104636393A (zh) * 2013-11-13 2015-05-20 航天信息股份有限公司 基于用户自定义行为分析的自适应报表的构建方法
CN106055535B (zh) * 2016-06-02 2020-06-12 深圳市中润四方信息技术有限公司 一种图表生成方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677777A (zh) * 2012-09-19 2014-03-26 腾讯科技(深圳)有限公司 调用应用程序组件的方法及装置
CN103440127A (zh) * 2013-08-19 2013-12-11 中国电子科技集团公司第十五研究所 软件图形界面绘制方法和系统
CN108228169A (zh) * 2017-12-08 2018-06-29 平安科技(深圳)有限公司 基于eCharts工具的图表制作方法、装置、设备及介质

Also Published As

Publication number Publication date
CN109358851B (zh) 2021-08-31
CN109358851A (zh) 2019-02-19

Similar Documents

Publication Publication Date Title
WO2020015166A1 (zh) 图表组件的创建方法、装置及计算机可读存储介质
CN108228169B (zh) 基于eCharts工具的图表制作方法、装置、设备及介质
CN108228119B (zh) 基于hxml的打印方法、终端设备及存储介质
CN109445783B (zh) 由服务驱动的动态配置应用的构建方法及装置
US8949776B2 (en) Gateway consumption framework
US11132114B2 (en) Method and apparatus for generating customized visualization component
CN108874924B (zh) 搜索服务的创建方法、装置及计算机可读存储介质
CN109446218A (zh) Sql语句生成方法、装置及计算机可读存储介质
US20170357487A1 (en) Generation of an application from data
CN107656729B (zh) 列表视图的更新装置、方法及计算机可读存储介质
CN111090437A (zh) 应用部署方法、装置及计算机可读存储介质
US20210208854A1 (en) System and method for enhancing component based development models with auto-wiring
WO2020015170A1 (zh) 接口调用方法、装置及计算机可读存储介质
WO2020015191A1 (zh) 业务规则的发布管理方法、电子装置及可读存储介质
CN107679056B (zh) 生成sql语句的方法、电子装置及可读存储介质
WO2019071898A1 (zh) 电子装置、数据库查询脚本生成方法及存储介质
CN109814863A (zh) 一种请求返回数据的处理方法、装置、计算机设备及计算机存储介质
CN113535165A (zh) 界面生成方法、装置、电子设备及计算机可读存储介质
CN114385940A (zh) 一种数据可视化方法、装置、设备及介质
CN113050941A (zh) 前端页面生成方法、装置、设备及计算机可读存储介质
CN113031936A (zh) 一种自动搭建页面并即时发布的方法及系统
CN111177698A (zh) 门户系统的处理方法、装置及计算机设备
US11853727B2 (en) Group control and management among electronic devices
CN111400310A (zh) 基于审批链配置的数据监控方法、服务器及存储介质
CN113377346B (zh) 集成环境搭建方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18926870

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18926870

Country of ref document: EP

Kind code of ref document: A1