Visual chart operation method, device, electronic device and storage medium
By combining the echarts visual chart library with the Superset platform, the click-drill-down function of the chart of the data visualization platform is realized, which solves the problem of click-drill-down between chart levels in the existing technology and improves the user experience and application of the data visualization platform. Effect.
Patent Information
- Application Number
- CN202010814080.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-13
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2040-08-13
AI Technical Summary
Existing data visualization platforms such as Superset cannot implement the click-drill function between charts when viewing data charts with hierarchical relationships, resulting in poor effectiveness for users to view data charts between upper and lower levels.
By combining the echarts visual chart library with the Superset platform, the click-drill-down function of the chart is realized. The specific steps include obtaining the parent graphics from the visual chart library, displaying the parent graphics, and after detecting the trigger operation of the operable area, based on Graph information obtains the chart data of the child graph associated with the parent graph, and filters and displays the target data in the child graph.
When viewing chart data with a parent-child hierarchical relationship, you can enter the display interface of the child graph by operating the parent graph, which improves the experience of using the data visualization platform and enhances the application effect.
Smart Images

Figure CN111914017B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data visualization, and in particular to a visualization chart operation method, device, electronic device and storage medium. Background Art
[0002] Visualization is a technology that uses computer graphics and image processing technology to convert data into graphics or images and display them on the screen, and then perform interactive processing. The data visualization platform can analyze and process the collected data, and integrate it into graphics and reports to present to users. It is an important tool for people to understand and assist in decision-making of massive data in the information age.
[0003] Superset is a widely used data visualization platform that can analyze data and create visualization charts through a variety of visualization methods. However, when using this visualization platform to view hierarchical data charts, you cannot enter the chart display interface of the lower level after clicking the upper level picture, which makes the effect of viewing data charts between the upper and lower levels poor. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a visual chart operation method, device, electronic device and storage medium to realize a click-to-drill-down function between charts with hierarchical relationships.
[0005] In a first aspect, an embodiment of the present application provides a visualization chart operation method, which is applied to an electronic device, wherein the electronic device includes a data visualization platform and a visualization chart library, and a database is connected to the data visualization platform. The method includes:
[0006] Acquire at least one parent graphic from the visualization chart library, wherein the parent graphic includes graphic information and a plurality of operable areas;
[0007] Displaying the parent graph on the data visualization platform;
[0008] When a trigger operation on any operable area of the parent-level graphic is detected, chart data of a child-level graphic associated with the parent-level graphic is acquired according to the graphic information;
[0009] Filtering data corresponding to the operable area from the chart data of the sub-level graph as target data;
[0010] The target data is displayed in the data visualization platform through the sub-level graphics.
[0011] In an optional embodiment, the electronic device includes a database; the database is connected to the data visualization platform; and obtaining at least one parent graph from the visualization chart library includes:
[0012] Acquiring the data to be displayed from the database through a local script of the data visualization platform;
[0013] Performing parameter processing on the data to be displayed to obtain chart data of the parent graphic;
[0014] Updating the chart data of the parent graphic into the corresponding visualization file;
[0015] The visualization file is stored in a directory corresponding to the data visualization platform.
[0016] In an optional implementation manner, performing parameter processing on the data to be displayed to obtain the chart data of the parent graphic includes:
[0017] The parameters of the data to be displayed are adjusted according to the parameter specifications of the visualization chart library, wherein the parameter specifications include at least one of abscissa content, ordinate content, font size, font color, and character spacing.
[0018] In an optional implementation manner, filtering the data corresponding to the operable area from the chart data as target data includes:
[0019] Obtaining a screening condition for the operable area corresponding to the trigger operation;
[0020] According to the screening condition of the operable area, data corresponding to the operable area is screened from the chart data of the sub-level graph as target data.
[0021] In an optional embodiment, the method further comprises:
[0022] Load local chart data acquisition function;
[0023] Generate an access interface for acquiring chart data according to the chart data acquisition function;
[0024] When a trigger operation on any operable area of the parent graphic is detected, obtaining chart data of a child graphic associated with the parent graphic according to the graphic information includes:
[0025] When a trigger operation on any operable area is detected, an identifier of the child graphic is obtained according to the graphic information of the parent graphic;
[0026] The chart data corresponding to the identifier is obtained through the access interface.
[0027] In an optional implementation manner, the parent-level graphic further includes a non-operation area, and the method further includes:
[0028] After monitoring the triggering operation on the non-operation area in the parent graphic, the parent graphic continues to be displayed in the data visualization platform.
[0029] In a second aspect, an embodiment of the present application provides a visual chart operation device, which is applied to an electronic device, wherein the electronic device includes a data visualization platform and a visual chart library, and the device includes:
[0030] A graphics acquisition module, used to acquire at least one parent graphics from the visual chart library, wherein the parent graphics includes graphics information and multiple operable areas;
[0031] A parent-level graphic display module, used for displaying the parent-level graphic on the data visualization platform;
[0032] A chart data acquisition module, configured to acquire chart data of a child graphic associated with the parent graphic according to the graphic information after detecting a trigger operation on any operable area of the parent graphic;
[0033] A data filtering module, used for filtering data corresponding to the operable area from the chart data of the sub-level graphics as target data;
[0034] The target data display module is used to display the target data in the data visualization platform through the sub-level graphics.
[0035] In an optional embodiment, the electronic device includes a database; the database is connected to the data visualization platform; the graphic acquisition module is specifically used to:
[0036] Acquiring the data to be displayed from the database through a local script of the data visualization platform;
[0037] Performing parameter processing on the data to be displayed to obtain chart data of the parent graphic;
[0038] Updating the chart data of the parent graphic into the corresponding visualization file;
[0039] The visualization file is stored in a directory corresponding to the data visualization platform.
[0040] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the method steps of any of the aforementioned implementation methods.
[0041] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method steps of any of the aforementioned implementation modes.
[0042] The visualization chart operation method, device, electronic device and storage medium provided in the embodiments of the present application first obtain at least one parent graphic from a visualization chart library and display the parent graphic on a data visualization platform. When a trigger operation on any operable area of the parent graphic is detected, the chart data of the child graphic associated with the parent graphic is obtained according to the graphic information, and the target data corresponding to the operable area is filtered out from the chart data of the child graphic and displayed in the child graphic, so as to realize the chart operation function of the data visualization platform. When viewing chart data with a parent-child hierarchical relationship, the display interface of the child graphic can be entered by operating the parent graphic, thereby improving the user experience of the data visualization platform.
[0043] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 One of the flowcharts of the visual chart operation method provided in the embodiment of the present application;
[0046] Figure 2 An example diagram of a parent graph X of a data visualization platform provided in an embodiment of the present application;
[0047] Figure 3 An example diagram of a sub-level graph Y of a data visualization platform provided in an embodiment of the present application;
[0048] Figure 4 Provided in the embodiments of this application Figure 1 The sub-step flow chart of step S101 in FIG.
[0049] Figure 5 Provided in the embodiments of this application Figure 1 The sub-step flow chart of step S104 in FIG.
[0050] Figure 6 The second flowchart of the visual chart operation method provided in the embodiment of the present application;
[0051] Figure 7 Provided in the embodiments of this application Figure 1 The sub-step flow chart of step S103 in FIG.
[0052] Figure 8 A functional module diagram of a visual chart operation device provided in an embodiment of the present application;
[0053] Fig. 9 An architectural diagram of an electronic device provided in accordance with an embodiment of the present application.
[0054] Description of the main component symbols: 10-electronic device; 11-processor; 12-memory; 100-visual chart operation device; 101-graphic acquisition module; 102-parent graphic display module; 103-chart data acquisition module; 104-data screening module; 105-target data display module; 106-function loading module; 107-access interface generation module. DETAILED DESCRIPTION
[0055] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0056] The term "comprising" will be used in the embodiments of the present application to indicate the existence of the features claimed thereafter, but does not exclude the addition of other features.
[0057] First of all, it should be noted that Superset is a data visualization platform that integrates a large number of data display charts, but Superset does not support clicking on charts, that is, it is not possible to click on the data display chart, and it is not possible to view the next level of data display chart after clicking on the Superset data display chart.
[0058] After research, the inventor found that if the chart click drill-down function is to be implemented in the Superset platform (i.e., entering the next level of chart after clicking the original chart), it is necessary to integrate a visual chart library that supports clicks in the Superset platform.
[0059] In order to solve the above technical problems, the inventors combined the Superset platform with the echarts visualization chart library, and introduced the charts in the echarts chart library into the Superset platform to realize the drill-down function of each slice in the Superset platform. The following is a detailed description of the visualization chart drill-down method provided in the embodiment of the present application.
[0060] Please refer to Figure 1 , Figure 1 This is one of the flowcharts of the visualization chart drill-down method provided in the embodiment of the present application. In this embodiment, the method is applied to an electronic device 10, and the electronic device 10 includes a data visualization platform and a visualization chart library. The method includes:
[0061] Step S101, obtaining at least one parent graph from the visual graph library, wherein the parent graph includes graph information and a plurality of operable areas.
[0062] Step S102, displaying the parent graph on the data visualization platform.
[0063] Step S103, when a triggering operation on any operable area of the parent graphic is detected, chart data of the child graphic associated with the parent graphic is acquired according to the graphic information.
[0064] Step S104: Filter data corresponding to the operable area from the chart data of the sub-level graphics as target data.
[0065] Step S105, displaying the target data in the data visualization platform through sub-level graphics.
[0066] The embodiment of the present application obtains at least one parent graphic from a visualization chart library and displays the parent graphic on a data visualization platform, wherein the parent graphic includes graphic information and multiple operable areas.
[0067] The graphic information of the parent graphic may include the identification of the child graphic associated with it (for example, the graphic ID), so that after monitoring the triggering operation of any operable area of the parent graphic, the chart data of the child graphic can be obtained according to the identification information of the child graphic.
[0068] Then, the data corresponding to the operable area is filtered out from the acquired chart data of the sub-level graphic as the target data, and the target data is displayed in the sub-level graphic, thereby realizing the chart drill-down function of the data visualization platform, that is, when viewing chart data with a parent-child hierarchical relationship, operating (for example, clicking) the parent graphic can enter the display interface of the sub-level graphic, thereby improving the user experience of the data visualization platform.
[0069] Specifically, in the above steps, the parent graphic is first obtained from the visualization chart library as a slice of the data visualization platform, wherein a slice refers to a picture used to display the data to be displayed in the database. In the data visualization platform, a graphic used to display data is called a slice, and each slice includes corresponding slice information (i.e., graphic information), and each graphic information includes the slice ID of another slice to which the slice jumps after being operated (e.g., clicked). It can be understood that when any operable area of a slice (i.e., the parent graphic) triggers an operation (e.g., a click operation), the slice ID of another slice (i.e., the graphic ID of the child graphic associated with the parent graphic) included in the slice information of the slice (i.e., the graphic information of the parent graphic) jumps to the child graphic, and the corresponding data is displayed in the child graphic.
[0070] In addition, when any operable area of the parent graphic is clicked, the chart data of the child graphic associated with the parent graphic is obtained according to the graphic information corresponding to the clicked parent graphic, and the target data corresponding to the clicked operable area is filtered from the obtained chart data of the child graphic, and then jumps to the child graphic, and displays the filtered target data through the child graphic.
[0071] For example, if the graphic ID of the child graphic included in the graphic information of the parent graphic X is Y, then after clicking any operable area of the parent graphic X, the display will jump to the child graphic Y for display.
[0072] Specifically, Figure 2 As shown, the graphic information of the parent graphic X may also include the chart data of the parent graphic, for example, the number of employees in each of the three first-level departments A, B, and C in a company, where department A has 200 employees, department B has 50 employees, and department C has 90 employees. Figure 2 In the figure, the operable area of the parent graphic X is the bar charts corresponding to the three departments A, B, and C.
[0073] After clicking any operable area of the parent graphic X, jump to the associated child graphic Y, where the chart data included in the child graphic Y can be three second-level departments A1, A2, and A3 under department A, there is only one second-level department B1 under department B, and there are two second-level departments C1 and C2 under department C. Among them, A1 has 60 employees, A2 has 50 employees, A3 has 90 employees, B1 has 50 employees, C1 has 50 employees, and C2 has 40 employees.
[0074] In a specific click event, if the operable area of the bar chart corresponding to Department A in the parent graphic X is clicked, the process jumps to the child graphic Y, obtains the chart data in the child graphic Y, and then filters out the target data corresponding to the clicked operable area from the child graphic Y. Since the click is on the operable area of the bar chart corresponding to Department A in the parent graphic X, it is necessary to filter out the target data about Department A from the chart data of the child graphic Y, that is, the filtered target data is "the three secondary departments A1, A2, and A3 under Department A, A1 has 60 employees, A2 has 50 employees, and A3 has 90 employees".
[0075] Then jump to the sub-level graph Y and display the above filtered target data in the sub-level graph Y. For details, please refer to Figure 3 , Figure 3 That is, it is a schematic diagram after clicking the operable area where the column chart corresponding to the A department in the parent graphic X is located and jumping to the child graphic Y.
[0076] In another embodiment, when the parent graph is operated (eg, clicked), the displayed parent graph can be directly updated to the child graph on the data visualization platform without jumping. The specific implementation method can be selected as needed and is not specifically limited here.
[0077] In summary, through the above steps, a visualization chart library can be introduced into the data visualization platform. Through the click function supported by the visualization chart library, the graphic drill-down function of the data visualization platform is realized, which enhances the application effect of the data visualization platform when viewing hierarchical relationships.
[0078] It is worth noting that in this embodiment, the sub-level graphics described in the above steps can also have a next-level graphic associated with it, that is, after clicking the sub-level graphic, you can also jump to the next-level graphic. The specific method is the same as the above steps and will not be described in detail here.
[0079] Furthermore, the data visualization platform may include the Superset platform, and the visualization chart library may include Echarts. Echarts is an open source visualization chart library that integrates a large number of rich data display charts, and the visualization chart library also supports clicking on each graph.
[0080] Furthermore, in order to realize the graphic drill-down function of the data visualization platform, it is necessary to combine the visualization chart library with the data visualization platform. The following describes how to introduce various graphics of the visualization chart library into the data visualization platform.
[0081] Please refer to Figure 4 , Figure 4 Provided in the embodiments of this application Figure 1In this embodiment, the electronic device 10 includes a database, the database is connected to the data visualization platform, and step S101 includes the following sub-steps:
[0082] Sub-step S1011, obtaining the data to be displayed from the database through the local script of the data visualization platform.
[0083] Sub-step S1012, performing parameter processing on the data to be displayed to obtain the chart data of the parent graphic.
[0084] Sub-step S1013, updating the chart data of the parent graphic into the corresponding visualization file;
[0085] Sub-step S1014, storing the visualization file in a directory corresponding to the data visualization platform.
[0086] The above steps are further explained below in combination with the specific data visualization platform Superset and the visualization chart library Echarts.
[0087] In the above sub-steps, you first need to add a function to obtain chart data in Superset's local backend data processing script viz.py, namely the data acquisition function (get_data function). The Superset platform obtains the data to be displayed from the database through this data acquisition function, where the data to be displayed refers to the data that needs to be displayed through the parent graphic.
[0088] After obtaining the data to be displayed, parameter processing is performed on the data to be displayed to obtain chart data. Parameter processing is used to perform format adaptation processing on the data to be displayed, that is, to adapt the format of the data to be displayed to the source format of the visualization chart library Echarts to avoid subsequent errors.
[0089] Specifically, in this embodiment, the step of performing parameter processing on the data to be displayed may include:
[0090] Parameters of the data to be displayed are adjusted according to parameter specifications of the visualization chart library, wherein the parameter specifications include at least one of abscissa content, ordinate content, font size, font color, and character spacing.
[0091] After parameter processing of the data to be displayed is performed to obtain the chart data of the parent graphic, the chart data of the parent graphic and the chart data of the child graphic are stored in the visualization file js of the visualization chart library Echarts, and the visualization file js is stored in the directory visualizations corresponding to the data visualization platform Superset.
[0092] In the subsequent steps, the graphic information of each graphic in Superset (i.e., the parent graphic) can be obtained from the js file.
[0093] Further, in this embodiment, please refer to Figure 5 , Figure 5 The sub-step flow chart of step S104 provided in the embodiment of the present application. Wherein, step S104 includes:
[0094] Sub-step S1041, obtaining the screening condition of the operable area corresponding to the trigger operation.
[0095] Sub-step S1042, according to the screening condition of the operable area, filtering data corresponding to the operable area from the chart data of the sub-level graphics as target data.
[0096] In the above steps, when filtering target data from the chart data of the sub-level graphics, the filter box of the data visualization platform can be used to obtain the filter conditions corresponding to the trigger operation. For example, the filter condition can be to filter the data related to Department A (or Department B or Department C) from the chart data of the sub-level graphics, where the filter condition is associated with each operation event, that is, clicking different operable areas corresponds to different filter conditions.
[0097] After the filtering condition is obtained, the relevant target data is filtered out from the chart data of the sub-level graphics according to the filtering condition.
[0098] For further information, please refer to Figure 6 , Figure 6 This is a second flowchart of the visualization chart drill-down method provided in an embodiment of the present application. In this embodiment, the method further includes:
[0099] Step S106, loading the local chart data acquisition function.
[0100] Step S107: generating an access interface for acquiring chart data according to the chart data acquisition function.
[0101] In the specific implementation process, taking Superset as an example, the Superset script core.py has encapsulated the method of obtaining chart data (i.e., chart data acquisition function) according to the identifier of the child graphic. Therefore, when obtaining chart data (i.e., form_data), the chart data acquisition function can be directly loaded locally. However, since there is no corresponding access interface in Superset for obtaining chart data, an access interface needs to be added. Specifically, the chart data acquisition function can be encapsulated and a corresponding access route can be registered to obtain chart data.
[0102] Further, after implementing step S106 and step S107, please refer to Figure 7 , Figure 7 Provided in the embodiments of this application Figure 1 The sub-step flow chart of step S103 in FIG. Step S103 may specifically include:
[0103] Sub-step S1031, when a trigger operation on any operable area is detected, the identifier of the child graphic is obtained according to the graphic information of the parent graphic.
[0104] Sub-step S1032, obtaining the chart data corresponding to the identifier through an access interface.
[0105] In the specific implementation process, taking Superset as an example, after clicking the parent graphic X, the graphic identifier (i.e., Y) of the child graphic associated with the parent graphic X is obtained according to the graphic information of the parent graphic X, and then the chart data (i.e., form_data) corresponding to the child graphic Y is obtained through the set access interface (e.g., http: / / ip:port / superset / query_form_data / slice_id / ).
[0106] After obtaining the form_data data, you can proceed to the subsequent steps, that is, filter out the target data and display the filtered target data in the sub-level graph Y.
[0107] Furthermore, the visualization chart operation method may further include: setting a jump_to_slice_id and slice_id key-value pair in the graphic information of the parent graphic, wherein slice_id is the graphic ID of the child graphic associated with the parent graphic.
[0108] In the specific implementation steps, when Superset is used alone as a data visualization platform, since it does not have a click function, the graphic information of the parent graphic does not contain information such as the identification information of the child graphic to be jumped to. Therefore, it is necessary to add relevant information to the graphic information of each parent graphic.
[0109] Specifically, the graphic information of each parent graphic is edited, and a key-value pair of "jump_to_slice_id" and "slice_id" is set in the parameters of the graphic information of each parent graphic, wherein slice_id is the graphic ID of the child graphic associated with the parent graphic.
[0110] For example, setting the key-value pair of "jump_to_slice_id" and "Y" in the parameters of the graphic information of the parent graphic X means that the user jumps to the child graphic Y after clicking the parent graphic X.
[0111] Furthermore, in this embodiment, the parent graph also includes a non-operation area, and the visualization graph operation method further includes:
[0112] After monitoring the trigger operation on the non-operation area in the parent graphic, the parent graphic continues to be displayed in the data visualization platform.
[0113] In the specific implementation process, the parent graphic includes a non-operation area in addition to the operable area. The non-operation area cannot be operated. Even if the non-operation area is operated, it will not jump to another graphic for display, that is, the data visualization platform continues to display the parent graphic.
[0114] In summary, by obtaining the parent graphic in the visualization chart library (such as Echarts) as the display graphic of the data visualization platform (such as Superset), after monitoring the trigger operation on any operable area of the parent graphic, you can jump to the child graphic through the graphic ID of the child graphic in the graphic information of the parent graphic, and filter out the target data from the chart data of the child graphic according to the operable area, and display it in the child graphic to realize the chart drill-down function of the data visualization platform, that is, when viewing chart data with a parent-child hierarchical relationship, click the parent graphic to enter the display interface of the child graphic, which enhances the application effect of the data visualization platform when viewing chart data with a hierarchical relationship and improves the user experience of the data visualization platform.
[0115] Based on the same inventive concept, a visualization chart operation device 100 corresponding to the visualization chart operation method is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned visualization chart drill-down method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0116] Please refer to Figure 8 , Figure 8 This is a functional module diagram of a visualization chart operation device 100 provided in an embodiment of the present application. In this embodiment, the device is applied to an electronic device 10, which includes a data visualization platform and a visualization chart library. The device includes: a graphics acquisition module 101, a parent graphics display module 102, a chart data acquisition module 103, a data screening module 104, and a target data display module 105.
[0117] The graphic acquisition module 101 is used to acquire at least one parent graphic from a visualization chart library, wherein the parent graphic includes graphic information and multiple operable areas.
[0118] The parent graph display module 102 is used to display the parent graph on the data visualization platform.
[0119] The chart data acquisition module 103 is used to acquire the chart data of the child graphics associated with the parent graphics according to the graphics information after detecting a trigger operation on any operable area of the parent graphics.
[0120] The data filtering module 104 is used to filter the data corresponding to the operable area from the chart data of the sub-level graphics as target data.
[0121] The target data display module 105 is used to display the target data in the data visualization platform through the sub-level graphics.
[0122] Furthermore, in this embodiment, the electronic device 10 includes a database; the database is connected to the data visualization platform, and the graphic acquisition module 101 is specifically used for:
[0123] Acquiring the data to be displayed from the database through a local script of the data visualization platform;
[0124] Performing parameter processing on the data to be displayed to obtain chart data of the parent graphic;
[0125] Updating the chart data of the parent graphic into the corresponding visualization file;
[0126] The visualization file is stored in a directory corresponding to the data visualization platform.
[0127] Furthermore, in this embodiment, parameter processing is performed on the data to be displayed to obtain the chart data of the parent graphic, which specifically includes:
[0128] The parameters of the data to be displayed are adjusted according to the parameter specifications of the visualization chart library, wherein the parameter specifications include at least one of abscissa content, ordinate content, font size, font color, and character spacing.
[0129] Furthermore, in this embodiment, the data screening module 104 is specifically used for:
[0130] Obtaining a screening condition for the operable area corresponding to the trigger operation;
[0131] According to the screening condition of the operable area, data corresponding to the operable area is screened from the chart data of the sub-level graph as target data.
[0132] For further information, please refer to Figure 8 In this embodiment, the visualization chart operation device 100 further includes:
[0133] The function loading module 106 is used to load the local chart data acquisition function.
[0134] The access interface generation module 107 is used to generate an access interface for acquiring chart data according to the chart data acquisition function.
[0135] Specifically, in this embodiment, the chart data acquisition module 103 is specifically used to: when a trigger operation on any operable area is detected, obtain the identifier of the child graphic according to the graphic information of the parent graphic; and obtain the chart data corresponding to the identifier through the access interface.
[0136] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0137] The present application embodiment also provides an electronic device 10, such as Fig. 9 As shown, it is a schematic diagram of the structure of an electronic device 10 provided in an embodiment of the present application, including: a processor 11 and a memory 12. The memory 12 stores a computer program executable by the processor 11. When the electronic device 10 is running, the computer program is executed by the processor 11 to perform the visualization chart operation method provided in the above embodiment.
[0138] An embodiment of the present application also provides a storage medium on which a computer program is stored. When the computer program is executed by the processor 11, the visualization chart operation method provided in the above embodiment is implemented.
[0139] In some embodiments, the processor 11 may include one or more processing cores (e.g., a single-core processor 11(S) or a multi-core processor 11(S)). By way of example only, the processor 11 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), an application specific instruction set processor 11 (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor 11 (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a controller, a microcontroller unit, a reduced instruction set computer (RISC), or a microprocessor 11, or any combination thereof.
[0140] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the electronic device 10 and the device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed electronic device 10, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0141] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0142] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0143] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium that can be executed by a processor 11. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0144] In addition, the functional units in the various embodiments of the present application can be integrated into one. In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described in combination with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application are only for the purpose of illustration and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate the operations implemented according to some embodiments of the present application.
[0145] It should be understood that the operations of the flow chart may not be implemented in order, and steps without logical contextual relationships may be reversed in order or implemented simultaneously. In addition, those skilled in the art may add one or more other operations to the flow chart, or may remove one or more operations from the flow chart under the guidance of the content of this application.
[0146] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
Claims
1. A visual chart operation method, characterized in that: Applied to an electronic device, the electronic device includes a data visualization platform and a visualization chart library, and the method includes: Acquire at least one parent graphic from the visualization chart library, wherein the parent graphic includes graphic information and multiple operable areas, the graphic information includes an identifier of a child graphic associated with the parent graphic, the operable area is located in a picture area of the parent graphic, and different operable areas are associated with different child graphics; Displaying the parent graph on the data visualization platform; Load local chart data acquisition function; Generate an access interface for acquiring chart data according to the chart data acquisition function; When a trigger operation on any operable area of the parent graphic is detected, chart data of a child graphic associated with the parent graphic is obtained according to the graphic information, including: when a trigger operation on any operable area is detected, an identifier of the child graphic is obtained according to the graphic information of the parent graphic, and chart data corresponding to the identifier is obtained through the access interface; Filtering data corresponding to the operable area from the chart data of the sub-level graph as target data; The target data is displayed in the data visualization platform through the sub-level graphics.
2. The method according to claim 1, characterized in that The electronic device includes a database; the database is connected to the data visualization platform; Acquiring at least one parent graphic from the visualization chart library includes: Acquiring the data to be displayed from the database through a local script of the data visualization platform; Performing parameter processing on the data to be displayed to obtain chart data of the parent graphic; Updating the chart data of the parent graphic into the corresponding visualization file; The visualization file is stored in a directory corresponding to the data visualization platform.
3. The method according to claim 2, characterized in that Parameter processing is performed on the data to be displayed to obtain the chart data of the parent graph, including: The parameters of the data to be displayed are adjusted according to the parameter specifications of the visualization chart library, wherein the parameter specifications include at least one of abscissa content, ordinate content, font size, font color, and character spacing.
4. The method according to claim 1, characterized in that The step of filtering the data corresponding to the operable area from the chart data as target data includes: Obtaining a screening condition for the operable area corresponding to the trigger operation; According to the screening condition of the operable area, data corresponding to the operable area is screened from the chart data of the sub-level graph as target data.
5. The method according to claim 1, characterized in that The parent graph also includes a non-operation area, and the method further includes: After monitoring the triggering operation on the non-operation area in the parent graphic, the parent graphic continues to be displayed in the data visualization platform.
6. A visual chart operation device, characterized in that: Applied to electronic equipment, the electronic equipment includes a data visualization platform and a visualization chart library, and the device includes: A graphics acquisition module, configured to acquire at least one parent graphics from the visualization chart library, wherein the parent graphics includes graphics information and multiple operable areas, the graphics information includes an identifier of a child graphics associated with the parent graphics, the operable area is located in a picture area of the parent graphics, and different operable areas are associated with different child graphics; A parent-level graphic display module, used for displaying the parent-level graphic on the data visualization platform; Function loading module, used to load local chart data acquisition function; An access interface generation module, used to generate an access interface for acquiring chart data according to the chart data acquisition function; A chart data acquisition module, used for acquiring chart data of a child-level graphic associated with the parent-level graphic according to the graphic information after a trigger operation on any operable area of the parent-level graphic is detected, comprising: acquiring an identifier of the child-level graphic according to the graphic information of the parent-level graphic after a trigger operation on any operable area is detected, and acquiring chart data corresponding to the identifier through the access interface; A data filtering module, used for filtering data corresponding to the operable area from the chart data of the sub-level graphics as target data; The target data display module is used to display the target data in the data visualization platform through the sub-level graphics.
7. The device according to claim 6, characterized in that The electronic device includes a database; the database is connected to the data visualization platform; the graphic acquisition module is specifically used for: Acquiring the data to be displayed from the database through a local script of the data visualization platform; Performing parameter processing on the data to be displayed to obtain chart data of the parent graphic; Updating the chart data of the parent graphic into the corresponding visualization file; The visualization file is stored in a directory corresponding to the data visualization platform.
8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Chart dynamic display method and apparatus, computer apparatus, and storage medium
CN109388791A
Linkage display method and device between components in a chart
CN109582403A
Automatic generation of hierarchy visualizations
US20140085307A1
Secure isolation of scripting from native graphic rendering of animated data visualizations
US20170076091A1
Implementing interactive hierarachical chart legend data display
US20190213762A1
