CN113918543A - Chart display method and device - Google Patents

Chart display method and device Download PDF

Info

Publication number
CN113918543A
CN113918543A CN202010659257.3A CN202010659257A CN113918543A CN 113918543 A CN113918543 A CN 113918543A CN 202010659257 A CN202010659257 A CN 202010659257A CN 113918543 A CN113918543 A CN 113918543A
Authority
CN
China
Prior art keywords
data
area
graph
determining
graphs
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
CN202010659257.3A
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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN202010659257.3A priority Critical patent/CN113918543A/en
Publication of CN113918543A publication Critical patent/CN113918543A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Quality & Reliability (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a chart display method and device. Wherein, the method comprises the following steps: determining display areas of a plurality of graphics; determining associated data based on the data set to be displayed on each graph, wherein the associated data are the same data in the data set to be displayed; and displaying the associated data in the associated area, and respectively displaying the non-associated data on each graph in the non-associated area of each graph, wherein the associated area is an area intersected between the display areas of the graphs, the non-associated data is data except the associated data in the data of the graphs, and the non-associated area is a display area except the associated area in the display areas of the graphs. The invention solves the technical problem that the use effect is poor because a method for displaying the keywords on the Venn diagram is not available in the related technology and only the Venn diagram can be displayed.

Description

Chart display method and device
Technical Field
The invention relates to the field of chart display, in particular to a chart display method and device.
Background
In the process of chart statistical data, after a large amount of calculation processing and data cleaning, a plurality of keyword sets are obtained, the relation and the keywords between the sets are expected to be displayed simultaneously, the keywords which are commonly owned between different sets are displayed on the intersecting part of the Venn diagram, and then the keywords which are unique to the respective sets are displayed on the non-intersecting part of the Venn diagram. This not only clearly demonstrates the logical connection between sets, but also enables the contained data structure to be more vividly demonstrated. However, in the related art, only the realization of the wien graph can be provided, and the display of the keyword on the wien graph cannot be realized, which causes a problem of poor use effect.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a chart display method and device, which are used for at least solving the technical problem that a keyword is not displayed on a Venn diagram in the related art, and the Venn diagram can only be displayed, so that the using effect is poor.
According to an aspect of an embodiment of the present invention, there is provided a graphic display method, including: determining display areas of a plurality of graphics; determining associated data based on a data set to be displayed on each graph, wherein the associated data are the same data in the data set to be displayed; displaying the associated data in associated areas, and respectively displaying non-associated data on each graph in the non-associated areas of each graph, wherein the associated areas are areas intersected between the display areas of the graphs, the non-associated data are data in the data of the graphs except the associated data, and the non-associated areas are display areas in the display areas of the graphs except the associated areas.
Optionally, determining the display areas of the plurality of graphics includes: determining the area size of each graph to be displayed according to the size of a display area for rendering the graphs; determining the coordinate position to be displayed of each graph according to the intersection of the area size of each graph and the data set to be displayed between the graphs; and determining the display area of each graph according to the area size of each graph and the coordinate position to be displayed of each graph.
Optionally, determining the coordinate position to be displayed of each graph according to the intersection of the area size of each graph and the data set to be displayed between the graphs includes: determining the area of the associated region according to the intersection of the region size of each graph and the data set to be displayed between the graphs; and determining the coordinate position to be displayed of each graph according to the area of the associated region.
Optionally, determining the area of the associated region according to the intersection of the region size of each graph and the data set to be displayed between the graphs includes: determining the area of the area size of each graph; and determining the area of the associated region according to the data volume in the intersection and the area of the region size of each graph.
Optionally, after determining the associated data based on the data set to be displayed on each graph, the method further includes: determining a coordinate position of the associated area based on the position of the display area of each graph; and determining the associated region according to the coordinate position of the associated region and the area of the associated region.
Optionally, displaying the associated data in the associated area, and displaying the non-associated data on each graph in the non-associated area of each graph respectively includes: establishing a coordinate system in the display area; in the coordinate system, determining an equation of the outline of the display area, wherein the outline of the display area is a closed graph; determining an equation of the outline of the associated area according to the equation of the outline of the display area; determining the coordinate range of the associated area according to the equation of the contour of the associated area, and displaying the associated data in the coordinate range of the associated area; and/or determining an equation of the outline of the non-associated region according to the equation of the outline of the display region; and determining the coordinate range of the non-associated area according to the equation of the contour of the non-associated area, and displaying the non-associated data in the coordinate range of the non-associated area.
Optionally, displaying the associated data in the coordinate range of the associated area includes: uniformly distributing a plurality of the associated data on the abscissa of the associated area; carrying out random displacement processing on the associated data which are uniformly distributed on the abscissa on the ordinate, or uniformly distributing a plurality of associated data on the ordinate of the associated area; carrying out random displacement processing on the associated data which are uniformly distributed on the ordinate on the abscissa; displaying the non-associated data in a coordinate range of the non-associated area, including: uniformly distributing a plurality of the non-associated data on the abscissa of the non-associated area; carrying out random displacement processing on the non-associated data after being uniformly distributed on the abscissa on the ordinate, or uniformly distributing a plurality of non-associated data on the ordinate of the non-associated area; and carrying out random displacement processing on the non-associated data which are uniformly distributed on the ordinate on the abscissa.
According to another aspect of the embodiments of the present invention, there is also provided a chart display apparatus including: the first determining module is used for determining display areas of a plurality of graphs; the second determining module is used for determining associated data based on the data set to be displayed on each graph, wherein the associated data are the same data in the data set to be displayed; and the association module is used for displaying the association data in association areas and respectively displaying the non-association data on each graph in the non-association areas of each graph, wherein the association areas are areas intersected between the display areas of the graphs, the non-association data are data in the data of the graphs except the association data, and the non-association areas are display areas in the display areas of the graphs except the association areas.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium, where the storage medium includes a stored program, and when the program runs, the apparatus where the storage medium is located is controlled to execute any one of the above-mentioned graphic display methods.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including at least one processor, and at least one memory and a bus connected to the processor; the processor and the memory complete mutual communication through the bus; the processor is configured to call program instructions in the memory to perform the chart presentation method of any of claims 1 to 7.
In the embodiment of the invention, the display areas of a plurality of graphs are determined; determining associated data based on the data set to be displayed on each graph, wherein the associated data are the same data in the data set to be displayed; displaying the associated data in the associated area, and displaying the non-associated data on each graph in the non-associated area of each graph respectively, wherein the associated area is an area intersected between the display areas of the graphs, the non-associated data is data except the associated data in the data of the graphs, and the non-associated area is a display area except the associated area in the display area of the graphs, by displaying the data set corresponding to the graphs on the display area of the graphs and displaying the data with the association relation between the graphs on the associated area, the purpose of combining and displaying the display areas of the graphs and the data corresponding to the display areas is achieved, thereby realizing the technical effects of simultaneously displaying the Venn diagram and the keywords and improving the use effect, further solving the problem that the method of displaying the keywords on the Venn diagram in the related art is not available, and only the Venn diagram can be displayed, leading to the technical problem of poor use effect.
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 chart illustration method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of two sets of separated Venn diagrams according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a Venn diagram of two sets of intersections according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of the data displayed on a Venn diagram according to an embodiment of the invention;
FIG. 5 is a schematic view of a chart display apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an electronic device 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.
For convenience of description, some terms or expressions referred to in the embodiments of the present application are explained below:
venturi map (Venn diagram): or Venn, wen, wien, van, mathematical branches, a sketch that is used in a less rigorous sense to form a set (or class) of tables. They are used to show the mathematical logical relationship between different groups (sets) of things, and are particularly suitable for representing "rough relationships" between sets (or classes), which are also often used to help deduce (or understand) some rules about set operations (or class operations).
Word cloud: also known as word clouds, is a visualization of text mining.
In accordance with an embodiment of the present invention, a method of diagramming is provided, it being noted that the steps illustrated in the flowchart 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 flowchart, in some cases the steps illustrated or described may be performed in an order different than presented herein.
Fig. 1 is a flow chart of a chart showing method according to an embodiment of the present invention, as shown in fig. 1, the method includes the steps of:
step S102, determining display areas of a plurality of graphs;
step S104, determining associated data based on the data set to be displayed on each graph, wherein the associated data are the same data in the data set to be displayed;
step S106, displaying the associated data in the associated area, and displaying the non-associated data on each graph in the non-associated area of each graph respectively, wherein the associated area is an area intersected between the display areas of the graphs, the non-associated data is data except the associated data in the data of the graphs, and the non-associated area is a display area except the associated area in the display areas of the graphs.
Through the steps, determining the display areas of a plurality of graphs; determining associated data based on the data set to be displayed on each graph, wherein the associated data are the same data in the data set to be displayed; displaying the associated data in the associated area, and displaying the non-associated data on each graph in the non-associated area of each graph respectively, wherein the associated area is an area intersected between the display areas of the graphs, the non-associated data is data except the associated data in the data of the graphs, and the non-associated area is a display area except the associated area in the display area of the graphs, by displaying the data set corresponding to the graphs on the display area of the graphs and displaying the data with the association relation between the graphs on the associated area, the purpose of combining and displaying the display areas of the graphs and the data corresponding to the display areas is achieved, thereby realizing the technical effects of simultaneously displaying the Venn diagram and the keywords and improving the use effect, further solving the problem that the method of displaying the keywords on the Venn diagram in the related art is not available, and only the Venn diagram can be displayed, leading to the technical problem of poor use effect.
The graph can be a Venn diagram, and common charts in the field of data visualization include a Venn diagram, a sector diagram, a column diagram, a line diagram and a logic block diagram. However, the relative relationship of data can only be graphically represented, for example, a venn graph may represent the relationship between data sets or data classes, a sector graph may represent the proportional relationship between data and the total number of data, and the like.
In the venn diagram, usually, only logical relations between different data sets or data categories can be represented, and relations between data sets are represented by separation and intersection relations between graphs, for example, two graphs intersect to represent that two sets intersect. However, a simple graph cannot meet the use requirement, and when a user wants to see the wien graph and the related data, the wien graph cannot meet the use requirement of the user.
In this embodiment, display areas of a plurality of graphics are determined, and in the venn diagram, the display areas of the graphics include the size and the position of the display of the graphics and an associated area between the graphics, for example, an area where two data having an intersection and an associated area are overlapped with each other in the display areas of the graphics corresponding to the two data.
After the display area of the graph is determined, the associated data is determined according to the data set corresponding to each graph, and under the condition that the data sets of the graphs have intersection, the associated data is the same data in the data set to be displayed of the graph, namely the intersection data.
Displaying the associated data in the associated area, and displaying the non-associated data on each graph in the non-associated area of each graph respectively, wherein the associated area is an area intersected between the display areas of the graphs, the non-associated data is data except the associated data in the data of the graphs, and the non-associated area is a display area except the associated area in the display areas of the graphs, so that the data set corresponding to the graphs is displayed on the display areas of the graphs, and the data with the associated relation between the graphs is displayed on the associated area, thereby achieving the purpose of combining and displaying the display areas of the graphs and the data corresponding to the display areas, simultaneously displaying the Venn diagram and the keywords, improving the technical effect of the use effect, further solving the problem that the keywords are not displayed on the Venn diagram in the related technology, and only displaying the Venn diagram, leading to the technical problem of poor use effect.
Optionally, determining the display areas of the plurality of graphics includes: determining the area size of each graph to be displayed according to the size of a display area for rendering the graphs; determining the coordinate position to be displayed of each graph according to the intersection of the area size of each graph and the data set to be displayed between the graphs; and determining the display area of each graph according to the area size of each graph and the coordinate position to be displayed of each graph.
The area size of each graph to be displayed is determined according to the size of the display area for rendering the graph, the size of the ROOT node area can be obtained by generating a Venn diagram on the ROOT node ROOT of the HTML file, the size of the Venn diagram in the ROOT node area is determined, and the situation that the use experience is influenced when the Venn diagram is too large or too small is prevented. The root node area may be a presentation area of the wien graph.
The size of the display graph of the graph is determined according to the size of the display area, for example, the size of the display graph can be determined according to a certain proportion, the display area can be a rectangle, and the size of the display graph is determined according to the length and the width of the rectangle. The display pattern may be a radius in the case of a circle, a length and a width in the case of a rectangle, or a side length of a square in the case of a square.
In this embodiment, the display graph is a circle, a preset distance is subtracted from the width of the root node, and then the result is divided by 4, so as to obtain two circles which have a certain interval in the horizontal direction and are not cut by the boundary of the display area, and specific positions of the two circles are determined according to a logical relationship of corresponding data sets, for example, the two circles intersect with each other to form an intersection.
When the display area is implemented, the display area may be determined according to a html root node root (hypertext markup language) used for rendering the graph, the root node root may be edited, the root node root includes a size field which is a rectangle by default, the size field includes a width and a height, and the root node root may generate the display area of a corresponding size according to the size field.
The boundary of the display area does not intersect with the display area of the graphics.
Optionally, determining the coordinate position to be displayed of each graph according to the intersection of the area size of each graph and the data set to be displayed between the graphs includes: determining the area of the associated region according to the intersection of the region size of each graph and the data set to be displayed between the graphs; and determining the coordinate position to be displayed of each graph according to the area of the associated region.
In the case of intersection, the intersection area is calculated first, and the area of the overlapped intersection area may be calculated according to a certain rule, for example, in this embodiment, the overlapped area of two circles is determined according to the percentage of the intersection area of the overlapped portion in the smaller set, and the two circles intersect in the horizontal direction. It should be noted that the above rule indicates an embodiment, and the two circles may also intersect in the vertical direction, or intersect in other directions, and are set according to the specific needs of the user. The area determination rule of the overlapping portion is also an embodiment, and does not limit the preset rule. That is, in the case of intersection, the user may set the rule of intersection according to the requirement, including determining the area of the intersection region, the way of graph intersection, and the like.
Optionally, determining the area of the associated region according to the intersection of the region size of each graph and the data set to be displayed between the graphs, includes: determining the area of the area size of each graph; and determining the area of the associated region according to the data volume in the intersection and the area of the region size of each graph.
And under the condition that the data sets represented by the plurality of graphs have intersection, the association area is an intersection area, and according to the percentage of the data quantity of the intersection in the data set with the minimum data quantity in the plurality of data sets, the percentage is multiplied by the area of the display area of the graph with the minimum area corresponding to the data set with the minimum data quantity, so as to determine the area of the intersection area corresponding to the intersection. The area of the display area of each graph in the wien diagram is in direct proportion to the data volume of the data set corresponding to the graph, and the larger the display area of the graph is, the more data sets can be displayed, so that the data of each data set can be conveniently displayed in the display area of each subsequent graph.
Optionally, after determining the associated data based on the data set to be displayed on each graph, the method further includes: determining a coordinate position of the associated area based on the position of the display area of each graph; and determining the associated region according to the coordinate position of the associated region and the area of the associated region.
After the display area of the graph is determined, the associated area is also determined, the coordinate range of the display area can be determined according to the position of the display area, the coordinate position of the associated area can be determined, and after the coordinate range of the associated area and the area of the associated area are determined, the associated area can be displayed.
Optionally, displaying the associated data in the associated area, and displaying the non-associated data on each graph in the non-associated area of each graph respectively includes: establishing a coordinate system in the display area; in a coordinate system, determining an equation of the outline of a display area, wherein the outline of the display area is a closed graph; determining an equation of the outline of the associated area according to the equation of the outline of the display area; determining the coordinate range of the associated area according to the equation of the profile of the associated area, and displaying the associated data in the coordinate range of the associated area; and/or determining an equation of the outline of the non-associated region according to the equation of the outline of the display region; and determining the coordinate range of the non-associated area according to the equation of the contour of the non-associated area, and displaying the non-associated data in the coordinate range of the non-associated area.
Displaying the dataset corresponding to the graphic on the display area of the graphic includes: establishing a coordinate system in a display area of the graph; determining a contour equation of a display area of the graph in the coordinate system; determining the display position of the data set corresponding to the graph on the display area of the graph according to the contour equation of the display area; and displaying the data on the display graph according to the display position.
By establishing a coordinate system, the respective graphic areas of the wien diagram are geometrically determined in the coordinate system. For example, if a function r ═ kx + b is established, the maximum and minimum values of the circle are set, r corresponds to the radius of the circle, and x corresponds to the number of data sets, then the relationship between r and the size of the sets in each case can be calculated, a wien graph is generated, and the basic information is recorded: { x1, y1, x2, y2, r1, r2 }; respectively corresponding to the center coordinates and the radius of the upper circle.
The intersection problem of the visualization graph of the data set becomes an understanding equation:
(x-x1)2+(y-y1)2=r12
(x-x2)2+(y-y2)2=r22
the vertical direction is a y axis, the horizontal direction is an x axis, the upper left corner is an origin, the central axis of the svg area is the solution of x, that is, w/2 is the x coordinate of the intersecting arc, so that the corresponding y coordinate can be solved, the solution is (w/2, ymin), and (w/2, ymax) two points, and the two circles can be divided into three areas, that is, an intersection area of two visual graphs and a complementary area of the two visual graphs except for the intersection area.
Optionally, displaying the associated data in the coordinate range of the associated area includes: uniformly distributing a plurality of associated data on the abscissa of the associated area; carrying out random displacement processing on the associated data which are uniformly distributed on the abscissa on the ordinate, or uniformly distributing a plurality of associated data on the ordinate of the associated area; carrying out random displacement processing on the associated data which are uniformly distributed on the ordinate on the abscissa; displaying the non-associated data in the coordinate range of the non-associated area, comprising: uniformly distributing a plurality of non-associated data on the abscissa of the non-associated area; carrying out random displacement processing on the non-associated data which are uniformly distributed on the abscissa on the ordinate, or uniformly distributing a plurality of non-associated data on the ordinate of the non-associated area; and carrying out random displacement processing on the non-associated data which are uniformly distributed on the ordinate on the abscissa.
In this embodiment, in the vertical direction (x-axis direction), the distance is equally divided in the circular region, so that the x coordinate of the falling point of each keyword can be obtained, the falling point is brought into the range in which the circular equation can solve the y coordinate, and then the solution set is displaced for each word. The range of the y coordinate can be calculated according to the following algorithm:
radius is the radius, (x1, y1), (x2, y2) are the left and right circle center coordinates, y1jmin, y2jmin, y1jmax, y2jmax are the four extreme values of the intersection condition, respectively, and the result is the y-axis value obtained by the final calculation.
When index is 0, it falls into the left circle, when index is 1, it falls into the right circle, and when index is 2, it falls into the intersection. The index drop point logic can be completely considered to be controlled, only the drop point is required to align the corresponding equation solution, each y value can be seen, and random displacement effect in each region is achieved, so that the word cloud looks more wrong and better.
In this embodiment, establishing the coordinate system in the display area of the graphic includes: and establishing a coordinate system by taking the upper left corner of the display area as the origin of the coordinate system, the vertical direction as an x axis and the horizontal direction as a y axis, wherein the coordinate system can be a two-dimensional plane rectangular coordinate system. Wherein the display area may be rectangular.
Displaying the data set corresponding to the graph on the display area of the graph according to the outline equation of the display area of the graph comprises the following steps: respectively determining the X-axis range and the Y-axis range of the display area and the intersection area of each graph; dividing the range of the X axis equally according to the number of data sets corresponding to the display area of the graph, wherein each division range of the X axis corresponds to one data, and determining the display position of the corresponding data according to the division range of the X axis; or dividing the range of the Y axis equally according to the number of the data corresponding to the display area of the graph, wherein each division range of the Y axis corresponds to one data, determining the display position of the corresponding data according to the division range of the Y axis, and displaying the data in the data set at the display position.
Under the condition of dividing the X axis, after the data in the data set is displayed, the displayed data is distributed and processed on the Y axis most randomly, so that the displayed data set is in a dispersed state, observation is facilitated, and user experience is improved. Similarly, when the Y axis is divided, the data in the data set may be displayed, and then the displayed data may be distributed most randomly on the X axis.
Determining the display position of the corresponding data according to the division range of the X-axis includes: determining an X-axis coordinate of the display position according to the division range of the X-axis; substituting the X-axis coordinate into an equation of the outline of the display area, and calculating the Y-axis coordinate range of the display area and the intersection area; determining the Y-axis coordinate of the display position according to the Y-axis coordinate range; or, determining the display position of the corresponding data according to the division range of the Y axis includes: determining a Y-axis coordinate of the display position according to the division range of the Y-axis; substituting the Y-axis coordinate into an equation of the outline of the display area, and calculating the X-axis coordinate range of the display area and the intersection area; and determining the X-axis coordinate of the display position according to the X-axis coordinate range.
It should be noted that the present application also provides an alternative implementation, and the details of the implementation are described below.
Whether a word cloud or a Venn diagram, is a very common diagram in the field of data visualization.
The technologies mainly used for data visualization at present are scalable Vector graphics svg (scalable Vector graphics) and canvas (a drawing component for drawing graphics on a web page), where a svg-based scheme is given, and based on this, the basic tool used is d 3.
The input is a dataset and the output is Venn-word cloud.
The simplest case is taken as an example here (two sets, for example, dataset includes two sets, where data in set 1 is a1, a2, a3, data in set 2 is a3, a4, and a3 is a portion where two data sets intersect in common), and the overall idea of the solution is as follows:
acquiring HTML (hypertext markup language, main language for displaying Web pages on the Internet, Web page is composed of HTML and used for displaying text, image or other resources through a Web browser) root node root of a graph to be rendered, generating a proper circle radius according to the width and height of the root, wherein a distance 60 is subtracted from the width of the root, and then the radius is divided by 4 to obtain two circles which have a certain interval in the horizontal direction and cannot be cut off by an svg boundary, and generating a circle (collection of wien graphs) according to the acquired data and the intersection condition: according to the data intersection condition, two circles are generated, if the data intersect, the overlapped area is calculated according to a certain rule (in the example, the overlapped area is calculated according to the percentage of the overlapped part in the smaller set, and the overlapped area is calculated in the horizontal direction), the two circles are displaced, and the coordinates of the centers of the two circles are recorded.
Fig. 2 is a schematic view of a wien diagram of two sets separated according to an embodiment of the present invention, and fig. 3 is a schematic view of a wien diagram of two sets intersecting according to an embodiment of the present invention, as shown in fig. 2 and 3, in addition to the separated intersections, there is complete coincidence, and thus the wien diagram is partially completed, followed by the generation of a word cloud.
2. A word cloud is generated where the initial data has been cleaned.
Distributing the data of the two sets into three sets, namely data set 1 unique data, data set 2 unique data and data set intersection data, and respectively generating corresponding < Text > tag loading words by each set;
if the upper left corner of svg is regarded as a coordinate system circular point, the x axis is in the vertical direction, and the y axis is in the horizontal direction, the problem of the falling point of the keywords in the three sets is changed into the problem of the intersection of two original equations, the distance is equally divided in a circular area in the vertical direction (the x axis direction), the x coordinate of the falling point of each keyword can be obtained, the y (y range) can be solved by substituting the circular equation, and then the solving set is displaced for each word.
Here, a way of calculating the y-coordinate is given. radius is the radius, (x1, y1), (x2, y2) are the left and right circle center coordinates, y1jmin, y2jmin, y1jmax, y2jmax are the four extreme values of the intersection case, respectively, and the result is the y-axis value obtained by the final calculation.
When index is 0, it falls into the left circle, when index is 1, it falls into the right circle, and when index is 2, it falls into the intersection. (the index drop point logic can be completely considered to be controlled, and only the drop point is required to be aligned with the corresponding equation solution), each y value can be seen, and a random displacement effect in each region is performed, so that the word cloud looks more wrong and better.
Fig. 4 is a schematic diagram of data displayed on a venn diagram according to an embodiment of the present invention, and as shown in fig. 4, generation of a word cloud is completed.
The embodiment provides a brand-new data visualization chart display mode and provides coding realization; the implementation mode is simple, and the logic is clear; a series of patents may be derived, such as (word cloud localization algorithms, multi-set intersection algorithms, word cloud dynamic motion localization algorithms, shape-specific word cloud and wien graph combination algorithms, etc.).
Fig. 5 is a schematic view of a chart showing apparatus according to an embodiment of the present invention, and as shown in fig. 5, according to another aspect of the embodiment of the present invention, there is also provided a chart showing apparatus including: a first determination module 52, a second determination module 54 and an association module 56, which are described in detail below.
A first determination module 52 for determining display areas of the plurality of graphics; a second determining module 54, connected to the first determining module 52, configured to determine associated data based on the data set to be displayed on each graph, where the associated data is the same data in the data set to be displayed; and an associating module 56, connected to the second determining module 54, configured to display the associated data in an associated region, and display the non-associated data on each graph in the non-associated region of each graph, respectively, where the associated region is a region where display regions of the graphs intersect with each other, the non-associated data is data of the graph other than the associated data, and the non-associated region is a display region of the graph other than the associated region.
By the device, the display areas of a plurality of graphs are determined by the first determining module 52; the second determining module 54 determines associated data based on the data set to be displayed on each graph, wherein the associated data are the same data in the data set to be displayed; the association module 56 displays the associated data in an associated area, and respectively displays the non-associated data on each graph in the non-associated area of each graph, wherein the associated area is an area where the display areas of the graphs intersect with each other, the non-associated data is data except the associated data in the data of the graphs, and the non-associated area is a display area except the associated area in the display area of the graphs, by displaying the data set corresponding to the graphs on the display area of the graphs and displaying the data having the association relationship between the graphs on the associated area, the purpose of displaying the display area of the graphs and the data corresponding to the display area in a combined manner is achieved, thereby simultaneously displaying the wien graph and the keyword, improving the technical effect of the use effect, and further solving the problem that the related art does not display the keyword on the wien graph, only the wien diagram can be displayed, resulting in a technical problem of poor use effect.
The chart display device comprises a processor and a memory, wherein the first determining module 52, the second determining module 54, the associating module 56 and the like are stored in the memory as program module units, and the processor executes the program module units stored in the memory to realize 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 than one, and the Wien diagram and the keywords are displayed simultaneously by adjusting the kernel parameters, so that the use effect is improved.
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.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium, where the storage medium includes a stored program, and when the program runs, the apparatus on which the storage medium is located is controlled to execute the graph displaying method of any one of the above.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes the graphics presentation method of any one of the above.
An embodiment of the present invention provides an apparatus, as shown in fig. 6, the apparatus includes at least one processor, and at least one memory and a bus connected to the processor; the processor and the memory complete mutual communication through a bus; the processor is used for calling the program instructions in the memory so as to execute the chart showing method. 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: determining display areas of a plurality of graphics; determining associated data based on the data set to be displayed on each graph, wherein the associated data are the same data in the data set to be displayed; and displaying the associated data in the associated area, and respectively displaying the non-associated data on each graph in the non-associated area of each graph, wherein the associated area is an area intersected between the display areas of the graphs, the non-associated data is data except the associated data in the data of the graphs, and the non-associated area is a display area except the associated area in the display areas of the graphs.
Optionally, determining the display areas of the plurality of graphics includes: determining the area size of each graph to be displayed according to the size of a display area for rendering the graphs; determining the coordinate position to be displayed of each graph according to the intersection of the area size of each graph and the data set to be displayed between the graphs; and determining the display area of each graph according to the area size of each graph and the coordinate position to be displayed of each graph.
Optionally, determining the coordinate position to be displayed of each graph according to the intersection of the area size of each graph and the data set to be displayed between the graphs includes: determining the area of the associated region according to the intersection of the region size of each graph and the data set to be displayed between the graphs; and determining the coordinate position to be displayed of each graph according to the area of the associated region.
Optionally, determining the area of the associated region according to the intersection of the region size of each graph and the data set to be displayed between the graphs, includes: determining the area of the area size of each graph; and determining the area of the associated region according to the data volume in the intersection and the area of the region size of each graph.
Optionally, after determining the associated data based on the data set to be displayed on each graph, the method further includes: determining a coordinate position of the associated area based on the position of the display area of each graph; and determining the associated region according to the coordinate position of the associated region and the area of the associated region.
Optionally, displaying the associated data in the associated area, and displaying the non-associated data on each graph in the non-associated area of each graph respectively includes: establishing a coordinate system in the display area; in a coordinate system, determining an equation of the outline of a display area, wherein the outline of the display area is a closed graph; determining an equation of the outline of the associated area according to the equation of the outline of the display area; determining the coordinate range of the associated area according to the equation of the profile of the associated area, and displaying the associated data in the coordinate range of the associated area; and/or determining an equation of the outline of the non-associated region according to the equation of the outline of the display region; and determining the coordinate range of the non-associated area according to the equation of the contour of the non-associated area, and displaying the non-associated data in the coordinate range of the non-associated area.
Optionally, displaying the associated data in the coordinate range of the associated area includes: uniformly distributing a plurality of associated data on the abscissa of the associated area; carrying out random displacement processing on the associated data which are uniformly distributed on the abscissa on the ordinate, or uniformly distributing a plurality of associated data on the ordinate of the associated area; carrying out random displacement processing on the associated data which are uniformly distributed on the ordinate on the abscissa; displaying the non-associated data in the coordinate range of the non-associated area, comprising: uniformly distributing a plurality of non-associated data on the abscissa of the non-associated area; carrying out random displacement processing on the non-associated data which are uniformly distributed on the abscissa on the ordinate, or uniformly distributing a plurality of non-associated data on the ordinate of the non-associated area; and carrying out random displacement processing on the non-associated data which are uniformly distributed on the ordinate on the abscissa.
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.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
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. 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 displaying graphics, comprising:
determining display areas of a plurality of graphics;
determining associated data based on a data set to be displayed on each graph, wherein the associated data are the same data in the data set to be displayed;
displaying the associated data in associated areas, and respectively displaying non-associated data on each graph in the non-associated areas of each graph, wherein the associated areas are areas intersected between the display areas of the graphs, the non-associated data are data in the data of the graphs except the associated data, and the non-associated areas are display areas in the display areas of the graphs except the associated areas.
2. The method of claim 1, wherein determining display areas for a plurality of graphics comprises:
determining the area size of each graph to be displayed according to the size of a display area for rendering the graphs;
determining the coordinate position to be displayed of each graph according to the intersection of the area size of each graph and the data set to be displayed between the graphs;
and determining the display area of each graph according to the area size of each graph and the coordinate position to be displayed of each graph.
3. The method of claim 2, wherein determining the coordinate location of each graph to be displayed based on the intersection of the region size of each graph and the data set to be exposed between the graphs comprises:
determining the area of the associated region according to the intersection of the region size of each graph and the data set to be displayed between the graphs;
and determining the coordinate position to be displayed of each graph according to the area of the associated region.
4. The method of claim 3, wherein determining the area of the associated region based on the intersection of the region size of each graph and the data set to be exposed between the graphs comprises:
determining the area of the area size of each graph;
and determining the area of the associated region according to the data volume in the intersection and the area of the region size of each graph.
5. The method of claim 3, wherein after determining the associated data based on each set of data to be presented graphically, the method further comprises:
determining a coordinate position of the associated area based on the position of the display area of each graph;
and determining the associated region according to the coordinate position of the associated region and the area of the associated region.
6. The method of claim 2, wherein displaying the associated data in the associated region and displaying the unassociated data on each graphic in the unassociated region of each graphic respectively comprises:
establishing a coordinate system in the display area;
in the coordinate system, determining an equation of the outline of the display area, wherein the outline of the display area is a closed graph;
determining an equation of the outline of the associated area according to the equation of the outline of the display area; determining the coordinate range of the associated area according to the equation of the contour of the associated area, and displaying the associated data in the coordinate range of the associated area; and/or determining an equation of the outline of the non-associated region according to the equation of the outline of the display region; and determining the coordinate range of the non-associated area according to the equation of the contour of the non-associated area, and displaying the non-associated data in the coordinate range of the non-associated area.
7. The method of claim 6, wherein displaying the association data within a coordinate range of the association area comprises:
uniformly distributing a plurality of the associated data on the abscissa of the associated area; carrying out random displacement processing on the associated data which are uniformly distributed on the abscissa on the ordinate, or uniformly distributing a plurality of associated data on the ordinate of the associated area; carrying out random displacement processing on the associated data which are uniformly distributed on the ordinate on the abscissa;
displaying the non-associated data in a coordinate range of the non-associated area, including:
uniformly distributing a plurality of the non-associated data on the abscissa of the non-associated area; carrying out random displacement processing on the non-associated data after being uniformly distributed on the abscissa on the ordinate, or uniformly distributing a plurality of non-associated data on the ordinate of the non-associated area; and carrying out random displacement processing on the non-associated data which are uniformly distributed on the ordinate on the abscissa.
8. A chart display apparatus, comprising:
the first determining module is used for determining display areas of a plurality of graphs;
the second determining module is used for determining associated data based on the data set to be displayed on each graph, wherein the associated data are the same data in the data set to be displayed;
and the association module is used for displaying the association data in association areas and respectively displaying the non-association data on each graph in the non-association areas of each graph, wherein the association areas are areas intersected between the display areas of the graphs, the non-association data are data in the data of the graphs except the association data, and the non-association areas are display areas in the display areas of the graphs except the association areas.
9. A computer storage medium, comprising a stored program, wherein the program, when executed, controls an apparatus in which the computer storage medium is located to perform the chart presentation method according to any one of claims 1 to 7.
10. An electronic device comprising at least one processor, and at least one memory, bus connected to the processor; the processor and the memory complete mutual communication through the bus; the processor is configured to call program instructions in the memory to perform the chart presentation method of any of claims 1 to 7.
CN202010659257.3A 2020-07-09 2020-07-09 Chart display method and device Pending CN113918543A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010659257.3A CN113918543A (en) 2020-07-09 2020-07-09 Chart display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010659257.3A CN113918543A (en) 2020-07-09 2020-07-09 Chart display method and device

Publications (1)

Publication Number Publication Date
CN113918543A true CN113918543A (en) 2022-01-11

Family

ID=79232135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010659257.3A Pending CN113918543A (en) 2020-07-09 2020-07-09 Chart display method and device

Country Status (1)

Country Link
CN (1) CN113918543A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI803331B (en) * 2022-05-27 2023-05-21 智慧價值股份有限公司 Multi-dimensional correlation word cloud system and implementation method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI803331B (en) * 2022-05-27 2023-05-21 智慧價值股份有限公司 Multi-dimensional correlation word cloud system and implementation method thereof

Similar Documents

Publication Publication Date Title
JP6768695B2 (en) Methods and devices for generating composite pictures
Wyvill et al. Soft objects
US5339390A (en) Operating a processor to display stretched continuation of a workspace
DE69907415T2 (en) DETERMINATION OF VISIBLE OBJECTS FOR INTERACTIVE VISUALISATION
US10650559B2 (en) Methods and systems for simplified graphical depictions of bipartite graphs
JPH03176784A (en) Polygon decomposition method and apparatus in computer graphics
US20160119615A1 (en) Three dimensional data visualization
CN107168961B (en) Data display method and device for chart
CN113918543A (en) Chart display method and device
US10067950B1 (en) Systems and methods for efficiently organizing map styling information
Lyons Cluster busting in anchored graph drawing
CN108280135B (en) Method and device for realizing visualization of data structure and electronic equipment
CN110020291B (en) Webpage layout processing method and device
CN108744520B (en) Method and device for determining placement position of game model and electronic equipment
CN106886510B (en) Method and device for displaying chart
Keskin et al. Effective visualization of hierarchical graphs with the cityscape metaphor
CN108429905B (en) Naked eye 3D display method and device, electronic equipment and storage medium
US9430232B2 (en) Program information generation system, method of generating program information, computer-readable program product, and program information display system
US20230032860A1 (en) Image processing apparatus and method and non-transitory computer readable medium
CN114490753A (en) Method, device, electronic equipment and medium for displaying map information
CN114238677A (en) Multi-view display method, device, equipment and medium
CN109712221B (en) Three-dimensional visualization rendering method and device
CN107291725B (en) Method and device for generating multi-directional tree
CN113742544A (en) Multi-object association display method and device and computer readable storage medium
CN112330772A (en) Radar map generation method, device, equipment 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