CN113434232B - Graph display method and device, storage medium and processor - Google Patents
Graph display method and device, storage medium and processor Download PDFInfo
- Publication number
- CN113434232B CN113434232B CN202110721905.8A CN202110721905A CN113434232B CN 113434232 B CN113434232 B CN 113434232B CN 202110721905 A CN202110721905 A CN 202110721905A CN 113434232 B CN113434232 B CN 113434232B
- Authority
- CN
- China
- Prior art keywords
- target
- state
- target interface
- chart
- changed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 69
- 238000012544 monitoring process Methods 0.000 claims abstract description 57
- 230000008859 change Effects 0.000 claims description 11
- 238000010276 construction Methods 0.000 claims description 4
- 238000001514 detection method Methods 0.000 claims description 3
- 230000009191 jumping Effects 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 13
- 238000005516 engineering process Methods 0.000 abstract description 8
- 230000006870 function Effects 0.000 description 32
- 238000012545 processing Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 230000001960 triggered effect Effects 0.000 description 5
- 238000013461 design Methods 0.000 description 4
- 238000004590 computer program Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3051—Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4488—Object-oriented
- G06F9/449—Object-oriented method invocation or resolution
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computing Systems (AREA)
- Quality & Reliability (AREA)
- Mathematical Physics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application discloses a chart display method, a chart display device, a storage medium and a processor. Wherein the method comprises the following steps: monitoring whether the state of the target interface is changed into a visible state, wherein the state of the target interface comprises the visible state and an invisible state; if the state of the target interface is monitored to be changed into a visible state, acquiring a target label object by adopting a target callback function, wherein a target chart is stored in the target label object; and displaying the target chart on the target interface based on the target label object. The method and the device solve the problem that charts cannot be normally presented due to the fact that a div container cannot be acquired in the pop-up box loading process of a model component in the related technology.
Description
Technical Field
The present invention relates to the field of interface interaction technologies, and in particular, to a method and apparatus for displaying a chart, a storage medium, and a processor.
Background
React is a JAVASCRIPT library for building user interfaces, which is used to build front-end UIs, originating from facebook internal items, and later on. The compact has the advantages of high efficiency, simple code and the like, is fast becoming a front-end library which is mainstream in the industry, has perfect ecology, is continuously updated, and is widely used.
The Ant design is a front-end component library packaged by the Ant group by means of compact, is mainly used for researching and developing enterprise-level middle and background products, has the characteristics of low learning cost, high hand-up speed, good implementation effect and the like, provides full-link ecology from interface design to front-end development, and can greatly improve design and development efficiency.
In developing the React project using the ant design framework, when a Modal component is used, the Modal can be displayed or hidden by changing its visual properties according to the api. When the Echarts chart component is introduced into the interface, a div container is created as a container for storing the chart, and the chart can be presented by initializing the chart on the div container by the Echarts providing init method. However, when the chart is required to be presented on the Modal, and the Modal is dynamically set to be visible, the container cannot be found when init initialization of echart is performed, so that the chart cannot be presented normally.
In the pop-up box loading process of the model component in the related technology, the problem that the diagram cannot be normally presented due to the fact that the div container cannot be acquired is solved, and an effective solution is not proposed at present.
Disclosure of Invention
The embodiment of the application provides a method, a device, a storage medium and a processor for displaying a chart, which at least solve the problem that the chart cannot be normally presented because a div container cannot be acquired in the pop-up box loading process of a model component in the related technology.
According to an aspect of the embodiments of the present application, there is provided a method for displaying a graph, including: monitoring whether the state of the target interface is changed into a visible state, wherein the state of the target interface comprises the visible state and an invisible state; if the state of the target interface is monitored to be changed into a visible state, acquiring a target label object by adopting a target callback function, wherein a target chart is stored in the target label object; and displaying the target chart on the target interface based on the target label object.
Further, before monitoring whether the state of the target interface is changed to the visible state, the method further includes: setting the state of the target interface to an invisible state; the method comprises the steps of calling a target plug-in to construct the content of an original page to obtain the original page with the content constructed, wherein the content of the original page comprises a document object model; and triggering the original page after the content is constructed to jump to the target interface based on a preset rule.
Further, after monitoring whether the state of the target interface is changed to the visible state, the method further includes: if the state of the target interface is monitored to be unchanged into the visible state, changing the state of the target interface based on the target callback function so as to change the state of the target interface into the visible state.
Further, displaying the target chart on the target interface based on the target label object includes: detecting whether a target label object contains target chart plugin information or not; if the target label object does not contain the target chart plug-in information, calling preset parameters to enable the target label object to contain the target chart plug-in information; and displaying the target chart on the target interface based on the target chart plug-in information.
Further, before monitoring whether the state of the target interface is changed to the visible state, the method further includes: judging whether the state of the target interface is changed or not; if the state of the target interface is changed, executing the step of monitoring whether the state of the target interface is changed into a visible state; if the state of the target interface is unchanged and the state of the target interface is invisible, the target callback function does not execute monitoring operation on the target tag object.
According to another aspect of the embodiments of the present application, there is also provided a display device for a graph, including: the first monitoring unit is used for monitoring whether the state of the target interface is changed into a visible state, wherein the state of the target interface comprises a visible state and an invisible state; the first acquisition unit is used for acquiring the target label object by adopting a target callback function if the state of the target interface is monitored to be changed into a visible state, wherein a target chart is stored in the target label object; and the first display unit is used for displaying the target chart on the target interface based on the target label object.
Further, the apparatus further comprises: the first setting unit is used for setting the state of the target interface to be an invisible state before monitoring whether the state of the target interface is changed to be a visible state; the first construction unit is used for calling the target plug-in to construct the content of the original page to obtain the original page after the content is constructed, wherein the content of the original page comprises a document object model; the first jumping unit is used for triggering the original page after the content is constructed to jump to the target interface based on a preset rule.
Further, the apparatus further comprises: and the first changing unit is used for changing the state of the target interface based on the target callback function to change the state of the target interface into the visible state if the state of the target interface is not changed into the visible state after monitoring whether the state of the target interface is changed into the visible state.
Further, the first display unit includes: the first detection module is used for detecting whether the target label object contains target chart plugin information or not; the first calling module is used for calling preset parameters to enable the target label object to contain target chart plug-in information if the target label object does not contain the target chart plug-in information; and the first display module is used for displaying the target chart on the target interface based on the target chart plug-in information.
Further, the apparatus further comprises: a first judging unit for judging whether the state of the target interface has been changed before monitoring whether the state of the target interface has been changed to the visible state; the first execution unit is used for executing the step of monitoring whether the state of the target interface is changed into a visible state if the state of the target interface is changed; and the second processing unit is used for not executing monitoring operation on the target tag object by the target callback function if the state of the target interface is unchanged and the state of the target interface is invisible.
According to another aspect of the embodiments of the present application, there is also provided a processor, configured to execute a program, where the program executes the method of any one of the above.
According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium having stored thereon a computer program/instruction which, when executed by a processor, performs the method of any of the above.
Through the application, the following steps are adopted: monitoring whether the state of the target interface is changed into a visible state, wherein the state of the target interface comprises the visible state and an invisible state; if the state of the target interface is monitored to be changed into a visible state, acquiring a target label object by adopting a target callback function, wherein a target chart is stored in the target label object; the target chart is displayed on the target interface based on the target label object, so that the problem that the chart cannot be normally presented due to the fact that a div container cannot be acquired in the pop-up box loading process of a model component in the related technology is solved. The target callback function is triggered to acquire the target label object by monitoring the change state of the target page, so that the effect that the chart can be normally presented in the pop-up frame loading process of the model component is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a flow chart of a method of displaying a chart provided in accordance with an embodiment of the present application;
FIG. 2 is a flow chart of a system implementation of a method of displaying a chart provided in accordance with an embodiment of the present application;
FIG. 3 is a flowchart one of an alternative method of displaying a chart provided in accordance with an embodiment of the present application;
FIG. 4 is a second flowchart of an alternative method of displaying a chart provided in accordance with an embodiment of the present application;
fig. 5 is a schematic diagram of a display device of a graph according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, refrigerator, or apparatus that comprises a series of steps or elements is not necessarily limited to those steps or elements that are expressly listed or inherent to such process, method, refrigerator, or apparatus.
In accordance with the embodiments of the present application, a method embodiment of the display of a chart is provided, it being noted that the steps shown in the flowchart of the figures may be performed in a computer system, such as a set of computer executable instructions, and, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order other than that shown or described herein.
Fig. 1 is a diagram displaying method according to an embodiment of the present application, as shown in fig. 1, the method includes the steps of:
step S101, monitoring whether the state of the target interface is changed into a visible state, wherein the state of the target interface comprises the visible state and the invisible state.
Fig. 2 is a flowchart of a system execution of a graph display method according to an embodiment of the present application, where, as shown in fig. 2, before monitoring a state of a target interface, an original page needs to be built based on a DOM (corresponding to a document object model, the following is the same) tree of a target plug-in, and based on an interaction operation performed by a user with the built original interface, opening of the target interface is triggered, where the target interface of the present application may be a pop-up box of a component Modal.
Step S102, if the state of the target interface is monitored to be changed into a visible state, acquiring a target label object by adopting a target callback function, wherein a target chart is stored in the target label object.
Specifically, if the state of the target interface is monitored to be changed into a visible state, a setstate callback function is adopted to acquire a target tag object, wherein the target tag object can be a div tag, and the div tag is used for storing a chart in the Echarts plug-in.
Step S103, displaying the target chart on the target interface based on the target label object.
Through steps S101 to S103, the problem that the diagram cannot be normally presented due to the fact that a div container cannot be acquired in the pop-up box loading process of a model component in the related art is solved. The target callback function is triggered to acquire the target label object by monitoring the change state of the target page, so that the effect that the chart can be normally presented in the pop-up frame loading process of the model component is achieved.
In addition, when displaying the chart in the echorts plug-in introduced in the div tag in the pop-up box of the Modal, it is necessary to determine whether the obtained div tag contains content information, where the content information includes at least the echorts plug-in information (corresponding to the target chart plug-in information in the present application).
Fig. 3 is a flowchart of an alternative method for displaying a graph according to an embodiment of the present application, optionally, before whether the state of the listening object interface is changed to a visible state, the method further includes:
step S301, setting the state of the target interface to be an invisible state;
step S302, a target plug-in is called to construct the content of an original page, and the original page with the content constructed is obtained, wherein the content of the original page comprises a document object model;
step S303, triggering the original page after constructing the content to jump to a target interface based on a preset rule;
step S304, monitoring whether the state of the target interface is changed into a visible state;
step S305, if the state of the target interface is monitored to be changed into a visible state, acquiring a target label object by adopting a target callback function, wherein a target chart is stored in the target label object;
step S306, displaying the target chart on the target interface based on the target label object.
Specifically, the constructed DOM tree contains the style layout of the original interface and related attribute information by calling the target plugin, wherein the target plugin contains css. And triggering the original page to jump to the target interface based on the interactive operation of the user and the original interface after the construction is completed, wherein the interactive operation can be the triggering of a clicking event.
Steps S304-S306 in fig. 3 are the same as the steps S101-S103 in fig. 1 in the embodiment of the present application, and are not described in detail here.
It should be noted that, before the target interface is opened, the state of the pop-up box of the Modal is preset to be an invisible state, where the state of the pop-up box includes a visible state and an invisible state.
Fig. 4 is a second flowchart of an alternative method for displaying a chart according to an embodiment of the present application, where the method further includes:
step S401, monitoring whether the state of the target interface is changed into a visible state;
step S402, if the state of the target interface is monitored not to be changed into a visible state, changing the state of the target interface based on the target callback function so as to change the state of the target interface into the visible state;
step S403, if the state of the target interface is monitored to be changed into a visible state, acquiring the target tag object by adopting a target callback function;
step S404, displaying the target chart on the target interface based on the target label object.
Specifically, the state of the target interface is changed by adopting a setstate callback function, so that the state of the target interface is changed into a visible state.
It should be noted that, steps S401, S403, S404 in fig. 4 are the same as the method S101 to S103 in fig. 1 in the embodiment of the present application, and are not described in detail here.
Optionally, in the method for displaying a graph provided in the embodiment of the present application, displaying the target graph on the target interface based on the target tag object includes: detecting whether a target label object contains target chart plugin information or not; if the target label object does not contain the target chart plug-in information, calling preset parameters to enable the target label object to contain the target chart plug-in information; and displaying the target chart on the target interface based on the target chart plug-in information.
Specifically, if the target tag object div tag does not contain the Echarts plug-in information, relevant API interface parameters are required to be called to introduce the Echarts plug-in information into the div tag, and the chart in the Echarts plug-in introduced in the div tag is displayed in the pop-up box of Modal.
Specifically, the method for introducing the Echarts plug-in information comprises the following steps: downloading an echart package by using an echart functional network; 2. copying css and js files into a static file path of the item; 3. introducing css and js into an html file; 4. when the method is used, the chart is directly initialized by the chart object, and the chart can be displayed on the target interface by setting the corresponding attribute of the chart.
Optionally, in the method for displaying a graph provided in the embodiment of the present application, before monitoring whether the state of the target interface is changed to the visible state, the method further includes: judging whether the state of the target interface is changed or not; if the state of the target interface is changed, executing the step of monitoring whether the state of the target interface is changed into a visible state; if the state of the target interface is unchanged and the state of the target interface is invisible, the target callback function does not execute monitoring operation on the target tag object.
Specifically, as shown in fig. 2, before whether the state of the target interface is changed to the visible state, if the state of the pop-up box of the target interface Modal is changed and the state of the pop-up box of Modal is the invisible state, the target callback function does not execute the monitoring operation on the target tag object, thereby avoiding the resource waste caused by repeatedly calling the monitoring program.
In summary, according to the method for displaying the chart provided by the embodiment of the application, whether the state of the target interface is changed into the visible state is monitored, wherein the state of the target interface comprises the visible state and the invisible state; if the state of the target interface is monitored to be changed into a visible state, acquiring a target label object by adopting a target callback function, wherein a target chart is stored in the target label object; the target chart is displayed on the target interface based on the target label object, so that the problem that the chart cannot be normally presented due to the fact that a div container cannot be acquired in the pop-up box loading process of a model component in the related technology is solved. The target callback function is triggered to acquire the target label object by monitoring the change state of the target page, so that the effect that the chart can be normally presented in the pop-up frame loading process of the model component is achieved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides a display device of the chart, and the display device of the chart can be used for executing the display method for the chart provided by the embodiment of the application. The following describes a display device of a graph provided in an embodiment of the present application.
Fig. 5 is a schematic diagram of a display device of a graph according to an embodiment of the present application. As shown in fig. 5, the apparatus includes: a first monitoring unit 501, a first obtaining unit 502, and a first display unit 503.
Specifically, the first monitoring unit 501 is configured to monitor whether the state of the target interface is changed to a visible state, where the state of the target interface includes a visible state and an invisible state;
the first obtaining unit 502 is configured to obtain, if it is monitored that the state of the target interface changes to a visible state, a target tag object by using a target callback function, where a target chart is stored in the target tag object;
a first display unit 503, configured to display the target chart on the target interface based on the target label object.
In summary, in the display device for a chart provided in the embodiment of the present application, whether the state of the target interface is changed to the visible state is monitored by the first monitoring unit 501, where the state of the target interface includes a visible state and an invisible state; if the first obtaining unit 502 monitors that the state of the target interface is changed to a visible state, obtaining a target tag object by adopting a target callback function, wherein a target chart is stored in the target tag object; the first display unit 503 displays the target chart on the target interface based on the target tab object. The method solves the problem that the diagram cannot be normally presented because the div container cannot be acquired in the pop-up box loading process of the model component in the related technology. The target callback function is triggered to acquire the target label object by monitoring the change state of the target page, so that the effect that the chart can be normally presented in the pop-up frame loading process of the model component is achieved.
Optionally, in the display device for a chart provided in the embodiment of the present application, the device further includes: the first setting unit is used for setting the state of the target interface to be an invisible state before monitoring whether the state of the target interface is changed to be a visible state; the first construction unit is used for calling the target plug-in to construct the content of the original page to obtain the original page after the content is constructed, wherein the content of the original page comprises a document object model; the first jumping unit is used for triggering the original page after the content is constructed to jump to the target interface based on a preset rule.
Optionally, in the display device for a chart provided in the embodiment of the present application, the device further includes: and the first changing unit is used for changing the state of the target interface based on the target callback function to change the state of the target interface into the visible state if the state of the target interface is not changed into the visible state after monitoring whether the state of the target interface is changed into the visible state.
Optionally, in the display device for a chart provided in the embodiment of the present application, the first display unit 503 includes: the first detection module is used for detecting whether the target label object contains target chart plugin information or not; the first calling module is used for calling preset parameters to enable the target label object to contain target chart plug-in information if the target label object does not contain the target chart plug-in information; and the first display module is used for displaying the target chart on the target interface based on the target chart plug-in information.
Optionally, in the display device for a chart provided in the embodiment of the present application, the device further includes: a first judging unit for judging whether the state of the target interface has been changed before monitoring whether the state of the target interface has been changed to the visible state; the first execution unit is used for executing the step of monitoring whether the state of the target interface is changed into a visible state if the state of the target interface is changed; and the second processing unit is used for not executing monitoring operation on the target tag object by the target callback function if the state of the target interface is unchanged and the state of the target interface is invisible.
The display device of the graph includes a processor and a memory, where the first monitor unit 501, the first acquisition unit 502, the first display unit 503, and the like are stored as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one, and the display of the chart is performed by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the application provides a storage medium on which a program is stored, which when executed by a processor, implements a method of displaying a graph.
The embodiment of the application provides a processor, which is used for running a program, wherein the program runs a display method for executing a chart.
The embodiment of the application provides equipment, which comprises a processor, a memory and a program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the following steps: monitoring whether the state of the target interface is changed into a visible state, wherein the state of the target interface comprises the visible state and an invisible state; if the state of the target interface is monitored to be changed into a visible state, acquiring a target label object by adopting a target callback function, wherein a target chart is stored in the target label object; and displaying the target chart on the target interface based on the target label object.
The processor also realizes the following steps when executing the program: setting the state of the target interface to an invisible state before monitoring whether the state of the target interface is changed to a visible state; the method comprises the steps of calling a target plug-in to construct the content of an original page to obtain the original page with the content constructed, wherein the content of the original page comprises a document object model; and triggering the original page after the content is constructed to jump to the target interface based on a preset rule.
The processor also realizes the following steps when executing the program: after monitoring whether the state of the target interface is changed to the visible state, if the state of the target interface is not changed to the visible state, changing the state of the target interface based on the target callback function so as to change the state of the target interface to the visible state.
The processor also realizes the following steps when executing the program: detecting whether a target label object contains target chart plugin information or not; if the target label object does not contain the target chart plug-in information, calling preset parameters to enable the target label object to contain the target chart plug-in information; and displaying the target chart on the target interface based on the target chart plug-in information.
The processor also realizes the following steps when executing the program: before monitoring whether the state of the target interface is changed into a visible state, judging whether the state of the target interface is changed or not; if the state of the target interface is changed, executing the step of monitoring whether the state of the target interface is changed into a visible state; if the state of the target interface is unchanged and the state of the target interface is invisible, the target callback function does not execute monitoring operation on the target tag object.
The device herein may be a server, PC, PAD, cell phone, etc.
The present application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with the method steps of: monitoring whether the state of the target interface is changed into a visible state, wherein the state of the target interface comprises the visible state and an invisible state; if the state of the target interface is monitored to be changed into a visible state, acquiring a target label object by adopting a target callback function, wherein a target chart is stored in the target label object; and displaying the target chart on the target interface based on the target label object.
When executed on a data processing device, is further adapted to carry out a program initialized with the method steps of: setting the state of the target interface to an invisible state before monitoring whether the state of the target interface is changed to a visible state; the method comprises the steps of calling a target plug-in to construct the content of an original page to obtain the original page with the content constructed, wherein the content of the original page comprises a document object model; and triggering the original page after the content is constructed to jump to the target interface based on a preset rule.
When executed on a data processing device, is further adapted to carry out a program initialized with the method steps of: after monitoring whether the state of the target interface is changed to the visible state, if the state of the target interface is not changed to the visible state, changing the state of the target interface based on the target callback function so as to change the state of the target interface to the visible state.
When executed on a data processing device, is further adapted to carry out a program initialized with the method steps of: detecting whether a target label object contains target chart plugin information or not; if the target label object does not contain the target chart plug-in information, calling preset parameters to enable the target label object to contain the target chart plug-in information; and displaying the target chart on the target interface based on the target chart plug-in information.
When executed on a data processing device, is further adapted to carry out a program initialized with the method steps of: before monitoring whether the state of the target interface is changed into a visible state, judging whether the state of the target interface is changed or not; if the state of the target interface is changed, executing the step of monitoring whether the state of the target interface is changed into a visible state; if the state of the target interface is unchanged and the state of the target interface is invisible, the target callback function does not execute monitoring operation on the target tag object.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of units may be a logic function division, and there may be another division manner in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone refrigerators, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or all or part of the technical solution, in the form of a software refrigerator stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.
Claims (5)
1. A method for displaying a graph, comprising:
monitoring whether the state of a target interface is changed into a visible state, wherein the state of the target interface comprises the visible state and the invisible state;
if the state of the target interface is monitored to be changed into a visible state, acquiring a target label object by adopting a target callback function, wherein a target chart is stored in the target label object;
displaying the target chart on the target interface based on the target label object;
wherein before monitoring whether the state of the target interface changes to a visible state, the method further comprises:
setting the state of the target interface to an invisible state;
the method comprises the steps of calling a target plug-in to construct the content of an original page to obtain the original page with the content constructed, wherein the content of the original page comprises a document object model;
triggering the original page after constructing the content to jump to the target interface based on a preset rule;
wherein after monitoring whether the state of the target interface is changed to the visible state, the method further comprises:
if the state of the target interface is monitored to be unchanged to a visible state, changing the state of the target interface based on the target callback function so as to change the state of the target interface to the visible state;
wherein displaying the target chart on the target interface based on the target label object comprises:
detecting whether the target label object contains target chart plugin information or not;
if the target label object does not contain the target chart plug-in information, calling preset parameters so that the target label object contains the target chart plug-in information;
and displaying the target chart on the target interface based on target chart plug-in information.
2. The method of claim 1, wherein before monitoring whether the state of the target interface changes to a visible state, the method further comprises:
judging whether the state of the target interface is changed or not;
if the state of the target interface is changed, executing the step of monitoring whether the state of the target interface is changed into a visible state;
and if the state of the target interface is not changed and the state of the target interface is in an invisible state, the target callback function does not execute monitoring operation on the target tag object.
3. A display device of a graph, comprising:
the first monitoring unit is used for monitoring whether the state of the target interface is changed into a visible state, wherein the state of the target interface comprises a visible state and an invisible state;
the first acquisition unit is used for acquiring a target label object by adopting a target callback function if the state of the target interface is monitored to be changed into a visible state, wherein a target chart is stored in the target label object;
the first display unit is used for displaying the target chart on the target interface based on the target label object;
the first setting unit is used for setting the state of the target interface to be an invisible state before monitoring whether the state of the target interface is changed to be a visible state;
the first construction unit is used for calling the target plug-in to construct the content of the original page to obtain the original page with the content constructed, wherein the content of the original page comprises a document object model;
the first jumping unit is used for triggering the original page after the content is constructed to jump to the target interface based on a preset rule;
the first changing unit is used for changing the state of the target interface into a visible state based on the target callback function if the state of the target interface is not changed into the visible state after monitoring whether the state of the target interface is changed into the visible state;
the first display unit includes: the first detection module is used for detecting whether the target label object contains target chart plugin information or not; the first calling module is used for calling preset parameters to enable the target label object to contain target chart plug-in information if the target label object does not contain the target chart plug-in information; and the first display module is used for displaying the target chart on the target interface based on the target chart plug-in information.
4. A processor for running a program, wherein the program when run performs the method of any one of claims 1 to 2.
5. A storage medium comprising a stored program, wherein the program performs the method of any one of claims 1 to 2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110721905.8A CN113434232B (en) | 2021-06-28 | 2021-06-28 | Graph display method and device, storage medium and processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110721905.8A CN113434232B (en) | 2021-06-28 | 2021-06-28 | Graph display method and device, storage medium and processor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113434232A CN113434232A (en) | 2021-09-24 |
CN113434232B true CN113434232B (en) | 2023-06-16 |
Family
ID=77757346
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110721905.8A Active CN113434232B (en) | 2021-06-28 | 2021-06-28 | Graph display method and device, storage medium and processor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113434232B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101669134A (en) * | 2006-12-06 | 2010-03-10 | 冈兹 | System and method for product marketing using feature codes |
CN103853712A (en) * | 2012-11-28 | 2014-06-11 | 金蝶软件(中国)有限公司 | Display method of floating layer window and browser |
CN106201511A (en) * | 2016-07-08 | 2016-12-07 | 东软集团股份有限公司 | Create the method and device of modal dialog box |
CN109146757A (en) * | 2018-07-06 | 2019-01-04 | 东南大学 | A kind of rail traffic emphasis volume of the flow of passengers section preparation method and its system |
CN109359009A (en) * | 2018-10-12 | 2019-02-19 | Oppo广东移动通信有限公司 | Display control method, electronic device and computer readable storage medium |
CN109450995A (en) * | 2018-10-25 | 2019-03-08 | 视联动力信息技术股份有限公司 | A kind of acquisition methods and system of servers' data |
CN109857579A (en) * | 2019-02-15 | 2019-06-07 | 深圳市迅雷网文化有限公司 | A kind of data processing method and relevant apparatus |
CN110853117A (en) * | 2019-11-20 | 2020-02-28 | 深圳前海微众银行股份有限公司 | Chart drawing method, device, equipment and storage medium |
CN111459715A (en) * | 2019-01-20 | 2020-07-28 | 华为技术有限公司 | Application exception recovery |
CN112433726A (en) * | 2020-12-04 | 2021-03-02 | 上海悦易网络信息技术有限公司 | Echarts chart assembly packaging method and device |
-
2021
- 2021-06-28 CN CN202110721905.8A patent/CN113434232B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101669134A (en) * | 2006-12-06 | 2010-03-10 | 冈兹 | System and method for product marketing using feature codes |
CN103853712A (en) * | 2012-11-28 | 2014-06-11 | 金蝶软件(中国)有限公司 | Display method of floating layer window and browser |
CN106201511A (en) * | 2016-07-08 | 2016-12-07 | 东软集团股份有限公司 | Create the method and device of modal dialog box |
CN109146757A (en) * | 2018-07-06 | 2019-01-04 | 东南大学 | A kind of rail traffic emphasis volume of the flow of passengers section preparation method and its system |
CN109359009A (en) * | 2018-10-12 | 2019-02-19 | Oppo广东移动通信有限公司 | Display control method, electronic device and computer readable storage medium |
CN109450995A (en) * | 2018-10-25 | 2019-03-08 | 视联动力信息技术股份有限公司 | A kind of acquisition methods and system of servers' data |
CN111459715A (en) * | 2019-01-20 | 2020-07-28 | 华为技术有限公司 | Application exception recovery |
CN109857579A (en) * | 2019-02-15 | 2019-06-07 | 深圳市迅雷网文化有限公司 | A kind of data processing method and relevant apparatus |
CN110853117A (en) * | 2019-11-20 | 2020-02-28 | 深圳前海微众银行股份有限公司 | Chart drawing method, device, equipment and storage medium |
CN112433726A (en) * | 2020-12-04 | 2021-03-02 | 上海悦易网络信息技术有限公司 | Echarts chart assembly packaging method and device |
Non-Patent Citations (2)
Title |
---|
Echarts在移动数据通信中的应用;贾宁;;移动通信(第20期);第52-55页 * |
采用ECharts可视化技术实现的数据体系监控系统;冀潇;李杨;;计算机系统应用(第06期);第72-76页 * |
Also Published As
Publication number | Publication date |
---|---|
CN113434232A (en) | 2021-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9805377B2 (en) | Unified content visibility | |
US9865005B1 (en) | Unified content visibility and video content monitoring | |
CN111159600B (en) | Information reporting method and device for elements on page, electronic equipment and storage medium | |
US9756140B2 (en) | Tracking user behavior relative to a network page | |
US20150220492A1 (en) | Systems and methods for integrating dynamic content into electronic media | |
US20230367953A1 (en) | Display rendering method and system | |
EP3090357B1 (en) | Hosted application marketplaces | |
WO2006133105A2 (en) | Web usage overlays for third-party web plug-in content | |
CN103617191A (en) | Browser and method for rendering same by means of hardware acceleration | |
JP6975339B2 (en) | Backdrop rendering of digital components | |
US11836758B1 (en) | Systems, methods, and media for detecting content view ability | |
CA2618859C (en) | Script markup | |
US20120151381A1 (en) | Defining actions for data streams via icons | |
CN115309516A (en) | Application life cycle detection method and device and computer equipment | |
CN114579182A (en) | Applet cross-end application method, related device and computer storage medium | |
CN108319474B (en) | Page information generation method, device and equipment | |
CN111399836B (en) | Method and device for modifying page attribute | |
CN113434232B (en) | Graph display method and device, storage medium and processor | |
CN113076501A (en) | Page processing method, storage medium and equipment | |
CN115809056B (en) | Component multiplexing implementation method and device, terminal equipment and readable storage medium | |
KR101795128B1 (en) | Matching system and method for providing product placement matched scene of main contents | |
CN106528733A (en) | Webpage display method and apparatus | |
CN109840113A (en) | A kind of application data processing method and its equipment, storage medium, terminal | |
US10203833B2 (en) | Recommending application modifications using image area counts | |
CN112597416A (en) | Webpage element display method, device, server and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |