CN116974437A - Graph display method, device, computer equipment and storage medium - Google Patents

Graph display method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116974437A
CN116974437A CN202310868391.8A CN202310868391A CN116974437A CN 116974437 A CN116974437 A CN 116974437A CN 202310868391 A CN202310868391 A CN 202310868391A CN 116974437 A CN116974437 A CN 116974437A
Authority
CN
China
Prior art keywords
attribute
displayed
chart
target data
attributes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310868391.8A
Other languages
Chinese (zh)
Inventor
付勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Great Wall Motor Co Ltd
Original Assignee
Great Wall Motor Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Great Wall Motor Co Ltd filed Critical Great Wall Motor Co Ltd
Priority to CN202310868391.8A priority Critical patent/CN116974437A/en
Publication of CN116974437A publication Critical patent/CN116974437A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a chart display method, a chart display device, computer equipment and a storage medium, wherein the method comprises the following steps: displaying a chart and attribute options of multiple dimensions; determining an attribute to be displayed of each dimension selected by the attribute selection item in the plurality of attributes of the object to be displayed, in the event that the plurality of attributes of the object to be displayed are added to the attribute selection item; the attribute to be displayed is sent to the server, so that the server inquires and returns target data corresponding to the attribute to be displayed; target data corresponding to the attribute to be displayed is displayed in the graph. The method can realize the data showing attribute combinations of any dimension in one chart.

Description

