CN112612858A - Data display method and device based on annular graph and computer equipment - Google Patents

Data display method and device based on annular graph and computer equipment Download PDF

Info

Publication number
CN112612858A
CN112612858A CN202011492397.2A CN202011492397A CN112612858A CN 112612858 A CN112612858 A CN 112612858A CN 202011492397 A CN202011492397 A CN 202011492397A CN 112612858 A CN112612858 A CN 112612858A
Authority
CN
China
Prior art keywords
data
polar coordinate
displayed
coordinate system
polar
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
CN202011492397.2A
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011492397.2A priority Critical patent/CN112612858A/en
Publication of CN112612858A publication Critical patent/CN112612858A/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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification
    • G06F16/287Visualization; Browsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application relates to the field of big data, and discloses a data display method based on a ring diagram, which comprises the following steps: acquiring the number of data display types contained in data to be displayed input by a user; determining the number of polar coordinate systems corresponding to the data to be displayed according to the number of the data display types; the same point in the canvas is taken as a polar coordinate origin, and polar coordinate systems corresponding to the number of the polar coordinate systems are established; assigning data parameters corresponding to the data to be displayed to a parameter configuration table of each polar coordinate system one by one to form a polar coordinate data group corresponding to the data to be displayed; and converting the polar coordinate data groups corresponding to the data to be displayed into rectangular coordinate system data in a one-to-one correspondence manner to obtain an annular diagram corresponding to the data to be displayed. The real-time change of the data to be displayed is followed through the parameter configuration table of the polar coordinates, so that the dynamic change display is realized, the real-time dynamic variability of the data display is improved, and the trend change characteristic is improved.

Description

