WO2023045634A1 - Graph display method and apparatus, electronic device, storage medium, and computer program product - Google Patents

Graph display method and apparatus, electronic device, storage medium, and computer program product Download PDF

Info

Publication number
WO2023045634A1
WO2023045634A1 PCT/CN2022/113127 CN2022113127W WO2023045634A1 WO 2023045634 A1 WO2023045634 A1 WO 2023045634A1 CN 2022113127 W CN2022113127 W CN 2022113127W WO 2023045634 A1 WO2023045634 A1 WO 2023045634A1
Authority
WO
WIPO (PCT)
Prior art keywords
display
data
chart
content
dynamic
Prior art date
Application number
PCT/CN2022/113127
Other languages
French (fr)
Chinese (zh)
Inventor
潘国良
Original Assignee
上海商汤智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Publication of WO2023045634A1 publication Critical patent/WO2023045634A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs

Definitions

  • the embodiment of the present disclosure is based on the Chinese patent application with the application number 202111106936.9, the application date is September 22, 2021, and the application name is "chart display method and device, electronic equipment and storage medium", and the priority of the Chinese patent application is required Right, the entire content of this Chinese patent application is hereby incorporated into this disclosure as a reference.
  • Embodiments of the present disclosure relate to but are not limited to the field of computer technologies, and in particular, relate to a graph display method and device, electronic equipment, storage media, and computer program products.
  • Embodiments of the present disclosure provide a graph display method and device, electronic equipment, a storage medium, and a computer program product.
  • An embodiment of the present disclosure provides a method for displaying a chart, the method including:
  • target data for displaying the chart including static display data and dynamic display data
  • drawing a static display area of the chart according to the static display data wherein the static display area is included in the target displaying the first display content with a fixed position on the interface
  • drawing a dynamic display area according to the dynamic display data and the display status of the chart in the target display interface wherein the dynamic display area includes a second display content, The second display content is transformed according to the display state; in the target display interface, the static display area and the dynamic display area are superimposedly displayed.
  • drawing the static display area of the chart according to the static display data includes: determining the first position of the first display content on the target display interface according to the static display data A display position: drawing the first display content according to the first display position to obtain the static display area.
  • the drawing of the dynamic display area according to the dynamic display data and the display state of the chart in the target display interface includes: in response to a display control operation on the chart, determining the The display state of the chart in the target display interface; according to the display state, obtain the second display content matching the display state in the third display content, wherein the third display content includes the dynamic display content All display contents matched by the data; according to the dynamic display data, determine a second display position of the second display content on the target display interface; according to the second display position, perform Draw to get the dynamic display area.
  • the display status includes display progress;
  • the third display content includes a plurality of graphic elements, and the plurality of graphic elements move along the preset direction of the chart at the same preset distance.
  • arranging: according to the display state, acquiring the second display content in the third display content that matches the display state includes: determining the second display content in the second display content according to the display progress and the preset distance The initial graphic element to be displayed; according to the display progress, the preset distance, and the preset display range of the dynamic display area in the chart, determine the terminal graphic element to be displayed in the second display content An element; based on the initial graphic element and the terminating graphic element, extracting second display content that matches the display state from the third display content.
  • the dynamic display area further includes fourth display content; drawing the dynamic display area according to the dynamic display data and the display state of the chart in the target display interface further includes: In the display state, the second display content is combined and counted according to a preset statistical rule to obtain the fourth display content; and the fourth display content is drawn according to a preset display position.
  • the acquiring target data for displaying the chart includes: acquiring initial data for displaying the chart; performing data structure transformation on the initial data according to the data type of the initial data to obtain intermediate data matching the preset data structure; converting the intermediate data according to the visualized data structure corresponding to the chart to obtain target data matching the visualized data structure.
  • the visualization data structure includes at least one of the following: a first data structure of the static display data, a second data structure of the dynamic display data, and a third data structure of the dynamic display data, wherein, the second data structure matches the second display content, the third data structure matches the fourth display content, and the fourth display content includes the statistical result obtained by combining and counting the second display content .
  • the first data structure of the static display data includes at least one of the following: first position information, a first label, and first color information with fixed values
  • the second data structure of the dynamic display data includes At least one of the following: second position information, second label, and second color information, wherein the value of the second position information is transformed according to the display state
  • the third data structure of the dynamic display data includes at least the following One: third label information, third color information, statistical information, and judgment information, wherein the judgment information includes a judgment result obtained by judging the statistical information according to a preset judgment rule.
  • the graph includes a graph of correspondence between time and responsible objects.
  • An embodiment of the present disclosure provides a graph display device, including:
  • the acquisition part is configured to acquire target data for displaying the chart, the target data includes static display data and dynamic display data; the static drawing part is configured to draw the static display data of the chart according to the static display data A display area, wherein the static display area includes the first display content whose position is fixed on the target display interface; the dynamic drawing part is configured to display in the target display interface according to the dynamic display data and the chart State, drawing a dynamic display area, wherein, the dynamic display area includes second display content, and the second display content is transformed according to the display state; the display part is configured to superimpose display in the target display interface The static display area and the dynamic display area.
  • the static drawing part includes: a first determination subsection configured to determine a first display position of the first display content on the target display interface according to the static display data;
  • the first drawing subsection is configured to draw the first display content according to the first display position to obtain the static display area.
  • the dynamic drawing part includes: a second determining subsection configured to determine a display state of the chart in the target display interface in response to a display control operation on the chart; An acquisition subsection configured to acquire, according to the display status, second display content that matches the display status in the third display content, wherein the third display content includes all the content that matches the dynamic display data display content; the third determining subpart is configured to determine a second display position of the second display content on the target display interface according to the dynamic display data; the second drawing part is configured to determine a second display position of the second display content on the target display interface according to the dynamic display data; In the second display position, the second display content is drawn to obtain the dynamic display area.
  • the display status includes display progress;
  • the third display content includes a plurality of graphic elements, and the plurality of graphic elements move along the preset direction of the chart at the same preset distance.
  • the first acquisition subsection includes: a fourth determination subsection configured to determine an initial graphic element to be displayed in the second display content according to the display progress and the preset distance;
  • the second The fifth determining subsection is configured to determine the termination graphic element to be displayed in the second display content according to the display progress, the preset distance, and the preset display range of the dynamic display area in the chart element;
  • a first extraction subsection configured to extract second display content matching the display state from the third display content based on the initial graphic element and the termination graphic element.
  • the dynamic display area further includes fourth display content;
  • the dynamic drawing part further includes: a first obtaining subpart configured to, according to the display state and according to a preset statistical rule, calculate the The second display content is combined and counted to obtain the fourth display content;
  • the third drawing subsection is configured to draw the fourth display content according to a preset display position.
  • the acquisition part includes: a second acquisition subsection configured to acquire initial data for displaying the graph; a second acquisition subsection configured to obtain the initial data according to the data type of the initial data , performing data structure transformation on the initial data to obtain intermediate data matching the preset data structure; the third obtaining sub-part is configured to convert the intermediate data according to the visual data structure corresponding to the chart to obtain Target data matching the visualization data structure.
  • the visualization data structure includes at least one of the following: a first data structure of the static display data, a second data structure of the dynamic display data, and a third data structure of the dynamic display data, wherein, the second data structure matches the second display content, the third data structure matches the fourth display content, and the fourth display content includes the statistical result obtained by combining and counting the second display content .
  • the first data structure of the static display data includes at least one of the following: first position information, a first label, and first color information with fixed values
  • the second data structure of the dynamic display data includes At least one of the following: second position information, second label, and second color information, wherein the value of the second position information is transformed according to the display state
  • the third data structure of the dynamic display data includes at least the following One: third label information, third color information, statistical information, and judgment information, wherein the judgment information includes a judgment result obtained by judging the statistical information according to a preset judgment rule.
  • the graph includes a graph of correspondence between time and responsible objects.
  • An embodiment of the present disclosure provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
  • An embodiment of the present disclosure provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
  • An embodiment of the present disclosure provides a computer program product, where the computer program product includes a computer program or an instruction, and when the computer program or instruction is run on an electronic device, the above method is implemented when the electronic device is executed.
  • the target data for displaying the chart can be obtained, and the static display area of the chart can be drawn according to the static display data in the target data, and the dynamic display area can be drawn according to the dynamic display data in the target data and the display state of the chart.
  • the display area, and in the target display interface, the static display area and the dynamic display area are superimposedly displayed.
  • the separate drawing of the static display area and the dynamic display area in the chart can be realized, and it is convenient to draw the dynamic display area by changing the second display content when the display state changes, reducing the changes to the static display area, thereby reducing
  • the amount of data processed during chart drawing improves the efficiency and performance of chart display.
  • FIG. 1 is a schematic flowchart of a graph display method provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of a graph display method provided by an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of a chart provided by an embodiment of the present disclosure.
  • FIG. 4 is a schematic flowchart of a graph display method provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of a chart provided by an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of the composition and structure of a chart display device provided by an embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram of an application example provided by an embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present disclosure.
  • the embodiment of the present disclosure provides a chart display method, which can realize the separate drawing of the static display area and the dynamic display area in the chart, and is convenient to draw the dynamic chart through the transformed second display content when the display state changes.
  • the display area reduces changes to the static display area, thereby reducing the amount of data processed during chart drawing and improving the efficiency and performance of chart display.
  • FIG. 1 is a schematic flowchart of a graph display method provided by an embodiment of the present disclosure.
  • the method can be applied to a graph display device, and the graph display device can be a terminal device, a server, or other processing devices.
  • the terminal device may be user equipment (User Equipment, UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (Personal Digital Assistant, PDA), handheld device, computing device, vehicle-mounted device, Wearable equipment etc.
  • UE User Equipment
  • PDA Personal Digital Assistant
  • the method for displaying graphs can also be implemented by the processor invoking computer-readable instructions stored in the memory.
  • the graph display method may include steps S11 to S14, wherein:
  • Step S11 acquiring target data for displaying charts.
  • the chart may include any graphical structure for visually displaying data or information. Any form such as point chart, radar chart or area chart; the dimension of the chart is also not limited, for example, it can be a two-dimensional chart, a three-dimensional chart, or a higher-dimensional chart.
  • the content of the chart can also be flexibly set according to the actual situation, and is not limited to the embodiments of the present disclosure.
  • the chart may be a related chart applied to the event management system, for displaying some data in the event management system and the like.
  • the chart may also be a chart applied in other fields, such as the financial field, the Internet field, or the office field.
  • the graph may be a graph including a correspondence relationship between time and responsibility objects.
  • the time can be the processing time of the event, and the time can be counted in minutes, hours, or days. parties, or the command center, etc.
  • time can be used as x-axis information and responsible objects can be used as y-axis information, or time can be used as y-axis information and responsible objects can be used as x-axis information.
  • Those skilled in the art can make settings according to actual conditions.
  • the target data can be the data object displayed in the chart.
  • the data content contained in the target data can be flexibly determined according to the actual situation of the chart. For example, it can include the position of the coordinate axis in the chart, the position of the node in the chart, and the text content contained in the chart, etc. .
  • the target data may include static display data and dynamic display data, wherein the data in the static display data may contain fixed location information, and during the chart drawing process, the drawing content corresponding to the static display data may be drawn on a fixed at the location.
  • the dynamic display data can contain changing position information.
  • the position of the drawing content corresponding to the dynamic display data can be dynamically changed. For example, when the chart is pulled, some nodes in the chart The position of the nodes may change according to the direction of pulling, and the data corresponding to these nodes can be used as dynamic display data, etc.
  • the data structure of the target data can also be flexibly determined according to the actual situation of the chart, and different types of target data may have different data structures.
  • static display data and dynamic display data can correspond to different data structures. See each of the disclosed examples below for details.
  • the method of acquiring target data is also not limited in the embodiments of the present disclosure, such as directly reading data from a preset database, or receiving target data to be displayed in real time, or performing certain data processing on the acquired data to obtain the target data etc.
  • step S11 refer to the following disclosed embodiments for details.
  • Step S12 draw the static display area of the chart according to the static display data.
  • the static display area of the chart may include an area with fixed display content and fixed display position in the chart, and the content contained in the static display area may be flexibly selected according to actual conditions, and is not limited to the following disclosed embodiments.
  • the static display area may include first display content with a fixed position on the target display interface.
  • the target display interface can be any interface for displaying charts, and its interface form is not limited in the embodiments of the present disclosure, and can be any device interface with a display function, such as a mobile phone screen, a computer screen, or a projection device Etc., in some embodiments, the target display interface can also be a software interface with a display function, such as a display interface of image editing software such as webpage and drawing, or a display interface of office software.
  • the first display content may include fixed-position content on the target display interface.
  • a chart may contain multiple coordinate axes, such as x-axis, y-axis, or z-axis, etc., if one of the coordinate axes contains If the data content of the coordinate axis can be completely displayed on the target display interface, then the coordinate axis and the content corresponding to the coordinate axis can be used as the first display content in the static display area.
  • the y-axis can contain fixed content information, and these fixed content information can be completely displayed on the target display interface.
  • the length of the y-axis and the separation of the y-axis The display position of information such as lines or labels on the y-axis in the target display interface can be fixed, so the y-axis coordinate axis, the dividing line on the y-axis, and the labels on the y-axis can all be used as static
  • the first display content included in the display area can be fixed, so the y-axis coordinate axis, the dividing line on the y-axis, and the labels on the y-axis can all be used as static.
  • step S12 can be flexibly changed according to the actual situation of the static display data, see the following disclosed embodiments for details.
  • Step S13 drawing a dynamic display area according to the display state of the dynamic display data and the graph in the target display interface.
  • the dynamic display area of the chart may include the area where the display content changes in the chart.
  • the display range of the target display interface may be limited, so that the chart cannot be fully displayed in the target display interface.
  • the chart can be moved according to the visible range of the target display interface, and the area displayed in the chart following the movement can be used as a dynamic display area.
  • the content contained in the dynamic display area can also be flexibly selected according to the actual situation, and is not limited to the following disclosed embodiments.
  • the dynamic display area includes second display content, and the second display content can be changed according to the display state.
  • the display status may include the display status of the chart in the target display interface.
  • the display status may include the display progress of the chart in the target display interface.
  • the progress is used to indicate the proportion of the content displayed in the target display interface to the overall content to be displayed in the chart.
  • the display progress can be displayed in the target display interface in the form of a scroll axis, a scroll bar, or dynamic text.
  • the second display content may include content that is transformed according to the display state. For example, if the data content contained in a certain coordinate axis in the chart cannot be completely displayed on the target display interface, the content corresponding to the coordinate axis and the coordinate axis It can be used as the second display content in the dynamic display area.
  • the x-axis may contain more content information.
  • the x-axis may be a time axis, and the time extension range is long and may continue to extend as the situation changes, resulting in the target display interface Only part of the content information corresponding to the x-axis can be displayed.
  • the display status of the x-axis, labels on the x-axis, and nodes containing the x-coordinate position in the chart may vary with the target display interface. Therefore, the x-axis, the label on the x-axis, and each node in the chart containing the x-coordinate position can be used as the second display content contained in the dynamic display area.
  • step S13 can be flexibly changed according to the actual situation of the dynamic display data.
  • the drawn second display content in the dynamic display area can be cleared.
  • the second display content is re-determined, and the dynamic display area is redrawn. See each of the disclosed examples below for details.
  • Step S14 in the target display interface, the static display area and the dynamic display area are superimposedly displayed.
  • the superposition form of the static display area and the dynamic display area can be flexibly selected according to the actual situation. It can be mutual superposition including occlusion, or mutual superposition without occlusion, which is not limited in this embodiment of the present disclosure.
  • the stacking order of the static display area and the dynamic display area can also be flexibly determined according to the actual situation. You can set the dynamic display area to be superimposed on the static display area, or you can superimpose the static display area on the dynamic display area. In the case of superposition of complementary occlusion, it is not necessary to consider the superposition order of the static display area and the dynamic display area.
  • the target data for displaying the chart can be obtained, and the static display area of the chart can be drawn according to the static display data in the target data, and the dynamic display area can be drawn according to the dynamic display data in the target data and the display state of the chart.
  • the display area, and in the target display interface, the static display area and the dynamic display area are superimposedly displayed.
  • the separate drawing of the static display area and the dynamic display area in the chart can be realized, and it is convenient to draw the dynamic display area by changing the second display content when the display state changes, reducing the changes to the static display area, thereby reducing
  • the amount of data processed during chart drawing improves the efficiency and performance of chart display.
  • step S11 may include step S111 to step S113, wherein:
  • Step S111 acquiring initial data for displaying charts.
  • the initial data may include any data related to the content displayed in the chart, and its acquisition method may be flexibly changed according to the content of the chart.
  • the initial data may be related data of the event management system, which is read from the database of the event management system.
  • the initial data can also be obtained in real time.
  • the initial data may contain one or more data types, and the data types are not limited in the embodiments of the present disclosure.
  • the type of the initial data may The responsibility of the data varies depending on the responsible object. For example, it can be the relevant data of the processing personnel, the general data uploaded by the parties through the incident management system, or the summary data in the command center, etc.
  • the data structure transformation may be performed on the initial data to obtain the intermediate data matching the preset data structure.
  • Step S112 performing data structure transformation on the initial data according to the data type of the initial data, to obtain intermediate data matching the preset data structure;
  • the structure type of the preset data structure can be set according to the actual situation.
  • the preset data structure in order to facilitate subsequent visual display of data, can be any structure type that is easy to convert into a visualized data structure.
  • the way of data structure transformation can be flexibly determined according to the data correspondence between the initial data and the preset data structure. Through data structure transformation, various forms of initial data can be unified into the same preset data structure, so as to facilitate subsequent batches.
  • the intermediate data is processed to obtain the target data with a visualized data structure.
  • Step S113 according to the visualization data structure corresponding to the chart, convert the intermediate data to obtain the target data matching the visualization data structure.
  • the visualized data structure is a data structure that can be directly converted into the content displayed in the chart, and its structural form can be flexibly changed according to the type of the chart. See the following disclosed embodiments for details.
  • the method of converting intermediate data into a visualized data structure can also be flexibly selected according to the actual situation.
  • the intermediate data can be converted to obtain the target data according to the type conversion relationship between the preset data structure and the visualized data structure.
  • the initial data of various data types can be unified into a preset data structure through data structure transformation, which facilitates batch processing of data in the process of converting intermediate data into a visualized data structure, and improves data structure. processing efficiency, and then improve the efficiency and performance of the entire chart display process.
  • step S12 may include step S121 to step S122, wherein:
  • Step S121 according to the static display data, determine the first display position of the first display content on the target display interface
  • Step S122 Draw the first display content according to the first display position to obtain a static display area.
  • the first display position may include the position where the first display content is displayed on the target display interface.
  • the first display content may be fixedly displayed on the target display interface, so the first display position Location information can be deterministic.
  • the manner of determining the first display position according to the static display data is not limited in this embodiment of the present disclosure.
  • the first display position can be directly acquired from the static display data according to the first data structure of the static display data.
  • the structural form of the first data structure can be flexibly determined according to the actual situation.
  • the first data structure can include at least one of the following: first position information with fixed values, first label and first color information.
  • the first position information may indicate the first display position of the first display content, and since the first display position is fixed, the value of the first position information may also be fixed.
  • the first label can be the information content corresponding to the static display data. For example, for the corresponding relationship chart between time and responsible objects, since the type of responsible objects is relatively certain, the coordinate axis where the responsible objects are located can be used as a static display data, in this case, the first label may be the label of the responsible object.
  • the first color may be the display color of the first display content, which may be flexibly set according to actual conditions, and is not limited in this embodiment of the present disclosure.
  • the structure of the first data structure may be ⁇ [xxx]:node ⁇ , where xxx may be the first label, as the responsibility object mentioned in the above disclosed embodiment, the node structure may include the first location information and the first Basic data such as color information, etc.
  • the structure of the node can be recorded as ⁇ basic data, rect: ⁇ centerX, centerY, width, height ⁇
  • the basic data can include the first color information or other information related to the first display content
  • rect: ⁇ centerX, centerY, width, height ⁇ can be the first position information mentioned in the above disclosed embodiments, where centerX and centerY are used to indicate the abscissa and ordinate of the center point of the first display content in the target display interface , width is used to indicate the width of the first display content, height is used to indicate the height of the first display content, based on the first position information, the first display position of the first display content can be effectively determined.
  • the first display content can be drawn to obtain a static display area.
  • the way of drawing is not limited to the embodiments of the present disclosure.
  • the drawing can be realized by using layout technologies such as rem or vw, and using related drawing methods or software.
  • the chart can be set in the form of Cartesian coordinate axes, and the Plot the static display area in Cartesian axes.
  • the first display content can be effectively positioned and drawn according to the static display data and its corresponding first data structure.
  • the drawing method is simple and convenient, thereby improving the performance of the entire chart display method.
  • Fig. 2 is a schematic flowchart of a graph display method provided by an embodiment of the present disclosure. As shown in Fig. 2, step S13 may include steps S131 to step 134, wherein:
  • Step S131 in response to the display control operation on the chart, determine the display state of the chart on the target display interface.
  • the display control operation for the chart can include any operation to adjust the display progress of the chart, such as dragging the scroll axis or scroll bar in the chart, or changing the text of the display progress in the chart to adjust the display progress of the chart , or directly slide the chart on the touch screen to change the display progress of the chart, etc.
  • Fig. 3 is a schematic diagram of a chart provided by an embodiment of the present disclosure. As shown in Fig. 3, the content of the x-axis part in the chart may not be completely displayed in the target display interface, so there is a scrolling in the direction of the x-axis in the chart The user can adjust the scroll bar 310 by dragging or scrolling to adjust the display progress of the chart in the target display interface.
  • the display state of the target graph in the target display interface may be determined, wherein, with different control operations, the manner of determining the display state is also different.
  • the display progress of the target chart can be determined according to the proportion of the position of the scroll bar after being dragged in the entire scroll bar; when the control operation is adjustment
  • the display progress can be determined directly according to the content indicated by the text; in the case of sliding the chart on the touch screen, the display progress of the chart can be determined according to the direction and distance of the slide.
  • Step S132 according to the display state, acquire the second display content matching the display state in the third display content.
  • the third display content may include all display content that matches the dynamic display data. Since the dynamic display data contains changing position information, the content corresponding to the dynamic display data may or may not appear in the target display interface. Therefore, the third display content The third display content includes not only the second display content being displayed on the target display interface, but also all data that is not displayed on the target display interface but can appear on the target display interface as the display progress changes.
  • the second display content that should currently appear on the target display interface can be extracted from the third display content.
  • the implementation of step S132 can be flexibly selected according to the actual situation.
  • the content range of the second display content in the third display content can be determined according to the display progress. See the following disclosed embodiments for details.
  • Step S133 Determine a second display position of the second display content on the target display interface according to the dynamic display data.
  • the second display position may include the current position where the second display content is displayed on the target display interface.
  • the position of the second display content may also be flexibly adjusted. Therefore, the position information of the second display position can be flexibly changed according to the display state.
  • the manner of determining the second display position according to the dynamic display data is not limited in this embodiment of the present disclosure.
  • the second display position can be directly obtained from the dynamic display data according to the second data structure of the dynamic display data.
  • the structural form of the second data structure may be flexibly determined according to actual conditions.
  • the second data structure may include at least one of the following: second position information, second label, and second color information.
  • the second position information can indicate the second display position of the second display content. Since the second display position can be changed flexibly, the value of the second position information can be changed according to the display state.
  • the difference between the display state and the second position information The conversion relationship between can be flexibly set according to actual conditions, and is not limited in this embodiment of the present disclosure.
  • the second label can be to dynamically display the information corresponding to the data. For example, for the corresponding relationship chart between time and responsible objects, since the time can be infinitely extended, the processing time of different events has a large difference, which makes it impossible to determine The span range of the time axis, so the coordinate axis where the time is located and the time-related nodes in the chart can be used as dynamic display data.
  • the second label can be the content label of the node, which can be used to indicate the The time corresponding to the node can also be used to indicate the type of event processing corresponding to the node.
  • the second color may be the display color of the second display content, which may be flexibly set according to actual conditions, and is not limited in this embodiment of the present disclosure.
  • the structure of the second data structure may be the node structure mentioned in the above disclosed embodiments.
  • the rect: ⁇ centerX, centerY in the node structure ,width,height ⁇ can be the second position information mentioned in the above disclosed embodiments, where centerX and centerY are used to indicate the abscissa and ordinate of the center point of the second display content in the target display interface, and width is used for Indicates the width of the second display content, and height is used to indicate the height of the second display content. Since the second position information can change with the display state, the values of centerX and centerY in the node structure can change with the display state changes, but the values of width and height may or may not change, it can be determined according to the actual situation of the node.
  • Step S134 drawing the second display content according to the second display position to obtain a dynamic display area.
  • the second display content that should be displayed at present can be determined in response to the display control operation on the chart, and based on the determined second display content, the dynamic display area can be redrawn, so that it can be based on the user's control , redraw the dynamic display area separately, reduce the amount of data that needs to be processed during the drawing process, improve the efficiency and performance of chart drawing, and also improve the interaction between the chart display and user control, and improve the user's ability to view the chart Experience the feeling.
  • Fig. 4 is a schematic flowchart of a graph display method provided by an embodiment of the present disclosure. As shown in Fig. 4, step S132 may include steps S1321 to S1323, wherein:
  • Step S1321 according to the display progress and the preset distance, determine the initial graphic element to be displayed in the second display content.
  • the third display content may include a plurality of graphic elements, and the graphic elements may be various image contents displayed or to be displayed in the dynamic display area.
  • the implementation form of the graphic element can be flexibly determined according to the actual situation of the chart. For example, when the chart is a line chart, the graphic element can be each node of the line in the chart; when the chart is a bar chart, The primitive elements can be individual bar images in a bar chart, etc.
  • multiple graphic elements can be arranged at the same preset interval in the preset direction of the chart, wherein the preset direction can include a direction consistent with the display progress, for example, if the chart can be on the x-axis To adjust the display progress, the preset direction can also be the direction of the x-axis.
  • the distance of the preset interval can be flexibly set according to actual conditions, which is not limited in this embodiment of the present disclosure.
  • the preset distance can be used to determine the graphic elements that can be included in the second display content from the plurality of graphic elements in the third display content.
  • the initial graphic element in the second display content may be determined according to the display progress and the preset distance, where the initial graphic element may include the first graphic element displayed in the second display content under the current display progress.
  • a primitive element may be determined according to the display progress and the preset distance, where the initial graphic element may include the first graphic element displayed in the second display content under the current display progress.
  • the way to determine the initial graphic element can be flexibly determined according to the form of the display progress.
  • the display progress in the case that the display progress is the position of a scroll bar or a scroll axis, the display progress can indicate that in the preset direction, the start of the dynamic display area The first distance between the initial position and the original initial position of the chart, so the first distance can be divided by the preset spacing to obtain the number a of the initial graphic element, and the number a can indicate that the third display content contains Among the multiple graphic elements of , the a-th graphic element will be used as the initial graphic element to be displayed in the second display content.
  • the chart can be moved on the x-axis through the scroll bar 310, and the position of the scroll bar 310 can indicate that in the direction of the x-axis, the left boundary point of the currently displayed dynamic display area is in line with the chart.
  • the first distance between the origin divide the first distance by the preset distance, you can determine the number of nodes contained between the origin and the left boundary point of the dynamic display area, then according to the number of nodes, you can determine the number of nodes located in the dynamic display area Which node should the leftmost node be, that is, the initial graphic element to be displayed in the second display content can be determined.
  • step S1321 can be expressed by the following formula (1):
  • index1 floor(scrollLeft/SIZE) (1)
  • index1 is the sequence number of the initial primitive element among multiple primitive elements
  • scrollLeft is the display progress
  • SIZE is the preset spacing
  • floor( ⁇ ) is the function of rounding down.
  • the initial graphic elements may not be completely displayed in the dynamic display area determined according to the display progress.
  • the function of rounding down can be used , so that the initial graphic element displayed in the dynamic display area is a complete element state, such as a complete node.
  • Step S1322 according to the display progress, the preset distance, and the preset display range of the dynamic display area in the chart, determine the end graphic element to be displayed in the second display content.
  • the terminating graphic element may be the last graphic element displayed in the second display content under the current display progress.
  • the preset display range may include the range of the dynamic display area that can be displayed in the chart, for example, the overall length of the chart on the x-axis is i, and the length of the preset display range in the x direction is j and j ⁇ i, the dynamic display area can only display the content of length j in the direction of the x-axis, and it is necessary to move the chart in the direction of the x-axis to obtain all the contents of the chart.
  • the size of the preset display range can be flexibly determined according to the actual situation of the target display interface, and is not limited in this embodiment of the present disclosure.
  • the way to determine the termination of the graphic element can also be flexibly determined according to the form of the display progress.
  • the display progress when the display progress is the position of the scroll bar or the scroll axis, the display progress can indicate that it is in the preset direction, The first distance between the starting position of the dynamic display area and the original starting position of the chart, add the first distance to the length of the preset display range in the preset direction, and then the end position of the dynamic display area can be known The second distance from the original starting position of the chart, so the second distance can be divided by the preset distance to obtain the number b of the end graphic element, which can indicate how much the third display content contains Among the graphic elements, the b-th graphic element will be used as the terminal graphic element to be displayed in the second display content.
  • the chart can be moved on the x-axis through the scroll bar 310, and the position of the scroll bar 310 is added to the length of the dynamic display area on the x-axis, which can indicate that in the direction of the x-axis , the second distance between the right boundary point of the currently displayed dynamic display area and the origin of the chart, and dividing the second distance by the preset spacing can determine the number of nodes contained between the origin and the right boundary point of the dynamic display area , then according to the number of nodes, it can be determined which node the rightmost node in the dynamic display area should be, that is, the terminal graphic element to be displayed in the second display content can be determined.
  • step S1322 can be expressed by the following formula (2):
  • index2 floor((scrollLeft+offsetWidth)/SIZE) (2);
  • index2 is the sequence number of the end graphic element among multiple graphic elements
  • offsetWidth is the length of the dynamic display area on the x-axis
  • scrollLeft is the display progress
  • SIZE is the preset spacing
  • floor( ⁇ ) is the downward direction whole function.
  • Step S1323 based on the initial graphic element and the termination graphic element, extract the second display content matching the display state from the third display content.
  • the first graphic element and the last graphic element included in the second display content can be determined respectively.
  • the graphic elements can be arranged according to the same preset spacing, so when the initial graphic element and the terminal graphic element are determined, each graphic element contained between them can be known, so as to determine the content contained in the second display content Each graphic element of , to obtain the second display content.
  • the preset distance and the preset display range of the dynamic display area it is possible to quickly and conveniently determine the graphic elements that should be included in the second display content, so as to efficiently determine the current display progress
  • the matching second display content improves the drawing efficiency and performance of the dynamic display area, and then improves the drawing efficiency and performance of the entire chart.
  • step S13 may also include steps S135 to S136, wherein:
  • Step S135 according to the display state and according to the preset statistical rules, perform combined statistics on the second display content to obtain the fourth display content.
  • Step S136 draw the fourth display content according to the preset display position.
  • the fourth display content may include the statistical content obtained by combining and counting the second display content in the chart. Since the second display content can be changed according to the display state, correspondingly, the fourth display content can also State two is transformed.
  • the fourth display content may be obtained by combining statistics of the graphic elements in the second display content according to preset statistical rules. The statistical results obtained.
  • the rule content of the preset statistical rules can be flexibly changed according to the actual situation of the graph, and is not limited to the following disclosed embodiments.
  • the preset statistical rule may be: nodes that are adjacent in time and belong to the same responsible object can be considered to belong to the same event processing stage, so they can be merged together.
  • Fig. 5 is a schematic diagram of a graph provided by an embodiment of the present disclosure.
  • the two nodes of accepted 521 and assigned 522 both belong to the responsibility object of the command center, and the two are adjacent in time. Therefore, the two nodes of accepted 521 and dispatched 522 can be combined and counted in the dispatching 512 event processing stage, and the dispatched content after the combined counting can be used as the fourth display content.
  • the fourth display content such as acceptance 511 , disposition 513 and verification 514 can also be obtained.
  • the preset display position can be the position where the fourth display content is displayed on the target display interface, and the position can be preset according to the actual situation.
  • the preset display position can be set at the Below the title event time and responsibility relationship 500, in some implementations, the preset display position can also be set to at least one position below, left or right of the chart according to the actual situation of the chart.
  • the manner of acquiring the preset display position is not limited in this embodiment of the present disclosure.
  • the pre-stored preset display position can be read directly; in some implementations, the preset display position can be read from the dynamic display data according to the third data structure of the dynamic display data.
  • the third data structure can include data results matching the fourth display content, and the structure can be flexibly determined according to the actual situation.
  • the third data structure can also include at least one of the following: third label information , third color information, statistical information and judgment information.
  • the third tag information may be the information content corresponding to the fourth display content, for example, it may be the name of the event processing stage after the combined statistics mentioned in the above disclosed embodiments, such as accepting, dispatching, handling or checking.
  • the third color information may be the display color of the fourth display content, which may be flexibly set according to actual conditions, and is not limited in this embodiment of the present disclosure.
  • the statistical information may include which graphic elements in the second display content are merged, and the length of the merged fourth display content in a preset direction. For example, the preset direction in FIG.
  • the judgment information can be the result obtained by judging the statistical information according to the preset judgment rules, and the rule form of the preset judgment rules can also be flexibly determined according to the actual situation.
  • the judging rule can be used to judge whether the statistical information has timed out. In this case, the content of the judging information can be timed out or not timed out.
  • the structure of the third data structure may be ⁇ label, duration, isExceed ⁇ , where the label may be the third label information, such as the stage name of acceptance and dispatch mentioned in the above disclosed embodiments, and the duration may be
  • the statistical information mentioned in the above-mentioned disclosed embodiments, such as which nodes in the second display content are merged and the overall time after merging, and isExceed can be the judgment information mentioned in the above-mentioned disclosed embodiments, such as judging the overall time after merging Whether the time is timed out, etc.
  • the manner of drawing the fourth display content according to the preset display position can also refer to the above manner of drawing the first display content.
  • the second display content in the dynamic display area can be statistically summarized together, so as to improve the drawing performance of the chart and enrich the content of the chart.
  • FIG. 6 is a schematic diagram of the composition and structure of a chart display device provided by an embodiment of the present disclosure. As shown in FIG. 6, the device 60 includes:
  • the acquiring part 61 is configured to acquire target data for displaying the graph, and the target data includes static display data and dynamic display data.
  • the static drawing part 62 is configured to draw a static display area of the chart according to the static display data, wherein the static display area includes first display content whose position is fixed on the target display interface.
  • the dynamic drawing part 63 is configured to draw the dynamic display area according to the display state of the dynamic display data and the chart in the target display interface, wherein the dynamic display area includes a second display content, and the second display content changes according to the display state.
  • the display part 64 is configured to superimposely display the static display area and the dynamic display area in the target display interface.
  • the static drawing part 62 includes: a first determining subsection configured to determine the first display position of the first display content on the target display interface according to the static display data; the first drawing subsection is configured to It is configured to draw the first display content according to the first display position to obtain a static display area.
  • the dynamic drawing part 63 includes: a second determining subsection configured to determine the display state of the chart in the target display interface in response to a display control operation on the chart; a first acquiring subsection configured to According to the display state, obtain the second display content that matches the display state in the third display content, wherein the third display content includes all display content that matches the dynamic display data; the third determining subpart is configured to The data determines the second display position of the second display content on the target display interface; the second drawing subpart is configured to draw the second display content according to the second display position to obtain a dynamic display area.
  • the display status includes display progress;
  • the third display content includes a plurality of graphic elements, and the plurality of graphic elements are arranged in the preset direction of the chart according to the same preset interval;
  • the first acquisition sub part including: a fourth determination subsection, configured to determine the initial graphic element to be displayed in the second display content according to the display progress and a preset distance; a fifth determination subsection, configured to determine according to the display progress, preset The spacing and the preset display range of the dynamic display area in the chart determine the terminal graphic element to be displayed in the second display content;
  • the first extraction sub-part is configured to be based on the initial graphic element and the terminal graphic element, from the first The second display content matching the display state is extracted from the third display content.
  • the dynamic display area further includes a fourth display content
  • the dynamic drawing part 63 further includes: a first obtaining subsection configured to merge the second display content according to a preset statistical rule according to the display state Statistics to obtain the fourth display content
  • the third drawing subsection is configured to draw the fourth display content according to the preset display position.
  • the acquisition part 61 includes: a second acquisition subsection configured to acquire initial data for displaying charts; a second acquisition subsection configured to process the initial data according to the data type of the initial data Data structure transformation to obtain intermediate data matching the preset data structure; the third obtaining sub-part is configured to convert the intermediate data according to the visual data structure corresponding to the chart to obtain target data matching the visual data structure.
  • the visualization data structure includes at least one of the following: a first data structure for static display data, a second data structure for dynamic display data, and a third data structure for dynamic display data, wherein the second data structure is the same as the first data structure
  • the second display content matches, the third data structure matches the fourth display content, and the fourth display content includes a statistical result obtained by combining and counting the second display content.
  • the first data structure of the static display data includes at least one of the following: the first position information, the first label, and the first color information with fixed values;
  • the second data structure of the dynamic display data includes at least one of the following : the second position information, the second label and the second color information, wherein, the value of the second position information is transformed according to the display state;
  • the third data structure of the dynamic display data includes at least one of the following: the third label information, the third Color information, statistical information and judging information, wherein the judging information includes judging results obtained by judging the statistical information according to preset judging rules.
  • the graph includes a graph of correspondence between time and responsible objects.
  • the functions or parts included in the apparatus provided by the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments, and the implementation can refer to the descriptions of the above method embodiments.
  • a "part" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course it may also be a unit, a module or a non-modular one.
  • FIG. 7 is a schematic diagram of an application example provided by an embodiment of the present disclosure. As shown in FIG. 7 , the application example of an embodiment of the present disclosure proposes a graph display method, including the following process:
  • Step S710 acquiring display data and performing preprocessing
  • the data in the event handling stage of the event management system can be used as the initial data, and according to the event handling stage to which the initial data belongs, the data structure transformation is performed on the initial data to realize the unification of the data structure, and the obtained and predicted Let the data structure match the intermediate data.
  • Step S720 converting the preprocessed intermediate data into the target data of the visualized data structure
  • the preprocessed intermediate data can be used as input and converted again, so as to output the target data adapted to the visualized data structure.
  • the structural form of the visualized data structure can refer to the first data structure, A second data structure and a third data structure.
  • Step S730 determining the preset display range of the dynamic display area, and constructing a Cartesian coordinate axis for drawing charts;
  • the rem or vw layout technology can be used to implement chart layout in the target display interface.
  • the visible width and height of the target display interface can be calculated according to the target data whose data structure is a visualized data structure, and used as the preset display range of the dynamic display area.
  • the chart may further include a control axis for indicating the display progress of the chart.
  • a Cartesian coordinate axis whose size matches the preset display range can be drawn. As shown in FIG. , is responsible for displaying the vertical axis label and the horizontal dividing line, and the upper layer is the dynamic display area 330, which is responsible for displaying the data of the graphic elements in the form of each node.
  • the Cartesian coordinate axis including two-layer areas can be drawn in a layered rendering method, in which the bottom layer is used as the vertical axis label and horizontal dividing line of the static display area, which belong to static display data.
  • the upper dynamic display area can change with the scrolling of the control axis.
  • the chart needs to be redrawn due to the movement of the control axis, it is only necessary to clear the screen of the dynamic display area, and then update the graphic elements in the dynamic display area, without redrawing the static display area.
  • the dynamic display area may further include a statistical axis for counting graphic element elements in the dynamic display area, and its realization form may refer to the fourth display content in the above disclosed embodiments.
  • Step S740 determining the second display content currently to be displayed, and drawing a dynamic display area according to the second display content
  • the preset display range offsetWidth of the dynamic display area on the x-axis, and the preset spacing SIZE of each graphic element in the chart on the x-axis direction determine the second display content currently to be displayed
  • the initial graphic element and the terminal graphic element draw each graphic element contained in the second display content in the coordinate system (or a certain quadrant of the coordinate system, such as the first quadrant, etc.) of the target display interface, so as to Get the dynamic display area.
  • the static display area and the dynamic display area in the chart can be drawn hierarchically, compared with the related art that draws all the graphic elements in the chart at one time , the method proposed by the application example of the embodiment of the present disclosure can effectively improve the drawing and display performance of the chart, optimize the display effect of the chart, reduce the occurrence of excessive memory occupation due to too much data during the display process, and can display according to the target The actual situation of the interface, the chart is displayed within the visible range, and the flexibility of the display is improved.
  • An embodiment of the present disclosure also provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
  • the computer readable storage medium may be a non-transitory computer readable storage medium.
  • An embodiment of the present disclosure also provides an electronic device, including: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
  • An embodiment of the present disclosure also provides a computer program product, including a computer program or an instruction, which causes the electronic device to execute the above method when the computer program or instruction is run on the electronic device.
  • the embodiments of the present disclosure also provide another computer program product, which is used for storing computer-readable instructions, and when the instructions are executed, the computer executes the operation of the chart display method provided by any of the above-mentioned embodiments.
  • Electronic devices may be provided as terminals, servers, or other forms of devices.
  • FIG. 8 is a schematic diagram of a hardware structure of an electronic device 800 provided by an embodiment of the present disclosure.
  • the electronic device 800 may be a terminal such as a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, or a personal digital assistant.
  • electronic device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814 , and the communication component 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as those associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802 .
  • the memory 804 is configured to store various types of data to support operations at the electronic device 800 . Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like.
  • the memory 804 can be realized by any type of volatile or non-volatile storage device or their combination, such as Static Random-Access Memory (Static Random-Access Memory, SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only memory, EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), programmable read-only memory (Programmable Read-Only memory, PROM), read-only memory (Read-Only Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • Static Random-Access Memory SRAM
  • Electrically Erasable Programmable Read-Only Memory Electrically Erasable Programmable Read-Only Memory
  • EEPROM Electrical
  • the power supply component 806 provides power to various components of the electronic device 800 .
  • Power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 800 .
  • the multimedia component 808 includes a screen providing an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (Liquid Crystal Display, LCD) and a touch panel (Touch Pad, TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
  • the touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense an edge of a touch or slide action, but also detect duration and pressure associated with the touch or slide operation.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (Microphone, MIC), and when the electronic device 800 is in an operation mode, such as a calling mode, a recording mode and a voice recognition mode, the microphone is configured to receive an external audio signal. Received audio signals may be further stored in memory 804 or sent via communication component 816 .
  • the audio component 810 also includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
  • Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of electronic device 800 .
  • the sensor component 814 can detect the open/closed state of the electronic device 800, the relative positioning of components, such as the display and the keypad of the electronic device 800, the sensor component 814 can also detect the electronic device 800 or a Changes in position of components, presence or absence of user contact with electronic device 800 , electronic device 800 orientation or acceleration/deceleration and temperature changes in electronic device 800 .
  • Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
  • the sensor assembly 814 may also include an optical sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge-coupled Device (CCD) image sensor, for use in imaging applications.
  • CMOS Complementary Metal Oxide Semiconductor
  • CCD Charge-coupled Device
  • the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 can access a wireless network based on communication standards, such as WiFi, 2G or 3G, or a combination thereof.
  • the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 also includes a Near Field Communication (NFC) module to facilitate short-range communication.
  • NFC Near Field Communication
  • the NFC module can be based on Radio Frequency Identification (RFID) technology, Infrared Data Association (Infrared Data Association, IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (Bluetooth, BT) technology and other technology to achieve.
  • RFID Radio Frequency Identification
  • IrDA Infrared Data Association
  • UWB Ultra Wide Band
  • Bluetooth Bluetooth
  • the electronic device 800 may be implemented by one or more application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (Digital Signal Processing Device , DSPD), Programmable Logic Device (Programmable Logic Device, PLD), Field Programmable Gate Array (Field Programmable Gate Array, FPGA), controller, microcontroller, microprocessor or other electronic components to implement the above method.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processing
  • DSPD digital signal processing devices
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • controller microcontroller, microprocessor or other electronic components to implement the above method.
  • a non-volatile computer-readable storage medium such as a memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete the above method.
  • FIG. 9 is a schematic diagram of a hardware structure of an electronic device 900 provided by an embodiment of the present disclosure.
  • the electronic device 900 may be provided as a server.
  • the electronic device 900 includes a processing component 910 , which further includes one or more processors, and a memory resource represented by a memory 920 for storing instructions executable by the processing component 910 , such as application programs.
  • the application program stored in memory 920 may include one or more modules each corresponding to a set of instructions.
  • the processing component 910 is configured to execute instructions to perform the above method.
  • the electronic device 900 may also include a power supply component 930 configured to perform power management of the electronic device 900, a wired or wireless network interface 940 configured to connect the electronic device 900 to a network, and an input-output (I/O) interface 950 .
  • the electronic device 900 can operate based on an operating system stored in the memory 920, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM or the like.
  • a non-volatile computer-readable storage medium such as a memory 920 including computer program instructions, which can be executed by the processing component 910 of the electronic device 900 to complete the above method.
  • Embodiments of the present disclosure may be systems, methods and/or computer program products.
  • a computer program product may include a computer readable storage medium having computer readable program instructions thereon for causing a processor to implement various aspects of the present disclosure.
  • a computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device.
  • a computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Examples of computer-readable storage media include: portable computer disks, hard disks, Random Access Memory (RAM), Read-Only Memory (ROM), erasable Programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM, or flash memory), Static Random-Access Memory (Static Random-Access Memory, SRAM), Portable Compression Disk Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM ), Digital Video Disc (DVD), memory sticks, floppy disks, mechanically encoded devices such as punched cards or raised structures in grooves with instructions stored thereon, and any suitable combination of the foregoing.
  • RAM Random Access Memory
  • ROM Read-Only Memory
  • EPROM erasable Programmable Read-Only Memory
  • EPROM Erasable Programmable Read-Only Memory
  • flash memory Static Random-Access Memory
  • Static Random-Access Memory SRAM
  • Portable Compression Disk Read-Only Memory Compact Disc Read-Only Memory
  • CD-ROM Compact Disc Read-Only
  • computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., pulses of light through fiber optic cables), or transmitted electrical signals.
  • Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or a network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for performing the operations of the present disclosure may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or in the form of one or more source or object code written in any combination of programming languages, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the “C” language or similar programming languages.
  • Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external computer such as use an Internet service provider to connect via the Internet).
  • electronic circuits such as programmable logic circuits, field programmable gate arrays (Field Programmable Gate Array, FPGA) or programmable logic arrays (Programmable Logic Array, PLA), the electronic circuit can execute computer-readable program instructions, thereby implementing various aspects of the present disclosure.
  • These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.
  • each block in a flowchart or block diagram may represent a module, a portion of a program segment, or an instruction that includes one or more Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.
  • the computer program product can be realized by hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in other implementation scenarios, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.
  • Embodiments of the present disclosure relate to a chart display method and device, electronic equipment, a storage medium, and a computer program product.
  • the method includes: acquiring target data for displaying the chart, and the target data includes static display data and dynamic display data. data; draw the static display area of the chart according to the static display data, wherein the static display area includes the first display content with a fixed position on the target display interface; according to the dynamic display data and the chart in The display state in the target display interface draws a dynamic display area, wherein the dynamic display area includes second display content, and the second display content is transformed according to the display state; in the target display interface, The static display area and the dynamic display area are superimposedly displayed.
  • the above scheme can realize the separate drawing of the static display area and the dynamic display area in the chart, and it is convenient to draw the dynamic display area by changing the second display content when the display state changes, reducing the changes to the static display area, thereby reducing
  • the amount of data processed during chart drawing improves the efficiency and performance of chart display.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