Graph display method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technology, and more particularly, to a graph display method, apparatus, computer device, and storage medium in the field of computer technology.
Background
The management platform generally performs data analysis of different dimensions on data of some object models, and can display a relationship between attributes of two dimensions represented by x and y axes through two-dimensional chart visualization, such as two-dimensional chart data analysis between a creator of a BUG (BUG) management model and priorities. When the attribute information of a certain object model is particularly large, the combination of the two-dimensional charts can reach hundreds of combinations, and the client interactive display and the server data processing related to different combinations are different. Thus, when the attribute information of a certain object model is particularly large, visualizing the two-dimensional graph of the attribute information may cause implementation codes of the client and the server to become heavy and redundant, and the subsequent maintenance is not easy.
Disclosure of Invention
The application provides a chart display method, a chart display device, computer equipment and a storage medium.
In a first aspect, there is provided a graph display method including:
displaying a chart and attribute options of multiple dimensions;
determining an attribute to be displayed of each dimension selected by the attribute selection item in the plurality of attributes of the object to be displayed, in the event that the plurality of attributes of the object to be displayed are added to the attribute selection item;
the attribute to be displayed is sent to the server, so that the server inquires and returns target data corresponding to the attribute to be displayed;
target data corresponding to the attribute to be displayed is displayed in the graph.
In the technical scheme, the attribute to be displayed in each dimension is selected from the plurality of attributes through the attribute selection item in each dimension, the attribute to be displayed is sent to the server, target data returned by the server is received, and the target data is displayed in the chart. The attribute to be displayed in each dimension can be an attribute combination obtained by combining any several attributes in the plurality of attributes, so that the data of the attribute combination in any dimension can be displayed in one chart only by selecting the attribute to be displayed in each dimension in the attribute selection items in each dimension. In this way, the client code may be simplified.
With reference to the first aspect, in some possible implementations, in a case where a plurality of attributes of an object to be displayed are not added in the attribute selection item, the method further includes:
generating a configuration file according to a plurality of attributes of the object to be displayed;
and adding each attribute into the attribute selection item of each dimension according to the arrangement sequence of each attribute in the configuration file.
With reference to the first aspect and the foregoing implementation manner, in some possible implementation manners, the method further includes:
when receiving the new attribute of the object to be displayed, adding the new attribute into the attribute selection items of each dimension.
With reference to the first aspect and the foregoing implementation manner, in some possible implementation manners, the configuration file includes an identifier of whether each attribute can be directly displayed back, and displaying, in a chart, target data corresponding to the attribute to be displayed includes:
determining whether the attribute to be displayed can be directly displayed back according to the identification of whether each attribute can be directly displayed back;
if the attribute to be displayed can be directly displayed back, displaying target data corresponding to the attribute to be displayed in the chart;
and if the attribute to be displayed cannot be directly displayed back, processing the target data, and displaying the processed target data in the chart.
With reference to the first aspect and the foregoing implementation manner, in some possible implementation manners, the configuration file further includes a data source identifier of an attribute that cannot be directly displayed back, and the processing the target data includes:
determining a data source corresponding to the attribute to be displayed according to the data source identifier of the attribute to be displayed;
and replacing the target data corresponding to the attribute to be displayed according to the data source.
With reference to the first aspect and the foregoing implementation manner, in some possible implementation manners, the configuration file includes each attribute and a field name of each attribute, and the sending the attribute to be displayed to the server, so that the server queries and returns target data corresponding to the attribute to be displayed, including:
determining a field name of the attribute to be displayed according to the configuration file;
and sending the field names of the attributes to be displayed to the server so that the server queries and returns the target data corresponding to the field names of the attributes to be displayed.
With reference to the first aspect and the foregoing implementation manner, in some possible implementation manners, displaying the target data in the graph includes:
according to the number of information items of the attribute to be displayed and the width of the chart, adjusting the display width of a display area for displaying the attribute to be displayed in the chart;
And when the number of the information items of the attribute to be displayed is larger than the preset number, generating a sliding control to display the attribute to be displayed in a sliding mode through the sliding control.
In a second aspect, there is provided a graphic display apparatus comprising:
the first display module is used for displaying the chart and attribute selection items of multiple dimensions;
a determining module, configured to determine, in a case where a plurality of attributes of an object to be displayed are added to the attribute selection item, an attribute to be displayed of each dimension selected among the plurality of attributes by the attribute selection item;
the sending module is used for sending the attribute to be displayed to the server so that the server inquires and returns target data corresponding to the attribute to be displayed;
and the second display module is used for displaying target data corresponding to the attribute to be displayed in the chart.
With reference to the second aspect, in some possible implementations, in a case where a plurality of attributes of an object to be displayed are not added in the attribute selection item, the apparatus further includes:
the generating module is used for generating a configuration file according to a plurality of attributes of the object to be displayed;
the first adding module is used for adding the attributes in the attribute selection items of the dimensions according to the arrangement sequence of the attributes in the configuration file.
With reference to the second aspect and the foregoing implementation manner, in some possible implementation manners, the apparatus further includes:
and the second adding module is used for adding the newly added attribute into the attribute selection items of each dimension when receiving the newly added attribute of the object to be displayed.
With reference to the second aspect and the foregoing implementation manner, in some possible implementation manners, the configuration file includes an identifier of whether each attribute can be directly displayed back, and the second display module includes:
the determining unit is used for determining whether the attribute to be displayed can be directly displayed back according to the identification of whether each attribute can be directly displayed back;
the display unit is used for displaying target data corresponding to the attribute to be displayed in the chart if the attribute to be displayed is determined to be capable of being directly displayed back;
and the processing unit is used for processing the target data and displaying the processed target data in the chart if the attribute to be displayed cannot be directly displayed back.
With reference to the second aspect and the foregoing implementation manner, in some possible implementation manners, the configuration file further includes a data source identifier of an attribute that cannot be directly replayed, and the processing unit is further configured to:
determining a data source corresponding to the attribute to be displayed according to the data source identifier of the attribute to be displayed;
And replacing the target data corresponding to the attribute to be displayed according to the data source.
With reference to the second aspect and the foregoing implementation manner, in some possible implementation manners, the configuration file includes each attribute and a field name of each attribute, and the sending module is further configured to:
determining a field name of the attribute to be displayed according to the configuration file;
and sending the field names of the attributes to be displayed to the server so that the server queries and returns the target data corresponding to the field names of the attributes to be displayed.
With reference to the second aspect and the foregoing implementation manner, in some possible implementation manners, the second display module is further configured to:
according to the number of information items of the attribute to be displayed and the width of the chart, adjusting the display width of a display area for displaying the attribute to be displayed in the chart;
and when the number of the information items of the attribute to be displayed is larger than the preset number, generating a sliding control to display the attribute to be displayed in a sliding mode through the sliding control.
In a third aspect, a computer device is provided that includes a memory and a processor. The memory is for storing executable program code and the processor is for calling and running the executable program code from the memory to cause the computer device to perform the method of the first aspect or any one of the possible implementation manners of the first aspect.
In a fourth aspect, there is provided a computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method of the first aspect or any one of the possible implementations of the first aspect.
In a fifth aspect, a computer readable storage medium is provided, the computer readable storage medium storing computer program code which, when run on a computer, causes the computer to perform the method of the first aspect or any one of the possible implementations of the first aspect.
Drawings
FIG. 1 is a schematic flow chart of a schematic diagram display method according to an embodiment of the present application;
FIG. 2 is a schematic illustration of a graph provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of a configuration file provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of a display diagram provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of another display diagram provided by an embodiment of the present application;
FIG. 6 is a schematic flow chart diagram of another graphical display method provided by an embodiment of the present application;
fig. 7 is a schematic structural diagram of a schematic diagram display device according to an embodiment of the present application;
Fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical scheme of the application will be clearly and thoroughly described below with reference to the accompanying drawings. Wherein, in the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B: the text "and/or" is merely an association relation describing the associated object, and indicates that three relations may exist, for example, a and/or B may indicate: the three cases where a exists alone, a and B exist together, and B exists alone, and furthermore, in the description of the embodiments of the present application, "plural" means two or more than two.
The terms "first," "second," and the like, are used below for descriptive purposes only and are not to be construed as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature.
Before explaining the chart display method provided by the embodiment of the application in detail, an application scene of the embodiment of the application is introduced.
In the process of internal management platform, data analysis of different dimensions is usually performed on some object model data through graphs, such as a user executing a case management model and a number of cases executing month, which are two-dimensional graph data analysis, i.e. a two-dimensional graph can only represent the relationship between attributes in two dimensions. When the attribute information of a certain object model is particularly large, for example, the certain object model has 10 attributes, the data of different dimensions are visualizedIn this combination, the code for the client to display and the server to process the data becomes burdensome and redundant, and is not easy to maintain later.
The client may also be referred to as a "front end," which refers to the development of interfaces visible to a user, such as special effects, layout, pictures, video, audio, and other content on a web page. The client is mainly used for designing an effect diagram of the art designer into a webpage which can be operated by a browser and matching with a server to make visual contents such as data display and interaction of the webpage. The client is therefore primarily used for display.
The server may also be referred to as a "backend," which refers to a development of a server that is inaccessible to a series of users, such as processing information, storing data, etc. The server side generally performs data interaction with the client side and stores and reads website data, so that the server side is mainly used for processing the data.
And for the object model, the number of permutation and combination modes is increased on the original basis when one attribute information is added, for example, on the basis that the object model has 10 attributes, one attribute is added, namely, 11 attributes are added, and the number of the newly added combinations is thatThe code of the client and the server can be increased greatly. Thus, there is a need for a method of chart visualization that enables combinations of different dimensions.
Based on the above problems, the embodiment of the application provides a graph display method, which is suitable for data visualization of object model attribute information, and has the advantages of easy maintenance, strong expansibility and strong portability.
Referring to fig. 1, fig. 1 is a schematic flowchart of a graph display method according to an embodiment of the application, where the method is applied to a client of a computer. Illustratively, as shown in FIG. 1, the method includes the following steps.
Step 101: the chart and attribute selections of multiple dimensions are displayed.
The client can generate an initialized chart and attribute options of multiple dimensions on the target page, and set formats such as width, height and the like of the initialized chart. By way of example, the chart may include a bar chart, a line chart, a pie chart, a scatter chart, and the like. The attribute selection item is used to select an attribute to be displayed in a corresponding dimension of the chart. When the chart is a two-dimensional chart, two-dimensional attribute options are used for selecting the attributes respectively represented by the x-axis and the y-axis of the two-dimensional chart, namely two attribute options exist, one attribute option is used for selecting the attribute represented by the x-axis, and the other attribute option is used for selecting the attribute represented by the y-axis. When the chart is a three-dimensional chart, three-dimensional attribute options are used for selecting the attribute respectively represented by the x, y and z axes of the three-dimensional chart, namely three attribute options exist, one attribute option is used for selecting the attribute represented by the x axis, one attribute option is used for selecting the attribute represented by the y axis, and the other attribute option is used for selecting the attribute represented by the z axis.
Fig. 2 is a schematic diagram of a chart provided by an embodiment of the present application. As shown in fig. 2, the graph is a two-dimensional graph, and an attribute selection item may be exemplarily disposed as a header at an upper position of the graph, which is a "two-dimensional graph with x-axis and y-axis of" x-x ", which represents an attribute of an object to be displayed" in fig. 2. Each attribute in the attribute selection item is an attribute of an object to be displayed. Wherein the object to be displayed is an entity with various attributes, which may be a person, a car, etc., for example.
After generating the chart and the attribute selections of the plurality of dimensions, in some embodiments, the client may generate a configuration file according to the plurality of attributes of the object to be displayed; and adding each attribute in the attribute selection item according to the arrangement sequence of each attribute in the configuration file.
The method comprises the steps that a plurality of attributes of an object to be displayed can be carried in user requirements, a client obtains the user requirements to obtain a plurality of attribute information of the object to be displayed, and attribute information fields of the object to be displayed are used for generating a configuration file according to a user-defined data format. For example, the custom data format may be json format, or may be another data format, such as scv format, which is not limited in the embodiment of the present application.
Therefore, the configuration file includes all the attributes of the object to be displayed, each attribute is arranged according to a certain sequence, the client can add each attribute in the attribute selection item, the arrangement sequence of each attribute in the attribute selection item is the arrangement sequence of each attribute in the configuration file, as shown in fig. 2, a plurality of attributes of the object to be displayed are added in both attribute selection items, the plurality of attributes include priority, manager, creator and affiliated environment, fig. 2 is only illustrated by four attribute examples, and in fact, more attributes can be displayed through a drop-down box in the attribute selection item. The property to be displayed may be selected from the plurality of properties by the property selection item thereafter.
The arrangement order of the attributes in the configuration file may be preset, for example, the arrangement may be according to the initial order of the attributes, or the arrangement may be according to the order of the attributes in the requirements, which is not limited in this embodiment of the present application.
In addition, if the object to be displayed has an additional attribute information field so that the additional attribute can be displayed later, the client may add the additional attribute to the attribute selection item. Therefore, when the newly added attribute of the object to be displayed is received, the newly added attribute is added in the attribute selection item. Specifically, configuration information of the newly added attribute may be added to the configuration file, and then the newly added attribute is sequentially added to the attribute selection item.
In general, a field of certain attribute information in the configuration file includes a chinese field name, an english field name, a data table field name, and a basic template information field of an identification field that can be directly displayed back. The Chinese field name (name) represents the Chinese name of the attribute, the English field name (key) represents the English name of the attribute, the field name (retDataKey) of the data table indicates whether the attribute can be directly displayed in the chart of the target page or not, the field identifier may include "true" and "false", the true "indicates that the attribute can be directly displayed back, and the false indicates that the attribute cannot be directly displayed back. When the client generates the configuration file, the naming rule of the attribute field can be preset, for example, a hump rule, an abbreviation rule and the like are used, the hump rule is the first letter of a first word and the first letters of a second word and later are uppercase, for example, dataKey, displayName.
In some cases, the direct display of some attribute information in the client diagram tends to expose privacy, such as user name, and thus may be displayed in other forms, such as a nickname instead of the user's real name. For example, it may be understood that the "name" attribute includes a real name of each of the plurality of users, and when the client displays the attribute information, it determines whether the real name of each user can be directly displayed back according to the isDirectDisplay field in the configuration file. If the real name of each user cannot be displayed directly, the nickname of each user may be displayed, replacing the real name of the corresponding user with the nickname of each user. Wherein each user's nickname and real name may be associated by a primary key.
Therefore, if the identification field which can be directly displayed back in the basic template information field of a certain attribute information indicates that the attribute cannot be directly displayed back, the basic template field information can also comprise a data source field identification, a field identification of a data source for displaying back, and a data mapping field identification. The data source identifier (dataSource) represents the table name of the attribute data source, the field identifier (dataName) of the data source for the callback represents the field name of the callback data corresponding to the attribute in the data source, and the data mapping field identifier (dataKey) represents the identifier associated between the data table of the attribute and the data source. Wherein the data mapping field identifies a primary key in general.
Fig. 3 is a schematic diagram of a configuration file provided by an embodiment of the present application, where the configuration file includes only field entries of an attribute "creator", and the naming rule in fig. 3 is a hump rule. As shown in fig. 3, the chinese field name (name) is the creator, the english field name (key) is the createiser, the datakey field name (retDataKey) is the create_user, and the field identifier (isDirectDisplay) that can be directly displayed back is false. That is, the creator field cannot be directly back-displayed, and thus, the configuration file further includes a data source identifier (dataSource), a field identifier (dataName) for the back-display of the data source, and a data mapping field identifier (dataKey). Wherein dataSource is userList, dataName is displayName, and dataKey is uid. It can be understood that: the create_user is one data table, the userList is the other data table, the two data tables are associated through a main key uid, the information item under the creator field cannot be directly displayed back, and the information item under the displayName field in the userList data table can be used for replacing display. Therefore, the subsequent client can determine whether the attribute to be displayed can be directly displayed back according to the configuration file, and process and display the data returned by the server when the attribute to be displayed cannot be directly displayed back.
Step 102: in the case where a plurality of attributes of the object to be displayed are added to the attribute selection item, the attribute to be displayed of each dimension selected by the attribute selection item among the plurality of attributes is determined.
Because the attribute selection items are added with the plurality of attributes of the object to be displayed, the client side developer can directly select the attribute to be displayed from the plurality of attributes through the attribute selection items, and the client side can determine the attribute to be displayed based on the operation of the client side developer. So that target data corresponding to the attribute to be displayed is queried and returned later according to the attribute to be displayed.
For example, if the chart is a two-dimensional icon, the client developer may select, through an attribute selection item, an attribute represented by the x-axis and an attribute represented by the y-axis from a plurality of attributes, that is, determine an attribute to be displayed on the x-axis and the y-axis, and represent an attribute to be displayed on the x-axis through xKEY and yKEY represent an attribute to be displayed on the y-axis.
Step 103: and sending the attribute to be displayed to the server so that the server inquires and returns target data corresponding to the attribute to be displayed.
After receiving the attribute to be displayed, the client sends the attribute to be displayed to the server, and the server inquires according to the attribute to be displayed and returns target data corresponding to the attribute to be displayed.
In some embodiments, the implementation of step 103 may be: when the attribute to be displayed is received, determining the field name of the attribute to be displayed according to the configuration file; and sending the field names of the attributes to be displayed to the server so that the server queries and returns the target data corresponding to the field names of the attributes to be displayed.
Typically, after the user requirement is obtained, the server abstracts the object model according to the user requirement. User requirements refer to certain requirements and problems that the user puts on the product from its own perspective, or what experience and functionality he wishes to obtain. The information in the general demands is disordered, not classified and cannot be directly used, and the demands are further abstracted by classification. While an object model is an abstract model built for describing and handling entities, things or concepts in the real world, it is generally composed of elements such as objects, attributes, etc. for describing relationships between entities. For example, the object model is a model of a certain plant material management, and the entities and attributes related to the material management include: the entities may include warehouses, parts, suppliers, employees, etc., with warehouse attributes including: warehouse number, area, etc., part attributes include: part number, name, specification, unit price, etc., vendor attributes include: vendor number, name, address, telephone number, etc., employee attributes include: job number, name, age, title, etc. The links between the entities are: 1. one warehouse may store a variety of parts and one part may be stored in a plurality of warehouses, so the warehouse and parts may be in a many-to-many relationship. 2. A warehouse may have multiple employees as a warehouse custodian and a worker may work in a warehouse, thus a one-to-many relationship may be established between the warehouse and the worker. 3. The staff members have a relationship between the leaders and the leaders, so that the staff members can have one-to-many connection. 4. There may be many-to-many connections between suppliers and parts, i.e., one supplier may supply multiple parts, each of which may be supplied by a different supplier.
The object in the object model is the object to be displayed, and an object data table is generated according to a plurality of attribute information fields of the object to be displayed, wherein each attribute in the object data table is an English field name. The object data table may be used for a server to query target data corresponding to an attribute to be displayed. In addition, in order to facilitate the understanding and operation of the user, each attribute added in the attribute selection item of the client is a Chinese field name, that is, the attribute to be displayed selected by the client developer is a Chinese field name. Therefore, after the client developer selects the attribute to be displayed, the client can determine the english field name of the attribute to be displayed according to the configuration file, and send the english field name of the attribute to be displayed to the server, so that the server queries and returns the target data corresponding to the attribute to be displayed in the object data table according to the english field name of the attribute to be displayed. For example, the server may group queries by sql statements.
As an example, where a client developer selects an attribute of the x-axis display as creator and an attribute of the y-axis display as priority, the client may generate the parameter { "xKey": "createUser", "yKey": "priority" }, and send the parameter to the server, the server receives the parameter, and generates a "SELECT COUNT (ID), create_user, priority FROM XXXXX GROUP BY create _user, priority" sql statement. Where ID is the primary key, XXXXX represents the name of the data table, and this statement indicates that the data in the data table XXXXX is grouped according to both creator and priority fields and the data within each group is counted.
After obtaining the target data corresponding to the attribute to be displayed through the sql statement query, the server side sends the target data corresponding to the attribute to be displayed to the client side, so that the client side displays the target data corresponding to the attribute to be displayed in the chart.
Step 104: target data corresponding to the attribute to be displayed is displayed in the graph.
Specifically, when receiving the target data corresponding to the attribute to be displayed, the client may directly display the target data corresponding to the attribute to be displayed on the graph.
As described in step 101 above, some attribute information may not be displayed directly in the chart, and may need to be displayed in other forms instead. Thus, in some embodiments, the implementation of step 104 may be: determining whether the attribute to be displayed can be directly displayed back according to the identification of whether each attribute can be directly displayed back; if the attribute to be displayed can be directly displayed back, displaying target data corresponding to the attribute to be displayed in the chart; and if the attribute to be displayed cannot be directly displayed back, processing the target data, and displaying the processed target data in the chart.
Based on the above description, some attributes may not be directly displayed in the client diagram and need to be displayed in other forms, so after the client receives the target data corresponding to the attribute to be displayed returned by the server, whether the attribute to be displayed can be directly displayed in a back-to-back manner can be determined according to the field identifier (isDirectDisplay) of whether each attribute in the configuration file can be directly displayed in a back-to-back manner. And under the condition that the attribute to be displayed can be directly displayed back, the target data corresponding to the attribute to be displayed is directly displayed in the chart.
In general, when a client corresponds to a plurality of servers and the client obtains target data corresponding to an attribute to be displayed returned by the servers, if it is determined that the attribute to be displayed cannot be directly displayed back according to the configuration file, the client may need to obtain data capable of being displayed instead of the attribute to be displayed from other servers, that is, in this case, the client may need to interact with the plurality of servers to obtain data, which may affect the graph display efficiency. Therefore, in the embodiment of the application, under the condition that the attribute to be displayed cannot be directly displayed back, the client can directly process and display the target data corresponding to the attribute to be displayed, interaction with the server is not needed, convenience and rapidness are realized, and the graph display efficiency can be improved.
Based on this, for example, the implementation procedure of the client processing the target data may be: determining a data source corresponding to the attribute to be displayed according to the data source identifier of the attribute to be displayed; and replacing the target data corresponding to the attribute to be displayed according to the data source.
When the client generates the configuration file, if some attributes in the configuration file cannot be directly displayed back, the client can acquire information items for replacing the attributes which cannot be directly displayed back from other servers in advance to generate a data source table. When determining that the attribute to be displayed cannot be directly displayed back, the client may determine a data source corresponding to the attribute to be displayed according to a data source identifier (dataSource) of the attribute to be displayed in the configuration file, further determine a field capable of replacing the attribute to be displayed for display according to a field identifier (dataName) of the data source for back display, replace data corresponding to the attribute incapable of being directly displayed back with an information item under the field, and then display the replaced data in the chart. If the chart is a two-dimensional chart, one of the attributes to be displayed, which are represented by the x-axis and the y-axis, cannot be directly displayed back, when the target data is processed, only the data of the attribute which cannot be displayed back is replaced, and finally the replaced data and the data of the other attribute to be displayed are displayed in the chart.
For example, after the attribute to be displayed is the creator and the belonging environment and the server returns the target data corresponding to the creator and the belonging environment, according to the configuration file illustrated in fig. 3, it can be known that the creator cannot directly display the information item under the displayName field in the userList data table instead of the information item under the creator field, and the information item under the displayName field and the information item under the belonging environment field returned by the server are displayed in the chart.
In addition, when displaying the target data, in some embodiments, the client may further adjust a display width of a display area for displaying the attribute to be displayed in the graph according to the number of information items of the attribute to be displayed and the width of the graph; and when the number of the information items of the attribute to be displayed is larger than the preset number, generating a sliding control to display the attribute to be displayed in a sliding mode through the sliding control.
The preset number may be preset, which is not limited in the embodiment of the present application.
Since the width and height of the chart are set when the client generates the initialized chart, after the client receives the target data, the display width of each information item, namely the width of each column, can be determined according to the number of the information items under the attribute field to be displayed on the x axis and the total width of the chart in the target page, namely the number of the display data on the x axis is automatically adapted according to the length condition of the attribute field to be displayed.
As shown in fig. 4, the attribute to be displayed on the x-axis is an environment, where the environment includes four information items of a pre-production environment, a pressure measurement environment, a production environment, and a development environment, each information item is a column, the attribute manager to be displayed on the y-axis is a column, and assuming that the total width of the chart is set to 900px (pixels), it can be determined that the display width of each column in the chart is 900/5=180 px.
In addition, if the number of information items under the attribute field to be displayed is too large, and all the information items cannot be completely displayed on the target page, the client may set a sliding control, and completely display all the information items by sliding the sliding component left and right, as shown in fig. 5, a corner mark in the lower right corner is the sliding control. It should be noted that fig. 5 is only a schematic illustration of a sliding control, and is not limited to this in the specific implementation.
Fig. 6 is a schematic flow chart of another graph display method provided by the embodiment of the application. As shown in fig. 6, the client and the server acquire user requirements and abstract the object model according to the requirements. The client generates a configuration file according to the attribute information field of the object to be displayed in the object model, generates an initialized chart and attribute selection items of multiple dimensions, and can perform dynamic switching interaction of the custom dimension of the chart by selecting the attribute to be displayed in the attribute selection items. The server firstly designs the attribute information field of the object to be displayed into a data table, sets the main key of the table to be self-increased, and completes basic operation functions such as table increase (create), read query (retrieve), update (delete) and the like. And then receiving the attribute to be displayed sent by the client, dynamically generating an sql statement of the grouping query according to the attribute parameter, inquiring and returning target data, and finally displaying the target data in the chart by the client. Therefore, the embodiment of the application realizes the display of the attribute combination data with any dimension in one chart through the joint debugging processing of the client and the server.
In summary, the embodiment of the application can realize the display of the attribute combination data with any dimension in one chart by selecting the attribute to be displayed from a plurality of attributes through the attribute selection item. The method is suitable for data visualization of object model attribute information, utilizes a induction method to componentize client codes and abstract server codes into a general method for dynamically generating sql, namely, the client generates an initialized chart and an attribute selection item through a method of universalization processing, does not relate to an object model to be displayed, can directly maintain the chart through a configuration file in the follow-up process, and is transplanted to other object models, only the configuration file needs to be modified, so that the method is easy to maintain, strong in portability and strong in expansibility. Moreover, when the object model newly adds attribute information, the new dimension combination chart visualization can be realized only by newly adding attribute fields in the configuration file.
All the above optional technical solutions may be combined according to any choice to form an optional embodiment of the present application, and the embodiments of the present application will not be described in detail.
Fig. 7 is a schematic structural diagram of a schematic diagram display device according to an embodiment of the present application. Illustratively, as shown in FIG. 7, the apparatus includes:
A first display module 701 for displaying a chart and attribute selections of multiple dimensions;
a determining module 702, configured to determine, in a case where a plurality of attributes of an object to be displayed are added to the attribute selection item, an attribute to be displayed of each dimension selected by the attribute selection item among the plurality of attributes;
a sending module 703, configured to send the attribute to be displayed to a server, so that the server queries and returns target data corresponding to the attribute to be displayed;
and a second display module 704, configured to display target data corresponding to the attribute to be displayed in the chart.
Optionally, in the case that a plurality of attributes of the object to be displayed are not added in the attribute selection item, the apparatus further includes:
the generating module is used for generating a configuration file according to a plurality of attributes of the object to be displayed;
the first adding module is used for adding the attributes in the attribute selection items of the dimensions according to the arrangement sequence of the attributes in the configuration file.
Optionally, the apparatus further comprises:
and the second adding module is used for adding the newly added attribute into the attribute selection items of each dimension when receiving the newly added attribute of the object to be displayed.
Optionally, the configuration file includes an identifier of whether each attribute can be directly displayed back, and the second display module 704 includes:
the determining unit is used for determining whether the attribute to be displayed can be directly displayed back according to the identification of whether each attribute can be directly displayed back;
the display unit is used for displaying target data corresponding to the attribute to be displayed in the chart if the attribute to be displayed is determined to be capable of being directly displayed back;
and the processing unit is used for processing the target data and displaying the processed target data in the chart if the attribute to be displayed cannot be directly displayed back.
Optionally, the configuration file further includes a data source identifier of the attribute that cannot be directly displayed back, and the processing unit is further configured to:
determining a data source corresponding to the attribute to be displayed according to the data source identifier of the attribute to be displayed;
and replacing the target data corresponding to the attribute to be displayed according to the data source.
Optionally, the configuration file includes each attribute and a field name of each attribute, and the sending module 703 is further configured to:
determining a field name of the attribute to be displayed according to the configuration file;
and sending the field names of the attributes to be displayed to the server so that the server queries and returns the target data corresponding to the field names of the attributes to be displayed.
Optionally, the second display module 704 is further configured to:
according to the number of information items of the attribute to be displayed and the width of the chart, adjusting the display width of a display area for displaying the attribute to be displayed in the chart;
and when the number of the information items of the attribute to be displayed is larger than the preset number, generating a sliding control to display the attribute to be displayed in a sliding mode through the sliding control.
Fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Illustratively, as shown in FIG. 8, the computer device 800 includes: a memory 801, and a processor 802, wherein the memory 801 stores therein executable program code 8011, and the processor 802 is configured to call and execute the executable program code 8011 to execute a graphic display method.
In this embodiment, the functional modules of the computer device may be divided according to the above method example, for example, each functional module may be corresponding to one processing module, or two or more functions may be integrated into one processing module, where the integrated modules may be implemented in a hardware form. It should be noted that, in this embodiment, the division of the modules is schematic, only one logic function is divided, and another division manner may be implemented in actual implementation.
In the case where respective functional modules are divided with corresponding respective functions, the computer apparatus may include: the device comprises a first display module, a determining module, a sending module and a second display module. It should be noted that, all relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
The computer device provided in this embodiment is configured to execute the above-described graph display method, so that the same effects as those of the implementation method can be achieved.
In case of an integrated unit, the computer device may comprise a processing module, a memory module. The processing module can be used for controlling and managing the actions of the computer equipment. The memory module may be used to support computer devices in executing inter-program code and data, etc.
Wherein a processing module may be a processor or controller that may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with the present disclosure. A processor may also be a combination of computing functions, e.g., including one or more microprocessors, digital signal processing (digital signal processing, DSP) and microprocessor combinations, etc., and a memory module may be a memory.
The present embodiment also provides a computer-readable storage medium having stored therein computer program code which, when run on a computer, causes the computer to perform the above-described related method steps to implement a graph display method in the above-described embodiments.
The present embodiment also provides a computer program product which, when run on a computer, causes the computer to perform the above-described related steps to implement a graph display method in the above-described embodiments.
In addition, the computer device provided by the embodiment of the application can comprise a processor and a memory which are connected; the memory is used for storing instructions, and when the computer device runs, the processor can call and execute the instructions to enable the computer device to execute a graph display method in the embodiment.
The computer device, the computer readable storage medium, the computer program product, or the chip provided in this embodiment are used to execute the corresponding method provided above, and therefore, the advantages achieved by the method can refer to the advantages in the corresponding method provided above, and will not be described herein.
It will be appreciated by those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. A graph display method, characterized in that the method comprises:
displaying a chart and attribute options of multiple dimensions;
determining the attribute to be displayed of each dimension selected by the attribute selection item in the plurality of attributes under the condition that the plurality of attributes of the object to be displayed are added in the attribute selection item;
the attribute to be displayed is sent to a server, so that the server inquires and returns target data corresponding to the attribute to be displayed;
and displaying target data corresponding to the attribute to be displayed in the chart.
2. The method according to claim 1, wherein in case that a plurality of attributes of the object to be displayed are not added in the attribute selection item, the method further comprises:
generating a configuration file according to the plurality of attributes of the object to be displayed;
and adding each attribute in the attribute selection item of each dimension according to the arrangement sequence of each attribute in the configuration file.
3. The method according to claim 1, wherein the method further comprises:
and when receiving the new attribute of the object to be displayed, adding the new attribute into the attribute selection items of each dimension.
4. The method according to claim 2, wherein the configuration file includes an identifier of whether each attribute can be directly displayed back, and the displaying, in the chart, target data corresponding to the attribute to be displayed includes:
determining whether the attribute to be displayed can be directly displayed back according to the identification of whether the attribute can be directly displayed back;
if the attribute to be displayed can be directly displayed back, displaying target data corresponding to the attribute to be displayed in the chart;
and if the attribute to be displayed cannot be directly displayed back, processing the target data, and displaying the processed target data in the chart.
5. The method of claim 4, wherein the configuration file further includes a data source identifier of an attribute that cannot be directly replayed, and wherein the processing the target data includes:
determining a data source corresponding to the attribute to be displayed according to the data source identifier of the attribute to be displayed;
and replacing the target data corresponding to the attribute to be displayed according to the data source.
6. The method of claim 2, wherein the configuration file includes each of the attributes and a field name of each of the attributes, and the sending the attribute to be displayed to a server, so that the server queries and returns target data corresponding to the attribute to be displayed, includes:
Determining the field name of the attribute to be displayed according to the configuration file;
and sending the field name of the attribute to be displayed to the server so that the server inquires and returns the target data corresponding to the field name of the attribute to be displayed.
7. The method of claim 1, wherein displaying the target data in the graph comprises:
according to the number of the information items of the attribute to be displayed and the width of the chart, adjusting the display width of a display area for displaying the attribute to be displayed in the chart;
and when the number of the information items of the attribute to be displayed is larger than the preset number, generating a sliding control to enable the attribute to be displayed in a sliding mode through the sliding control.
8. A graph display apparatus, characterized in that the apparatus comprises:
the first display module is used for displaying the chart and attribute selection items of multiple dimensions;
a determining module, configured to determine, in a case where a plurality of attributes of an object to be displayed are added to the attribute selection item, an attribute to be displayed of each dimension selected among the plurality of attributes by the attribute selection item;
The sending module is used for sending the attribute to be displayed to a server so that the server inquires and returns target data corresponding to the attribute to be displayed;
and the second display module is used for displaying target data corresponding to the attribute to be displayed in the chart.
9. A computer device, the computer device comprising:
a memory for storing executable program code;
a processor for calling and running the executable program code from the memory, causing the computer device to perform the method of any of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed, implements the method according to any of claims 1 to 7.
CN202310868391.8A 2023-07-14 2023-07-14 Graph display method, device, computer equipment and storage medium Pending CN116974437A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310868391.8A CN116974437A (en) 2023-07-14 2023-07-14 Graph display method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310868391.8A CN116974437A (en) 2023-07-14 2023-07-14 Graph display method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116974437A true CN116974437A (en) 2023-10-31