Data display method and device based on annular graph and computer equipment
Technical Field
The application relates to the field of big data, in particular to a data display method and device based on a ring diagram and computer equipment.
Background
The front-end page usually adopts a more intuitive mode such as a ring chart, a pie chart, a bar chart, a broken line chart and the like to display data, and the data is classified according to classification elements such as time and the like so as to visually display the data comparison state and the data change trend. The existing annular chart echarts realizes the scheme of the annular chart by using a pie chart, but the annular chart of the type is formed according to proportion data and cannot meet the requirement of real-time adjustment along with the dynamic change of the data.
Disclosure of Invention
The application mainly aims to provide data display based on a ring diagram and aims to solve the technical problem that the existing data display cannot be adjusted in real time along with dynamic changes of data.
The application provides a data display method based on a ring diagram, which comprises the following steps:
acquiring the number of data display types contained in data to be displayed input by a user;
determining the number of the polar coordinate systems corresponding to the data to be displayed according to the number of the data display types;
the same point in the canvas is taken as a polar coordinate origin, and polar coordinate systems corresponding to the number of the polar coordinate systems are established;
assigning data parameters corresponding to the data to be displayed to a parameter configuration table of each polar coordinate system one by one to form a polar coordinate data group corresponding to the data to be displayed;
and converting the polar coordinate data groups corresponding to the data to be displayed into rectangular coordinate system data in a one-to-one correspondence manner, so as to obtain an annular diagram corresponding to the data to be displayed.
Preferably, the data display type includes a proportional display and a text display of data, and the step of creating polar coordinate systems corresponding to the number of the polar coordinate systems by using the same point in the canvas as a polar coordinate origin includes:
acquiring coordinate data of a polar coordinate origin input by a user;
positioning the polar origin in the canvas according to the coordinate data of the polar origin;
and setting a first polar coordinate system corresponding to the proportion display and a second polar coordinate system corresponding to the text display on the polar coordinate origin.
Preferably, polar coordinate system includes polar origin, polar angle axis and the radial axle of polar coordinate set up on the polar origin the first polar coordinate system that the proportion show corresponds, and the step of the second polar coordinate system that the text show corresponds includes:
determining a first radial axis assignment corresponding to the first polar coordinate system according to the area ratio of the annular diagram to the canvas selected by a user, and setting a first angular axis assignment corresponding to the first polar coordinate system according to the display ratio of a preset annular diagram;
and determining a second radial axis assignment and a second angular axis assignment corresponding to the second polar coordinate according to a preset display position relation of the text display data relative to the annular diagram, the first radial axis assignment and the first angular axis assignment.
Preferably, the proportion display data includes multiple groups, multiple groups of proportion display data are assigned to one polar coordinate system at the same time, a first radial axis assignment corresponding to the first polar coordinate system is determined according to the area proportion of the canvas to the annular diagram selected by the user, and a first angular axis assignment corresponding to the first polar coordinate system is set according to the display proportion of a preset annular diagram:
determining a first radial axis assignment corresponding to the first polar coordinate system according to the area ratio of the annular diagram to the canvas selected by a user;
forming a blank annular map according to the first radial axis assignment;
acquiring an input sequence of a plurality of groups of data displayed in proportion input by a user, wherein each group of data displayed in proportion respectively comprises a current data value and a preset target value;
calculating the ratio value of the current data value in each group of data displayed in the ratio to a preset target value in real time respectively according to the input sequence;
and sequentially filling the proportional values according to the input sequence to be used as the first angular axis assignment, and forming an annular diagram sequentially filled according to the proportional values in the blank annular diagram.
Preferably, the data displayed in proportion include multiple groups, multiple groups of data displayed in proportion are assigned to each of the first polar coordinate systems in a one-to-one correspondence manner, all the first polar coordinate systems have the same polar coordinate origin and polar coordinate radial axis assignment, the first radial axis assignment corresponding to the first polar coordinate system is determined according to the area proportion of the annular diagram selected by the user to the canvas, and the first angular axis assignment corresponding to the first polar coordinate system is set according to the display proportion of the preset annular diagram, including:
determining third radial axis assignments which correspond to all the first polar coordinate systems together according to the area proportion of the circular diagram to the canvas selected by the user;
forming a blank annular map according to the third radial axis assignment;
acquiring an input order of a plurality of groups of data displayed in proportion input by a user, wherein the data displayed in proportion respectively comprise a current data value and a preset target value;
calculating a ratio value of the current data value in the data displayed in each ratio to a preset target value in real time according to the input sequence;
updating a first proportional value in a first order to a first angular axis assignment table of a polar coordinate system corresponding to the first order, wherein the first angular axis assignment table comprises a first starting angle, a first proportional value corresponding angle and a first ending angle, and the first ending angle is equal to the first proportional value corresponding angle plus the first starting angle;
updating a second proportional value in a second order to a second angular axis assignment table of the polar coordinate system corresponding to the second order, wherein the second angular axis assignment table comprises a second starting angle, a second proportional value corresponding angle and a second ending angle, the second ending angle is equal to the second proportional value corresponding angle plus the second starting angle, and the second starting angle is equal to the first ending angle;
and updating the angle axis assignment tables of which the data displayed in all proportions respectively correspond to the polar coordinates according to the assignment modes of the first angle axis assignment table and the second angle axis assignment table.
Preferably, the step of converting the polar coordinate data sets corresponding to the data to be displayed into rectangular coordinate data in a one-to-one correspondence manner to obtain the annular diagram corresponding to the data to be displayed includes:
acquiring radial axis coordinate data and angle axis coordinate data corresponding to a specified polar coordinate system, wherein the specified polar coordinate system is any polar coordinate system in the polar coordinate data set;
calculating abscissa data in a rectangular coordinate system corresponding to the specified polar coordinate system by using a first calculation formula according to radial axis coordinate data and angle axis coordinate data corresponding to the specified polar coordinate system;
according to the radial axis coordinate data and the angle axis coordinate data corresponding to the specified polar coordinate system, utilizing a second calculation formula to calculate longitudinal coordinate data in a rectangular coordinate system corresponding to the specified polar coordinate system;
converting the polar coordinate data sets into rectangular coordinate systems in a one-to-one correspondence manner according to the conversion manner of the rectangular coordinate systems corresponding to the specified polar coordinate systems to obtain rectangular coordinate data sets;
and operating the rectangular coordinate data set in the canvas to obtain the annular diagram corresponding to the data to be displayed.
Preferably, before the step of obtaining the number of data presentation types included in the data to be presented, which is input by the user, the method includes:
creating a canvas label corresponding to a canvas on the html page;
specifying canvas parameters corresponding to the canvas labels corresponding to the canvas;
and setting an index value corresponding to the canvas.
The application also provides a data display device based on the annular diagram, which comprises:
the acquisition module is used for acquiring the number of data display types contained in the data to be displayed input by a user;
the determining module is used for determining the number of the polar coordinate systems corresponding to the data to be displayed according to the number of the data display types;
the device comprises a creating module, a calculating module and a judging module, wherein the creating module is used for creating polar coordinate systems corresponding to the number of the polar coordinate systems by taking the same point in the canvas as a polar coordinate origin;
the assignment module is used for assigning the data parameters corresponding to the data to be displayed to the parameter configuration table of each polar coordinate system one by one to form a polar coordinate data group corresponding to the data to be displayed;
and the conversion module is used for converting the polar coordinate data groups corresponding to the data to be displayed into rectangular coordinate system data in a one-to-one correspondence manner to obtain an annular diagram corresponding to the data to be displayed.
The present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method as described above.
According to the data display method and device, the parameter configuration table of the polar coordinates is used for following the real-time change of the data to be displayed, dynamic change display is achieved, real-time dynamic variability of data display is improved, and trend change characteristics are improved.
Drawings
FIG. 1 is a schematic flow chart of a data presentation method based on a torus map according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a data presentation system based on a torus map according to an embodiment of the present application;
fig. 3 is a schematic diagram of an internal structure of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, a data display method based on a ring diagram according to an embodiment of the present application includes:
s1: acquiring the number of data display types contained in data to be displayed input by a user;
s2: determining the number of the polar coordinate systems corresponding to the data to be displayed according to the number of the data display types;
s3: the same point in the canvas is taken as a polar coordinate origin, and polar coordinate systems corresponding to the number of the polar coordinate systems are established;
s4: assigning data parameters corresponding to the data to be displayed to a parameter configuration table of each polar coordinate system one by one to form a polar coordinate data group corresponding to the data to be displayed;
s5: and converting the polar coordinate data groups corresponding to the data to be displayed into rectangular coordinate system data in a one-to-one correspondence manner, so as to obtain an annular diagram corresponding to the data to be displayed.
According to the embodiment of the application, different data display types are displayed through each polar coordinate system, and the ring graphs containing different data display types are displayed through the coincidence of the polar coordinate systems of the multiple co-polar coordinate origins. The data display types include, but are not limited to, proportional display of data and text display of data, proportional display includes data in a quantity of 30% and text content of data item names, proportional characters and the like, such as 19.5% of income. According to the data display method and device, the data of the corresponding type are input into the parameter configuration table of the corresponding polar coordinate system according to the difference of the data display types, and the effect of displaying the data of different data display types at the same time is achieved. According to the method and the device, project columns such as current time data and total target data are set in a parameter configuration table of a polar coordinate system, the current time data in the parameter configuration table and proportion data of the current time data to the total target data can be automatically acquired and updated in real time according to preset calculation rules in the parameter configuration table, and real-time dynamic change display of the data is further achieved.
According to the data display method and device, the parameter configuration table of the polar coordinates is used for following the real-time change of the data to be displayed, dynamic calculation and dynamic change display are achieved, the real-time dynamic variability of data display is improved, and the trend change characteristic is improved. The dynamic change of the data is realized, and the annular effect of data display is realized by utilizing different index values corresponding to a plurality of polar coordinate systems in canvas, wherein the polar coordinate systems comprise polar coordinate angle axis data and polar coordinate radial axis data. The angle axis data comprises an index value, a starting angle, an angle axis data type, an angle range, an angle interval, an axis and the like; the radial axis parameters comprise index values, type axes and the like, a visual annular area is generated by superposition of a plurality of polar coordinate systems, a round angle annular diagram is obtained, namely different part of data boundary edges in the annular diagram are arc boundaries formed according to polar coordinate angle axis data, a round angle is presented, the data boundary edges are different from line segment boundary lines directly obtained in proportion calculation, so that data boundary transition is more natural, and dynamic change display can be realized according to change of real-time data.
According to the data display method and device, the parameter configuration table of the polar coordinates is used for following the real-time change of the data to be displayed, dynamic change display is achieved, real-time dynamic variability of data display is improved, and trend change characteristics are improved.
Further, the data display type includes a scale display and a text display of data, and the step S3 of creating a polar coordinate system corresponding to the number of polar coordinate systems with the same point in the canvas as a polar coordinate origin includes:
s31: acquiring coordinate data of a polar coordinate origin input by a user;
s32: positioning the polar origin in the canvas according to the coordinate data of the polar origin;
s33: and setting a first polar coordinate system corresponding to the proportion display and a second polar coordinate system corresponding to the text display on the polar coordinate origin.
The vertex at the upper left corner of the canvas is the origin of the coordinates (0,0) of the rectangular coordinate system, the positive direction of the Y axis is downward, the positive direction of the X axis is rightward, the coordinates (0,0) are used as reference points, the origin of the polar coordinates of the polar coordinate system is set, for example, the position of the midpoint (200 ) of the rectangular coordinate system, the radial axis data of the polar coordinate system is set at the origin of the polar coordinates, for example, any value between 0 and 50 is taken, the angle axis data of the polar coordinate system is set, for example, the angle range of 0 to 360 degrees is set, and then the initial polar coordinate system is established. In accordance with the above method, multiple polar coordinate systems are created at the same point (200 ) and distinguished by index values. For example, the present application preferably uses a bi-polar coordinate system, and sets the index values of two polar coordinate systems as a distinction, for example, the index value of one polar coordinate system is 1, and the index value of the other polar coordinate system is 2. And inputting corresponding data into the parameter configuration table of the polar coordinate to obtain a polar coordinate data set for data display.
The two polar coordinate systems created above are overlapped at the distribution position of canvas due to the same polar coordinate origin, and are distinguished by the index value index, the corresponding circular ring is shown by the proportion of the polar coordinate system with index being 1 for drawing data, and the text string corresponding to the text with index being 2 for drawing data is shown by the polar coordinate system with index being 2. Introducing two groups of data parameters including but not limited to target digital values required by scale display and actual digital values at the current moment into the two polar coordinate systems in a one-to-one correspondence manner; as well as text strings, text colors, text font sizes, circle widths, etc. required for text presentation. And transmitting the parameters into a corresponding polar coordinate system parameter configuration table according to different function rules corresponding to the polar coordinate systems with different index values, wherein the data transmission sequence is consistent with the index sequence of the polar coordinate systems. The functional rules include, but are not limited to, drawing a circle, displaying text, etc.
Further, polar coordinate system includes polar origin, polar angle axis and the radial axle of polar coordinate set up on the polar origin the first polar coordinate system that the proportion show corresponds, and step S33 of the second polar coordinate system that the text show corresponds includes:
s331: determining a first radial axis assignment corresponding to the first polar coordinate system according to the area ratio of the annular diagram to the canvas selected by a user, and setting a first angular axis assignment corresponding to the first polar coordinate system according to the display ratio of a preset annular diagram;
s332: and determining a second radial axis assignment and a second angular axis assignment corresponding to the second polar coordinate according to a preset display position relation of the text display data relative to the annular diagram, the first radial axis assignment and the first angular axis assignment.
In the embodiment of the present application, the radial axis assignments determine the inner and outer radius dimensions of the annular map, and the angular axis assignments determine the annular profile of the annular map, i.e., the entire ring, 1/1 ring, etc. The annular outline of the first polar coordinate system corresponding to the data displayed in proportion is determined firstly, and then the coordinate data of the second polar coordinate system corresponding to the data displayed in text is determined, so that the distribution state of data display is more reasonable. The position information of the annular graph in the canvas and the proportion of the annular graph occupying the total area of the canvas are reasonably set according to the parameter requirements input by the user in advance, and the requirement of carrying out specific setting according to different display effect requirements of the user is met. For example, a caption is added to the center of the annular diagram, and the text character string is drawn by using the canvas API at the center of the second polar coordinate system with the index value index of 2, so that the display coordinates of the text character string are set at the center of the annular diagram.
Further, the proportion display data includes multiple groups, multiple groups of proportion display data are assigned to one polar coordinate system at the same time, a first radial axis assignment corresponding to the first polar coordinate system is determined according to the area proportion of the canvas to the annular diagram selected by the user, and a first angular axis assignment corresponding to the first polar coordinate system is set according to the display proportion of a preset annular diagram S331:
s3311: determining a first radial axis assignment corresponding to the first polar coordinate system according to the area ratio of the annular diagram to the canvas selected by a user;
s3312: forming a blank annular map according to the first radial axis assignment;
s3313: acquiring an input sequence of a plurality of groups of data displayed in proportion input by a user, wherein each group of data displayed in proportion respectively comprises a current data value and a preset target value;
s3314: calculating the ratio value of the current data value in each group of data displayed in the ratio to a preset target value in real time respectively according to the input sequence;
s3315: and sequentially filling the proportional values according to the input sequence to be used as the first angular axis assignment, and forming an annular diagram sequentially filled according to the proportional values in the blank annular diagram.
In the embodiment of the application, multiple groups of data displayed in proportion are simultaneously displayed in the same first polar coordinate system, a blank annular graph or an annular outline without filling is generated according to assignment of a radial axis, and then annular areas corresponding to the data displayed in proportion are sequentially filled according to the input sequence of the multiple groups of data displayed in proportion from the set initial filling position. For example, the preset target values in the multiple sets of data displayed in proportion are the same, the preset target values correspond to 360 degrees of the angle of the whole circular ring, and the data displayed in proportion respectively correspond to different current data values, if the proportion values are different, the corresponding circular ring angles are different. The annular diagram sequentially and correspondingly filled according to each proportion value is formed in the blank annular diagram by sequentially connecting the arc starting edges and the arc ending edges of the adjacent annular angles according to the input sequence of the data displayed by the multiple groups of proportions, so that the data displayed by the multiple groups of proportions are continuously distributed and displayed on the annular diagram.
In other embodiments of the present application, when the preset target value corresponds to an angle of a circular ring of 180 degrees or other angles, the blank circular ring diagram is an 1/2 circular ring or other angle circular ring, which can indicate a ratio of the current data value to the preset target value, and the display effect on the semicircular or other angle circular ring increases the style richness of data display, and enlarges the application range of the circular diagram for displaying different data modes.
Further, the data displayed in proportion includes multiple groups, multiple groups of data displayed in proportion are assigned to each of the first polar coordinate systems in a one-to-one correspondence manner, all the first polar coordinate systems have the same polar coordinate origin and polar coordinate radial axis assignment, the first radial axis assignment corresponding to the first polar coordinate system is determined according to the area proportion of the canvas to the annular diagram selected by the user, and the step S331 of setting the first angular axis assignment corresponding to the first polar coordinate system according to the display proportion of the preset annular diagram includes:
s331 a: determining third radial axis assignments which correspond to all the first polar coordinate systems together according to the area proportion of the circular diagram to the canvas selected by the user;
s331 b: forming a blank annular map according to the third radial axis assignment;
s331 c: acquiring an input order of a plurality of groups of data displayed in proportion input by a user, wherein the data displayed in proportion respectively comprise a current data value and a preset target value;
s331 d: calculating a ratio value of the current data value in the data displayed in each ratio to a preset target value in real time according to the input sequence;
s331 e: updating a first proportional value in a first order to a first angular axis assignment table of a polar coordinate system corresponding to the first order, wherein the first angular axis assignment table comprises a first starting angle, a first proportional value corresponding angle and a first ending angle, and the first ending angle is equal to the first proportional value corresponding angle plus the first starting angle;
s331 f: updating a second proportional value in a second order to a second angular axis assignment table of the polar coordinate system corresponding to the second order, wherein the second angular axis assignment table comprises a second starting angle, a second proportional value corresponding angle and a second ending angle, the second ending angle is equal to the second proportional value corresponding angle plus the second starting angle, and the second starting angle is equal to the first ending angle;
s331 g: and updating the angle axis assignment tables of which the data displayed in all proportions respectively correspond to the polar coordinates according to the assignment modes of the first angle axis assignment table and the second angle axis assignment table.
According to the embodiment of the application, data displayed in multiple groups of proportions are displayed in multiple coincident first polar coordinate systems simultaneously, and the parameter configuration tables corresponding to each first polar coordinate system are independent, so that users can conveniently set the data in a personalized mode according to respective requirements, and the data display is richer.
Further, step S5, converting the polar coordinate data set corresponding to the data to be displayed into rectangular coordinate data in a one-to-one correspondence manner, to obtain an annular diagram corresponding to the data to be displayed, includes:
s51: acquiring radial axis coordinate data and angle axis coordinate data corresponding to a specified polar coordinate system, wherein the specified polar coordinate system is any polar coordinate system in the polar coordinate data set;
s52: calculating abscissa data in a rectangular coordinate system corresponding to the specified polar coordinate system by using a first calculation formula according to radial axis coordinate data and angle axis coordinate data corresponding to the specified polar coordinate system;
s53: according to the radial axis coordinate data and the angle axis coordinate data corresponding to the specified polar coordinate system, utilizing a second calculation formula to calculate longitudinal coordinate data in a rectangular coordinate system corresponding to the specified polar coordinate system;
s54: converting the polar coordinate data sets into rectangular coordinate systems in a one-to-one correspondence manner according to the conversion manner of the rectangular coordinate systems corresponding to the specified polar coordinate systems to obtain rectangular coordinate data sets;
s55: and operating the rectangular coordinate data set in the canvas to obtain the annular diagram corresponding to the data to be displayed.
In the embodiment of the present application, the polar coordinate data set is converted into the rectangular coordinate data set, so as to ensure that the annular diagram data is correctly displayed in the canvas. The first calculation formula is x ═ rhocos theta, the second calculation formula is y ═ rhosin theta, rho is a radial axis coordinate, theta is an angle axis coordinate, and the data display effect of the rounded corner annular graph is realized by drawing and displaying the data in the canvas through the canvas API.
Further, before the step S1 of obtaining the number of data display types included in the data to be displayed, which is input by the user, the method includes:
s11: creating a canvas label corresponding to a canvas on the html page;
s12: specifying canvas parameters corresponding to the canvas labels corresponding to the canvas;
s13: and setting an index value corresponding to the canvas.
The canvas of the embodiment of the application is established on the html page, the multiple coincident polar coordinate systems are distinguished by setting the index values, and the input data and the canvas establish data association by setting the canvas labels, so that accurate data display is ensured. The canvas tags include, but are not limited to, the tag address Id and the attribute assignment of the tag Id. The canvas parameters include, but are not limited to, the height and width of the canvas, such as setting width 400 and height 400, to create a canvas of a specified display area.
Referring to fig. 2, a data display apparatus based on a ring diagram according to an embodiment of the present application includes:
the display device comprises an acquisition module 1, a display module and a display module, wherein the acquisition module is used for acquiring the number of data display types contained in data to be displayed input by a user;
the determining module 2 is configured to determine, according to the number of the data display types, the number of the polar coordinate systems corresponding to the data to be displayed;
the creating module 3 is used for creating polar coordinate systems corresponding to the number of the polar coordinate systems by taking the same point in the canvas as a polar coordinate origin;
the assignment module 4 is configured to assign data parameters corresponding to the data to be displayed to a parameter configuration table of each polar coordinate system one by one, so as to form a polar coordinate data group corresponding to the data to be displayed;
and the conversion module 5 is configured to convert the polar coordinate data sets corresponding to the data to be displayed into rectangular coordinate data in a one-to-one correspondence manner, so as to obtain an annular diagram corresponding to the data to be displayed.
In the embodiments of the present application, reference may be made to corresponding parts of the method embodiments, which are not described in detail.
Further, the data display type includes a scale display and a text display of data, and the creating module 3 includes:
the first acquisition submodule is used for acquiring coordinate data of a polar coordinate origin input by a user;
the positioning sub-module is used for positioning the polar coordinate origin in the canvas according to the coordinate data of the polar coordinate origin;
and the setting submodule is used for setting a first polar coordinate system corresponding to the proportion display and a second polar coordinate system corresponding to the text display on the polar coordinate origin.
Further, polar coordinate system includes polar origin, polar angle axis and the radial axle of polar coordinate, sets up the submodule piece, includes:
the first determining unit is used for determining a first radial axis assignment corresponding to the first polar coordinate system according to the area ratio of the annular diagram selected by the user to the canvas, and setting a first angular axis assignment corresponding to the first polar coordinate system according to the display ratio of a preset annular diagram;
and the second determining unit is used for determining a second radial axis assignment and a second angular axis assignment corresponding to the second polar coordinate according to the preset display position relation of the text display data relative to the annular diagram, the first radial axis assignment and the first angular axis assignment.
Further, the ratio display data includes a plurality of groups, the plurality of groups of ratio display data are assigned to one polar coordinate system at the same time, and the first determining unit includes:
the first determining subunit is configured to determine, according to an area ratio of an annular diagram selected by a user to the canvas, a first radial axis assignment corresponding to the first polar coordinate system;
the first assignment subunit is used for forming a blank annular graph according to the first radial axis assignment;
the first acquisition subunit is used for acquiring an input order of a plurality of groups of data displayed in proportion, which are input by a user, wherein each group of data displayed in proportion respectively comprises a current data value and a preset target value;
the first calculating subunit is used for respectively calculating a ratio value of the current data value in each group of data displayed in the ratio to a preset target value in real time according to the input sequence;
and the first filling subunit is used for sequentially filling the proportional values according to the input order to obtain the first angular axis assignment, and forming an annular diagram sequentially filled according to the proportional values in the blank annular diagram.
Further, the data displayed in proportion includes multiple groups, the multiple groups of data displayed in proportion are assigned to each of the first polar coordinate systems in a one-to-one correspondence manner, all the first polar coordinate systems have the same polar coordinate origin and polar coordinate radial axis assignment, and the first determining unit includes:
the second determining subunit is configured to determine, according to an area ratio of the annular diagram to the canvas selected by the user, third radial axis assignments corresponding to all the first polar coordinate systems;
the second assignment subunit is used for forming a blank annular graph according to the third radial axis assignment;
the second acquisition subunit is used for acquiring an input order of a plurality of groups of data displayed in proportion input by a user, wherein the data displayed in proportion respectively comprise a current data value and a preset target value;
the second calculating subunit is used for calculating a ratio value of the current data value in the data displayed in each ratio to a preset target value in real time according to the input sequence;
the second padding subunit is configured to update a first proportional value in a first order to a first angular axis assignment table of a polar coordinate system corresponding to the first order, where the first angular axis assignment table includes a first start angle, a first proportional value corresponding angle, and a first end angle, and the first end angle is equal to the first proportional value corresponding angle plus the first start angle;
a first updating subunit, configured to update a second proportional value in a second order to a second angular axis assignment table of the polar coordinate system corresponding to the second order, where the second angular axis assignment table includes a second start angle, a second proportional value corresponding angle, and a second end angle, the second end angle is equal to the second proportional value corresponding angle plus the second start angle, and the second start angle is equal to the first end angle;
and the second updating subunit is used for updating the angular axis assignment tables of which the data displayed in all proportions respectively correspond to the polar coordinates according to the assignment modes of the first angular axis assignment table and the second angular axis assignment table.
Further, the conversion module 5 includes:
the second obtaining submodule is used for obtaining radial axis coordinate data and angle axis coordinate data corresponding to a specified polar coordinate system, wherein the specified polar coordinate system is any polar coordinate system in the polar coordinate data set;
the first calculation submodule is used for calculating horizontal coordinate data in a rectangular coordinate system corresponding to the specified polar coordinate system by using a first calculation formula according to radial axis coordinate data and angle axis coordinate data corresponding to the specified polar coordinate system;
the second calculation submodule is used for calculating longitudinal coordinate data in a rectangular coordinate system corresponding to the specified polar coordinate system by using a second calculation formula according to the radial axis coordinate data and the angle axis coordinate data corresponding to the specified polar coordinate system;
the conversion submodule is used for converting the polar coordinate data set into the rectangular coordinate system in a one-to-one correspondence mode according to the conversion mode of the rectangular coordinate system corresponding to the specified polar coordinate system to obtain the rectangular coordinate data set;
and the operation sub-module is used for operating the rectangular coordinate data group in the canvas to obtain the annular diagram corresponding to the data to be displayed.
Further, the data presentation device based on the annular graph comprises:
the creating module is used for creating a canvas label corresponding to the canvas on the html page;
the specifying module is used for specifying the canvas parameters corresponding to the canvas labels corresponding to the canvas;
and the setting module is used for setting the index value corresponding to the canvas.
Referring to fig. 3, a computer device, which may be a server and whose internal structure may be as shown in fig. 3, is also provided in the embodiment of the present application. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for storing all data required by the data presentation process based on the ring diagram. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of data presentation based on a torus map.
The processor executes the data display method based on the annular diagram, and the method comprises the following steps: acquiring the number of data display types contained in data to be displayed input by a user; determining the number of the polar coordinate systems corresponding to the data to be displayed according to the number of the data display types; the same point in the canvas is taken as a polar coordinate origin, and polar coordinate systems corresponding to the number of the polar coordinate systems are established; assigning data parameters corresponding to the data to be displayed to a parameter configuration table of each polar coordinate system one by one to form a polar coordinate data group corresponding to the data to be displayed; and converting the polar coordinate data groups corresponding to the data to be displayed into rectangular coordinate system data in a one-to-one correspondence manner, so as to obtain an annular diagram corresponding to the data to be displayed.
According to the computer equipment, the dynamic change display is realized by following the real-time change of the data to be displayed through the parameter configuration table of the polar coordinates, the real-time dynamic variability of the data display is improved, and the trend change characteristic is improved.
In one embodiment, the data display type includes a proportional display and a text display of data, and the step of creating, by the processor, a polar coordinate system corresponding to the number of polar coordinate systems with the same point in the canvas as a polar coordinate origin includes: acquiring coordinate data of a polar coordinate origin input by a user; positioning the polar origin in the canvas according to the coordinate data of the polar origin; and setting a first polar coordinate system corresponding to the proportion display and a second polar coordinate system corresponding to the text display on the polar coordinate origin.
In one embodiment, the polar coordinate system includes a polar origin, a polar angle axis, and a polar radial axis, and the processor sets a first polar coordinate system corresponding to the proportional display and a second polar coordinate system corresponding to the text display on the polar origin, including: determining a first radial axis assignment corresponding to the first polar coordinate system according to the area ratio of the annular diagram to the canvas selected by a user, and setting a first angular axis assignment corresponding to the first polar coordinate system according to the display ratio of a preset annular diagram; and determining a second radial axis assignment and a second angular axis assignment corresponding to the second polar coordinate according to a preset display position relation of the text display data relative to the annular diagram, the first radial axis assignment and the first angular axis assignment.
In one embodiment, the ratio display data includes multiple groups, multiple groups of ratio display data are assigned to one polar coordinate system at the same time, the processor determines a first radial axis assignment corresponding to the first polar coordinate system according to an area ratio of an annular diagram selected by a user to the canvas, and sets the first angular axis assignment corresponding to the first polar coordinate system according to a preset display ratio of the annular diagram: determining a first radial axis assignment corresponding to the first polar coordinate system according to the area ratio of the annular diagram to the canvas selected by a user; forming a blank annular map according to the first radial axis assignment; acquiring an input sequence of a plurality of groups of data displayed in proportion input by a user, wherein each group of data displayed in proportion respectively comprises a current data value and a preset target value; calculating the ratio value of the current data value in each group of data displayed in the ratio to a preset target value in real time respectively according to the input sequence; and sequentially filling the proportional values according to the input sequence to be used as the first angular axis assignment, and forming an annular diagram sequentially filled according to the proportional values in the blank annular diagram.
In one embodiment, the data displayed in proportion includes multiple groups, the multiple groups of data displayed in proportion are assigned to each of the first polar coordinate systems in a one-to-one correspondence manner, all the first polar coordinate systems have the same polar coordinate origin and polar coordinate radial axis assignment, the processor determines the first radial axis assignment corresponding to the first polar coordinate system according to the area proportion of the annular diagram selected by the user to the canvas, and sets the first angular axis assignment corresponding to the first polar coordinate system according to the display proportion of the preset annular diagram, including: determining third radial axis assignments which correspond to all the first polar coordinate systems together according to the area proportion of the circular diagram to the canvas selected by the user; forming a blank annular map according to the third radial axis assignment; acquiring an input order of a plurality of groups of data displayed in proportion input by a user, wherein the data displayed in proportion respectively comprise a current data value and a preset target value; calculating a ratio value of the current data value in the data displayed in each ratio to a preset target value in real time according to the input sequence; updating a first proportional value in a first order to a first angular axis assignment table of a polar coordinate system corresponding to the first order, wherein the first angular axis assignment table comprises a first starting angle, a first proportional value corresponding angle and a first ending angle, and the first ending angle is equal to the first proportional value corresponding angle plus the first starting angle; updating a second proportional value in a second order to a second angular axis assignment table of the polar coordinate system corresponding to the second order, wherein the second angular axis assignment table comprises a second starting angle, a second proportional value corresponding angle and a second ending angle, the second ending angle is equal to the second proportional value corresponding angle plus the second starting angle, and the second starting angle is equal to the first ending angle; and updating the angle axis assignment tables of which the data displayed in all proportions respectively correspond to the polar coordinates according to the assignment modes of the first angle axis assignment table and the second angle axis assignment table.
In an embodiment, the step of converting the polar coordinate data set corresponding to the data to be displayed into rectangular coordinate data by the processor in a one-to-one correspondence manner to obtain the annular diagram corresponding to the data to be displayed includes: acquiring radial axis coordinate data and angle axis coordinate data corresponding to a specified polar coordinate system, wherein the specified polar coordinate system is any polar coordinate system in the polar coordinate data set; calculating abscissa data in a rectangular coordinate system corresponding to the specified polar coordinate system by using a first calculation formula according to radial axis coordinate data and angle axis coordinate data corresponding to the specified polar coordinate system; according to the radial axis coordinate data and the angle axis coordinate data corresponding to the specified polar coordinate system, utilizing a second calculation formula to calculate longitudinal coordinate data in a rectangular coordinate system corresponding to the specified polar coordinate system; converting the polar coordinate data sets into rectangular coordinate systems in a one-to-one correspondence manner according to the conversion manner of the rectangular coordinate systems corresponding to the specified polar coordinate systems to obtain rectangular coordinate data sets; and operating the rectangular coordinate data set in the canvas to obtain the annular diagram corresponding to the data to be displayed.
In an embodiment, before the step of acquiring, by the processor, the number of data presentation types included in the data to be presented, which is input by the user, the method includes: creating a canvas label corresponding to a canvas on the html page; specifying canvas parameters corresponding to the canvas labels corresponding to the canvas; and setting an index value corresponding to the canvas.
Those skilled in the art will appreciate that the architecture shown in fig. 3 is only a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects may be applied.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for displaying data based on a torus map is implemented, including: acquiring the number of data display types contained in data to be displayed input by a user; determining the number of the polar coordinate systems corresponding to the data to be displayed according to the number of the data display types; the same point in the canvas is taken as a polar coordinate origin, and polar coordinate systems corresponding to the number of the polar coordinate systems are established; assigning data parameters corresponding to the data to be displayed to a parameter configuration table of each polar coordinate system one by one to form a polar coordinate data group corresponding to the data to be displayed; and converting polar coordinate data groups corresponding to the data to be displayed into rectangular coordinate system data in a one-to-one correspondence manner to obtain an annular diagram corresponding to the data to be displayed.
The computer-readable storage medium follows real-time change of data to be displayed through a parameter configuration table of a polar coordinate, dynamic change display is achieved, real-time dynamic variability of data display is improved, and trend change characteristics are improved.
In one embodiment, the data display type includes a proportional display and a text display of data, and the step of creating, by the processor, a polar coordinate system corresponding to the number of polar coordinate systems with the same point in the canvas as a polar coordinate origin includes: acquiring coordinate data of a polar coordinate origin input by a user; positioning the polar origin in the canvas according to the coordinate data of the polar origin; and setting a first polar coordinate system corresponding to the proportion display and a second polar coordinate system corresponding to the text display on the polar coordinate origin.
In one embodiment, the polar coordinate system includes a polar origin, a polar angle axis, and a polar radial axis, and the processor sets a first polar coordinate system corresponding to the proportional display and a second polar coordinate system corresponding to the text display on the polar origin, including: determining a first radial axis assignment corresponding to the first polar coordinate system according to the area ratio of the annular diagram to the canvas selected by a user, and setting a first angular axis assignment corresponding to the first polar coordinate system according to the display ratio of a preset annular diagram; and determining a second radial axis assignment and a second angular axis assignment corresponding to the second polar coordinate according to a preset display position relation of the text display data relative to the annular diagram, the first radial axis assignment and the first angular axis assignment.
In one embodiment, the ratio display data includes multiple groups, multiple groups of ratio display data are assigned to one polar coordinate system at the same time, the processor determines a first radial axis assignment corresponding to the first polar coordinate system according to an area ratio of an annular diagram selected by a user to the canvas, and sets the first angular axis assignment corresponding to the first polar coordinate system according to a preset display ratio of the annular diagram: determining a first radial axis assignment corresponding to the first polar coordinate system according to the area ratio of the annular diagram to the canvas selected by a user; forming a blank annular map according to the first radial axis assignment; acquiring an input sequence of a plurality of groups of data displayed in proportion input by a user, wherein each group of data displayed in proportion respectively comprises a current data value and a preset target value; calculating the ratio value of the current data value in each group of data displayed in the ratio to a preset target value in real time respectively according to the input sequence; and sequentially filling the proportional values according to the input sequence to be used as the first angular axis assignment, and forming an annular diagram sequentially filled according to the proportional values in the blank annular diagram.
In one embodiment, the data displayed in proportion includes multiple groups, the multiple groups of data displayed in proportion are assigned to each of the first polar coordinate systems in a one-to-one correspondence manner, all the first polar coordinate systems have the same polar coordinate origin and polar coordinate radial axis assignment, the processor determines the first radial axis assignment corresponding to the first polar coordinate system according to the area proportion of the annular diagram selected by the user to the canvas, and sets the first angular axis assignment corresponding to the first polar coordinate system according to the display proportion of the preset annular diagram, including: determining third radial axis assignments which correspond to all the first polar coordinate systems together according to the area proportion of the circular diagram to the canvas selected by the user; forming a blank annular map according to the third radial axis assignment; acquiring an input order of a plurality of groups of data displayed in proportion input by a user, wherein the data displayed in proportion respectively comprise a current data value and a preset target value; calculating a ratio value of the current data value in the data displayed in each ratio to a preset target value in real time according to the input sequence; updating a first proportional value in a first order to a first angular axis assignment table of a polar coordinate system corresponding to the first order, wherein the first angular axis assignment table comprises a first starting angle, a first proportional value corresponding angle and a first ending angle, and the first ending angle is equal to the first proportional value corresponding angle plus the first starting angle; updating a second proportional value in a second order to a second angular axis assignment table of the polar coordinate system corresponding to the second order, wherein the second angular axis assignment table comprises a second starting angle, a second proportional value corresponding angle and a second ending angle, the second ending angle is equal to the second proportional value corresponding angle plus the second starting angle, and the second starting angle is equal to the first ending angle; and updating the angle axis assignment tables of which the data displayed in all proportions respectively correspond to the polar coordinates according to the assignment modes of the first angle axis assignment table and the second angle axis assignment table.
In an embodiment, the step of converting the polar coordinate data set corresponding to the data to be displayed into rectangular coordinate data by the processor in a one-to-one correspondence manner to obtain the annular diagram corresponding to the data to be displayed includes: acquiring radial axis coordinate data and angle axis coordinate data corresponding to a specified polar coordinate system, wherein the specified polar coordinate system is any polar coordinate system in the polar coordinate data set; calculating abscissa data in a rectangular coordinate system corresponding to the specified polar coordinate system by using a first calculation formula according to radial axis coordinate data and angle axis coordinate data corresponding to the specified polar coordinate system; according to the radial axis coordinate data and the angle axis coordinate data corresponding to the specified polar coordinate system, utilizing a second calculation formula to calculate longitudinal coordinate data in a rectangular coordinate system corresponding to the specified polar coordinate system; converting the polar coordinate data sets into rectangular coordinate systems in a one-to-one correspondence manner according to the conversion manner of the rectangular coordinate systems corresponding to the specified polar coordinate systems to obtain rectangular coordinate data sets; and operating the rectangular coordinate data set in the canvas to obtain the annular diagram corresponding to the data to be displayed.
In an embodiment, before the step of acquiring, by the processor, the number of data presentation types included in the data to be presented, which is input by the user, the method includes: creating a canvas label corresponding to a canvas on the html page; specifying canvas parameters corresponding to the canvas labels corresponding to the canvas; and setting an index value corresponding to the canvas.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method 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, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A data display method based on a ring diagram is characterized by comprising the following steps:
acquiring the number of data display types contained in data to be displayed input by a user;
determining the number of the polar coordinate systems corresponding to the data to be displayed according to the number of the data display types;
the same point in the canvas is taken as a polar coordinate origin, and polar coordinate systems corresponding to the number of the polar coordinate systems are established;
assigning data parameters corresponding to the data to be displayed to a parameter configuration table of each polar coordinate system one by one to form a polar coordinate data group corresponding to the data to be displayed;
and converting the polar coordinate data groups corresponding to the data to be displayed into rectangular coordinate system data in a one-to-one correspondence manner, so as to obtain an annular diagram corresponding to the data to be displayed.
2. The data presentation method based on a torus map according to claim 1, wherein the data presentation types include a scale presentation and a text presentation of data, and the step of creating polar coordinate systems corresponding to the number of the polar coordinate systems with the same point in the canvas as a polar coordinate origin comprises:
acquiring coordinate data of a polar coordinate origin input by a user;
positioning the polar origin in the canvas according to the coordinate data of the polar origin;
and setting a first polar coordinate system corresponding to the proportion display and a second polar coordinate system corresponding to the text display on the polar coordinate origin.
3. The method for displaying data based on a ring diagram according to claim 2, wherein the polar coordinate system comprises a polar origin, a polar angle axis and a polar radial axis, and the step of setting a first polar coordinate system corresponding to the proportional display and a second polar coordinate system corresponding to the text display on the polar origin comprises:
determining a first radial axis assignment corresponding to the first polar coordinate system according to the area ratio of the annular diagram to the canvas selected by a user, and setting a first angular axis assignment corresponding to the first polar coordinate system according to the display ratio of a preset annular diagram;
and determining a second radial axis assignment and a second angular axis assignment corresponding to the second polar coordinate according to a preset display position relation of the text display data relative to the annular diagram, the first radial axis assignment and the first angular axis assignment.
4. The data display method based on the annular diagram according to claim 3, wherein the proportion display data includes a plurality of groups, the plurality of groups of proportion display data are simultaneously assigned to one first polar coordinate system, the step of determining the first radial axis assignment corresponding to the first polar coordinate system according to the area proportion of the annular diagram to the canvas selected by the user, and the step of setting the first angular axis assignment corresponding to the first polar coordinate system according to the display proportion of the preset annular diagram includes:
determining a first radial axis assignment corresponding to the first polar coordinate system according to the area ratio of the annular diagram to the canvas selected by a user;
forming a blank annular map according to the first radial axis assignment;
acquiring an input sequence of a plurality of groups of data displayed in proportion input by a user, wherein each group of data displayed in proportion respectively comprises a current data value and a preset target value;
calculating the ratio value of the current data value in each group of data displayed in the ratio to a preset target value in real time respectively according to the input sequence;
and sequentially filling the proportional values according to the input sequence to be used as the first angular axis assignment, and forming an annular diagram sequentially filled according to the proportional values in the blank annular diagram.
5. The method as claimed in claim 3, wherein the data displayed in proportion includes multiple groups, multiple groups of the data displayed in proportion are assigned to each of the first polar coordinate systems in a one-to-one correspondence, all the first polar coordinate systems have the same polar origin and polar radial axis assignment, the step of determining the first radial axis assignment corresponding to the first polar coordinate system according to the area ratio of the annular diagram to the canvas selected by the user, and setting the first angular axis assignment corresponding to the first polar coordinate system according to the display ratio of the preset annular diagram includes:
determining third radial axis assignments which correspond to all the first polar coordinate systems together according to the area proportion of the circular diagram to the canvas selected by the user;
forming a blank annular map according to the third radial axis assignment;
acquiring an input order of a plurality of groups of data displayed in proportion input by a user, wherein the data displayed in proportion respectively comprise a current data value and a preset target value;
calculating a ratio value of the current data value in the data displayed in each ratio to a preset target value in real time according to the input sequence;
updating a first proportional value in a first order to a first angular axis assignment table of a polar coordinate system corresponding to the first order, wherein the first angular axis assignment table comprises a first starting angle, a first proportional value corresponding angle and a first ending angle, and the first ending angle is equal to the first proportional value corresponding angle plus the first starting angle;
updating a second proportional value in a second order to a second angular axis assignment table of the polar coordinate system corresponding to the second order, wherein the second angular axis assignment table comprises a second starting angle, a second proportional value corresponding angle and a second ending angle, the second ending angle is equal to the second proportional value corresponding angle plus the second starting angle, and the second starting angle is equal to the first ending angle;
and updating the angle axis assignment tables of which the data displayed in all proportions respectively correspond to the polar coordinates according to the assignment modes of the first angle axis assignment table and the second angle axis assignment table.
6. The data display method based on the annular graph as claimed in claim 1, wherein the step of converting the polar coordinate data sets corresponding to the data to be displayed into rectangular coordinate system data in a one-to-one correspondence manner to obtain the annular graph corresponding to the data to be displayed comprises:
acquiring radial axis coordinate data and angle axis coordinate data corresponding to a specified polar coordinate system, wherein the specified polar coordinate system is any polar coordinate system in the polar coordinate data set;
calculating abscissa data in a rectangular coordinate system corresponding to the specified polar coordinate system by using a first calculation formula according to radial axis coordinate data and angle axis coordinate data corresponding to the specified polar coordinate system;
according to the radial axis coordinate data and the angle axis coordinate data corresponding to the specified polar coordinate system, utilizing a second calculation formula to calculate longitudinal coordinate data in a rectangular coordinate system corresponding to the specified polar coordinate system;
converting the polar coordinate data sets into rectangular coordinate systems in a one-to-one correspondence manner according to the conversion manner of the rectangular coordinate systems corresponding to the specified polar coordinate systems to obtain rectangular coordinate data sets;
and operating the rectangular coordinate data set in the canvas to obtain the annular diagram corresponding to the data to be displayed.
7. The data presentation method based on the annular graph according to claim 1, wherein the step of obtaining the number of data presentation types included in the data to be presented input by the user comprises:
creating a canvas label corresponding to a canvas on the html page;
specifying canvas parameters corresponding to the canvas labels corresponding to the canvas;
and setting an index value corresponding to the canvas.
8. A data presentation device based on a ring diagram, comprising:
the acquisition module is used for acquiring the number of data display types contained in the data to be displayed input by a user;
the determining module is used for determining the number of the polar coordinate systems corresponding to the data to be displayed according to the number of the data display types;
the device comprises a creating module, a calculating module and a judging module, wherein the creating module is used for creating polar coordinate systems corresponding to the number of the polar coordinate systems by taking the same point in the canvas as a polar coordinate origin;
the assignment module is used for assigning the data parameters corresponding to the data to be displayed to the parameter configuration table of each polar coordinate system one by one to form a polar coordinate data group corresponding to the data to be displayed;
and the conversion module is used for converting the polar coordinate data groups corresponding to the data to be displayed into rectangular coordinate system data in a one-to-one correspondence manner to obtain an annular diagram corresponding to the data to be displayed.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202011492397.2A 2020-12-16 2020-12-16 Data display method and device based on annular graph and computer equipment Pending CN112612858A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011492397.2A CN112612858A (en) 2020-12-16 2020-12-16 Data display method and device based on annular graph and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011492397.2A CN112612858A (en) 2020-12-16 2020-12-16 Data display method and device based on annular graph and computer equipment