Embodiments of the present disclosure relate to a graph display method and apparatus, an electronic device, a storage medium, and a computer program product. The method comprises: obtaining target data for displaying a graph, the target data comprising static display data and dynamic display data; drawing a static display area of the graph according to the static display data, the static display area comprising first display content having a fixed position on a target display interface; drawing a dynamic display area according to the dynamic display data and a display state of the graph in the target display interface, the dynamic display area comprising second display content, and the second display content being transformed according to the display state; and in the target display interface, superimposingly displaying the static display area and the dynamic display area.

Description

图表显示方法及装置、电子设备、存储介质和计算机程序产品Diagram display method and device, electronic device, storage medium and computer program product
相关申请的交叉引用Cross References to Related Applications
本公开实施例基于申请号为202111106936.9、申请日为2021年09月22日、申请名称为“图表显示方法及装置、电子设备和存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。The embodiment of the present disclosure is based on the Chinese patent application with the application number 202111106936.9, the application date is September 22, 2021, and the application name is "chart display method and device, electronic equipment and storage medium", and the priority of the Chinese patent application is required Right, the entire content of this Chinese patent application is hereby incorporated into this disclosure as a reference.
技术领域technical field
本公开实施例涉及但不限于计算机技术领域,尤其涉及一种图表显示方法及装置、电子设备、存储介质和计算机程序产品。Embodiments of the present disclosure relate to but are not limited to the field of computer technologies, and in particular, relate to a graph display method and device, electronic equipment, storage media, and computer program products.
背景技术Background technique
随着计算机技术的快速发展,对数据进行可视化展示已经愈加广泛地应用在人们的生活之中。在相关技术中,在绘制图表的过程中图表的显示性能及效率均不高。With the rapid development of computer technology, visual display of data has become more and more widely used in people's lives. In the related art, the display performance and efficiency of the graph are not high during the process of drawing the graph.
发明内容Contents of the invention
本公开实施例提供一种图表显示方法及装置、电子设备、存储介质和计算机程序产品。Embodiments of the present disclosure provide a graph display method and device, electronic equipment, a storage medium, and a computer program product.
本公开实施例提供了一种图表显示方法,所述方法包括:An embodiment of the present disclosure provides a method for displaying a chart, the method including:
获取用于显示所述图表的目标数据,所述目标数据包括静态显示数据和动态显示数据;根据所述静态显示数据,绘制所述图表的静态显示区域,其中,所述静态显示区域包括在目标显示界面上位置固定的第一显示内容;根据所述动态显示数据和所述图表在所述目标显示界面中的显示状态,绘制动态显示区域,其中,所述动态显示区域包括第二显示内容,所述第二显示内容根据所述显示状态进行变换;在所述目标显示界面中,叠加显示所述静态显示区域和所述动态显示区域。acquiring target data for displaying the chart, the target data including static display data and dynamic display data; drawing a static display area of the chart according to the static display data, wherein the static display area is included in the target displaying the first display content with a fixed position on the interface; drawing a dynamic display area according to the dynamic display data and the display status of the chart in the target display interface, wherein the dynamic display area includes a second display content, The second display content is transformed according to the display state; in the target display interface, the static display area and the dynamic display area are superimposedly displayed.
在一些实施方式中,所述根据所述静态显示数据,绘制所述图表的静态显示区域,包括:根据所述静态显示数据,确定所述第一显示内容在所述目标显示界面上的第一显示位置;根据所述第一显示位置,对所述第一显示内容进行绘制,得到所述静态显示区域。In some embodiments, drawing the static display area of the chart according to the static display data includes: determining the first position of the first display content on the target display interface according to the static display data A display position: drawing the first display content according to the first display position to obtain the static display area.
在一些实施方式中,所述根据所述动态显示数据和所述图表在所述目标显示界面中的显示状态,绘制动态显示区域,包括:响应于针对所述图表的显示控制操作,确定所述图表在所述目标显示界面中的显示状态;根据所述显示状态,获取第三显示内容中与所述显示状态匹配的第二显示内容,其中,所述第三显示内容包括与所述动态显示数据匹配的全部显示内容;根据所述动态显示数据,确定所述第二显示内容在所述目标显示界面上的第二显示位置;根据所述第二显示位置,对所述第二显示内容进行绘制,得到所述动态显示区域。In some implementations, the drawing of the dynamic display area according to the dynamic display data and the display state of the chart in the target display interface includes: in response to a display control operation on the chart, determining the The display state of the chart in the target display interface; according to the display state, obtain the second display content matching the display state in the third display content, wherein the third display content includes the dynamic display content All display contents matched by the data; according to the dynamic display data, determine a second display position of the second display content on the target display interface; according to the second display position, perform Draw to get the dynamic display area.
在一些实施方式中,所述显示状态包括显示进度;所述第三显示内容包括多个图元元素,所述多个图元元素在所述图表的预设方向上按照相同的预设间距进行排列;所述根据所述显示状态,获取第三显示内容中与所述显示状态匹配的第二显示内容,包括:根据所述显示进度与所述预设间距,确定所述第二显示内容中待显示的初始图元元素;根据所述显示进度、所述预设间距以及所述动态显示区域在所述图表中的预设显示范围,确定所述第二显示内容中待显示的终止图元元素;基于所述初始图元元素和所述终止图元元素,从所述第三显示内容中提取与所述显示状态匹配的第二显示内容。In some implementations, the display status includes display progress; the third display content includes a plurality of graphic elements, and the plurality of graphic elements move along the preset direction of the chart at the same preset distance. arranging: according to the display state, acquiring the second display content in the third display content that matches the display state includes: determining the second display content in the second display content according to the display progress and the preset distance The initial graphic element to be displayed; according to the display progress, the preset distance, and the preset display range of the dynamic display area in the chart, determine the terminal graphic element to be displayed in the second display content An element; based on the initial graphic element and the terminating graphic element, extracting second display content that matches the display state from the third display content.
在一些实施方式中,所述动态显示区域还包括第四显示内容;所述根据所述动态显示数据和所述图表在所述目标显示界面中的显示状态,绘制动态显示区域,还包括:根据所述显示状态,按照预设统计规则,对所述第二显示内容进行合并统计,得到所述第四显示内容;根据预设显示位置,对所述第四显示内容进行绘制。In some implementations, the dynamic display area further includes fourth display content; drawing the dynamic display area according to the dynamic display data and the display state of the chart in the target display interface further includes: In the display state, the second display content is combined and counted according to a preset statistical rule to obtain the fourth display content; and the fourth display content is drawn according to a preset display position.
在一些实施方式中,所述获取用于显示所述图表的目标数据,包括:获取用于显示所述图表的初始数据;根据所述初始数据的数据类型,对所述初始数据进行数据结构变换,得到与预设数据结构匹配的中间数据;根据所述图表对应的可视化数据结构,将所述中间数据进行转换,得到与所述可视化数据结构匹配的目标数据。In some implementations, the acquiring target data for displaying the chart includes: acquiring initial data for displaying the chart; performing data structure transformation on the initial data according to the data type of the initial data to obtain intermediate data matching the preset data structure; converting the intermediate data according to the visualized data structure corresponding to the chart to obtain target data matching the visualized data structure.
在一些实施方式中,所述可视化数据结构包括以下至少之一:所述静态显示数据的第一数据结构、所述动态显示数据的第二数据结构以及所述动态显示数据的第三数据结构,其中,所述第二数据结构与第二显示内容匹配,所述第三数据结构与第四显示内容匹配,所述第四显示内容包括对所述第二显示内容进行合并统计所得到的统计结果。In some implementations, the visualization data structure includes at least one of the following: a first data structure of the static display data, a second data structure of the dynamic display data, and a third data structure of the dynamic display data, Wherein, the second data structure matches the second display content, the third data structure matches the fourth display content, and the fourth display content includes the statistical result obtained by combining and counting the second display content .
在一些实施方式中,所述静态显示数据的第一数据结构包括以下至少之一:数值固定的第一位置信息、第一标签以及第一颜色信息;所述动态显示数据的第二数据结构包括以下至少之一:第二位置信息、第二标签以及第二颜色信息,其中,所述第二位置信息的数值根据所述显示状态进行变换;所述动态显示数据的第三数据结构包括以下至少之一:第三标签信息、第三颜色信息、统计信息以及判断信息,其中,所述判断信息包括根据预设判断规则对所述统计信息进行判断所得到的判断结果。In some implementations, the first data structure of the static display data includes at least one of the following: first position information, a first label, and first color information with fixed values; the second data structure of the dynamic display data includes At least one of the following: second position information, second label, and second color information, wherein the value of the second position information is transformed according to the display state; the third data structure of the dynamic display data includes at least the following One: third label information, third color information, statistical information, and judgment information, wherein the judgment information includes a judgment result obtained by judging the statistical information according to a preset judgment rule.
在一些实施方式中,所述图表包括时间与责任对象之间的对应关系图表。In some implementations, the graph includes a graph of correspondence between time and responsible objects.
本公开实施例提供了一种图表显示装置,包括:An embodiment of the present disclosure provides a graph display device, including:
获取部分,被配置为获取用于显示所述图表的目标数据,所述目标数据包括静态显示数据和动态显示数据;静态绘制部分,被配置为根据所述静态显示数据,绘制所述图表的静态显示区域,其中,所述静态显示区域包括在目标显示界面上位置固定的第一显示内容;动态绘制部分,被配置为根据所述动态显示数据和所述图表在所述目标显示界面中的显示状态,绘制动态显示区域,其中,所述动态显示区域包括第二显示内容,所述第二显示内容根据所述显示状态进行变换;显示部分,被配置为在所述目标显示界面中,叠加显示所述静态显示区域和所述动态显示区域。The acquisition part is configured to acquire target data for displaying the chart, the target data includes static display data and dynamic display data; the static drawing part is configured to draw the static display data of the chart according to the static display data A display area, wherein the static display area includes the first display content whose position is fixed on the target display interface; the dynamic drawing part is configured to display in the target display interface according to the dynamic display data and the chart State, drawing a dynamic display area, wherein, the dynamic display area includes second display content, and the second display content is transformed according to the display state; the display part is configured to superimpose display in the target display interface The static display area and the dynamic display area.
在一些实施方式中,所述静态绘制部分,包括:第一确定子部分,被配置为根据所述静态显示数据,确定所述第一显示内容在所述目标显示界面上的第一显示位置;第一绘制子部分,被配置为根据所述第一显示位置,对所述第一显示内容进行绘制,得到所述静态显示区域。In some implementations, the static drawing part includes: a first determination subsection configured to determine a first display position of the first display content on the target display interface according to the static display data; The first drawing subsection is configured to draw the first display content according to the first display position to obtain the static display area.
在一些实施方式中,所述动态绘制部分,包括:第二确定子部分,被配置为响应于针对所述图表的显示控制操作,确定所述图表在所述目标显示界面中的显示状态;第一获取子部分,被配置为根据所述显示状态,获取第三显示内容中与所述显示状态匹配的第二显示内容,其中,所述第三显示内容包括与所述动态显示数据匹配的全部显示内容;第三确定子部分,被配置为根据所述动态显示数据,确定所述第二显示内容在所述目标显示界面上的第二显示位置;第二绘制部分,被配置为根据所述第二显示位置,对所述第二显示内容进行绘制,得到所述动态显示区域。In some implementations, the dynamic drawing part includes: a second determining subsection configured to determine a display state of the chart in the target display interface in response to a display control operation on the chart; An acquisition subsection configured to acquire, according to the display status, second display content that matches the display status in the third display content, wherein the third display content includes all the content that matches the dynamic display data display content; the third determining subpart is configured to determine a second display position of the second display content on the target display interface according to the dynamic display data; the second drawing part is configured to determine a second display position of the second display content on the target display interface according to the dynamic display data; In the second display position, the second display content is drawn to obtain the dynamic display area.
在一些实施方式中,所述显示状态包括显示进度;所述第三显示内容包括多个图元元素,所述多个图元元素在所述图表的预设方向上按照相同的预设间距进行排列;所述第一获取子部 分,包括:第四确定子部分,被配置为根据所述显示进度与所述预设间距,确定所述第二显示内容中待显示的初始图元元素;第五确定子部分,被配置为根据所述显示进度、所述预设间距以及所述动态显示区域在所述图表中的预设显示范围,确定所述第二显示内容中待显示的终止图元元素;第一提取子部分,被配置为基于所述初始图元元素和所述终止图元元素,从所述第三显示内容中提取与所述显示状态匹配的第二显示内容。In some implementations, the display status includes display progress; the third display content includes a plurality of graphic elements, and the plurality of graphic elements move along the preset direction of the chart at the same preset distance. arrangement; the first acquisition subsection includes: a fourth determination subsection configured to determine an initial graphic element to be displayed in the second display content according to the display progress and the preset distance; the second The fifth determining subsection is configured to determine the termination graphic element to be displayed in the second display content according to the display progress, the preset distance, and the preset display range of the dynamic display area in the chart element; a first extraction subsection configured to extract second display content matching the display state from the third display content based on the initial graphic element and the termination graphic element.
在一些实施方式中,所述动态显示区域还包括第四显示内容;所述动态绘制部分,还包括:第一得到子部分,被配置为根据所述显示状态,按照预设统计规则,对所述第二显示内容进行合并统计,得到所述第四显示内容;第三绘制子部分,被配置为根据预设显示位置,对所述第四显示内容进行绘制。In some implementations, the dynamic display area further includes fourth display content; the dynamic drawing part further includes: a first obtaining subpart configured to, according to the display state and according to a preset statistical rule, calculate the The second display content is combined and counted to obtain the fourth display content; the third drawing subsection is configured to draw the fourth display content according to a preset display position.
在一些实施方式中,所述获取部分,包括:第二获取子部分,被配置为获取用于显示所述图表的初始数据;第二得到子部分,被配置为根据所述初始数据的数据类型,对所述初始数据进行数据结构变换,得到与预设数据结构匹配的中间数据;第三得到子部分,被配置为根据所述图表对应的可视化数据结构,将所述中间数据进行转换,得到与所述可视化数据结构匹配的目标数据。In some implementations, the acquisition part includes: a second acquisition subsection configured to acquire initial data for displaying the graph; a second acquisition subsection configured to obtain the initial data according to the data type of the initial data , performing data structure transformation on the initial data to obtain intermediate data matching the preset data structure; the third obtaining sub-part is configured to convert the intermediate data according to the visual data structure corresponding to the chart to obtain Target data matching the visualization data structure.
在一些实施方式中,所述可视化数据结构包括以下至少之一:所述静态显示数据的第一数据结构、所述动态显示数据的第二数据结构以及所述动态显示数据的第三数据结构,其中,所述第二数据结构与第二显示内容匹配,所述第三数据结构与第四显示内容匹配,所述第四显示内容包括对所述第二显示内容进行合并统计所得到的统计结果。In some implementations, the visualization data structure includes at least one of the following: a first data structure of the static display data, a second data structure of the dynamic display data, and a third data structure of the dynamic display data, Wherein, the second data structure matches the second display content, the third data structure matches the fourth display content, and the fourth display content includes the statistical result obtained by combining and counting the second display content .
在一些实施方式中,所述静态显示数据的第一数据结构包括以下至少之一:数值固定的第一位置信息、第一标签以及第一颜色信息;所述动态显示数据的第二数据结构包括以下至少之一:第二位置信息、第二标签以及第二颜色信息,其中,所述第二位置信息的数值根据所述显示状态进行变换;所述动态显示数据的第三数据结构包括以下至少之一:第三标签信息、第三颜色信息、统计信息以及判断信息,其中,所述判断信息包括根据预设判断规则对所述统计信息进行判断所得到的判断结果。In some implementations, the first data structure of the static display data includes at least one of the following: first position information, a first label, and first color information with fixed values; the second data structure of the dynamic display data includes At least one of the following: second position information, second label, and second color information, wherein the value of the second position information is transformed according to the display state; the third data structure of the dynamic display data includes at least the following One: third label information, third color information, statistical information, and judgment information, wherein the judgment information includes a judgment result obtained by judging the statistical information according to a preset judgment rule.
在一些实施方式中,所述图表包括时间与责任对象之间的对应关系图表。In some implementations, the graph includes a graph of correspondence between time and responsible objects.
本公开实施例提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。An embodiment of the present disclosure provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
本公开实施例提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。An embodiment of the present disclosure provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
本公开实施例提供了一种计算机程序产品,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在电子设备上运行的情况下,使得所述电子设备执行时实现上述方法。An embodiment of the present disclosure provides a computer program product, where the computer program product includes a computer program or an instruction, and when the computer program or instruction is run on an electronic device, the above method is implemented when the electronic device is executed.
在本公开实施例中,可以获取用于显示图表的目标数据,并根据目标数据中的静态显示数据,绘制图表的静态显示区域,根据目标数据中的动态显示数据和图表的显示状态,绘制动态显示区域,并在目标显示界面中,叠加显示静态显示区域和动态显示区域。这样,可以实现图表中静态显示区域和动态显示区域的分别绘制,且便于在显示状态变化的情况下,通过变换的第二显示内容来绘制动态显示区域,减少对静态显示区域的更改,从而减少图表绘制过程中处理的数据量,提高图表显示的效率和性能。In the embodiment of the present disclosure, the target data for displaying the chart can be obtained, and the static display area of the chart can be drawn according to the static display data in the target data, and the dynamic display area can be drawn according to the dynamic display data in the target data and the display state of the chart. The display area, and in the target display interface, the static display area and the dynamic display area are superimposedly displayed. In this way, the separate drawing of the static display area and the dynamic display area in the chart can be realized, and it is convenient to draw the dynamic display area by changing the second display content when the display state changes, reducing the changes to the static display area, thereby reducing The amount of data processed during chart drawing improves the efficiency and performance of chart display.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The accompanying drawings here are incorporated into the description and constitute a part of the present description. These drawings show embodiments consistent with the present disclosure, and are used together with the description to explain the technical solution of the present disclosure.
图1为本公开实施例提供的一种图表显示方法的流程示意图;FIG. 1 is a schematic flowchart of a graph display method provided by an embodiment of the present disclosure;
图2为本公开实施例提供的一种图表显示方法的流程示意图;FIG. 2 is a schematic flowchart of a graph display method provided by an embodiment of the present disclosure;
图3为本公开实施例提供的一种图表的示意图;FIG. 3 is a schematic diagram of a chart provided by an embodiment of the present disclosure;
图4为本公开实施例提供的一种图表显示方法的流程示意图;FIG. 4 is a schematic flowchart of a graph display method provided by an embodiment of the present disclosure;
图5为本公开实施例提供的一种图表的示意图;FIG. 5 is a schematic diagram of a chart provided by an embodiment of the present disclosure;
图6为本公开实施例提供的一种图表显示装置的组成结构示意图;FIG. 6 is a schematic diagram of the composition and structure of a chart display device provided by an embodiment of the present disclosure;
图7为本公开实施例提供的一应用示例的示意图;FIG. 7 is a schematic diagram of an application example provided by an embodiment of the present disclosure;
图8为本公开实施例提供的一种电子设备的硬件结构示意图;FIG. 8 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present disclosure;
图9为本公开实施例提供的一种电子设备的硬件结构示意图。FIG. 9 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
以下将参考附图详细说明本公开的示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的多个方面,但是除非特别指出,不必按比例绘制附图。Exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures indicate functionally identical or similar elements. While the various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as superior or better than other embodiments.
本文中术语“和/或”,是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article is an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and B exists alone These three situations. In addition, the term "at least one" herein means any one of a variety or any combination of at least two of the more, for example, including at least one of A, B, and C, which may mean including from A, Any one or more elements selected from the set formed by B and C.
另外,为了更好地说明本公开,在下文的实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实施例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following embodiments. It will be understood by those skilled in the art that the present disclosure may be practiced without some of the specific details. In some embodiments, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the gist of the present disclosure.
随着计算机技术的快速发展,对数据进行可视化展示已经愈加广泛地应用在人们的生活之中。然而在对图表绘制的过程中,往往是在同一图层中一次性画出图表的全部内容。这种绘制方式不仅提升了绘制中需要处理的数据量,也不易对图表中的内容进行更改,导致图表显示性能的降低。With the rapid development of computer technology, visual display of data has become more and more widely used in people's lives. However, in the process of drawing a chart, the entire content of the chart is often drawn in the same layer at one time. This drawing method not only increases the amount of data that needs to be processed in the drawing, but also makes it difficult to change the content in the chart, resulting in a decrease in the performance of the chart display.
基于此,本公开实施例提供了一种图表显示方法,可以实现图表中静态显示区域和动态显示区域的分别绘制,且便于在显示状态变化的情况下,通过变换的第二显示内容来绘制动态显示区域,减少对静态显示区域的更改,从而减少图表绘制过程中处理的数据量,提高图表显示的效率和性能。Based on this, the embodiment of the present disclosure provides a chart display method, which can realize the separate drawing of the static display area and the dynamic display area in the chart, and is convenient to draw the dynamic chart through the transformed second display content when the display state changes. The display area reduces changes to the static display area, thereby reducing the amount of data processed during chart drawing and improving the efficiency and performance of chart display.
图1为本公开实施例提供的一种图表显示方法的流程示意图,该方法可以应用于图表显示装置,该图表显示装置可以为终端设备、服务器或者其他处理设备等。其中,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。FIG. 1 is a schematic flowchart of a graph display method provided by an embodiment of the present disclosure. The method can be applied to a graph display device, and the graph display device can be a terminal device, a server, or other processing devices. Wherein, the terminal device may be user equipment (User Equipment, UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (Personal Digital Assistant, PDA), handheld device, computing device, vehicle-mounted device, Wearable equipment etc.
在一些实施方式中,该图表显示方法也可以通过处理器调用存储器中存储的计算机可读指 令的方式来实现。In some implementations, the method for displaying graphs can also be implemented by the processor invoking computer-readable instructions stored in the memory.
如图1所示,在一些实施方式中,所述图表显示方法可以包括步骤S11至步骤S14,其中:As shown in FIG. 1, in some implementations, the graph display method may include steps S11 to S14, wherein:
步骤S11,获取用于显示图表的目标数据。Step S11, acquiring target data for displaying charts.
这里,图表可以包括对数据或信息等内容进行可视化展示的任意图形结构,图表的实现形式在本公开实施例中不做限制,比如可以是条形图、柱状图、折线图、饼图、散点图、雷达图或面积图等任意形式;图表的维度同样不受限制,比如可以为二维图表、三维图表、或更高维度的图表等。Here, the chart may include any graphical structure for visually displaying data or information. Any form such as point chart, radar chart or area chart; the dimension of the chart is also not limited, for example, it can be a two-dimensional chart, a three-dimensional chart, or a higher-dimensional chart.
图表的内容同样可以根据实际情况灵活设定,不局限于本公开各实施例。在一些实施方式中,图表可以是应用于事件管理系统的相关图表,用于对事件管理系统内的一些数据进行展示等。在一些实施方式中,图表也可以为应用于其他领域的图表,比如财务领域、互联网领域、或办公领域等。The content of the chart can also be flexibly set according to the actual situation, and is not limited to the embodiments of the present disclosure. In some implementations, the chart may be a related chart applied to the event management system, for displaying some data in the event management system and the like. In some implementation manners, the chart may also be a chart applied in other fields, such as the financial field, the Internet field, or the office field.
在一些实施方式中,图表可以为包括时间与责任对象之间的对应关系图表。其中,时间可以是事件的处理时间,该时间可以以分钟、小时、或天为单位等进行统计,责任对象可以是对该事件进行处理、或负担责任的相关对象,比如处理人员、辅助人员、当事人、或指挥中心等。在图表包括时间与责任对象之间的对应关系的情况下,可以将时间作为x轴信息,责任对象作为y轴信息,也可以将时间作为y轴信息,将责任对象作为x轴信息等,本领域技术人员可以根据实际情况进行设定即可。In some implementations, the graph may be a graph including a correspondence relationship between time and responsibility objects. Among them, the time can be the processing time of the event, and the time can be counted in minutes, hours, or days. parties, or the command center, etc. When the graph includes the correspondence between time and responsible objects, time can be used as x-axis information and responsible objects can be used as y-axis information, or time can be used as y-axis information and responsible objects can be used as x-axis information. Those skilled in the art can make settings according to actual conditions.
目标数据可以是图表所展示的数据对象,目标数据包含的数据内容可以根据图表的实际情况灵活决定,比如可以包含图表中坐标轴的位置、图表中节点的位置、以及图表中包含的文字内容等。The target data can be the data object displayed in the chart. The data content contained in the target data can be flexibly determined according to the actual situation of the chart. For example, it can include the position of the coordinate axis in the chart, the position of the node in the chart, and the text content contained in the chart, etc. .
在一些实施方式中,目标数据可以包含静态显示数据和动态显示数据,其中,静态显示数据中数据可以包含固定的位置信息,在图表绘制的过程中,静态显示数据对应的绘制内容可以绘制在固定的位置处。而动态显示数据可以包含变化的位置信息,在图表绘制的过程中,动态显示数据对应的绘制内容绘制的位置可以是动态变化的,比如在对图表进行拉动的情况下,图表中的某些节点的位置可能跟随拉动的方向而进行改变,则这些节点对应的数据可以作为动态显示数据等。In some implementations, the target data may include static display data and dynamic display data, wherein the data in the static display data may contain fixed location information, and during the chart drawing process, the drawing content corresponding to the static display data may be drawn on a fixed at the location. The dynamic display data can contain changing position information. In the process of drawing the chart, the position of the drawing content corresponding to the dynamic display data can be dynamically changed. For example, when the chart is pulled, some nodes in the chart The position of the nodes may change according to the direction of pulling, and the data corresponding to these nodes can be used as dynamic display data, etc.
目标数据的数据结构同样可以根据图表的实际情况灵活决定,而且不同类型的目标数据,其数据结构也可能不同,比如静态显示数据和动态显示数据可以对应不同的数据结构等。详见下述各公开实施例。The data structure of the target data can also be flexibly determined according to the actual situation of the chart, and different types of target data may have different data structures. For example, static display data and dynamic display data can correspond to different data structures. See each of the disclosed examples below for details.
获取目标数据的方式在本公开实施例中同样不做限制,比如直接从预设的数据库中读取数据,或实时接收待显示的目标数据,或对获取的数据进行一定的数据处理后得到目标数据等。步骤S11的一些实施方式可以详见下述各公开实施例。The method of acquiring target data is also not limited in the embodiments of the present disclosure, such as directly reading data from a preset database, or receiving target data to be displayed in real time, or performing certain data processing on the acquired data to obtain the target data etc. For some implementation manners of step S11, refer to the following disclosed embodiments for details.
步骤S12,根据静态显示数据,绘制图表的静态显示区域。Step S12, draw the static display area of the chart according to the static display data.
这里,图表的静态显示区域,可以包括图表中显示内容固定且显示位置固定的区域,静态显示区域中包含的内容可以根据实际情况灵活选择,不局限于下述各公开实施例。Here, the static display area of the chart may include an area with fixed display content and fixed display position in the chart, and the content contained in the static display area may be flexibly selected according to actual conditions, and is not limited to the following disclosed embodiments.
在一些实施方式中,静态显示区域可以包括在目标显示界面上位置固定的第一显示内容。In some implementations, the static display area may include first display content with a fixed position on the target display interface.
这里,目标显示界面可以是用于对图表进行显示的任意界面,其界面形式在本公开实施例中不做限制,可以为具有显示功能的任意设备界面,比如手机屏幕、电脑屏幕、或投影设备等,在一些实施方式中,该目标显示界面也可以为具有展示功能的软件界面,比如网页、画图等图 像编辑软件的显示界面、或办公软件的显示界面等。Here, the target display interface can be any interface for displaying charts, and its interface form is not limited in the embodiments of the present disclosure, and can be any device interface with a display function, such as a mobile phone screen, a computer screen, or a projection device Etc., in some embodiments, the target display interface can also be a software interface with a display function, such as a display interface of image editing software such as webpage and drawing, or a display interface of office software.
第一显示内容可以包括在目标显示界面上位置固定的内容,举例来说,图表中可以包含多个坐标轴,如x轴、y轴、或z轴等,如果其中的某个坐标轴中包含的数据内容可以完全显示在目标显示界面上,则该坐标轴与坐标轴对应的内容均可以作为静态显示区域中的第一显示内容。比如,某个二维折线图中,y轴中可以包含固定的内容信息,则这些固定的内容信息可以完全显示在目标显示界面上,在这种情况下,y轴的长度、y轴的分隔线、或y轴上的标签等信息在目标显示界面中的显示位置均可以是固定不变的,因此可以将y轴坐标轴、y轴上的分隔线以及y轴上的标签等均作为静态显示区域所包含的第一显示内容。The first display content may include fixed-position content on the target display interface. For example, a chart may contain multiple coordinate axes, such as x-axis, y-axis, or z-axis, etc., if one of the coordinate axes contains If the data content of the coordinate axis can be completely displayed on the target display interface, then the coordinate axis and the content corresponding to the coordinate axis can be used as the first display content in the static display area. For example, in a two-dimensional line chart, the y-axis can contain fixed content information, and these fixed content information can be completely displayed on the target display interface. In this case, the length of the y-axis and the separation of the y-axis The display position of information such as lines or labels on the y-axis in the target display interface can be fixed, so the y-axis coordinate axis, the dividing line on the y-axis, and the labels on the y-axis can all be used as static The first display content included in the display area.
步骤S12的实现形式可以根据静态显示数据的实际情况的不同而灵活发生变化,详见下述各公开实施例。The implementation form of step S12 can be flexibly changed according to the actual situation of the static display data, see the following disclosed embodiments for details.
步骤S13,根据动态显示数据和图表在所述目标显示界面中的显示状态,绘制动态显示区域。Step S13, drawing a dynamic display area according to the display state of the dynamic display data and the graph in the target display interface.
这里,图表的动态显示区域,可以包括图表中显示内容变化的区域,举例来说,在一些实施方式中,目标显示界面的显示范围可能有限,使得图表无法完全展现在目标显示界面中,在这种情况下,可以根据目标显示界面的可视范围对图表进行移动,而图表中跟随移动情况而进行展示的区域则可以作为动态显示区域。动态显示区域中包含的内容同样可以根据实际情况灵活选择,不局限于下述各公开实施例。Here, the dynamic display area of the chart may include the area where the display content changes in the chart. For example, in some implementations, the display range of the target display interface may be limited, so that the chart cannot be fully displayed in the target display interface. In this case, the chart can be moved according to the visible range of the target display interface, and the area displayed in the chart following the movement can be used as a dynamic display area. The content contained in the dynamic display area can also be flexibly selected according to the actual situation, and is not limited to the following disclosed embodiments.
在一些实施方式中,动态显示区域包括第二显示内容,第二显示内容可以根据显示状态进行变换。In some implementations, the dynamic display area includes second display content, and the second display content can be changed according to the display state.
这里,显示状态可以包括图表在目标显示界面中的显示情况,举例来说,图表在目标显示界面中无法进行完全显示的情况下,显示状态可以包括图表在目标显示界面中的显示进度,该显示进度用以表明目标显示界面中显示的内容在图表整体待展示的整体内容中的所占比例,该显示进度可以通过滚动轴、滚动条、或动态文字等形式显示在目标显示界面中。Here, the display status may include the display status of the chart in the target display interface. For example, if the chart cannot be fully displayed in the target display interface, the display status may include the display progress of the chart in the target display interface. The progress is used to indicate the proportion of the content displayed in the target display interface to the overall content to be displayed in the chart. The display progress can be displayed in the target display interface in the form of a scroll axis, a scroll bar, or dynamic text.
第二显示内容可以包括根据显示状态进行变换的内容,举例来说,如果图表中的某个坐标轴中包含的数据内容无法完全显示在目标显示界面上,则该坐标轴与坐标轴对应的内容可以作为动态显示区域中的第二显示内容。比如,某个二维折线图中,x轴中包含的内容信息可能比较多,比如x轴可能是时间轴,而时间的延伸范围较长且可能随着情况的改变一直延伸,导致目标显示界面仅能对x轴对应的内容信息进行部分显示,在这种情况下,x轴、x轴上的标签以及图表中包含x坐标位置的各节点等在目标显示界面中的显示状态均可能随着x轴进度的变化而改变,因此可以将x轴、x轴上的标签以及图表中包含x坐标位置的各节点等均作为动态显示区域所包含的第二显示内容。The second display content may include content that is transformed according to the display state. For example, if the data content contained in a certain coordinate axis in the chart cannot be completely displayed on the target display interface, the content corresponding to the coordinate axis and the coordinate axis It can be used as the second display content in the dynamic display area. For example, in a two-dimensional line chart, the x-axis may contain more content information. For example, the x-axis may be a time axis, and the time extension range is long and may continue to extend as the situation changes, resulting in the target display interface Only part of the content information corresponding to the x-axis can be displayed. In this case, the display status of the x-axis, labels on the x-axis, and nodes containing the x-coordinate position in the chart may vary with the target display interface. Therefore, the x-axis, the label on the x-axis, and each node in the chart containing the x-coordinate position can be used as the second display content contained in the dynamic display area.
步骤S13的实现形式可以根据动态显示数据的实际情况的不同而灵活发生变化,在一些实施方式中,在显示状态发生变化的情况下,可以将动态显示区域中已绘制的第二显示内容清空,并根据变化后的显示状态,重新确定第二显示内容,并对动态显示区域重新进行绘制等。详见下述各公开实施例。The implementation form of step S13 can be flexibly changed according to the actual situation of the dynamic display data. In some embodiments, when the display state changes, the drawn second display content in the dynamic display area can be cleared. And according to the changed display state, the second display content is re-determined, and the dynamic display area is redrawn. See each of the disclosed examples below for details.
步骤S14,在目标显示界面中,叠加显示静态显示区域和动态显示区域。Step S14, in the target display interface, the static display area and the dynamic display area are superimposedly displayed.
这里,静态显示区域和动态显示区域叠加的形式可以根据实际情况灵活选择,可以是包含遮挡的相互叠加,也可以是互不遮挡的叠加,在本公开实施例中不做限制。Here, the superposition form of the static display area and the dynamic display area can be flexibly selected according to the actual situation. It can be mutual superposition including occlusion, or mutual superposition without occlusion, which is not limited in this embodiment of the present disclosure.
静态显示区域和动态显示区域的叠加顺序同样可以根据实际情况灵活决定,可以根据实际情况设定将动态显示区域叠加在静态显示区域上,也可以将静态显示区域叠加在动态显示区域 上,在进行互补遮挡的叠加的情况下,也可以无需考虑静态显示区域和动态显示区域的叠加顺序等。The stacking order of the static display area and the dynamic display area can also be flexibly determined according to the actual situation. You can set the dynamic display area to be superimposed on the static display area, or you can superimpose the static display area on the dynamic display area. In the case of superposition of complementary occlusion, it is not necessary to consider the superposition order of the static display area and the dynamic display area.
在本公开实施例中,可以获取用于显示图表的目标数据,并根据目标数据中的静态显示数据,绘制图表的静态显示区域,根据目标数据中的动态显示数据和图表的显示状态,绘制动态显示区域,并在目标显示界面中,叠加显示静态显示区域和动态显示区域。这样,可以实现图表中静态显示区域和动态显示区域的分别绘制,且便于在显示状态变化的情况下,通过变换的第二显示内容来绘制动态显示区域,减少对静态显示区域的更改,从而减少图表绘制过程中处理的数据量,提高图表显示的效率和性能。In the embodiment of the present disclosure, the target data for displaying the chart can be obtained, and the static display area of the chart can be drawn according to the static display data in the target data, and the dynamic display area can be drawn according to the dynamic display data in the target data and the display state of the chart. The display area, and in the target display interface, the static display area and the dynamic display area are superimposedly displayed. In this way, the separate drawing of the static display area and the dynamic display area in the chart can be realized, and it is convenient to draw the dynamic display area by changing the second display content when the display state changes, reducing the changes to the static display area, thereby reducing The amount of data processed during chart drawing improves the efficiency and performance of chart display.
在一些实施方式中,步骤S11可以包括步骤S111至步骤S113,其中:In some implementations, step S11 may include step S111 to step S113, wherein:
步骤S111、获取用于显示图表的初始数据。Step S111 , acquiring initial data for displaying charts.
这里,初始数据可以包括与图表显示的内容相关的任意数据,其获取方式可以根据图表内容的不同而灵活发生变化。比如在图表为时间与责任对象之间的对应关系图表的情况下,初始数据可以为事件管理系统的相关数据,从事件管理系统的数据库中进行读取。在一些实施方式中,在事件处于过程中的情况下,初始数据也可以通过实时获取的方式所得到。Here, the initial data may include any data related to the content displayed in the chart, and its acquisition method may be flexibly changed according to the content of the chart. For example, when the graph is a graph of the corresponding relationship between time and responsible objects, the initial data may be related data of the event management system, which is read from the database of the event management system. In some embodiments, when the event is in progress, the initial data can also be obtained in real time.
初始数据可以包含一种或多种数据类型,该数据类型在本公开实施例中同样不做限制,比如在初始数据为事件管理系统的相关数据的情况下,初始数据的类型可以随着该初始数据所属责任对象的不同而发生变化,比如可以是处理人员的相关数据、当事人通过事件管理系统上传的普通数据、或指挥中心中的汇总数据等。The initial data may contain one or more data types, and the data types are not limited in the embodiments of the present disclosure. For example, when the initial data is related data of the event management system, the type of the initial data may The responsibility of the data varies depending on the responsible object. For example, it can be the relevant data of the processing personnel, the general data uploaded by the parties through the incident management system, or the summary data in the command center, etc.
在初始数据包含多种数据类型的情况下,为了便于对初始数据进行处理,可以对初始数据进行数据结构变换,以得到与预设数据结构匹配的中间数据。In the case that the initial data contains multiple data types, in order to facilitate the processing of the initial data, the data structure transformation may be performed on the initial data to obtain the intermediate data matching the preset data structure.
步骤S112、根据初始数据的数据类型,对初始数据进行数据结构变换,得到与预设数据结构匹配的中间数据;Step S112, performing data structure transformation on the initial data according to the data type of the initial data, to obtain intermediate data matching the preset data structure;
这里,预设数据结构的结构类型可以根据实际情况设定,在一些实施方式中,为了便于后续对数据进行可视化展示,预设数据结构可以是便于转换为可视化数据结构的任意结构类型。Here, the structure type of the preset data structure can be set according to the actual situation. In some embodiments, in order to facilitate subsequent visual display of data, the preset data structure can be any structure type that is easy to convert into a visualized data structure.
数据结构变换的方式可以根据初始数据与预设数据结构之间的数据对应关系所灵活决定,通过数据结构变换,可以将多种形式的初始数据统一为同样的预设数据结构,以便于后续批量对中间数据进行处理,以得到具有可视化数据结构的目标数据。The way of data structure transformation can be flexibly determined according to the data correspondence between the initial data and the preset data structure. Through data structure transformation, various forms of initial data can be unified into the same preset data structure, so as to facilitate subsequent batches. The intermediate data is processed to obtain the target data with a visualized data structure.
步骤S113、根据图表对应的可视化数据结构,将中间数据进行转换,得到与可视化数据结构匹配的目标数据。Step S113, according to the visualization data structure corresponding to the chart, convert the intermediate data to obtain the target data matching the visualization data structure.
这里,可视化数据结构是可以直接转换为图表中显示内容的数据结构,其结构形式可以根据图表的类型而灵活发生变化,详见下述各公开实施例。Here, the visualized data structure is a data structure that can be directly converted into the content displayed in the chart, and its structural form can be flexibly changed according to the type of the chart. See the following disclosed embodiments for details.
将中间数据转换为可视化数据结构的方式同样可以根据实际情况灵活选择,比如可以根据预设数据结构与可视化数据结构之间的类型转换关系,对中间数据进行转换以得到目标数据。The method of converting intermediate data into a visualized data structure can also be flexibly selected according to the actual situation. For example, the intermediate data can be converted to obtain the target data according to the type conversion relationship between the preset data structure and the visualized data structure.
通过本公开实施例,可以通过数据结构变换,将多种数据类型的初始数据统一为预设数据结构,便于后续在将中间数据转换为可视化数据结构的过程中,对数据进行批量处理,提升数据的处理效率,继而提升整个图表显示过程的效率和性能。Through the embodiments of the present disclosure, the initial data of various data types can be unified into a preset data structure through data structure transformation, which facilitates batch processing of data in the process of converting intermediate data into a visualized data structure, and improves data structure. processing efficiency, and then improve the efficiency and performance of the entire chart display process.
在一些实施方式中,步骤S12可以包括步骤S121至步骤S122,其中:In some implementations, step S12 may include step S121 to step S122, wherein:
步骤S121、根据静态显示数据,确定第一显示内容在目标显示界面上的第一显示位置;Step S121, according to the static display data, determine the first display position of the first display content on the target display interface;
步骤S122、根据第一显示位置,对第一显示内容进行绘制,得到静态显示区域。Step S122: Draw the first display content according to the first display position to obtain a static display area.
这里,第一显示位置可以包括第一显示内容在目标显示界面上进行显示的位置,如上述公开实施例所述,第一显示内容可以固定显示在目标显示界面上,因此该第一显示位置的位置信息可以是确定的。Here, the first display position may include the position where the first display content is displayed on the target display interface. As described in the above disclosed embodiments, the first display content may be fixedly displayed on the target display interface, so the first display position Location information can be deterministic.
根据静态显示数据确定第一显示位置的方式在本公开实施例中不做限制。在一些实施方式中,可以根据静态显示数据的第一数据结构,从静态显示数据中直接获取到该第一显示位置。The manner of determining the first display position according to the static display data is not limited in this embodiment of the present disclosure. In some implementations, the first display position can be directly acquired from the static display data according to the first data structure of the static display data.
第一数据结构的结构形式可以根据实际情况灵活决定,比如第一数据结构可以包括以下至少之一:数值固定的第一位置信息、第一标签以及第一颜色信息。The structural form of the first data structure can be flexibly determined according to the actual situation. For example, the first data structure can include at least one of the following: first position information with fixed values, first label and first color information.
这里,第一位置信息可以指示第一显示内容的第一显示位置,由于第一显示位置固定,故该第一位置信息的数值也可以是固定的。第一标签可以是静态显示数据所对应的信息内容,举例来说,对于时间与责任对象之间的对应关系图表,由于责任对象的类型较为确定,因此可以将责任对象所在的坐标轴作为静态显示数据,在这种情况下,第一标签可以为责任对象的标签。第一颜色可以为第一显示内容的显示颜色,可以根据实际情况灵活设定,在本公开实施例中不做限制。Here, the first position information may indicate the first display position of the first display content, and since the first display position is fixed, the value of the first position information may also be fixed. The first label can be the information content corresponding to the static display data. For example, for the corresponding relationship chart between time and responsible objects, since the type of responsible objects is relatively certain, the coordinate axis where the responsible objects are located can be used as a static display data, in this case, the first label may be the label of the responsible object. The first color may be the display color of the first display content, which may be flexibly set according to actual conditions, and is not limited in this embodiment of the present disclosure.
例如,第一数据结构的结构可以为{[xxx]:node},其中,xxx可以为第一标签,如上述公开实施例提到的责任对象,node结构中可以包含第一位置信息以及第一颜色信息等基础数据等。例如,该node的结构可以记为{基础数据,rect:{centerX,centerY,width,height}},其中,基础数据可以包含第一颜色信息、或与第一显示内容相关的其他信息,rect:{centerX,centerY,width,height}可以为上述公开实施例中提到的第一位置信息,其中centerX和centerY用于表明该第一显示内容的中心点在目标显示界面中的横坐标和纵坐标,width用于表明第一显示内容的宽度,height用于表明第一显示内容的高度,基于该第一位置信息,可以有效确定第一显示内容的第一显示位置。For example, the structure of the first data structure may be {[xxx]:node}, where xxx may be the first label, as the responsibility object mentioned in the above disclosed embodiment, the node structure may include the first location information and the first Basic data such as color information, etc. For example, the structure of the node can be recorded as {basic data, rect:{centerX, centerY, width, height}}, where the basic data can include the first color information or other information related to the first display content, rect: {centerX, centerY, width, height} can be the first position information mentioned in the above disclosed embodiments, where centerX and centerY are used to indicate the abscissa and ordinate of the center point of the first display content in the target display interface , width is used to indicate the width of the first display content, height is used to indicate the height of the first display content, based on the first position information, the first display position of the first display content can be effectively determined.
根据第一显示位置,可以对第一显示内容进行绘制以得到静态显示区域。绘制的方式不局限于本公开各实施例,比如可以通过rem或vw等布局技术,采用相关的绘制方法或软件等实现绘制,例如,可以将图表设置为笛卡尔坐标轴的形式,并在该笛卡尔坐标轴中绘制静态显示区域。According to the first display position, the first display content can be drawn to obtain a static display area. The way of drawing is not limited to the embodiments of the present disclosure. For example, the drawing can be realized by using layout technologies such as rem or vw, and using related drawing methods or software. For example, the chart can be set in the form of Cartesian coordinate axes, and the Plot the static display area in Cartesian axes.
通过本公开实施例,可以根据静态显示数据及其对应的第一数据结构,有效对第一显示内容进行定位并实现绘制,绘制方式简单便捷,从而提升整个图表显示方法的性能。Through the embodiments of the present disclosure, the first display content can be effectively positioned and drawn according to the static display data and its corresponding first data structure. The drawing method is simple and convenient, thereby improving the performance of the entire chart display method.
图2为本公开实施例提供的一种图表显示方法的流程示意图,如图2所示,步骤S13可以包括步骤S131至步骤134,其中:Fig. 2 is a schematic flowchart of a graph display method provided by an embodiment of the present disclosure. As shown in Fig. 2, step S13 may include steps S131 to step 134, wherein:
步骤S131,响应于针对图表的显示控制操作,确定图表在目标显示界面中的显示状态。Step S131, in response to the display control operation on the chart, determine the display state of the chart on the target display interface.
这里,针对图表的显示控制操作,可以包括对图表的显示进度进行调整的任意操作,比如拖拽图表中的滚动轴、或滚动条等,或改变图表中显示进度的文字以调整图表的显示进度,或直接在触控屏上对图表进行滑动等以更改图表的显示进度等。Here, the display control operation for the chart can include any operation to adjust the display progress of the chart, such as dragging the scroll axis or scroll bar in the chart, or changing the text of the display progress in the chart to adjust the display progress of the chart , or directly slide the chart on the touch screen to change the display progress of the chart, etc.
图3为本公开实施例提供的一种图表的示意图,如图3所示,图表中x轴部分的内容可能无法在目标显示界面中进行完整展示,因此图表在x轴的方向上存在一个滚动条310,用户可以通过拖拽或滚动等方式调整该滚动条310,以调整图表在目标显示界面中的显示进度。Fig. 3 is a schematic diagram of a chart provided by an embodiment of the present disclosure. As shown in Fig. 3, the content of the x-axis part in the chart may not be completely displayed in the target display interface, so there is a scrolling in the direction of the x-axis in the chart The user can adjust the scroll bar 310 by dragging or scrolling to adjust the display progress of the chart in the target display interface.
响应于该显示控制操作,可以确定目标图表在目标显示界面中的显示状态,其中,随着控制操作的不同,确定显示状态的方式也不同。比如在控制操作为拖拽滚动条的情况下,可以根据滚动条被拖拽后所处的位置在整个滚动条中所占的位置比例,确定目标图表所处的显示进度; 在控制操作为调整文字的情况下,可以直接根据文字所指示的内容确定显示进度;在控制操作为在触控屏上对图表进行滑动的情况下,可以根据滑动的方向和距离,确定图表的显示进度等。In response to the display control operation, the display state of the target graph in the target display interface may be determined, wherein, with different control operations, the manner of determining the display state is also different. For example, when the control operation is dragging the scroll bar, the display progress of the target chart can be determined according to the proportion of the position of the scroll bar after being dragged in the entire scroll bar; when the control operation is adjustment In the case of text, the display progress can be determined directly according to the content indicated by the text; in the case of sliding the chart on the touch screen, the display progress of the chart can be determined according to the direction and distance of the slide.
步骤S132,根据显示状态,获取第三显示内容中与显示状态匹配的第二显示内容。Step S132, according to the display state, acquire the second display content matching the display state in the third display content.
这里,第三显示内容可以包括与动态显示数据匹配的全部显示内容,由于动态显示数据包含变化的位置信息,使得动态显示数据对应的内容可能出现也可能未出现在目标显示界面中,因此该第三显示内容既包含在目标显示界面中正在进行显示的第二显示内容,也包含未显示在目标显示界面中,但可以随着显示进度的变化而出现在目标显示界面中的全部数据。Here, the third display content may include all display content that matches the dynamic display data. Since the dynamic display data contains changing position information, the content corresponding to the dynamic display data may or may not appear in the target display interface. Therefore, the third display content The third display content includes not only the second display content being displayed on the target display interface, but also all data that is not displayed on the target display interface but can appear on the target display interface as the display progress changes.
根据显示状态,可以从第三显示内容中,提取出当前应该出现在目标显示界面上的第二显示内容。步骤S132的实现方式可以根据实际情况灵活选择,比如可以根据显示进度确定第二显示内容在第三显示内容中所处的内容范围等,详见下述各公开实施例。According to the display state, the second display content that should currently appear on the target display interface can be extracted from the third display content. The implementation of step S132 can be flexibly selected according to the actual situation. For example, the content range of the second display content in the third display content can be determined according to the display progress. See the following disclosed embodiments for details.
步骤S133,根据动态显示数据,确定第二显示内容在目标显示界面上的第二显示位置。Step S133: Determine a second display position of the second display content on the target display interface according to the dynamic display data.
这里,第二显示位置可以包括第二显示内容在目标显示界面上进行显示的当前位置,如上述公开实施例所述,随着显示状态的变化,第二显示内容的位置也可以灵活进行调整,因此该第二显示位置的位置信息可以根据显示状态而灵活发生变化。Here, the second display position may include the current position where the second display content is displayed on the target display interface. As described in the above disclosed embodiments, as the display state changes, the position of the second display content may also be flexibly adjusted. Therefore, the position information of the second display position can be flexibly changed according to the display state.
根据动态显示数据确定第二显示位置的方式在本公开实施例中不做限制。在一些实施方式中,可以根据动态显示数据的第二数据结构,从动态显示数据中直接获取到该第二显示位置。The manner of determining the second display position according to the dynamic display data is not limited in this embodiment of the present disclosure. In some implementations, the second display position can be directly obtained from the dynamic display data according to the second data structure of the dynamic display data.
第二数据结构的结构形式可以根据实际情况灵活决定,比如第二数据结构可以包括以下至少之一:第二位置信息、第二标签以及第二颜色信息。The structural form of the second data structure may be flexibly determined according to actual conditions. For example, the second data structure may include at least one of the following: second position information, second label, and second color information.
这里,第二位置信息可以指示第二显示内容的第二显示位置,由于第二显示位置可以灵活变化,故该第二位置信息的数值可以根据显示状态进行变换,显示状态与第二位置信息之间的变换关系可以根据实际情况进行灵活设定,在本公开实施例中不做限制。第二标签可以是动态显示数据所对应的信息内容,举例来说,对于时间与责任对象之间的对应关系图表,由于时间可以无限延伸,不同事件的处理时间均具有较大差异,导致无法确定时间轴的跨度范围,因此可以将时间所在的坐标轴以及图表中与时间相关的节点等均作为动态显示数据,在这种情况下,第二标签可以为节点的内容标签,可以用于指示该节点对应的时间,也可以用于指示该节点对应的事件处理类型等。第二颜色可以为第二显示内容的显示颜色,可以根据实际情况灵活设定,在本公开实施例中不做限制。Here, the second position information can indicate the second display position of the second display content. Since the second display position can be changed flexibly, the value of the second position information can be changed according to the display state. The difference between the display state and the second position information The conversion relationship between can be flexibly set according to actual conditions, and is not limited in this embodiment of the present disclosure. The second label can be to dynamically display the information corresponding to the data. For example, for the corresponding relationship chart between time and responsible objects, since the time can be infinitely extended, the processing time of different events has a large difference, which makes it impossible to determine The span range of the time axis, so the coordinate axis where the time is located and the time-related nodes in the chart can be used as dynamic display data. In this case, the second label can be the content label of the node, which can be used to indicate the The time corresponding to the node can also be used to indicate the type of event processing corresponding to the node. The second color may be the display color of the second display content, which may be flexibly set according to actual conditions, and is not limited in this embodiment of the present disclosure.
例如,第二数据结构的结构可以为上述公开实施例中提到的node结构,需要注意的是,在node结构用于表示动态显示数据的情况下,该node结构中的rect:{centerX,centerY,width,height}可以为上述公开实施例中提到的第二位置信息,其中centerX和centerY用于表明该第二显示内容的中心点在目标显示界面中的横坐标和纵坐标,width用于表明第二显示内容的宽度,height用于表明第二显示内容的高度,由于第二位置信息可以随着显示状态而发生变换,因此该node结构中的centerX和centerY的数值可以随着显示状态而发生变化,而width和height的数值可以变化也可以不变化,根据节点的实际情况所确定即可。For example, the structure of the second data structure may be the node structure mentioned in the above disclosed embodiments. It should be noted that, when the node structure is used to represent dynamic display data, the rect:{centerX, centerY in the node structure ,width,height} can be the second position information mentioned in the above disclosed embodiments, where centerX and centerY are used to indicate the abscissa and ordinate of the center point of the second display content in the target display interface, and width is used for Indicates the width of the second display content, and height is used to indicate the height of the second display content. Since the second position information can change with the display state, the values of centerX and centerY in the node structure can change with the display state changes, but the values of width and height may or may not change, it can be determined according to the actual situation of the node.
步骤S134,根据第二显示位置,对第二显示内容进行绘制,得到动态显示区域。Step S134, drawing the second display content according to the second display position to obtain a dynamic display area.
根据第二显示位置对第二显示内容进行绘制的方式,可以参考上述公开实施例中对第一显示内容进行绘制的方式。For the manner of drawing the second display content according to the second display position, reference may be made to the manner of drawing the first display content in the above disclosed embodiments.
通过本公开实施例,可以响应于针对图表的显示控制操作,来确定当前应该显示的第二显示内容,并基于确定的第二显示内容,对动态显示区域进行重新绘制,从而可以基于用户的控 制,单独对动态显示区域进行重新绘制,减少绘制过程中所需要处理的数据量,提升图表绘制的效率和性能,也可以提升图表显示与用户控制之间的交互程度,提升用户对图表进行查看的体验感受。Through the embodiments of the present disclosure, the second display content that should be displayed at present can be determined in response to the display control operation on the chart, and based on the determined second display content, the dynamic display area can be redrawn, so that it can be based on the user's control , redraw the dynamic display area separately, reduce the amount of data that needs to be processed during the drawing process, improve the efficiency and performance of chart drawing, and also improve the interaction between the chart display and user control, and improve the user's ability to view the chart Experience the feeling.
图4为本公开实施例提供的一种图表显示方法的流程示意图,如图4所示,步骤S132可以包括步骤S1321至步骤S1323,其中:Fig. 4 is a schematic flowchart of a graph display method provided by an embodiment of the present disclosure. As shown in Fig. 4, step S132 may include steps S1321 to S1323, wherein:
步骤S1321,根据显示进度与预设间距,确定第二显示内容中待显示的初始图元元素。Step S1321, according to the display progress and the preset distance, determine the initial graphic element to be displayed in the second display content.
这里,第三显示内容可以包括多个图元元素,该图元元素可以是动态显示区域中显示的或待显示的各图像内容。图元元素的实现形式可以根据图表的实际情况灵活决定,举例来说,在图表为折线图的情况下,图元元素可以是图表中折线的各个节点;在图表为条形图的情况下,图元元素可以是条形图中的各个条形图像等。Here, the third display content may include a plurality of graphic elements, and the graphic elements may be various image contents displayed or to be displayed in the dynamic display area. The implementation form of the graphic element can be flexibly determined according to the actual situation of the chart. For example, when the chart is a line chart, the graphic element can be each node of the line in the chart; when the chart is a bar chart, The primitive elements can be individual bar images in a bar chart, etc.
在一些实施方式中,多个图元元素可以在图表的预设方向上按照相同的预设间距进行排列,其中,预设方向可以包括与显示进度一致的方向,比如,若图表可以在x轴上进行显示进度的调节,则预设方向同样可以为x轴的方向。预设间距的距离可以根据实际情况灵活设置,在本公开实施例中不做限制。In some implementations, multiple graphic elements can be arranged at the same preset interval in the preset direction of the chart, wherein the preset direction can include a direction consistent with the display progress, for example, if the chart can be on the x-axis To adjust the display progress, the preset direction can also be the direction of the x-axis. The distance of the preset interval can be flexibly set according to actual conditions, which is not limited in this embodiment of the present disclosure.
由于多个图元元素可以在预设方向上按照相同的预设间距进行排列,故基于该预设间距,可以方便确定某个图元元素在多个图元元素中的编号或位置等,因此该预设间距可以用于从第三显示内容的多个图元元素中,确定第二显示内容中可以包含的图元元素等。Since multiple graphic elements can be arranged according to the same preset spacing in the preset direction, based on the preset spacing, it is convenient to determine the number or position of a certain graphic element among multiple graphic elements, so The preset distance can be used to determine the graphic elements that can be included in the second display content from the plurality of graphic elements in the third display content.
在一些实施方式中,可以根据显示进度和预设间距来确定第二显示内容中的初始图元元素,其中,初始图元元素可以包括在当前显示进度下,第二显示内容中所显示的第一个图元元素。In some implementations, the initial graphic element in the second display content may be determined according to the display progress and the preset distance, where the initial graphic element may include the first graphic element displayed in the second display content under the current display progress. A primitive element.
确定初始图元元素的方式可以根据显示进度的形式而灵活决定,例如,在显示进度为滚动条或滚动轴的位置的情况下,该显示进度可以表明在预设方向上,动态显示区域的起始位置与图表的原始起始位置之间的第一距离,因此可以将该第一距离与预设间距相除来得到初始图元元素的编号a,该编号a可以表明在第三显示内容包含的多个图元元素中,第a个图元元素将作为第二显示内容中待显示的初始图元元素。The way to determine the initial graphic element can be flexibly determined according to the form of the display progress. For example, in the case that the display progress is the position of a scroll bar or a scroll axis, the display progress can indicate that in the preset direction, the start of the dynamic display area The first distance between the initial position and the original initial position of the chart, so the first distance can be divided by the preset spacing to obtain the number a of the initial graphic element, and the number a can indicate that the third display content contains Among the multiple graphic elements of , the a-th graphic element will be used as the initial graphic element to be displayed in the second display content.
例如,在图3所示的图表中,图表可以通过滚动条310在x轴上进行移动,滚动条310的位置可以表明在x轴的方向上,当前显示的动态显示区域的左边界点与图表原点之间的第一距离,将该第一距离与预设间距相除,可以确定原点和动态显示区域的左边界点之间包含的节点数量,则根据该节点数量,可以确定位于动态显示区域最左边的节点应该是哪个节点,即可以确定第二显示内容中待显示的初始图元元素。For example, in the chart shown in Figure 3, the chart can be moved on the x-axis through the scroll bar 310, and the position of the scroll bar 310 can indicate that in the direction of the x-axis, the left boundary point of the currently displayed dynamic display area is in line with the chart. The first distance between the origin, divide the first distance by the preset distance, you can determine the number of nodes contained between the origin and the left boundary point of the dynamic display area, then according to the number of nodes, you can determine the number of nodes located in the dynamic display area Which node should the leftmost node be, that is, the initial graphic element to be displayed in the second display content can be determined.
在一些实施方式中,步骤S1321的过程可以通过下述公式(1)进行表示:In some implementations, the process of step S1321 can be expressed by the following formula (1):
index1=floor(scrollLeft/SIZE)         (1);index1=floor(scrollLeft/SIZE) (1);
这里,index1为初始图元元素在多个图元元素中的顺序编号,scrollLeft为显示进度,SIZE为预设间距,floor(·)为向下取整函数。Here, index1 is the sequence number of the initial primitive element among multiple primitive elements, scrollLeft is the display progress, SIZE is the preset spacing, and floor(·) is the function of rounding down.
通过公式(1)可以看出,在一些实施方式中,根据显示进度所确定的动态显示区域中,可能无法完整地显示初始图元元素,在这种情况下,可以通过向下取整的函数,使得动态显示区域中显示的初始图元元素是一个完整的元素状态,比如是一个完整的节点。It can be seen from formula (1) that in some implementations, the initial graphic elements may not be completely displayed in the dynamic display area determined according to the display progress. In this case, the function of rounding down can be used , so that the initial graphic element displayed in the dynamic display area is a complete element state, such as a complete node.
步骤S1322,根据显示进度、预设间距以及动态显示区域在图表中的预设显示范围,确定第二显示内容中待显示的终止图元元素。Step S1322, according to the display progress, the preset distance, and the preset display range of the dynamic display area in the chart, determine the end graphic element to be displayed in the second display content.
这里,终止图元元素可以是在当前显示进度下,第二显示内容中所显示的最后一个图元元 素。Here, the terminating graphic element may be the last graphic element displayed in the second display content under the current display progress.
在一些实施方式中,预设显示范围可以包括图表中可以展示的动态显示区域的范围,比如图表在x轴的整体长度为i,而预设显示范围在x方向上的长度为j且j<i,则动态显示区域仅能在x轴方向上显示长度为j的内容,需要对图表在x轴方向上进行移动才能获知图表的全部内容。In some implementations, the preset display range may include the range of the dynamic display area that can be displayed in the chart, for example, the overall length of the chart on the x-axis is i, and the length of the preset display range in the x direction is j and j< i, the dynamic display area can only display the content of length j in the direction of the x-axis, and it is necessary to move the chart in the direction of the x-axis to obtain all the contents of the chart.
预设显示范围的大小可以根据目标显示界面的实际情况灵活决定,在本公开实施例中不做限定。The size of the preset display range can be flexibly determined according to the actual situation of the target display interface, and is not limited in this embodiment of the present disclosure.
确定终止图元元素的方式同样可以根据显示进度的形式而灵活决定,在一些实施方式中,在显示进度为滚动条或滚动轴的位置的情况下,该显示进度可以表明在预设方向上,动态显示区域的起始位置与图表的原始起始位置之间的第一距离,将该第一距离与预设显示范围在预设方向上的长度相加,则可以获知动态显示区域的终止位置与图表的原始起始位置之间的第二距离,因此可以将该第二距离与预设间距相除来得到终止图元元素的编号b,该编号b可以表明在第三显示内容包含的多个图元元素中,第b个图元元素将作为第二显示内容中待显示的终止图元元素。The way to determine the termination of the graphic element can also be flexibly determined according to the form of the display progress. In some implementations, when the display progress is the position of the scroll bar or the scroll axis, the display progress can indicate that it is in the preset direction, The first distance between the starting position of the dynamic display area and the original starting position of the chart, add the first distance to the length of the preset display range in the preset direction, and then the end position of the dynamic display area can be known The second distance from the original starting position of the chart, so the second distance can be divided by the preset distance to obtain the number b of the end graphic element, which can indicate how much the third display content contains Among the graphic elements, the b-th graphic element will be used as the terminal graphic element to be displayed in the second display content.
例如,在图3所示的图表中,图表可以通过滚动条310在x轴上进行移动,滚动条310的位置与动态显示区域在x轴上的长度相加,可以表明在x轴的方向上,当前显示的动态显示区域的右边界点与图表原点之间的第二距离,将该第二距离与预设间距相除,可以确定原点和动态显示区域的右边界点之间包含的节点数量,则根据该节点数量,可以确定位于动态显示区域最右边的节点应该是哪个节点,即可以确定第二显示内容中待显示的终止图元元素。For example, in the chart shown in FIG. 3 , the chart can be moved on the x-axis through the scroll bar 310, and the position of the scroll bar 310 is added to the length of the dynamic display area on the x-axis, which can indicate that in the direction of the x-axis , the second distance between the right boundary point of the currently displayed dynamic display area and the origin of the chart, and dividing the second distance by the preset spacing can determine the number of nodes contained between the origin and the right boundary point of the dynamic display area , then according to the number of nodes, it can be determined which node the rightmost node in the dynamic display area should be, that is, the terminal graphic element to be displayed in the second display content can be determined.
在一些实施方式中,步骤S1322的过程可以通过下述公式(2)进行表示:In some implementations, the process of step S1322 can be expressed by the following formula (2):
index2=floor((scrollLeft+offsetWidth)/SIZE)      (2);index2=floor((scrollLeft+offsetWidth)/SIZE) (2);
这里,index2为终止图元元素在多个图元元素中的顺序编号,offsetWidth为动态显示区域在x轴上的长度,scrollLeft为显示进度,SIZE为预设间距,floor(·)为向下取整函数。Here, index2 is the sequence number of the end graphic element among multiple graphic elements, offsetWidth is the length of the dynamic display area on the x-axis, scrollLeft is the display progress, SIZE is the preset spacing, and floor(·) is the downward direction whole function.
通过公式(2)可以看出,在一些实施方式中,根据显示进度所确定的动态显示区域中,可能无法完整地显示终止图元元素,在这种情况下,同样可以通过向下取整的函数,使得动态显示区域中显示的终止图元元素也是一个完整的元素状态,比如是一个完整的节点。It can be seen from formula (2) that in some implementations, in the dynamic display area determined according to the display progress, it may not be possible to completely display the termination graphic element. In this case, it can also be rounded down by function, so that the terminal primitive element displayed in the dynamic display area is also a complete element state, such as a complete node.
步骤S1323,基于初始图元元素和终止图元元素,从第三显示内容中提取与显示状态匹配的第二显示内容。Step S1323, based on the initial graphic element and the termination graphic element, extract the second display content matching the display state from the third display content.
根据初始图元元素和终止图元元素,可以分别确定第二显示内容包含的第一个图元元素和最后一个图元元素,在一些实施方式中,由于在第三显示内容中包含的多个图元元素可以按照相同的预设间距进行排列,故在确定初始图元元素和终止图元元素的情况下,可以获知二者之间包含的各图元元素,从而确定第二显示内容中包含的各图元元素,得到第二显示内容。According to the initial graphic element and the terminating graphic element, the first graphic element and the last graphic element included in the second display content can be determined respectively. In some implementations, due to the multiple The graphic elements can be arranged according to the same preset spacing, so when the initial graphic element and the terminal graphic element are determined, each graphic element contained between them can be known, so as to determine the content contained in the second display content Each graphic element of , to obtain the second display content.
通过本公开实施例,可以根据显示进度、预设间距以及动态显示区域的预设显示范围,便捷快速地确定第二显示内容中应该包含的图元元素,从而高效率地确定与当前的显示进度匹配的第二显示内容,提升动态显示区域的绘制效率和性能,继而提升整个图表的绘制效率和性能。Through the embodiments of the present disclosure, according to the display progress, the preset distance and the preset display range of the dynamic display area, it is possible to quickly and conveniently determine the graphic elements that should be included in the second display content, so as to efficiently determine the current display progress The matching second display content improves the drawing efficiency and performance of the dynamic display area, and then improves the drawing efficiency and performance of the entire chart.
在一些实施方式中,步骤S13还可以包括步骤S135至步骤S136,其中:In some embodiments, step S13 may also include steps S135 to S136, wherein:
步骤S135、根据显示状态,按照预设统计规则,对第二显示内容进行合并统计,得到第四显示内容。Step S135 , according to the display state and according to the preset statistical rules, perform combined statistics on the second display content to obtain the fourth display content.
步骤S136、根据预设显示位置,对第四显示内容进行绘制。Step S136, draw the fourth display content according to the preset display position.
这里,第四显示内容可以包括对图表中的第二显示内容进行合并统计所得到的统计内容, 由于第二显示内容可以根据显示状态而进行变换,因此相应地,第四显示内容也可以根据显示状态二进行变换。Here, the fourth display content may include the statistical content obtained by combining and counting the second display content in the chart. Since the second display content can be changed according to the display state, correspondingly, the fourth display content can also State two is transformed.
在一些实施方式中,由于第二显示内容可以由图元元素所组成,在这种情况下,第四显示内容可以是按照预设统计规则对第二显示内容中的图元元素进行合并统计而得到的统计结果。In some implementations, since the second display content may be composed of graphic elements, in this case, the fourth display content may be obtained by combining statistics of the graphic elements in the second display content according to preset statistical rules. The statistical results obtained.
预设统计规则的规则内容可以根据图表的实际情况灵活变化,不局限于下述各公开实施例。例如,对于时间与责任对象之间的对应关系图表,预设统计规则可以为:时间上相邻且属于同一责任对象的节点,可以认为属于相同的事件处理阶段,因此可以合并在一起。The rule content of the preset statistical rules can be flexibly changed according to the actual situation of the graph, and is not limited to the following disclosed embodiments. For example, for the graph of the corresponding relationship between time and responsible objects, the preset statistical rule may be: nodes that are adjacent in time and belong to the same responsible object can be considered to belong to the same event processing stage, so they can be merged together.
图5为本公开实施例提供的一种图表的示意图,如图5所示,已受理521和已分派522这两个节点均属于指挥中心这一责任对象,且二者在时间上相邻,因此,可以将已受理521和已分派522这两个节点进行合并统计在派遣512这一事件处理阶段中,并将合并统计后的派遣内容作为第四显示内容。同理,还可以得到受理511、处置513以及核查514等第四显示内容。Fig. 5 is a schematic diagram of a graph provided by an embodiment of the present disclosure. As shown in Fig. 5, the two nodes of accepted 521 and assigned 522 both belong to the responsibility object of the command center, and the two are adjacent in time. Therefore, the two nodes of accepted 521 and dispatched 522 can be combined and counted in the dispatching 512 event processing stage, and the dispatched content after the combined counting can be used as the fourth display content. Similarly, the fourth display content such as acceptance 511 , disposition 513 and verification 514 can also be obtained.
预设显示位置可以是第四显示内容在目标显示界面上进行显示的位置,该位置可以根据实际情况进行预先设定,比如,如图5所示,可以将预设显示位置设置在位于图表的标题事件时间与责任关系500的下方,在一些实施方式中,也可以根据图表的实际情况,将预设显示位置设置在图表的下方、左方或右方等至少一个位置。The preset display position can be the position where the fourth display content is displayed on the target display interface, and the position can be preset according to the actual situation. For example, as shown in FIG. 5, the preset display position can be set at the Below the title event time and responsibility relationship 500, in some implementations, the preset display position can also be set to at least one position below, left or right of the chart according to the actual situation of the chart.
获取预设显示位置的方式在本公开实施例中不做限制。在一些实施方式中,可以直接读取预先存储的预设显示位置;在一些实施方式中,可以根据动态显示数据的第三数据结构,从动态显示数据中读取该预设显示位置。The manner of acquiring the preset display position is not limited in this embodiment of the present disclosure. In some implementations, the pre-stored preset display position can be read directly; in some implementations, the preset display position can be read from the dynamic display data according to the third data structure of the dynamic display data.
第三数据结构可以包括与第四显示内容匹配的数据结果,结构形式可以根据实际情况灵活决定,除了可以包含预设显示位置以外,第三数据结构也可以包括以下至少之一:第三标签信息、第三颜色信息、统计信息以及判断信息。The third data structure can include data results matching the fourth display content, and the structure can be flexibly determined according to the actual situation. In addition to including the preset display position, the third data structure can also include at least one of the following: third label information , third color information, statistical information and judgment information.
这里,第三标签信息可以是第四显示内容所对应的信息内容,例如,可以为上述公开实施例中提到的合并统计后的事件处理阶段的名称,比如受理、派遣、处置或核查等。第三颜色信息可以为第四显示内容的显示颜色,可以根据实际情况灵活设定,在本公开实施例中不做限制。统计信息可以包括对第二显示内容中的哪些图元元素进行合并,以及合并后第四显示内容在预设方向上的长度,比如,图5中预设方向为x方向,且x轴代表时间,则x轴方向上的长度可以表明时间长度,即图5中的在受理节点511用时0分钟、在处理节点513用时1分钟等。而判断信息则可以是根据预设判断规则对统计信息进行判断所得到的结果,预设判断规则的规则形式同样可以根据实际情况灵活决定,比如,图5中统计信息包含时间长度,则预设判断规则可以用于判断统计信息是否超时,在这种情况下,判断信息的内容可以为超时或未超时等。Here, the third tag information may be the information content corresponding to the fourth display content, for example, it may be the name of the event processing stage after the combined statistics mentioned in the above disclosed embodiments, such as accepting, dispatching, handling or checking. The third color information may be the display color of the fourth display content, which may be flexibly set according to actual conditions, and is not limited in this embodiment of the present disclosure. The statistical information may include which graphic elements in the second display content are merged, and the length of the merged fourth display content in a preset direction. For example, the preset direction in FIG. 5 is the x direction, and the x axis represents time , then the length in the x-axis direction can indicate the length of time, that is, 0 minutes at the acceptance node 511 and 1 minute at the processing node 513 in FIG. 5 . The judgment information can be the result obtained by judging the statistical information according to the preset judgment rules, and the rule form of the preset judgment rules can also be flexibly determined according to the actual situation. The judging rule can be used to judge whether the statistical information has timed out. In this case, the content of the judging information can be timed out or not timed out.
在一些实施方式中,第三数据结构的结构可以为{label,duration,isExceed},其中,label可以为第三标签信息,如上述公开实施例提到的受理、派遣等阶段名称,duration可以为上述公开实施例中提到的统计信息,比如合并第二显示内容中的哪些节点以及合并后的总体时间,而isExceed则可以为上述公开实施例中提到的判断信息,比如判断合并后的总体时间是否超时等。In some implementations, the structure of the third data structure may be {label, duration, isExceed}, where the label may be the third label information, such as the stage name of acceptance and dispatch mentioned in the above disclosed embodiments, and the duration may be The statistical information mentioned in the above-mentioned disclosed embodiments, such as which nodes in the second display content are merged and the overall time after merging, and isExceed can be the judgment information mentioned in the above-mentioned disclosed embodiments, such as judging the overall time after merging Whether the time is timed out, etc.
根据预设显示位置,对第四显示内容进行绘制的方式同样可以参考上述对第一显示内容进行绘制的方式。The manner of drawing the fourth display content according to the preset display position can also refer to the above manner of drawing the first display content.
通过本公开实施例,可以在绘制图表动态显示区域的过程中,一并对动态显示区域中的第二显示内容进行统计汇总,提升图表绘制性能的同时丰富图表的内容。Through the embodiments of the present disclosure, in the process of drawing the dynamic display area of the chart, the second display content in the dynamic display area can be statistically summarized together, so as to improve the drawing performance of the chart and enrich the content of the chart.
图6为本公开实施例提供的一种图表显示装置的组成结构示意图,如图6所示,所述装置60 包括:FIG. 6 is a schematic diagram of the composition and structure of a chart display device provided by an embodiment of the present disclosure. As shown in FIG. 6, the device 60 includes:
获取部分61,被配置为获取用于显示图表的目标数据,目标数据包括静态显示数据和动态显示数据。The acquiring part 61 is configured to acquire target data for displaying the graph, and the target data includes static display data and dynamic display data.
静态绘制部分62,被配置为根据静态显示数据,绘制图表的静态显示区域,其中,静态显示区域包括在目标显示界面上位置固定的第一显示内容。The static drawing part 62 is configured to draw a static display area of the chart according to the static display data, wherein the static display area includes first display content whose position is fixed on the target display interface.
动态绘制部分63,被配置为根据动态显示数据和图表在目标显示界面中的显示状态,绘制动态显示区域,其中,动态显示区域包括第二显示内容,第二显示内容根据显示状态进行变换。The dynamic drawing part 63 is configured to draw the dynamic display area according to the display state of the dynamic display data and the chart in the target display interface, wherein the dynamic display area includes a second display content, and the second display content changes according to the display state.
显示部分64,被配置为在目标显示界面中,叠加显示静态显示区域和动态显示区域。The display part 64 is configured to superimposely display the static display area and the dynamic display area in the target display interface.
在一些实施方式中,静态绘制部分62,包括:第一确定子部分,被配置为根据静态显示数据,确定第一显示内容在目标显示界面上的第一显示位置;第一绘制子部分,被配置为根据第一显示位置,对第一显示内容进行绘制,得到静态显示区域。In some implementations, the static drawing part 62 includes: a first determining subsection configured to determine the first display position of the first display content on the target display interface according to the static display data; the first drawing subsection is configured to It is configured to draw the first display content according to the first display position to obtain a static display area.
在一些实施方式中,动态绘制部分63,包括:第二确定子部分,被配置为响应于针对图表的显示控制操作,确定图表在目标显示界面中的显示状态;第一获取子部分,被配置为根据显示状态,获取第三显示内容中与显示状态匹配的第二显示内容,其中,第三显示内容包括与动态显示数据匹配的全部显示内容;第三确定子部分,被配置为根据动态显示数据,确定第二显示内容在目标显示界面上的第二显示位置;第二绘制子部分,被配置为根据第二显示位置,对第二显示内容进行绘制,得到动态显示区域。In some implementations, the dynamic drawing part 63 includes: a second determining subsection configured to determine the display state of the chart in the target display interface in response to a display control operation on the chart; a first acquiring subsection configured to According to the display state, obtain the second display content that matches the display state in the third display content, wherein the third display content includes all display content that matches the dynamic display data; the third determining subpart is configured to The data determines the second display position of the second display content on the target display interface; the second drawing subpart is configured to draw the second display content according to the second display position to obtain a dynamic display area.
在一些实施方式中,显示状态包括显示进度;第三显示内容包括多个图元元素,多个图元元素在图表的预设方向上按照相同的预设间距进行排列;所述第一获取子部分,包括:第四确定子部分,被配置为根据显示进度与预设间距,确定第二显示内容中待显示的初始图元元素;第五确定子部分,被配置为根据显示进度、预设间距以及动态显示区域在图表中的预设显示范围,确定第二显示内容中待显示的终止图元元素;第一提取子部分,被配置为基于初始图元元素和终止图元元素,从第三显示内容中提取与显示状态匹配的第二显示内容。In some implementations, the display status includes display progress; the third display content includes a plurality of graphic elements, and the plurality of graphic elements are arranged in the preset direction of the chart according to the same preset interval; the first acquisition sub part, including: a fourth determination subsection, configured to determine the initial graphic element to be displayed in the second display content according to the display progress and a preset distance; a fifth determination subsection, configured to determine according to the display progress, preset The spacing and the preset display range of the dynamic display area in the chart determine the terminal graphic element to be displayed in the second display content; the first extraction sub-part is configured to be based on the initial graphic element and the terminal graphic element, from the first The second display content matching the display state is extracted from the third display content.
在一些实施方式中,动态显示区域还包括第四显示内容;动态绘制部分63,还包括:第一得到子部分,被配置为根据显示状态,按照预设统计规则,对第二显示内容进行合并统计,得到第四显示内容;第三绘制子部分,被配置为根据预设显示位置,对第四显示内容进行绘制。In some implementations, the dynamic display area further includes a fourth display content; the dynamic drawing part 63 further includes: a first obtaining subsection configured to merge the second display content according to a preset statistical rule according to the display state Statistics to obtain the fourth display content; the third drawing subsection is configured to draw the fourth display content according to the preset display position.
在一些实施方式中,获取部分61,包括:第二获取子部分,被配置为获取用于显示图表的初始数据;第二得到子部分,被配置为根据初始数据的数据类型,对初始数据进行数据结构变换,得到与预设数据结构匹配的中间数据;第三得到子部分,被配置为根据图表对应的可视化数据结构,将中间数据进行转换,得到与可视化数据结构匹配的目标数据。In some implementations, the acquisition part 61 includes: a second acquisition subsection configured to acquire initial data for displaying charts; a second acquisition subsection configured to process the initial data according to the data type of the initial data Data structure transformation to obtain intermediate data matching the preset data structure; the third obtaining sub-part is configured to convert the intermediate data according to the visual data structure corresponding to the chart to obtain target data matching the visual data structure.
在一些实施方式中,可视化数据结构包括以下至少之一:静态显示数据的第一数据结构、动态显示数据的第二数据结构以及动态显示数据的第三数据结构,其中,第二数据结构与第二显示内容匹配,第三数据结构与第四显示内容匹配,第四显示内容包括对第二显示内容进行合并统计所得到的统计结果。In some embodiments, the visualization data structure includes at least one of the following: a first data structure for static display data, a second data structure for dynamic display data, and a third data structure for dynamic display data, wherein the second data structure is the same as the first data structure The second display content matches, the third data structure matches the fourth display content, and the fourth display content includes a statistical result obtained by combining and counting the second display content.
在一些实施方式中,静态显示数据的第一数据结构包括以下至少之一:数值固定的第一位置信息、第一标签以及第一颜色信息;动态显示数据的第二数据结构包括以下至少之一:第二位置信息、第二标签以及第二颜色信息,其中,第二位置信息的数值根据显示状态进行变换;动态显示数据的第三数据结构包括以下至少之一:第三标签信息、第三颜色信息、统计信息以及判断信息,其中,判断信息包括根据预设判断规则对统计信息进行判断所得到的判断结果。In some implementations, the first data structure of the static display data includes at least one of the following: the first position information, the first label, and the first color information with fixed values; the second data structure of the dynamic display data includes at least one of the following : the second position information, the second label and the second color information, wherein, the value of the second position information is transformed according to the display state; the third data structure of the dynamic display data includes at least one of the following: the third label information, the third Color information, statistical information and judging information, wherein the judging information includes judging results obtained by judging the statistical information according to preset judging rules.
在一些实施方式中,图表包括时间与责任对象之间的对应关系图表。In some implementations, the graph includes a graph of correspondence between time and responsible objects.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的部分可以用于执行上文方法实施例描述的方法,其实现可以参照上文方法实施例的描述。In some embodiments, the functions or parts included in the apparatus provided by the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments, and the implementation can refer to the descriptions of the above method embodiments.
在本公开实施例以及其他的实施例中,“部分”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是单元,还可以是模块也可以是非模块化的。In the embodiments of the present disclosure and other embodiments, a "part" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course it may also be a unit, a module or a non-modular one.
图7为本公开实施例提供的一应用示例的示意图,如图7所示,本公开实施例的应用示例提出了一种图表显示方法,包括如下过程:FIG. 7 is a schematic diagram of an application example provided by an embodiment of the present disclosure. As shown in FIG. 7 , the application example of an embodiment of the present disclosure proposes a graph display method, including the following process:
步骤S710,获取展示数据,进行预处理;Step S710, acquiring display data and performing preprocessing;
在本公开实施例的应用示例中,可以将事件管理系统事件处置阶段的数据作为初始数据,根据初始数据所属的事件处置阶段,对初始数据进行数据结构变换来实现数据结构的统一,得到与预设数据结构匹配的中间数据。In the application example of the embodiment of the present disclosure, the data in the event handling stage of the event management system can be used as the initial data, and according to the event handling stage to which the initial data belongs, the data structure transformation is performed on the initial data to realize the unification of the data structure, and the obtained and predicted Let the data structure match the intermediate data.
步骤S720,将预处理后的中间数据转为可视化数据结构的目标数据;Step S720, converting the preprocessed intermediate data into the target data of the visualized data structure;
在步骤S720中,可以将预处理后的中间数据作为输入,再次进行转换,从而输出适配可视化数据结构的目标数据,可视化数据结构的结构形式可以参考上述公开实施例中的第一数据结构、第二数据结构和第三数据结构。In step S720, the preprocessed intermediate data can be used as input and converted again, so as to output the target data adapted to the visualized data structure. The structural form of the visualized data structure can refer to the first data structure, A second data structure and a third data structure.
步骤S730,确定动态显示区域的预设显示范围,并构建用于绘制图表的笛卡尔坐标轴;Step S730, determining the preset display range of the dynamic display area, and constructing a Cartesian coordinate axis for drawing charts;
在本公开实施例的应用示例中,可以利用rem或vw布局技术来在目标显示界面中进行图表布局。在一些实施方式中,可以根据数据结构为可视化数据结构的目标数据,计算目标显示界面中可视的宽度和高度,作为动态显示区域的预设显示范围。In the application example of the embodiment of the present disclosure, the rem or vw layout technology can be used to implement chart layout in the target display interface. In some implementations, the visible width and height of the target display interface can be calculated according to the target data whose data structure is a visualized data structure, and used as the preset display range of the dynamic display area.
由于图表可能无法在目标显示界面中进行完整显示,因此图表中还可以包含一控制轴,用于表明图表的显示进度。Since the chart may not be fully displayed on the target display interface, the chart may further include a control axis for indicating the display progress of the chart.
根据预设显示范围,可以绘制尺寸与预设显示范围匹配的笛卡尔坐标轴,如上述公开实施例中的图3所示,该笛卡尔坐标轴可以由两层组成,底层为静态显示区域320,负责展示纵轴标签和水平分割线,上层为动态显示区域330,负责对各节点形式的图元元素进行数据展示。According to the preset display range, a Cartesian coordinate axis whose size matches the preset display range can be drawn. As shown in FIG. , is responsible for displaying the vertical axis label and the horizontal dividing line, and the upper layer is the dynamic display area 330, which is responsible for displaying the data of the graphic elements in the form of each node.
考虑到绘制性能和绘制的简便程度,包含两层区域的笛卡尔坐标轴可以采用分层渲染的方式进行绘制,其中底层作为静态显示区域的纵轴标签和水平分割线等,属于静态显示数据,不需要随着控制轴的滚动而变化。而上层的动态显示区域,则可以随着控制轴的滚动而变化。在控制轴移动而需要对图表进行重新绘制的情况下,只需要对动态显示区域进行清屏,然后更新动态显示区域中的图元元素即可,无需重新对静态显示区域进行绘制。Considering the drawing performance and the simplicity of drawing, the Cartesian coordinate axis including two-layer areas can be drawn in a layered rendering method, in which the bottom layer is used as the vertical axis label and horizontal dividing line of the static display area, which belong to static display data. There is no need to change with the scrolling of the control axis. The upper dynamic display area can change with the scrolling of the control axis. In the case that the chart needs to be redrawn due to the movement of the control axis, it is only necessary to clear the screen of the dynamic display area, and then update the graphic elements in the dynamic display area, without redrawing the static display area.
动态显示区域还可以包括统计轴,用于对动态显示区域中的图元元素进行统计,其实现形式可以参考上述公开实施例中的第四显示内容。The dynamic display area may further include a statistical axis for counting graphic element elements in the dynamic display area, and its realization form may refer to the fourth display content in the above disclosed embodiments.
步骤S740,确定当前待显示的第二显示内容,并根据第二显示内容绘制动态显示区域;Step S740, determining the second display content currently to be displayed, and drawing a dynamic display area according to the second display content;
根据当前控制轴的位置scrollLeft、动态显示区域在x轴上的预设显示范围offsetWidth以及图表中各图元元素在x轴方向上的预设间距SIZE,确定当前待显示的第二显示内容中的起始节点和结束节点的节点编号,作为第二显示内容中的初始图元元素和终止图元元素。According to the position scrollLeft of the current control axis, the preset display range offsetWidth of the dynamic display area on the x-axis, and the preset spacing SIZE of each graphic element in the chart on the x-axis direction, determine the second display content currently to be displayed The node numbers of the start node and end node, as the initial and end primitive elements in the second display.
根据该初始图元元素和终止图元元素,在目标显示界面的坐标系(或是坐标系的某个象限,比如第一象限等)中绘制第二显示内容中包含的各图元元素,以得到动态显示区域。According to the initial graphic element and the terminal graphic element, draw each graphic element contained in the second display content in the coordinate system (or a certain quadrant of the coordinate system, such as the first quadrant, etc.) of the target display interface, so as to Get the dynamic display area.
基于本公开实施例的应用示例中的图表显示方法,可以对图表中的静态显示区域和动态显示区域进行分层绘制,相比于相关技术中将图表中的各图元元素一次性进行全部绘制,本公开 实施例的应用示例提出的方法可以有效提升图表的绘制和显示性能,优化图表的显示效果,减少显示过程中由于数据过多导致内存被过分占用的情况的发生,且可以根据目标显示界面的实际情况,对图表在可视范围内进行展示,提升显示的灵活性。Based on the chart display method in the application example of the embodiment of the present disclosure, the static display area and the dynamic display area in the chart can be drawn hierarchically, compared with the related art that draws all the graphic elements in the chart at one time , the method proposed by the application example of the embodiment of the present disclosure can effectively improve the drawing and display performance of the chart, optimize the display effect of the chart, reduce the occurrence of excessive memory occupation due to too much data during the display process, and can display according to the target The actual situation of the interface, the chart is displayed within the visible range, and the flexibility of the display is improved.
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例。It can be understood that the above-mentioned method embodiments mentioned in this disclosure can all be combined with each other to form a combined embodiment without violating the principle and logic.
本领域技术人员可以理解,在实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above method of implementation, the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process. The execution order of each step should be based on its function and possible internal logic. Sure.
本公开实施例还提供一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质。An embodiment of the present disclosure also provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented. The computer readable storage medium may be a non-transitory computer readable storage medium.
本公开实施例还提供一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。An embodiment of the present disclosure also provides an electronic device, including: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
本公开实施例还提供了一种计算机程序产品,包括计算机程序或指令,在计算机程序或指令在电子设备上运行的情况下,使得电子设备执行上述方法。An embodiment of the present disclosure also provides a computer program product, including a computer program or an instruction, which causes the electronic device to execute the above method when the computer program or instruction is run on the electronic device.
本公开实施例还提供了另一种计算机程序产品,用于存储计算机可读指令,指令被执行时使得计算机执行上述任一实施例提供的图表显示方法的操作。The embodiments of the present disclosure also provide another computer program product, which is used for storing computer-readable instructions, and when the instructions are executed, the computer executes the operation of the chart display method provided by any of the above-mentioned embodiments.
电子设备可以被提供为终端、服务器或其它形态的设备。Electronic devices may be provided as terminals, servers, or other forms of devices.
图8为本公开实施例提供的一种电子设备800的硬件结构示意图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。FIG. 8 is a schematic diagram of a hardware structure of an electronic device 800 provided by an embodiment of the present disclosure. For example, the electronic device 800 may be a terminal such as a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, or a personal digital assistant.
参照图8,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。8, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814 , and the communication component 816.
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operations of the electronic device 800, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802 .
存储器804被配置为存储多种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(Static Random-Access Memory,SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only memory,EEPROM),可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM),可编程只读存储器(Programmable Read-Only memory,PROM),只读存储器(Read-Only Memory,ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 804 is configured to store various types of data to support operations at the electronic device 800 . Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 can be realized by any type of volatile or non-volatile storage device or their combination, such as Static Random-Access Memory (Static Random-Access Memory, SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only memory, EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), programmable read-only memory (Programmable Read-Only memory, PROM), read-only memory (Read-Only Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.
电源组件806为电子设备800的多种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。The power supply component 806 provides power to various components of the electronic device 800 . Power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 800 .
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(Liquid Crystal Display,LCD)和触摸面板(Touch Pad,TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边缘,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 808 includes a screen providing an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (Liquid Crystal Display, LCD) and a touch panel (Touch Pad, TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense an edge of a touch or slide action, but also detect duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(Microphone,MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a microphone (Microphone, MIC), and when the electronic device 800 is in an operation mode, such as a calling mode, a recording mode and a voice recognition mode, the microphone is configured to receive an external audio signal. Received audio signals may be further stored in memory 804 or sent via communication component 816 . In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如互补金属氧化物半导体(Complement Metal Oxide Semiconductor,CMOS)或电荷耦合器件(Charge-coupled Device,CCD)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。 Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of electronic device 800 . For example, the sensor component 814 can detect the open/closed state of the electronic device 800, the relative positioning of components, such as the display and the keypad of the electronic device 800, the sensor component 814 can also detect the electronic device 800 or a Changes in position of components, presence or absence of user contact with electronic device 800 , electronic device 800 orientation or acceleration/deceleration and temperature changes in electronic device 800 . Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 814 may also include an optical sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge-coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(Near Field Communication,NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(Radio Frequency Identification,RFID)技术,红外数据协会(Infrared Data Association,IrDA)技术,超宽带(Ultra Wide Band,UWB)技术,蓝牙(Bluetooth,BT)技术和其他技术来实现。The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on communication standards, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be based on Radio Frequency Identification (RFID) technology, Infrared Data Association (Infrared Data Association, IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (Bluetooth, BT) technology and other technology to achieve.
在本公开实施例中,电子设备800可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(Digital Signal Processing Device,DSPD)、可编程逻辑器件(Programmable Logic Device,PLD)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In the embodiment of the present disclosure, the electronic device 800 may be implemented by one or more application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (Digital Signal Processing Device , DSPD), Programmable Logic Device (Programmable Logic Device, PLD), Field Programmable Gate Array (Field Programmable Gate Array, FPGA), controller, microcontroller, microprocessor or other electronic components to implement the above method.
在本公开实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。In an embodiment of the present disclosure, there is also provided a non-volatile computer-readable storage medium, such as a memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete the above method.
图9为本公开实施例提供的一种电子设备900的硬件结构示意图。例如,电子设备900可以被提供为一服务器。参照图9,电子设备900包括处理组件910,其进一步包括一个或多个处理器, 以及由存储器920所代表的存储器资源,用于存储可由处理组件910的执行的指令,例如应用程序。存储器920中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件910被配置为执行指令,以执行上述方法。FIG. 9 is a schematic diagram of a hardware structure of an electronic device 900 provided by an embodiment of the present disclosure. For example, the electronic device 900 may be provided as a server. Referring to FIG. 9 , the electronic device 900 includes a processing component 910 , which further includes one or more processors, and a memory resource represented by a memory 920 for storing instructions executable by the processing component 910 , such as application programs. The application program stored in memory 920 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 910 is configured to execute instructions to perform the above method.
电子设备900还可以包括一个电源组件930被配置为执行电子设备900的电源管理,一个有线或无线网络接口940被配置为将电子设备900连接到网络,和一个输入输出(I/O)接口950。电子设备900可以操作基于存储在存储器920的操作系统,例如Windows Server TM,Mac OS X TM,Unix TM,Linux TM,FreeBSD TM或类似。 The electronic device 900 may also include a power supply component 930 configured to perform power management of the electronic device 900, a wired or wireless network interface 940 configured to connect the electronic device 900 to a network, and an input-output (I/O) interface 950 . The electronic device 900 can operate based on an operating system stored in the memory 920, such as Windows Server , Mac OS X , Unix , Linux , FreeBSD or the like.
在本公开实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器920,上述计算机程序指令可由电子设备900的处理组件910执行以完成上述方法。In an embodiment of the present disclosure, there is also provided a non-volatile computer-readable storage medium, such as a memory 920 including computer program instructions, which can be executed by the processing component 910 of the electronic device 900 to complete the above method.
本公开实施例可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。Embodiments of the present disclosure may be systems, methods and/or computer program products. A computer program product may include a computer readable storage medium having computer readable program instructions thereon for causing a processor to implement various aspects of the present disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是但不限于电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(Random Access Memory,RAM)、只读存储器(Read-Only Memory,ROM)、可擦式可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM、或闪存)、静态随机存取存储器(Static Random-Access Memory,SRAM)、便携式压缩盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能盘(Digital Video Disc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. Examples of computer-readable storage media (a non-exhaustive list) include: portable computer disks, hard disks, Random Access Memory (RAM), Read-Only Memory (ROM), erasable Programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM, or flash memory), Static Random-Access Memory (Static Random-Access Memory, SRAM), Portable Compression Disk Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM ), Digital Video Disc (DVD), memory sticks, floppy disks, mechanically encoded devices such as punched cards or raised structures in grooves with instructions stored thereon, and any suitable combination of the foregoing. As used herein, computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., pulses of light through fiber optic cables), or transmitted electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or a network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(Instruction Set Architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(Local Area Network,LAN)或广域网(Wide Area Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(Field Programmable Gate Array,FPGA)或可编程逻辑阵列(Programmable Logic Array,PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for performing the operations of the present disclosure may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or in the form of one or more source or object code written in any combination of programming languages, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the “C” language or similar programming languages. Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In cases involving a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external computer such as use an Internet service provider to connect via the Internet). In some embodiments, electronic circuits, such as programmable logic circuits, field programmable gate arrays (Field Programmable Gate Array, FPGA) or programmable logic arrays (Programmable Logic Array, PLA), the electronic circuit can execute computer-readable program instructions, thereby implementing various aspects of the present disclosure.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It should be understood that each block of the flowcharts and/or block diagrams, and combinations of blocks in the flowcharts and/or block diagrams, can be implemented by computer-readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and/or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。It is also possible to load computer-readable program instructions into a computer, other programmable data processing device, or other equipment, so that a series of operational steps are performed on the computer, other programmable data processing device, or other equipment to produce a computer-implemented process , so that instructions executed on computers, other programmable data processing devices, or other devices implement the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, a portion of a program segment, or an instruction that includes one or more Executable instructions. In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.
该计算机程序产品可以通过硬件、软件或其结合的方式实现。在一些实施场景中,所述计算机程序产品体现为计算机存储介质,在另一些实施场景中,计算机程序产品体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。The computer program product can be realized by hardware, software or a combination thereof. In some implementation scenarios, the computer program product is embodied as a computer storage medium, and in other implementation scenarios, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Having described various embodiments of the present disclosure above, the foregoing description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and alterations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principle of each embodiment, practical application or improvement of technology in the market, or to enable other ordinary skilled in the art to understand each embodiment disclosed herein.
工业实用性Industrial Applicability
本公开实施例涉及一种图表显示方法及装置、电子设备、存储介质及计算机程序产品,所述方法包括:获取用于显示所述图表的目标数据,所述目标数据包括静态显示数据和动态显示数据;根据所述静态显示数据,绘制所述图表的静态显示区域,其中,所述静态显示区域包括在目标显示界面上位置固定的第一显示内容;根据所述动态显示数据和所述图表在所述目标显示界面中的显示状态,绘制动态显示区域,其中,所述动态显示区域包括第二显示内容,所述第二显示内容根据所述显示状态进行变换;在所述目标显示界面中,叠加显示所述静态显示区域和所述动态显示区域。上述方案可以实现图表中静态显示区域和动态显示区域的分别绘制,且便于在显示状态变化的情况下,通过变换的第二显示内容来绘制动态显示区域,减少对静态显示区域的更改,从而减少图表绘制过程中处理的数据量,提高图表显示的效率和性能。Embodiments of the present disclosure relate to a chart display method and device, electronic equipment, a storage medium, and a computer program product. The method includes: acquiring target data for displaying the chart, and the target data includes static display data and dynamic display data. data; draw the static display area of the chart according to the static display data, wherein the static display area includes the first display content with a fixed position on the target display interface; according to the dynamic display data and the chart in The display state in the target display interface draws a dynamic display area, wherein the dynamic display area includes second display content, and the second display content is transformed according to the display state; in the target display interface, The static display area and the dynamic display area are superimposedly displayed. The above scheme can realize the separate drawing of the static display area and the dynamic display area in the chart, and it is convenient to draw the dynamic display area by changing the second display content when the display state changes, reducing the changes to the static display area, thereby reducing The amount of data processed during chart drawing improves the efficiency and performance of chart display.

Claims (21)

  1. 一种图表显示方法,包括:A graph display method, comprising:
    获取用于显示所述图表的目标数据,所述目标数据包括静态显示数据和动态显示数据;acquiring target data for displaying the chart, where the target data includes static display data and dynamic display data;
    根据所述静态显示数据,绘制所述图表的静态显示区域,其中,所述静态显示区域包括在目标显示界面上位置固定的第一显示内容;Drawing a static display area of the chart according to the static display data, wherein the static display area includes first display content whose position is fixed on the target display interface;
    根据所述动态显示数据和所述图表在所述目标显示界面中的显示状态,绘制动态显示区域,其中,所述动态显示区域包括第二显示内容,所述第二显示内容根据所述显示状态进行变换;Draw a dynamic display area according to the dynamic display data and the display state of the chart in the target display interface, wherein the dynamic display area includes second display content, and the second display content is based on the display state to transform;
    在所述目标显示界面中,叠加显示所述静态显示区域和所述动态显示区域。In the target display interface, the static display area and the dynamic display area are superimposedly displayed.
  2. 根据权利要求1所述的方法,其中,所述根据所述静态显示数据,绘制所述图表的静态显示区域,包括:The method according to claim 1, wherein said drawing the static display area of the chart according to the static display data comprises:
    根据所述静态显示数据,确定所述第一显示内容在所述目标显示界面上的第一显示位置;determining a first display position of the first display content on the target display interface according to the static display data;
    根据所述第一显示位置,对所述第一显示内容进行绘制,得到所述静态显示区域。Drawing the first display content according to the first display position to obtain the static display area.
  3. 根据权利要求1或2所述的方法,其中,所述根据所述动态显示数据和所述图表在所述目标显示界面中的显示状态,绘制动态显示区域,包括:The method according to claim 1 or 2, wherein said drawing a dynamic display area according to the dynamic display data and the display state of the chart in the target display interface comprises:
    响应于针对所述图表的显示控制操作,确定所述图表在所述目标显示界面中的显示状态;determining a display state of the chart in the target display interface in response to a display control operation on the chart;
    根据所述显示状态,获取第三显示内容中与所述显示状态匹配的第二显示内容,其中,所述第三显示内容包括与所述动态显示数据匹配的全部显示内容;According to the display state, acquire the second display content matching the display state in the third display content, wherein the third display content includes all the display content matching the dynamic display data;
    根据所述动态显示数据,确定所述第二显示内容在所述目标显示界面上的第二显示位置;determining a second display position of the second display content on the target display interface according to the dynamic display data;
    根据所述第二显示位置,对所述第二显示内容进行绘制,得到所述动态显示区域。Drawing the second display content according to the second display position to obtain the dynamic display area.
  4. 根据权利要求3所述的方法,其中,所述显示状态包括显示进度;所述第三显示内容包括多个图元元素,所述多个图元元素在所述图表的预设方向上按照相同的预设间距进行排列;The method according to claim 3, wherein the display status includes display progress; the third display content includes a plurality of graphic elements, and the plurality of graphic elements are arranged in the same direction in the preset direction of the graph. Arranged at the preset spacing;
    所述根据所述显示状态,获取第三显示内容中与所述显示状态匹配的第二显示内容,包括:According to the display state, acquiring the second display content in the third display content that matches the display state includes:
    根据所述显示进度与所述预设间距,确定所述第二显示内容中待显示的初始图元元素;determining an initial graphic element to be displayed in the second display content according to the display progress and the preset distance;
    根据所述显示进度、所述预设间距以及所述动态显示区域在所述图表中的预设显示范围,确定所述第二显示内容中待显示的终止图元元素;According to the display progress, the preset distance, and the preset display range of the dynamic display area in the chart, determine the termination graphic element to be displayed in the second display content;
    基于所述初始图元元素和所述终止图元元素,从所述第三显示内容中提取与所述显示状态匹配的第二显示内容。Extracting second display content matching the display state from the third display content based on the initial graphic element and the termination graphic element.
  5. 根据权利要求1至4中任意一项所述的方法,其中,所述动态显示区域还包括第四显示内容;The method according to any one of claims 1 to 4, wherein the dynamic display area further includes a fourth display content;
    所述根据所述动态显示数据和所述图表在所述目标显示界面中的显示状态,绘制动态显示区域,还包括:The drawing of the dynamic display area according to the dynamic display data and the display state of the chart in the target display interface further includes:
    根据所述显示状态,按照预设统计规则,对所述第二显示内容进行合并统计,得到所述第四显示内容;performing combined statistics on the second display content according to the display state and according to preset statistical rules to obtain the fourth display content;
    根据预设显示位置,对所述第四显示内容进行绘制。Drawing the fourth display content according to a preset display position.
  6. 根据权利要求1至5中任意一项所述的方法,其中,所述获取用于显示所述图表的目标数据,包括:The method according to any one of claims 1 to 5, wherein said acquiring target data for displaying said chart comprises:
    获取用于显示所述图表的初始数据;obtain initial data for displaying said graph;
    根据所述初始数据的数据类型,对所述初始数据进行数据结构变换,得到与预设数据结构匹配的中间数据;performing data structure transformation on the initial data according to the data type of the initial data to obtain intermediate data matching the preset data structure;
    根据所述图表对应的可视化数据结构,将所述中间数据进行转换,得到与所述可视化数据结构匹配的目标数据。According to the visualization data structure corresponding to the chart, the intermediate data is converted to obtain target data matching the visualization data structure.
  7. 根据权利要求6所述的方法,其中,所述可视化数据结构包括以下至少之一:所述静态显示数据的第一数据结构、所述动态显示数据的第二数据结构以及所述动态显示数据的第三数据结构,其中,所述第二数据结构与第二显示内容匹配,所述第三数据结构与第四显示内容匹配,所述第四显示内容包括对所述第二显示内容进行合并统计所得到的统计结果。The method according to claim 6, wherein the visualization data structure comprises at least one of: a first data structure of the static display data, a second data structure of the dynamic display data, and a The third data structure, wherein the second data structure matches the second display content, the third data structure matches the fourth display content, and the fourth display content includes combining statistics on the second display content The obtained statistical results.
  8. 根据权利要求7所述的方法,其中,所述静态显示数据的第一数据结构包括以下至少之一:数值固定的第一位置信息、第一标签以及第一颜色信息;The method according to claim 7, wherein the first data structure of the static display data includes at least one of the following: first position information with fixed values, first label and first color information;
    所述动态显示数据的第二数据结构包括以下至少之一:第二位置信息、第二标签以及第二颜色信息,其中,所述第二位置信息的数值根据所述显示状态进行变换;The second data structure of the dynamic display data includes at least one of the following: second position information, a second label, and second color information, wherein the value of the second position information is transformed according to the display state;
    所述动态显示数据的第三数据结构包括以下至少之一:第三标签信息、第三颜色信息、统计信息以及判断信息,其中,所述判断信息包括根据预设判断规则对所述统计信息进行判断所得到的判断结果。The third data structure of the dynamic display data includes at least one of the following: third label information, third color information, statistical information, and judging information, wherein the judging information includes evaluating the statistical information according to preset judging rules. Judgment results obtained.
  9. 根据权利要求1至8中任意一项所述的方法,其中,所述图表包括时间与责任对象之间的对应关系图表。The method according to any one of claims 1 to 8, wherein the graph includes a graph of correspondence between time and responsible objects.
  10. 一种图表显示装置,包括:A graphic display device comprising:
    获取部分,被配置为获取用于显示所述图表的目标数据,所述目标数据包括静态显示数据和动态显示数据;an acquisition part configured to acquire target data for displaying the chart, the target data including static display data and dynamic display data;
    静态绘制部分,被配置为根据所述静态显示数据,绘制所述图表的静态显示区域,其中,所述静态显示区域包括在目标显示界面上位置固定的第一显示内容;The static drawing part is configured to draw the static display area of the chart according to the static display data, wherein the static display area includes first display content whose position is fixed on the target display interface;
    动态绘制部分,被配置为根据所述动态显示数据和所述图表在所述目标显示界面中的显示状态,绘制动态显示区域,其中,所述动态显示区域包括第二显示内容,所述第二显示内容根据所述显示状态进行变换;The dynamic drawing part is configured to draw a dynamic display area according to the dynamic display data and the display state of the chart in the target display interface, wherein the dynamic display area includes a second display content, and the second The display content is transformed according to the display state;
    显示部分,被配置为在所述目标显示界面中,叠加显示所述静态显示区域和所述动态显示区域。The display part is configured to superimpose display the static display area and the dynamic display area in the target display interface.
  11. 根据权利要求10所述的装置,其中,所述静态绘制部分,包括:The device according to claim 10, wherein the static drawing part comprises:
    第一确定子部分,被配置为根据所述静态显示数据,确定所述第一显示内容在所述目标显示界面上的第一显示位置;The first determination subpart is configured to determine a first display position of the first display content on the target display interface according to the static display data;
    第一绘制子部分,被配置为根据所述第一显示位置,对所述第一显示内容进行绘制,得到所述静态显示区域。The first drawing subsection is configured to draw the first display content according to the first display position to obtain the static display area.
  12. 根据权利要求10或11所述的装置,其中,所述动态绘制部分,包括:The device according to claim 10 or 11, wherein the dynamic drawing part comprises:
    第二确定子部分,被配置为响应于针对所述图表的显示控制操作,确定所述图表在所述目标显示界面中的显示状态;The second determining subpart is configured to determine a display state of the chart in the target display interface in response to a display control operation on the chart;
    第一获取子部分,被配置为根据所述显示状态,获取第三显示内容中与所述显示状态匹配的第二显示内容,其中,所述第三显示内容包括与所述动态显示数据匹配的全部显示内容;The first acquisition subpart is configured to acquire, according to the display state, second display content that matches the display state in the third display content, wherein the third display content includes information that matches the dynamic display data Show all content;
    第三确定子部分,被配置为根据所述动态显示数据,确定所述第二显示内容在所述目标显示界面上的第二显示位置;The third determining subpart is configured to determine a second display position of the second display content on the target display interface according to the dynamic display data;
    第二绘制子部分,被配置为根据所述第二显示位置,对所述第二显示内容进行绘制,得到所述动态显示区域。The second drawing subsection is configured to draw the second display content according to the second display position to obtain the dynamic display area.
  13. 根据权利要求12所述的装置,其中,所述显示状态包括显示进度;所述第三显示内容包括多个图元元素,所述多个图元元素在所述图表的预设方向上按照相同的预设间距进行排列;The device according to claim 12, wherein the display status includes display progress; the third display content includes a plurality of graphic elements, and the plurality of graphic elements are arranged in the same direction in the preset direction of the graph. Arranged at the preset spacing;
    所述第一获取子部分,包括:The first acquisition subpart includes:
    第四确定子部分,被配置为根据所述显示进度与所述预设间距,确定所述第二显示内容中待显示的初始图元元素;The fourth determining subpart is configured to determine an initial graphic element to be displayed in the second display content according to the display progress and the preset distance;
    第五确定子部分,被配置为根据所述显示进度、所述预设间距以及所述动态显示区域在所述图表中的预设显示范围,确定所述第二显示内容中待显示的终止图元元素;The fifth determining subsection is configured to determine the termination graph to be displayed in the second display content according to the display progress, the preset distance, and the preset display range of the dynamic display area in the graph meta element;
    第一提取子部分,被配置为基于所述初始图元元素和所述终止图元元素,从所述第三显示内容中提取与所述显示状态匹配的第二显示内容。The first extracting subsection is configured to extract second display content matching the display state from the third display content based on the initial graphic element and the termination graphic element.
  14. 根据权利要求10至13中任意一项所述的装置,其中,所述动态显示区域还包括第四显示内容;The device according to any one of claims 10 to 13, wherein the dynamic display area further includes a fourth display content;
    所述动态绘制部分,还包括:The dynamic drawing part also includes:
    第一得到子部分,被配置为根据所述显示状态,按照预设统计规则,对所述第二显示内容进行合并统计,得到所述第四显示内容;The first obtaining subpart is configured to perform combined statistics on the second display content according to the display state and according to preset statistical rules, to obtain the fourth display content;
    第三绘制子部分,被配置为根据预设显示位置,对所述第四显示内容进行绘制。The third drawing subsection is configured to draw the fourth display content according to a preset display position.
  15. 根据权利要求10至14中任意一项所述的装置,其中,所述获取部分,包括:The device according to any one of claims 10 to 14, wherein the acquiring part comprises:
    第二获取子部分,被配置为获取用于显示所述图表的初始数据;a second acquisition subsection configured to acquire initial data for displaying the chart;
    第二得到子部分,被配置为根据所述初始数据的数据类型,对所述初始数据进行数据结构变换,得到与预设数据结构匹配的中间数据;The second obtaining subpart is configured to perform data structure transformation on the initial data according to the data type of the initial data to obtain intermediate data matching the preset data structure;
    第三得到子部分,被配置为根据所述图表对应的可视化数据结构,将所述中间数据进行转换,得到与所述可视化数据结构匹配的目标数据。The third obtaining subpart is configured to convert the intermediate data according to the visualized data structure corresponding to the chart, so as to obtain target data matching the visualized data structure.
  16. 根据权利要求15所述的装置,其中,所述可视化数据结构包括以下至少之一:所述静态显示数据的第一数据结构、所述动态显示数据的第二数据结构以及所述动态显示数据的第三数据结构,其中,所述第二数据结构与第二显示内容匹配,所述第三数据结构与第四显示内容匹配,所述第四显示内容包括对所述第二显示内容进行合并统计所得到的统计结果。The apparatus according to claim 15, wherein the visualization data structure comprises at least one of: a first data structure of the static display data, a second data structure of the dynamic display data, and a The third data structure, wherein the second data structure matches the second display content, the third data structure matches the fourth display content, and the fourth display content includes combining statistics on the second display content The obtained statistical results.
  17. 根据权利要求16所述的装置,其中,所述静态显示数据的第一数据结构包括以下至少之一:数值固定的第一位置信息、第一标签以及第一颜色信息;The device according to claim 16, wherein the first data structure of the static display data includes at least one of the following: first position information with fixed values, first label and first color information;
    所述动态显示数据的第二数据结构包括以下至少之一:第二位置信息、第二标签以及第二颜色信息,其中,所述第二位置信息的数值根据所述显示状态进行变换;The second data structure of the dynamic display data includes at least one of the following: second position information, a second label, and second color information, wherein the value of the second position information is transformed according to the display state;
    所述动态显示数据的第三数据结构包括以下至少之一:第三标签信息、第三颜色信息、统计信息以及判断信息,其中,所述判断信息包括根据预设判断规则对所述统计信息进行判断所得到的判断结果。The third data structure of the dynamic display data includes at least one of the following: third label information, third color information, statistical information, and judging information, wherein the judging information includes evaluating the statistical information according to preset judging rules. Judgment results obtained.
  18. 根据权利要求10至17中任意一项所述的装置,其中,所述图表包括时间与责任对象之间的对应关系图表。The apparatus according to any one of claims 10 to 17, wherein the graph includes a graph of correspondence between time and responsible objects.
  19. 一种电子设备,包括:An electronic device comprising:
    处理器;processor;
    用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至9中任意一项所述的方法。Wherein, the processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1-9.
  20. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至9中任意一项所述的方法。A computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 9 is implemented.
  21. 一种计算机程序产品,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在电子设备上运行的情况下,使得所述电子设备执行权利要求1至9中任意一项所述的方法。A computer program product, the computer program product comprising a computer program or an instruction, when the computer program or instruction is run on an electronic device, the electronic device is made to execute any one of claims 1 to 9. Methods.
PCT/CN2022/113127 2021-09-22 2022-08-17 Graph display method and apparatus, electronic device, storage medium, and computer program product WO2023045634A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111106936.9 2021-09-22
CN202111106936.9A CN113807067A (en) 2021-09-22 2021-09-22 Chart display method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2023045634A1 true WO2023045634A1 (en) 2023-03-30

Family

ID=78939920

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/113127 WO2023045634A1 (en) 2021-09-22 2022-08-17 Graph display method and apparatus, electronic device, storage medium, and computer program product

Country Status (2)

Country Link
CN (1) CN113807067A (en)
WO (1) WO2023045634A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113807067A (en) * 2021-09-22 2021-12-17 深圳市商汤科技有限公司 Chart display method and device, electronic equipment and storage medium
CN114647476B (en) * 2022-03-31 2024-06-11 北京百度网讯科技有限公司 Page rendering method, device, equipment, storage medium and program

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101620591A (en) * 2009-08-12 2010-01-06 国网电力科学研究院 Method for designing module report form layout based on cell mode
US10156975B1 (en) * 2014-09-08 2018-12-18 Tableau Software, Inc. Systems and methods for using analytic objects in a dynamic data visualization interface
CN111143725A (en) * 2019-11-15 2020-05-12 北京字节跳动网络技术有限公司 Page generation method and device and electronic equipment
CN112612991A (en) * 2020-12-30 2021-04-06 微医云(杭州)控股有限公司 Page display method and device, electronic equipment and storage medium
CN113807067A (en) * 2021-09-22 2021-12-17 深圳市商汤科技有限公司 Chart display method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101620591A (en) * 2009-08-12 2010-01-06 国网电力科学研究院 Method for designing module report form layout based on cell mode
US10156975B1 (en) * 2014-09-08 2018-12-18 Tableau Software, Inc. Systems and methods for using analytic objects in a dynamic data visualization interface
CN111143725A (en) * 2019-11-15 2020-05-12 北京字节跳动网络技术有限公司 Page generation method and device and electronic equipment
CN112612991A (en) * 2020-12-30 2021-04-06 微医云(杭州)控股有限公司 Page display method and device, electronic equipment and storage medium
CN113807067A (en) * 2021-09-22 2021-12-17 深圳市商汤科技有限公司 Chart display method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113807067A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
WO2023045634A1 (en) Graph display method and apparatus, electronic device, storage medium, and computer program product
WO2021008195A1 (en) Data updating method and apparatus, electronic device, and storage medium
JP6227766B2 (en) Method, apparatus and terminal device for changing facial expression symbol in chat interface
US20180046336A1 (en) Instant Message Processing Method and Apparatus, and Storage Medium
CN107948708B (en) Bullet screen display method and device
US9641471B2 (en) Electronic device, and method and computer-readable recording medium for displaying message in electronic device
US10078422B2 (en) Method and device for updating a list
CN104240068A (en) Method and device for creating reminding event
TW202109360A (en) Image processing method and device, electronic equipment and storage medium
CN107621886B (en) Input recommendation method and device and electronic equipment
CN106648063B (en) Gesture recognition method and device
US20180060308A1 (en) Method and apparatus for message communication
EP2988203B1 (en) Method and device for positioning cursor
KR20150012067A (en) Method for processing message and an electronic device thereof
CN107147936B (en) Display control method and device for barrage
CN110609933A (en) Image processing method and device, electronic equipment and storage medium
CN109949385A (en) A kind of image adaptive method of adjustment, equipment, electronic equipment and storage medium
KR20220093091A (en) Labeling method and apparatus, electronic device and storage medium
CN106775548B (en) page processing method and device
CN110321042A (en) Interface information methods of exhibiting, device and electronic equipment
CN110892371B (en) Display control method and terminal
EP3506627A1 (en) Terminal and server for providing video call service
WO2023097998A1 (en) Chart display method and apparatus, electronic device, storage medium, and program
CN112083869A (en) Digital input method, digital input device and storage medium
CN106095129A (en) Stroke display packing and device

Legal Events

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

Ref document number: 22871692

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE