CN114281450A - Chart visualization method and device, storage medium and processor - Google Patents

Chart visualization method and device, storage medium and processor Download PDF

Info

Publication number
CN114281450A
CN114281450A CN202111503935.8A CN202111503935A CN114281450A CN 114281450 A CN114281450 A CN 114281450A CN 202111503935 A CN202111503935 A CN 202111503935A CN 114281450 A CN114281450 A CN 114281450A
Authority
CN
China
Prior art keywords
target
scale number
information
scale
chart
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111503935.8A
Other languages
Chinese (zh)
Inventor
张静
黄小君
鲁倍辰
朱明宇
邱星宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hillstone Networks Co Ltd
Original Assignee
Hillstone Networks Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hillstone Networks Co Ltd filed Critical Hillstone Networks Co Ltd
Priority to CN202111503935.8A priority Critical patent/CN114281450A/en
Publication of CN114281450A publication Critical patent/CN114281450A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a chart visualization method and device, a storage medium and a processor. The method comprises the following steps: acquiring target information from the chart, wherein the target information at least comprises: original data of the chart, preset configuration of the chart and total width information of the chart; determining the target scale number of a horizontal axis in the graph according to the target information; and displaying the original data according to the number of the target scales. Through the method and the device, the problem of poor visibility of the time axis in the chart in the related art is solved.

Description

Chart visualization method and device, storage medium and processor
Technical Field
The application relates to the technical field of webpage interface processing, in particular to a method and a device for visualizing a chart, a storage medium and a processor.
Background
The front-end webpage is the most direct way for people to interact with the network, one webpage with good visual effect can attract more users, the two-dimensional rectangular coordinate system drawing chart is the most common drawing means of the front end, and at present, a plurality of open-source libraries can be used by developers, such as BitCharts and eCharts.
In the prior art, the number of the standard values is calculated only through a data source, but the influence of the total width and height of a chart and the size of the standard values on the drawing and displaying of the chart is not considered, and if the number of the standard values calculated by part of data is large and the data is too long, the uneven distribution and the congestion of the standard values can be caused, so that the visibility of a time axis coordinate is poor.
Aiming at the problem of poor visibility of a time axis in a chart in the related art, an effective solution is not provided at present.
Disclosure of Invention
The present application mainly aims to provide a method, an apparatus, a storage medium, and a processor for visualizing a chart, so as to solve the problem of poor visibility of a time axis in the chart in the related art.
To achieve the above object, according to one aspect of the present application, there is provided a method of visualizing a chart. The method comprises the following steps: acquiring target information from the chart, wherein the target information at least comprises: original data of the chart, preset configuration of the chart and total width information of the chart; determining the target scale number of a horizontal axis in the graph according to the target information; and displaying the original data according to the number of the target scales.
Further, determining the target scale number of the horizontal axis in the graph according to the target information includes: under the condition that the target information is preset configuration of the chart, acquiring the first scale quantity of a horizontal axis in the chart according to the preset configuration; under the condition that the target information is original data, determining the second scale quantity of a horizontal axis in the graph according to the original data; determining the third scale number of a horizontal axis in the graph according to the total width information of the graph under the condition that the target information is the total width information of the graph; and determining the number of the target scales according to the first scale number, the second scale number and the third scale number.
Further, in a case where the target information is the original data, determining the second scale number of the horizontal axis in the graph according to the original data includes: acquiring length information of original data; comparing the length information with a preset scale number to obtain a comparison result, wherein the preset scale number comprises one of the following: the scale comprises a first preset scale number and a second preset scale number, wherein the first preset scale number is larger than the second preset scale number; and determining the second scale number according to the comparison result.
Further, determining the second scale number according to the comparison result includes: if the comparison result indicates that the length information is larger than the first preset scale number, calculating the ratio of the length information to a target value to obtain ratio information, wherein the target value is multiple; judging whether the ratio information is in a target range, wherein the target range is larger than the second preset scale number and is smaller than the first preset scale number; and if the ratio information is in the target range, determining the second scale quantity according to the ratio information.
Further, in a case where the target information is total width information of the graph, determining the third scale number of the horizontal axis in the graph from the total width information of the graph includes: acquiring preset width information of scales of a horizontal axis in the graph from the graph; and determining the number of the third scales according to the total width information and the preset width information.
Further, determining the target scale number according to the first scale number, the second scale number, and the third scale number comprises: selecting the minimum scale number from the first scale number, the second scale number and the third scale number; and taking the minimum scale number as the target scale number.
Further, displaying the original data according to the target scale number comprises: processing the original data at equal intervals according to the target scale number to obtain processed original data; and displaying the processed original data.
In order to achieve the above object, according to another aspect of the present application, there is provided a visualization apparatus of a chart. The device includes: an obtaining unit, configured to obtain target information from the graph, where the target information at least includes: original data of the chart, preset configuration of the chart and total width information of the chart; the determining unit is used for determining the target scale number of a horizontal axis in the graph according to the target information; and the display unit is used for displaying the original data according to the target scale number.
Further, the determination unit includes: the acquisition subunit is used for acquiring the first scale quantity of the horizontal axis in the chart according to the preset configuration under the condition that the target information is the preset configuration of the chart; the first determining subunit is used for determining the second scale quantity of the horizontal axis in the graph according to the original data under the condition that the target information is the original data; the second determining subunit is used for determining the third scale number of the horizontal axis in the chart according to the total width information of the chart under the condition that the target information is the total width information of the chart; and the third determining subunit is used for determining the number of the target scales according to the first scale number, the second scale number and the third scale number.
Further, the first determining subunit includes: the first acquisition module is used for acquiring length information of original data; the comparison module is used for comparing the length information with the preset scale number to obtain a comparison result, wherein the preset scale number comprises one of the following: the scale comprises a first preset scale number and a second preset scale number, wherein the first preset scale number is larger than the second preset scale number; and the first determining module is used for determining the second scale quantity according to the comparison result.
Further, the determining module includes: the calculation submodule is used for calculating the ratio of the length information to a target value to obtain ratio information if the comparison result indicates that the length information is larger than the first preset scale number, wherein the number of the target values is multiple; the judgment submodule is used for judging whether the ratio information is in a target range, wherein the target range is larger than the second preset scale number and is smaller than the first preset scale number; and the determining submodule is used for determining the second scale quantity according to the ratio information if the ratio information is in the target range.
Further, the second determining subunit includes: the second acquisition module is used for acquiring preset width information of scales of a transverse shaft in the graph from the graph; and the second determining module is used for determining the number of the third scales according to the total width information and the preset width information.
Further, the third determining subunit includes: the selection module is used for selecting the minimum scale number from the first scale number, the second scale number and the third scale number; and the third determining module is used for taking the minimum scale number as the target scale number.
Further, the display unit includes: the processing subunit is used for carrying out equidistant processing on the original data according to the target scale number to obtain processed original data; and the display subunit is used for displaying the processed original data.
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 to perform the method of any one of the above.
According to another aspect of embodiments of the present application, there is also provided a computer-readable storage medium having stored thereon a computer program/instructions which, when executed by a processor, perform the method of any one of the above.
Through the application, the following steps are adopted: acquiring target information from the chart, wherein the target information at least comprises: original data of the chart, preset configuration of the chart and total width information of the chart; determining the target scale number of a horizontal axis in the graph according to the target information; and displaying the original data according to the number of the target scales. The problem of relatively poor visibility of the time axis in the graph in the related art is solved. The target scale number of the transverse shaft in the graph is determined through the target information, the original data are displayed according to the target scale number, and therefore the effect of improving the visibility of the time shaft in the graph is achieved.
Drawings
The accompanying drawings, which 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 are not intended to limit the application. In the drawings:
FIG. 1 is a flow chart of a method of visualization of a chart provided in accordance with an embodiment of the present application;
FIG. 2 is a flowchart of the operation of a method for visualizing charts, according to an embodiment of the present application, for determining the number of scales based on raw data;
FIG. 3 is an operation diagram of a chart total width information-based scale number determination method according to a chart visualization method provided by an embodiment of the application;
FIG. 4 is a flow chart of an optimal scale number for a method of visualizing charts provided in accordance with embodiments of the present application;
FIG. 5 is a graphical illustration of a target scale number of a method of visualizing a chart provided in accordance with an embodiment of the present application;
fig. 6 is a schematic diagram of a visualization device of a chart provided according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. 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, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an embodiment of the present application, a method of visualizing a chart is provided.
Fig. 1 is a flow chart of a method of visualizing a chart according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, acquiring target information from the chart, wherein the target information at least comprises: original data of the chart, preset configuration of the chart and total width information of the chart.
Specifically, the original data of the chart is the data to be displayed by the chart.
And step S102, determining the target scale number of the horizontal axis in the graph according to the target information.
Specifically, the preset configuration may be the number of the scale values on the horizontal axis set by the chart in a self-defined manner, for example, the system self-defines the number of scales on the horizontal axis in advance without considering the number of the original data.
Optionally, in the method for visualizing a chart provided in the embodiment of the present application, determining the target scale number of the horizontal axis in the chart according to the target information includes: under the condition that the target information is preset configuration of the chart, acquiring the first scale quantity of a horizontal axis in the chart according to the preset configuration; under the condition that the target information is original data, determining the second scale quantity of a horizontal axis in the graph according to the original data; determining the third scale number of a horizontal axis in the graph according to the total width information of the graph under the condition that the target information is the total width information of the graph; and determining the number of the target scales according to the first scale number, the second scale number and the third scale number.
For example, in the case that the target information is preset configuration of the graph, the system self-defines and configures the number of the scale values (corresponding to the scales in the present application, the same below) of the horizontal axis to be 5 in advance, and takes 5 as the first scale number, in the case that the target information is original data, by reading the data source information of the original data, analyzes the total number of the scales of the horizontal axis of the graph, and performs calculation processing to obtain the second scale number, and in the case that the target information is total width information of the graph, calculates the total number of the scale values that the horizontal axis of the graph can accommodate, and takes the total number as the third scale number.
Optionally, in the method for visualizing a chart provided in the embodiment of the present application, in a case that the target information is the original data, determining the second scale number of the horizontal axis in the chart according to the original data includes: acquiring length information of original data; comparing the length information with a preset scale number to obtain a comparison result, wherein the preset scale number comprises one of the following: the scale comprises a first preset scale number and a second preset scale number, wherein the first preset scale number is larger than the second preset scale number; and determining the second scale number according to the comparison result.
Fig. 2 is an operation flowchart of determining the scale number based on the raw data according to the visualization method of the chart provided in the embodiment of the present application, and as shown in fig. 2, the default setting scale number dataTickCount is equal to the length of the raw data dataSource; the maximum value maxdatatie count of the cross-axis scalar value number is set to be 10 (corresponding to the first preset scale number in the application) in the current algorithm, the minimum value mindatatie count of the cross-axis scalar value number is set to be 4 (corresponding to the second preset scale number in the application), and the maximum value and the minimum value of the cross-axis scalar value number are set in the application, so that the value of the second scale number is more accurate, and data can be displayed in a chart more reasonably.
Optionally, in the method for visualizing a chart provided in the embodiment of the present application, determining the second scale number according to the comparison result includes: if the comparison result indicates that the length information is larger than the first preset scale number, calculating the ratio of the length information to a target value to obtain ratio information, wherein the target value is multiple; judging whether the ratio information is in a target range, wherein the target range is larger than the second preset scale number and is smaller than the first preset scale number; and if the ratio information is in the target range, determining the second scale quantity according to the ratio information.
Specifically, as shown in fig. 2, if the length of the original data is greater than the first preset number of scales, it is determined whether the length of the original data is divisible by 2 (corresponding to a target value in the present application), if the length of the original data is divisible by 2, it is determined whether a value of the length of the original data divided by 2n is within a threshold range, if the length of the original data divided by 2n is within the threshold range, the current second number of scales may be a value of the length of the original data divided by 2n, if the length of the original data is not divisible by 2, it is determined whether the length of the original data is divisible by 3 (corresponding to a target value in the present application), if the length of the original data is divisible by 3n, it is determined whether a value of the length of the original data divided by 3n is within a threshold range, if the value of the length of the original data divided by 3n is within a threshold range, the current second number of scales may be a value of the length of the original data divided by 3n, if the original data length cannot be evenly divided by 3, judging whether the original data length can be evenly divided by 5 (corresponding to a target numerical value in the application), if the original data length can be evenly divided by 5, judging whether the value of the original data length evenly divided by 5n is in a threshold range, if the value of the original data length evenly divided by 5n is in the threshold range, the current second scale quantity can be the value of the original data length evenly divided by 5n, and comparing the processed original data length with the threshold range, so that the value of the second scale quantity is more accurate, the data can be more reasonably displayed in a chart, and the visual effect of the chart is further improved.
It should be noted that the above mentioned threshold range is the region greater than minDataTickCount and less than maxDataTickCount, and n refers to natural numbers 1, 2, 3, and 4.
Optionally, in the method for visualizing a chart provided in the embodiment of the present application, in a case that the target information is total width information of the chart, determining a third scale number of a horizontal axis in the chart according to the total width information of the chart includes: acquiring preset width information of scales of a horizontal axis in the graph from the graph; and determining the number of the third scales according to the total width information and the preset width information.
Fig. 3 is an operation diagram for determining the number of scales based on the total width information of the chart according to the visualization method of the chart provided in the embodiment of the present application, and as shown in fig. 3, it is known that the total width of the drawing area of the chart is maxWidth, and the maximum width of the preset scale value is labelWidth, and then the value of width twickcount (corresponding to the third number of scales in the present application) is the maximum width of the total width/the preset scale value.
Optionally, in the method for visualizing a chart provided in the embodiment of the present application, determining the target scale number according to the first scale number, the second scale number, and the third scale number includes: selecting the minimum scale number from the first scale number, the second scale number and the third scale number; and taking the minimum scale number as the target scale number.
Specifically, fig. 4 is a flowchart of an optimal scale number of a chart visualization method according to an embodiment of the present application, and as shown in fig. 4, the user-defined scale number corresponds to a first scale number, the calculated scale number corresponds to a second scale number, and the container scale number corresponds to a third scale number, if the first scale number is 7, the second scale number is 5, and the third scale number is 6, the second scale number is selected as a target scale number of a chart horizontal axis, and the chart is drawn according to the optimized target scale number, so that data in the chart is uniformly and reasonably displayed.
And step S103, displaying the original data according to the target scale number.
Specifically, the horizontal axis of the chart is drawn according to the target scale number obtained in the above steps.
Optionally, in the method for visualizing a chart provided in the embodiment of the present application, displaying the original data according to the number of the target scales includes: processing the original data at equal intervals according to the target scale number to obtain processed original data; and displaying the processed original data.
For example, fig. 5 is a graph display diagram of the target scale number according to the graph visualization method provided in the embodiment of the present application, and as can be seen from fig. 5, the minimum scale number selected from the first scale number, the second scale number, and the third scale number is 7, and then 7 is used as the target scale number of the horizontal axis, and 7 data information is selected to be displayed at equal intervals by traversing the original data.
To sum up, the method for visualizing a chart obtains target information from the chart, where the target information at least includes: original data of the chart, preset configuration of the chart and total width information of the chart; determining the target scale number of a horizontal axis in the graph according to the target information; and displaying the original data according to the number of the target scales. The problem of relatively poor visibility of the time axis in the graph in the related art is solved. The target scale number of the transverse shaft in the graph is determined through the target information, the original data are displayed according to the target scale number, and therefore the effect of improving the visibility of the time shaft in the graph 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 different than presented herein.
The embodiment of the present application further provides a visualization device for a chart, and it should be noted that the visualization device for a chart according to the embodiment of the present application may be used to execute the visualization method for a chart provided by the embodiment of the present application. The following describes a visualization apparatus for a chart provided in an embodiment of the present application.
Fig. 6 is a schematic diagram of a visualization device of a chart according to an embodiment of the application. As shown in fig. 6, the apparatus includes: an acquisition unit 601, a determination unit 602, and a presentation unit 603.
Specifically, the obtaining unit 601 is configured to obtain target information from the graph, where the target information at least includes: original data of the chart, preset configuration of the chart and total width information of the chart;
a determining unit 602, configured to determine a target scale number of a horizontal axis in the graph according to the target information;
and a display unit 603, configured to display the original data according to the target scale number.
To sum up, the visualization apparatus for a chart provided in the embodiment of the present application obtains target information from the chart through the obtaining unit 601, where the target information at least includes: original data of the chart, preset configuration of the chart and total width information of the chart; the determining unit 602 determines the target scale number of the horizontal axis in the graph according to the target information; the display unit 603 displays the original data according to the target scale number, and the problem of poor visibility of a time axis in a chart in the related art is solved. The target scale number of the transverse shaft in the graph is determined through the target information, the original data are displayed according to the target scale number, and therefore the effect of improving the visibility of the time shaft in the graph is achieved.
Optionally, in the apparatus for visualizing a chart provided in an embodiment of the present application, the determining unit 602 includes: the acquisition subunit is used for acquiring the first scale quantity of the horizontal axis in the chart according to the preset configuration under the condition that the target information is the preset configuration of the chart; the first determining subunit is used for determining the second scale quantity of the horizontal axis in the graph according to the original data under the condition that the target information is the original data; the second determining subunit is used for determining the third scale number of the horizontal axis in the chart according to the total width information of the chart under the condition that the target information is the total width information of the chart; and the third determining subunit is used for determining the number of the target scales according to the first scale number, the second scale number and the third scale number.
Optionally, in the visualization apparatus for a graph provided in an embodiment of the present application, the first determining subunit includes: the first acquisition module is used for acquiring length information of original data; the comparison module is used for comparing the length information with the preset scale number to obtain a comparison result, wherein the preset scale number comprises one of the following: the scale comprises a first preset scale number and a second preset scale number, wherein the first preset scale number is larger than the second preset scale number; and the first determining module is used for determining the second scale quantity according to the comparison result.
Optionally, in the apparatus for visualizing a chart provided in an embodiment of the present application, the determining module includes: the calculation submodule is used for calculating the ratio of the length information to a target value to obtain ratio information if the comparison result indicates that the length information is larger than the first preset scale number, wherein the number of the target values is multiple; the judgment submodule is used for judging whether the ratio information is in a target range, wherein the target range is larger than the second preset scale number and is smaller than the first preset scale number; and the determining submodule is used for determining the second scale quantity according to the ratio information if the ratio information is in the target range.
Optionally, in the visualization apparatus for a graph provided in an embodiment of the present application, the second determining subunit includes: the second acquisition module is used for acquiring preset width information of scales of a transverse shaft in the graph from the graph; and the second determining module is used for determining the number of the third scales according to the total width information and the preset width information.
Optionally, in the visualization apparatus for a graph provided in an embodiment of the present application, the third determining subunit includes: the selection module is used for selecting the minimum scale number from the first scale number, the second scale number and the third scale number; and the third determining module is used for taking the minimum scale number as the target scale number.
Optionally, in the apparatus for visualizing a chart provided in an embodiment of the present application, the display unit 603 includes: the processing subunit is used for carrying out equidistant processing on the original data according to the target scale number to obtain processed original data; and the display subunit is used for displaying the processed original data.
The graph visualization apparatus includes a processor and a memory, the obtaining unit 601, the determining unit 602, the presenting unit 603, and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, and the visualization of the chart is carried out by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium on which a program is stored, the program implementing a method of visualizing a chart when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein a method for visualizing an execution chart during the running of the program is used.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: acquiring target information from the chart, wherein the target information at least comprises: original data of the chart, preset configuration of the chart and total width information of the chart; determining the target scale number of a horizontal axis in the graph according to the target information; and displaying the original data according to the number of the target scales.
The processor executes the program and further realizes the following steps: under the condition that the target information is preset configuration of the chart, acquiring the first scale quantity of a horizontal axis in the chart according to the preset configuration; under the condition that the target information is original data, determining the second scale quantity of a horizontal axis in the graph according to the original data; determining the third scale number of a horizontal axis in the graph according to the total width information of the graph under the condition that the target information is the total width information of the graph; and determining the number of the target scales according to the first scale number, the second scale number and the third scale number.
The processor executes the program and further realizes the following steps: acquiring length information of original data; comparing the length information with a preset scale number to obtain a comparison result, wherein the preset scale number comprises one of the following: the scale comprises a first preset scale number and a second preset scale number, wherein the first preset scale number is larger than the second preset scale number; and determining the second scale number according to the comparison result.
The processor executes the program and further realizes the following steps: if the comparison result indicates that the length information is larger than the first preset scale number, calculating the ratio of the length information to a target value to obtain ratio information, wherein the target value is multiple; judging whether the ratio information is in a target range, wherein the target range is larger than the second preset scale number and is smaller than the first preset scale number; and if the ratio information is in the target range, determining the second scale quantity according to the ratio information.
The processor executes the program and further realizes the following steps: acquiring preset width information of scales of a horizontal axis in the graph from the graph; and determining the number of the third scales according to the total width information and the preset width information.
The processor executes the program and further realizes the following steps: selecting the minimum scale number from the first scale number, the second scale number and the third scale number; and taking the minimum scale number as the target scale number.
The processor executes the program and further realizes the following steps: processing the original data at equal intervals according to the target scale number to obtain processed original data; and displaying the processed original data.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: acquiring target information from the chart, wherein the target information at least comprises: original data of the chart, preset configuration of the chart and total width information of the chart; determining the target scale number of a horizontal axis in the graph according to the target information; and displaying the original data according to the number of the target scales.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: under the condition that the target information is preset configuration of the chart, acquiring the first scale quantity of a horizontal axis in the chart according to the preset configuration; under the condition that the target information is original data, determining the second scale quantity of a horizontal axis in the graph according to the original data; determining the third scale number of a horizontal axis in the graph according to the total width information of the graph under the condition that the target information is the total width information of the graph; and determining the number of the target scales according to the first scale number, the second scale number and the third scale number.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: acquiring length information of original data; comparing the length information with a preset scale number to obtain a comparison result, wherein the preset scale number comprises one of the following: the scale comprises a first preset scale number and a second preset scale number, wherein the first preset scale number is larger than the second preset scale number; and determining the second scale number according to the comparison result.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: if the comparison result indicates that the length information is larger than the first preset scale number, calculating the ratio of the length information to a target value to obtain ratio information, wherein the target value is multiple; judging whether the ratio information is in a target range, wherein the target range is larger than the second preset scale number and is smaller than the first preset scale number; and if the ratio information is in the target range, determining the second scale quantity according to the ratio information.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: acquiring preset width information of scales of a horizontal axis in the graph from the graph; and determining the number of the third scales according to the total width information and the preset width information.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: selecting the minimum scale number from the first scale number, the second scale number and the third scale number; and taking the minimum scale number as the target scale number.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: processing the original data at equal intervals according to the target scale number to obtain processed original data; and displaying the processed original data.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for visualizing a chart, comprising:
acquiring target information from the chart, wherein the target information at least comprises: original data of the chart, preset configuration of the chart and total width information of the chart;
determining the target scale number of a horizontal axis in the graph according to the target information;
and displaying the original data according to the target scale number.
2. The method of claim 1, wherein determining the target scale number for the horizontal axis of the graph from the target information comprises:
under the condition that the target information is preset configuration of the chart, acquiring a first scale quantity of a horizontal axis in the chart according to the preset configuration;
under the condition that the target information is the original data, determining the second scale quantity of a horizontal axis in the graph according to the original data;
determining the third scale number of a horizontal axis in the graph according to the total width information of the graph under the condition that the target information is the total width information of the graph;
and determining the number of the target scales according to the first scale number, the second scale number and the third scale number.
3. The method of claim 2, wherein in the case that the target information is the raw data, determining a second scale number of a horizontal axis in the graph according to the raw data comprises:
acquiring length information of the original data;
comparing the length information with a preset scale number to obtain a comparison result, wherein the preset scale number comprises one of the following: the scale setting method comprises the following steps of setting a first preset scale quantity and a second preset scale quantity, wherein the first preset scale quantity is larger than the second preset scale quantity;
and determining the second scale number according to the comparison result.
4. The method of claim 3, wherein determining the second scale number based on the comparison comprises:
if the comparison result indicates that the length information is larger than the first preset scale number, calculating the ratio of the length information to a target value to obtain ratio information, wherein the target value is multiple;
judging whether the ratio information is in a target range, wherein the target range is larger than the second preset scale quantity and is smaller than the first preset scale quantity;
and if the ratio information is in the target range, determining the second scale quantity according to the ratio information.
5. The method of claim 1, wherein determining a third scale number of a horizontal axis in the graph according to the total width information of the graph in the case that the target information is the total width information of the graph comprises:
acquiring preset width information of scales of a horizontal axis in the graph from the graph;
and determining the third scale quantity according to the total width information and the preset width information.
6. The method of claim 2, wherein determining the target scale number from the first and second scale numbers and a third scale number comprises:
selecting the minimum scale number from the first scale number, the second scale number and the third scale number;
and taking the minimum scale number as the target scale number.
7. The method of claim 1, wherein presenting the raw data by the target scale amount comprises:
processing the original data at equal intervals according to the target scale number to obtain processed original data;
and displaying the processed original data.
8. An apparatus for visualizing a chart, comprising:
an obtaining unit, configured to obtain target information from a graph, where the target information at least includes: original data of the chart, preset configuration of the chart and total width information of the chart;
the determining unit is used for determining the target scale number of a horizontal axis in the graph according to the target information;
and the display unit is used for displaying the original data according to the target scale number.
9. A processor, characterized in that the processor is configured to run a program, wherein the program when running performs the method of visualization of a chart of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the storage medium comprises a stored program, wherein the program performs the method of visualization of a chart of any one of claims 1 to 7.
CN202111503935.8A 2021-12-09 2021-12-09 Chart visualization method and device, storage medium and processor Pending CN114281450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111503935.8A CN114281450A (en) 2021-12-09 2021-12-09 Chart visualization method and device, storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111503935.8A CN114281450A (en) 2021-12-09 2021-12-09 Chart visualization method and device, storage medium and processor

Publications (1)

Publication Number Publication Date
CN114281450A true CN114281450A (en) 2022-04-05

Family

ID=80871476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111503935.8A Pending CN114281450A (en) 2021-12-09 2021-12-09 Chart visualization method and device, storage medium and processor

Country Status (1)

Country Link
CN (1) CN114281450A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102203548A (en) * 2008-11-07 2011-09-28 夏普株式会社 Projection device, projection device control method, and projection device control program
GB201418715D0 (en) * 2014-10-21 2014-12-03 Ibm Generating a computer executable chart visualization by annotating a static image of said visualization
CN106610926A (en) * 2015-10-27 2017-05-03 北京国双科技有限公司 Data display method and device for Echarts (Enterprise Charts)
CN107291955A (en) * 2017-07-28 2017-10-24 武汉票据交易中心有限公司 A kind of chart data dynamic display method and device
CN107315729A (en) * 2017-06-14 2017-11-03 网易(杭州)网络有限公司 For the data processing method of chart, medium, device and computing device
CN112860961A (en) * 2021-01-29 2021-05-28 支付宝(杭州)信息技术有限公司 Visual data processing method and device and electronic equipment
CN113225748A (en) * 2020-01-17 2021-08-06 普天信息技术有限公司 Hyper frame number out-of-step detection method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102203548A (en) * 2008-11-07 2011-09-28 夏普株式会社 Projection device, projection device control method, and projection device control program
GB201418715D0 (en) * 2014-10-21 2014-12-03 Ibm Generating a computer executable chart visualization by annotating a static image of said visualization
CN106610926A (en) * 2015-10-27 2017-05-03 北京国双科技有限公司 Data display method and device for Echarts (Enterprise Charts)
CN107315729A (en) * 2017-06-14 2017-11-03 网易(杭州)网络有限公司 For the data processing method of chart, medium, device and computing device
CN107291955A (en) * 2017-07-28 2017-10-24 武汉票据交易中心有限公司 A kind of chart data dynamic display method and device
CN113225748A (en) * 2020-01-17 2021-08-06 普天信息技术有限公司 Hyper frame number out-of-step detection method and device
CN112860961A (en) * 2021-01-29 2021-05-28 支付宝(杭州)信息技术有限公司 Visual data processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN110019353B (en) Data processing method and device
US20130194272A1 (en) Placing pixels according to attribute values in positions in a graphical visualization that correspond to geographic locations
CN109561052A (en) The detection method and device of website abnormal flow
CN106776612B (en) Display method and device of geographical thermodynamic diagram
CN109426415B (en) Method and device for generating cascade selector
CN110110159A (en) Thermodynamic chart methods of exhibiting and device
CN107168961B (en) Data display method and device for chart
US20170171041A1 (en) System capacity heatmap
CN110019261B (en) Data query method and device
CN110888922A (en) Method and device for creating target table during data synchronization
CN109388306B (en) Information display method and device
CN107103010B (en) Visualized data processing method and device
CN109857964B (en) Thermodynamic diagram drawing method and device for page operation, storage medium and processor
CN110968385A (en) Proportion display method and device
CN110147183B (en) Data screening method and device
CN114281450A (en) Chart visualization method and device, storage medium and processor
CN110020351B (en) Click thermodynamic diagram anomaly detection method and device
CN113055209B (en) Arranging method and device for edge calculation
CN106997292A (en) The method and apparatus for handling rectangle tree graph
CN114817209A (en) Monitoring rule processing method and device, processor and electronic equipment
CN114462370A (en) Method and device for generating view, storage medium and electronic equipment
CN107133241B (en) Data display method and device
CN109582191B (en) Menu content display method and device
CN110633181B (en) Visual display method and device
CN111381910A (en) Thermodynamic diagram drawing method and device

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