Publications (1)

Publication Number Publication Date
CN112612858A true CN112612858A (en) 2021-04-06

Family

ID=75239870

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011492397.2A Pending CN112612858A (en) 2020-12-16 2020-12-16 Data display method and device based on annular graph and computer equipment

Country Status (1)

Country Link
CN (1) CN112612858A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090024683A1 (en) * 2007-07-19 2009-01-22 Microsoft Corporation N-Dimensional Coordinates Conversion
CN103186700A (en) * 2011-12-28 2013-07-03 国际商业机器公司 Data display method and system based on annular angle
CN103698637A (en) * 2013-12-25 2014-04-02 云南电力调度控制中心 Electric power key indicator abnormity rapid detecting method and device
CN107870911A (en) * 2016-09-23 2018-04-03 腾讯科技(深圳)有限公司 A kind of data visualization methods of exhibiting and equipment
EP3480781A1 (en) * 2017-11-02 2019-05-08 Siemens Aktiengesellschaft Interactive method and system for scaling data plots in distributed control system
CN110516004A (en) * 2019-08-28 2019-11-29 中国人民解放军国防科技大学 Visualization method and system giving consideration to information global characteristics and local hierarchical structure
CN111581208A (en) * 2020-04-21 2020-08-25 北京龙云科技有限公司 Data visualization display method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090024683A1 (en) * 2007-07-19 2009-01-22 Microsoft Corporation N-Dimensional Coordinates Conversion
CN103186700A (en) * 2011-12-28 2013-07-03 国际商业机器公司 Data display method and system based on annular angle
CN103698637A (en) * 2013-12-25 2014-04-02 云南电力调度控制中心 Electric power key indicator abnormity rapid detecting method and device
CN107870911A (en) * 2016-09-23 2018-04-03 腾讯科技(深圳)有限公司 A kind of data visualization methods of exhibiting and equipment
EP3480781A1 (en) * 2017-11-02 2019-05-08 Siemens Aktiengesellschaft Interactive method and system for scaling data plots in distributed control system
CN110516004A (en) * 2019-08-28 2019-11-29 中国人民解放军国防科技大学 Visualization method and system giving consideration to information global characteristics and local hierarchical structure
CN111581208A (en) * 2020-04-21 2020-08-25 北京龙云科技有限公司 Data visualization display method and device

Similar Documents

Publication Publication Date Title
US5377102A (en) Apparatus for preparing map data with regional properties
CN111475163A (en) Method, device and equipment for generating code file of view template and storage medium
CN107992275B (en) Document printing method and device, computer equipment and storage medium
US20030088561A1 (en) Methods for retrieving database with image information
CN101996248B (en) Address lookup method and device
CN102368259A (en) Electronic map data storage and query method, device and system
CN110955803A (en) Drawing method, device, equipment and medium of relational graph based on graph database
US20190171657A1 (en) Geospatial mapping system
CN112612858A (en) Data display method and device based on annular graph and computer equipment
CN113129155B (en) Multi-type personnel information processing method, equipment and storage medium
CN112131332B (en) Information point updating method and device, electronic equipment and computer storage medium
CN113486280A (en) Page rendering display method, device, equipment, storage medium and program product
KR101485108B1 (en) Batch automatic method for coordinate transfer and apparatus for the same
CN112699195A (en) Geospatial data processing method, geospatial data processing device, computer equipment and storage medium
CN108959232B (en) Method and device for generating plan adjustment report forms and computer readable storage medium
CN110807112A (en) Data display method and device based on map
CN107390978B (en) Formula display method and device, terminal and computer readable storage medium
CN113722031A (en) Dynamic display method, device, medium and product of electronic signature
CN114018243A (en) Map data processing method, device, equipment and storage medium
CN111680479A (en) Excel template-based form generation method and device and computer equipment
CN108416747A (en) Element position modification method, device, computer equipment and storage medium
CN112765256A (en) Parallel coordinate axis data visualization method and system
CN111783408B (en) Cell pasting method and device, electronic equipment and storage medium
CN112416503A (en) Applet icon display method, device and equipment and computer readable storage medium
CN114003776B (en) Method, device, equipment and storage medium for generating chart based on middleware

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