Family

ID=88476100

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310868391.8A Pending CN116974437A (en) 2023-07-14 2023-07-14 Graph display method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116974437A (en)

Similar Documents

Publication Publication Date Title
CN111542813B (en) Object model using heterogeneous data to facilitate building data visualizations
US7386578B2 (en) Associations between duplicate master data objects
US9218398B2 (en) Content storage mapping
CN108228817A (en) Data processing method, device and system
US20100070496A1 (en) Searchable Object Network
US20080109762A1 (en) Visual document user interface system
US9223847B2 (en) Using dimension substitutions in OLAP cubes
US8762411B2 (en) Progressive exploration of data relationships
CN111538774B (en) Data storage and display method, system, equipment and storage medium
WO2021047323A1 (en) Data operation method and apparatus, and system
CN104699742A (en) Extreme visualization enabling extension for large data sets
US20080109283A1 (en) Apparatus and method for mixing business intelligence and business process workflows
CN112783488A (en) Business mode canvas drawing method and device
WO2004095168A2 (en) System and method for providing a territory management tool
US11204925B2 (en) Enabling data source extensions
EP1638019A2 (en) Advanced object mapping by mapping key sub-object
CN116974437A (en) Graph display method, device, computer equipment and storage medium
CN113010582A (en) Data processing method and device, computer readable medium and electronic equipment
CN116088816B (en) Method for developing panoramic service view by low codes
CN111459907B (en) Method, system and storage medium for configuring main data through model
CN114880678A (en) Authority management method, device, equipment and storage medium
CN116579593A (en) Service processing method, device, electronic equipment and computer readable storage medium
CN114064789A (en) Visualization method and device for vehicle-mounted terminal data and storage medium
JP2021170368A (en) Information presentation method, apparatus, electronic device, storage medium, and program
CN108984176B (en) High-definition desktop development system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination