Method and device for displaying statistical graphs
By generating and processing snapshots of statistical charts, it solves the problems of large amount of calculation and slow response speed during interactive operations in the existing technology, and achieves smooth display of statistical charts and improved response speed.
Patent Information
- Application Number
- CN202010566646.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-19
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2040-06-19
AI Technical Summary
In the existing technology, when a user interacts with a statistical chart, the statistical chart needs to be redrawn frequently, resulting in a large amount of calculation, slow response speed, poor user experience, and possible problems such as lags.
When user interaction is detected, a snapshot of the statistical chart is generated, and the snapshot is processed according to the interactive operation, and the response results are displayed to avoid directly redrawing the statistical chart and use temporary interfaces and APIs for display and processing.
It improves the response speed of user interactive operations, ensures the smoothness of statistical charts during the interaction process, reduces the computing load, and improves the user experience.
Smart Images

Figure CN113821282B
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method and device for displaying statistical graphs. Background Art
[0002] Statistical charts are various graphics drawn based on statistical figures using geometric figures, images of things, and maps. They are intuitive, vivid, and specific. Statistical charts can simplify, popularize, and visualize complex statistical figures, making them clear at a glance and easy to understand and compare. Therefore, statistical charts play an important role in the compilation and analysis of statistical data and are widely used. For example, many client applications use statistical charts to visually display information to users.
[0003] At present, some client applications provide users with various interactive operations on statistical graphs when displaying statistical graphs to users, so that users can understand relevant information more flexibly and reliably. For example, users can select any interval of the statistical graph by double-fingering, and perform operations such as panning and zooming on the interval on the statistical graph. At this time, the client application usually redraws the statistical graph corresponding to the user's interactive operation according to the user's interactive operation and displays it to the user. Summary of the invention
[0004] The embodiments of the present disclosure provide a method and apparatus for displaying a statistical graph.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for displaying a statistical graph, the method comprising: in response to detecting an interactive operation on the statistical graph, generating a snapshot of the statistical graph; according to the interactive operation, processing the snapshot to obtain a response result for the interactive operation; and displaying the response result.
[0006] In some embodiments, the statistical graph is a statistical graph displayed by a target application; and generating a snapshot of the statistical graph includes: generating a snapshot of the view where the statistical graph is located.
[0007] In some embodiments, the display of the response result includes: using a temporary interface to display the response result.
[0008] In some embodiments, the above-mentioned display of the response result includes: displaying the response result based on an application program interface API for displaying snapshots.
[0009] In some embodiments, the above method further includes: generating statistical information of the information presented in the statistical chart based on the interactive operation; and displaying the statistical information.
[0010] In some embodiments, the above-mentioned interaction operation includes at least one of the following: a single-finger event and a double-finger event.
[0011] In some embodiments, the above method further includes: in response to detecting that the interactive operation on the statistical graph is terminated, recycling the snapshot of the statistical graph.
[0012] In a second aspect, an embodiment of the present disclosure provides a device for displaying a statistical graph, the device comprising: a generation unit, configured to generate a snapshot of the statistical graph in response to detecting an interactive operation on the statistical graph; a processing unit, configured to process the snapshot according to the interactive operation to obtain a response result to the interactive operation; and a display unit, configured to display the response result.
[0013] In some embodiments, the statistical graph belongs to a statistical graph displayed by a target application; and the generating unit is further configured to: generate a snapshot of a view where the statistical graph is located.
[0014] In some embodiments, the display unit is further configured to: display the response result using a temporary interface.
[0015] In some embodiments, the display unit is further configured to: display the response result based on an application program interface API for displaying snapshots.
[0016] In some embodiments, the generation unit is further configured to: generate statistical information of the information presented in the statistical chart according to the interactive operation; and the display unit is further configured to: display the statistical information.
[0017] In some embodiments, the interactive operation includes at least one of the following: a single-finger event, a double-finger event.
[0018] In some embodiments, the apparatus further includes: a recycling unit configured to recycle the snapshot of the statistical graph in response to detecting that the interactive operation on the statistical graph ends.
[0019] In a third aspect, an embodiment of the present disclosure provides a terminal, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0020] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0021] The method and device for displaying a statistical graph provided by the embodiments of the present disclosure generate a snapshot of the statistical graph when an interactive operation on the statistical graph is detected, and process the snapshot according to the interactive operation of the user to obtain a response result for the interactive operation of the user, and display the response result to the user. Since the processing process of the snapshot usually does not involve complex and large amounts of calculations, the response speed of the user's interactive operation can be effectively improved, thereby ensuring the smoothness of the display process of the statistical graph during the interactive process. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0023] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
[0024] Figure 2 is a flow chart of an embodiment of a method for displaying a statistical graph according to the present disclosure;
[0025] Figure 3 is a schematic diagram of an application scenario of a method for displaying a statistical graph according to an embodiment of the present disclosure;
[0026] Figure 4 is a flow chart of another embodiment of a method for displaying a statistical graph according to the present disclosure;
[0027] Figure 5 is a structural schematic diagram of an embodiment of a device for displaying a statistical graph according to the present disclosure;
[0028] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION
[0029] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0030] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0031] Figure 1 An exemplary architecture 100 is shown to which an embodiment of a method for displaying a statistical graph or an apparatus for displaying a statistical graph of the present disclosure can be applied.
[0032] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0033] The terminal devices 101, 102, 103 interact with the server 105 through the network 104 to receive or send messages, etc. Various client applications may be installed on the terminal devices 101, 102, 103. For example, browser applications, search applications, shopping applications, financial applications, social platform software, instant messaging applications, information flow applications, data processing applications, etc.
[0034] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers and desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0035] The server 105 may be a server that provides various services, such as a backend server that provides backend support for client applications installed on the terminal devices 101, 102, 103. The server 105 may respond to requests sent by the terminal devices 101, 102, 103, and return response results.
[0036] It should be noted that the method for displaying a statistical graph provided in the embodiment of the present disclosure is generally performed by the terminal devices 101, 102, 103, and accordingly, the apparatus for displaying a statistical graph is generally provided in the terminal devices 101, 102, 103. At this time, the exemplary system architecture 100 may not have the server 105 and the network 104.
[0037] It should also be noted that the server 105 may also be installed with a tool for processing statistical graphs, etc., and the server 105 may also respond to the user's interactive operation on the statistical graph displayed on the client based on the tool for processing statistical graphs, etc. In this case, the method for displaying statistical graphs may also be executed by the server 105, and accordingly, the device for displaying statistical graphs may also be set in the server 105.
[0038] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0039] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0040] Continue to refer Figure 2 , which shows a process 200 of an embodiment of a method for displaying a statistical graph according to the present disclosure. The method for displaying a statistical graph comprises the following steps:
[0041] Step 201: In response to detecting an interactive operation on a statistical graph, a snapshot of the statistical graph is generated.
[0042] In this embodiment, the execution subject of the method for displaying a statistical graph (such as Figure 1 The terminal devices 101, 102, 103 shown in the figure can generate a snapshot of the statistical graph when detecting a user's interactive operation on the currently displayed statistical graph.
[0043] Statistical graphs can refer to tools that use points, lines, surfaces, and volumes to draw geometric figures to show the relationship between various quantities and their changes. Statistical graphs can be a general term for various graphics that show the size and changes of statistical figures.
[0044] Statistical charts can usually be used to represent the comparative relationship between phenomena, reveal the overall structure, check the implementation of plans, reveal the dependency relationship between phenomena, reflect the distribution of overall units, explain the spatial distribution of phenomena, and so on.
[0045] According to different division methods, statistical graphs may include various existing types of statistical graphs. For example, statistical graphs include but are not limited to: bar graphs, pie charts, line graphs, pictograms, real number graphs, cumulative number graphs, percentage graphs, logarithmic graphs, exponential graphs, percentage bar graphs, pie charts, histograms, scatter plots, statistical maps, web graphs, stem-and-leaf graphs, and the like.
[0046] The interactive operation may include various user operations that can be received and detected by the above-mentioned execution subject. For example, the interactive operation may include various gesture operations of the user. For another example, the interactive operation may include various operations performed by the user using an interactive tool (such as a stylus, a capacitive pen, etc.).
[0047] It should be understood that different types of execution entities can receive different types of interactive operations. Therefore, different types of execution entities can use corresponding different detection methods for different interactive operations.
[0048] Snapshots can be used to record the state of data at a certain moment. A snapshot of a statistical chart can be used to record the state of the statistical chart at the current moment. In other words, a snapshot can record the information presented by the statistical chart at the current moment.
[0049] The execution subject may generate a snapshot of the statistical graph using various existing snapshot technologies, open source snapshot generation methods, etc. For example, a snapshot of the screen of the execution subject displaying the statistical graph may be generated to obtain a snapshot of the statistical graph.
[0050] Step 202: Process the snapshot according to the interactive operation to obtain a response result for the interactive operation.
[0051] In this embodiment, the interactive operation on the statistical graph is usually used to instruct to perform certain processing on the statistical graph. In this case, it can be converted into processing on the snapshot, and the processing result is obtained as the response result to the interactive operation.
[0052] It should be understood that the snapshot processing method may be different for different interactive operations. For example, the interactive operation includes zooming in on an interval of the statistical chart selected by two fingers. In this case, the portion of the snapshot corresponding to the selected interval may be captured first, and then the captured portion may be zoomed in to obtain the processing result.
[0053] Step 203: Display the response result.
[0054] In this embodiment, after obtaining the response result to the user's interactive operation, the execution subject may further display the response result to the user.
[0055] In some optional implementations of this embodiment, an image corresponding to the currently displayed statistical graph can be generated as a snapshot of the statistical graph. Thus, when the snapshot is processed according to the interactive operation, the image is processed to obtain a response result. Since the processing of the image hardly involves data calculation, the response speed to the user's interactive operation can be further improved, thereby improving the fluency of the statistical graph in the change process corresponding to the user's interactive operation.
[0056] As an example, a bitmap corresponding to the currently displayed statistical graph may be generated as a snapshot of the statistical graph.
[0057] In some optional implementations of this embodiment, the statistical chart may be a statistical chart displayed by a target application, wherein the target application may be a variety of applications, for example, the target application may be various types of applications installed by the above subject.
[0058] As an example, the target application may be an application installed by the execution subject for displaying a stock trend chart. In this case, the statistical chart may be the stock trend chart displayed by the application.
[0059] This can reduce the user's sense of delay in the interaction process of the statistical graphs displayed by the application, improve the smoothness of the corresponding changes in the statistical graphs in response to the user's interactive operations, and avoid the large amount of calculations required to redraw the statistical graphs in response to the user's interactive operations.
[0060] Optionally, a snapshot of the view in which the chart is located can be generated.
[0061] Currently, many applications can use views to display various user interfaces (UI). For example, applications supported by the Android system can use View components to develop various pages.
[0062] At this time, the snapshot of the view where the statistical chart is located can be generated using an API (Application Programming Interface) for generating a snapshot of a specified view. The API for generating a snapshot of a specified view can be an API provided by the operating system where the application is located, or an API developed by a technician or an open source API, etc. For example, the View screenshot method provided by the Android system can be used to generate a drawing snapshot of a specified View.
[0063] In this way, a snapshot of the view where the statistical chart displayed by the application is located can be generated in a targeted and rapid manner, so that the snapshot can be processed according to the user's interactive operation to obtain a response result, avoiding the process of redrawing the statistical chart according to the user's interactive operation, which helps to save snapshot storage space and snapshot processing speed.
[0064] In some optional implementations of this embodiment, a temporary interface may be used to display the obtained response results. The temporary interface may refer to an interface opened on the page currently displaying the statistical chart. At this time, the temporary interface may be used to display the response results corresponding to the user's interactive operation.
[0065] According to different application requirements or application scenarios, various types of temporary interfaces can be used to display the response results. Temporary interfaces include but are not limited to: floating layers, pop-up layers, pop-up boxes, dialog boxes, etc. It should be understood that according to actual application requirements, the style of the temporary interface can be flexibly designed by technicians. For example, technicians can design various overlays as temporary interfaces to display the response results. For another example, the transparency, shape, background color and other attribute information of the temporary interface can be controlled.
[0066] Since the temporary interface is less interruptive, using the temporary interface to display the response results can ensure a more coherent user experience and help users more clearly understand the content of the statistical chart that their interactive operations are targeting.
[0067] In some optional implementations of this embodiment, the obtained response result can be displayed using an API for displaying snapshots. The API for displaying snapshots can be an API provided by the operating system where the application is located, or an API developed by a technician or an open source API, etc. For example, the response result can be drawn using methods such as drawBitmap() of the Canvas class provided by the Android system to display to the user.
[0068] By directly using the API for displaying snapshots to display the resulting response, the speed and convenience of the entire processing and display process for the statistical chart can be further improved.
[0069] In some optional implementations of this embodiment, the interactive operation includes at least one of the following: a single-finger event and a double-finger event.
[0070] Among them, a single-finger event may refer to various operations performed by a single finger. For example, a single-finger event includes but is not limited to: a single-finger light press, a single-finger heavy press, a single-finger long press, a single-finger click to move, etc. A two-finger event may refer to various operations performed by two fingers. For example, a two-finger event includes but is not limited to: a two-finger slide drag and drop, a two-finger press, etc.
[0071] Optionally, when the interactive operation is a single-finger event, a vertical line that can slide with the single finger can be generated in the contact area between the single finger and the statistical chart, so that the user can quickly locate the area of the statistical chart that he or she wishes to contact, and then understand the relevant information of the area.
[0072] Optionally, when the interactive operation is a two-finger event, a temporary interface can be used to display relevant information of the area of the statistical graph corresponding to the two fingers. For example, a vertical line that can slide with the fingers can be generated in the contact area between the two fingers of the user and the statistical graph, and a temporary interface is formed between the two vertical lines. The size and other properties of the temporary interface can be controlled by controlling the two vertical lines.
[0073] Through various interactive operations such as single-finger events and double-finger events, the user's interactive flexibility for statistical charts can be improved to improve the service quality for users.
[0074] Continue to see Figure 3 , Figure 3 FIG. 3 is a schematic diagram 300 of an application scenario of the method for displaying a statistical graph according to this embodiment. Figure 3 In the application scenario of , the user can browse the line chart by using the application installed on the terminal 301. When the application installed on the terminal 301 detects that the user touches the screen with two fingers, a snapshot 302 in the Bitmap format of the line chart can be generated.
[0075] Since the user's double-finger event indicates to move the interval of the line graph selected by the double-finger, the snapshot 302 can be intercepted to obtain the interval of the line graph selected by the double-finger as the response result 303. Afterwards, the response result 303 can be displayed on the semi-transparent floating layer 304. As the user's double-finger moves, the semi-transparent floating layer 304 will also move accordingly. Of course, the semi-transparent floating layer 304 will also be scaled accordingly with the scaling indicated by the user's double-finger.
[0076] In the prior art, as the user interacts with the statistical graph, the statistical graph needs to be constantly redrawn. Each redrawing process involves a large amount of calculations. For example, each redrawing requires recalculating the display coordinates of each point in the statistical graph, etc., and the amount of calculation is very large. As a result, it is easy for users to experience high latency, unsmooth statistical graph drawing, and freezes.
[0077] The method provided by the above-mentioned embodiment of the present disclosure generates a snapshot of the statistical graph when detecting the user's interactive operation on the statistical graph, thereby converting the redrawing process of the statistical graph in the prior art into a processing process of the snapshot. Since the processing of the snapshot does not require a process involving a large amount of calculations such as recalculating the coordinates of each point in the statistical graph each time, the use of snapshots to respond to the user's interactive operation on the statistical graph can greatly improve the response speed and ensure the fluency of the statistical graph during the interactive process.
[0078] Further references Figure 4 , which shows a process 400 of another embodiment of a method for displaying a statistical graph. The process 400 of the method for displaying a statistical graph includes the following steps:
[0079] Step 401 : in response to detecting an interactive operation on a statistical graph displayed by a target application, generating a snapshot of a view where the statistical graph is located.
[0080] Step 402: Process the snapshot according to the interactive operation to obtain a response result for the interactive operation.
[0081] Step 403: Generate statistical information of the information presented in the statistical chart according to the interactive operation.
[0082] In this embodiment, the statistical information may refer to the results obtained by performing various statistical analyses on the information presented in the statistical graph.
[0083] It should be understood that for statistical charts presenting different contents, the statistical information may also be different. For example, for a fund trend chart, the statistical information may be the net value increase of the fund, etc. For another example, for an income line chart, the statistical information may be the average income, etc.
[0084] By generating and displaying statistical information, users can be provided with richer information so that they can have a more comprehensive and in-depth understanding of the content presented by the statistical chart. In addition, users do not need to perform statistical analysis based on the content presented by the statistical chart, which helps improve the quality of services provided to users.
[0085] Optionally, when the detected user interaction operation indicates partial content of the currently displayed statistical chart, the above statistical information may refer to statistical information corresponding to the partial content of the statistical chart indicated by the user interaction operation, so as to provide the user with more targeted detailed information.
[0086] For example, for an income line graph, when a user's interactive operation specifies an interval of the income line graph, the statistical information may be the average income of the time period indicated by the interval, etc.
[0087] It should be noted that the execution order of the above steps 402 and 403 can be interchanged or they can be executed simultaneously.
[0088] Step 404: Use a temporary interface to display response results and statistical information.
[0089] Step 405: In response to detecting that the interactive operation on the statistical graph is finished, the snapshot of the statistical graph is recycled.
[0090] As an example, the execution subject may display a statistical chart using the screen used to display information. At this time, the user may interact with the statistical chart by performing gesture operations on the screen (such as single-finger sliding, two-finger dragging and dropping, etc.). When the user's finger touches the statistical chart displayed on the screen, a snapshot of the currently displayed statistical chart may be generated, and the user's interactive operation may be responded to by processing the snapshot. When the user's finger leaves the screen of the execution subject, the generated snapshot may be recycled.
[0091] After the user's interactive operation is completed, by recycling the snapshot, useless resources can be cleaned up in time to avoid unnecessary memory usage.
[0092] The specific execution process of the above steps 401-405 can be referred to Figure 2 The relevant descriptions of the relevant contents in the corresponding embodiments are not repeated here.
[0093] The process 400 of the method for displaying a statistical graph in this embodiment generates a snapshot of the view where the statistical graph is located when an interactive operation is detected for the statistical graph displayed by the target application, processes the snapshot according to the interactive operation, and generates statistical information of the information presented by the statistical graph, and then uses a temporary interface based on the relevant API of the application to display the processing result of the snapshot and the generated statistical information, and recycles the snapshot in time after the interactive operation ends. In this way, the user can realize smooth operation (such as translation, sliding, zooming, etc.) on the statistical graph displayed by the application without freezing and other situations.
[0094] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for displaying statistical graphs. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0095] like Figure 5 As shown, the apparatus 500 for displaying a statistical graph provided in this embodiment includes a generating unit 501, a processing unit 502 and a display unit 503. The generating unit 501 is configured to generate a snapshot of the statistical graph in response to detecting an interactive operation on the statistical graph; the processing unit 502 is configured to process the snapshot according to the interactive operation to obtain a response result for the interactive operation; and the display unit 503 is configured to display the response result.
[0096] In the apparatus 500 for displaying a statistical graph in this embodiment, the specific processing of the generating unit 501, the processing unit 502 and the display unit 503 and the technical effects thereof can be referred to in Figure 2 The relevant descriptions of step 201, step 202 and step 203 in the corresponding embodiment are not repeated here.
[0097] In some optional implementations of this embodiment, the statistical chart belongs to a statistical chart displayed by a target application; and the generating unit 501 is further configured to: generate a snapshot of the view where the statistical chart is located.
[0098] In some optional implementations of this embodiment, the display unit 503 is further configured to: use a temporary interface to display the response result.
[0099] In some optional implementations of this embodiment, the display unit 503 is further configured to: display the response result based on an application program interface API for displaying snapshots.
[0100] In some optional implementations of this embodiment, the generation unit 501 is further configured to: generate statistical information of the information presented in the statistical chart according to the interactive operation; and the display unit 503 is further configured to: display the statistical information.
[0101] In some optional implementations of this embodiment, the interactive operation includes at least one of the following: a single-finger event and a double-finger event.
[0102] In some optional implementations of this embodiment, the apparatus 500 further includes: a recycling unit (not shown in the figure) configured to recycle the snapshot of the statistical chart in response to detecting that the interactive operation on the statistical chart is terminated.
[0103] The device provided by the above-mentioned embodiment of the present disclosure generates a snapshot of the statistical graph in response to detecting an interactive operation on the statistical graph by means of a generating unit; the processing unit processes the snapshot according to the interactive operation to obtain a response result for the interactive operation; and the display unit displays the response result. Thus, a large number of calculation processes generated by directly drawing the statistical graph can be avoided, the response speed can be greatly improved, and the fluency of the statistical graph in the interactive process can be ensured.
[0104] Reference below Figure 6 , which shows an electronic device (eg, Figure 1 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0105] like Figure 6As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0106] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0107] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0108] It should be noted that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0109] The computer-readable medium may be included in the terminal, or may exist independently without being installed in the terminal. The computer-readable medium carries one or more programs. When the one or more programs are executed by the terminal, the terminal: generates a snapshot of the statistical chart in response to detecting an interactive operation on the statistical chart; processes the snapshot according to the interactive operation to obtain a response result for the interactive operation; and displays the response result.
[0110] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0111] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0112] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The units described may also be arranged in a processor, for example, may be described as: a processor includes a generation unit, a processing unit and a display unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the generation unit may also be described as "a unit for generating a snapshot of a statistical graph in response to detecting an interactive operation on the statistical graph".
[0113] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) to form a technical solution.
Claims
1. A method for displaying a statistical graph, comprising: In response to detecting an interactive operation on the statistical graph, generating a snapshot of the statistical graph; According to the interactive operation, the snapshot is processed to obtain a response result for the interactive operation; Displaying the response result, wherein the response result includes a partial area of the statistical graph; The interactive operation includes at least one of the following: a single-finger event, a double-finger event; When the interactive operation is a single-finger event, a vertical line is generated in the contact area between the single finger and the statistical graph, and can slide with the single finger; When the interactive operation is a two-finger event, the temporary interface is used to display relevant information of the area of the statistical graph corresponding to the middle of the two fingers; The generating a snapshot of the statistical graph comprises: Generate a snapshot of the view where the statistical chart is located by using an application program interface API for generating a snapshot of a specified view; The displaying of the response result includes: The response result is displayed based on an application program interface (API) for displaying snapshots.
2. The method according to claim 1, wherein: The statistical chart belongs to the statistical chart displayed by the target application.
3. The method according to claim 2, wherein: The display of the response result further includes: A temporary interface is used to display the response result.
4. The method according to any one of claims 1 to 3, wherein: The method further comprises: Generating statistical information of the information presented in the statistical graph according to the interactive operation; Displays the statistical information.
5. The method according to any one of claims 1 to 3, wherein: The method further comprises: In response to detecting that the interactive operation on the statistical graph is finished, the snapshot of the statistical graph is recycled.
6. A device for displaying a statistical graph, wherein: The device comprises: A generating unit, configured to generate a snapshot of the statistical graph in response to detecting an interactive operation on the statistical graph; a processing unit, configured to process the snapshot according to the interactive operation to obtain a response result for the interactive operation; A display unit, configured to display the response result, wherein the response result includes a partial area of the statistical graph; The interactive operation includes at least one of the following: a single-finger event, a double-finger event; When the interactive operation is a single-finger event, a vertical line is generated in the contact area between the single finger and the statistical graph, and can slide with the single finger; When the interactive operation is a two-finger event, the temporary interface is used to display relevant information of the area of the statistical graph corresponding to the middle of the two fingers; The generating unit is specifically used to generate a snapshot of the view where the statistical chart is located by using an application program interface API for generating a snapshot of a specified view; The display unit is specifically used to display the response result based on an application program interface API for displaying snapshots.
7. A terminal, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
