A method and device for drawing a Nightingale rose chart

By automatically determining the graphic parameters of Nightingale Rose Diagram, the problem of inefficient manual drawing in existing office software is solved, and the automated drawing of Nightingale Rose Diagram is realized, supporting diversified graphic forms and arrangements.

CN113554730BActive Publication Date: 2025-07-25GUANGZHOU KINGSOFT MOBILE TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010331989.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-24
Publication Date
2025-07-25
Estimated Expiration
2040-04-24

AI Technical Summary

Technical Problem

Existing office software such as WPS office and Microsoft office do not provide the function of quickly drawing Nightingale roses, which leads to users having to draw manually, which is inefficient.

Method used

By obtaining the basic parameters and data values of the chart, the graphical parameters of each data corresponding to the figure are automatically determined, including the outer circle size, position coordinates, starting angle and termination angle, and automatic drawing of the Nightingale rose diagram is realized.

Benefits of technology

The automatic drawing of Nightingale rose diagram is realized, which improves the drawing efficiency, supports solid and hollow graphics, can draw full-week or non-week graphics, and provides a diverse graphic arrangement method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113554730B_ABST
    Figure CN113554730B_ABST
Patent Text Reader

Abstract

A method for drawing a Nightingale rose diagram, comprising: when receiving a command to draw a diagram, obtaining data for drawing the diagram and basic parameters for drawing the diagram; drawing each graph corresponding to the data in the obtained data in the following manner: determining graph parameters for drawing the graph corresponding to the data according to the obtained basic parameters for drawing the diagram and the value of the data; and drawing the graph corresponding to the data according to the determined graph parameters. This application can realize automatic drawing of a Nightingale rose diagram, especially providing an automatic drawing function for users in office software.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to computer technology, and particularly to a method and device for drawing a Nightingale rose diagram. Background Art

[0002] When using office software such as WPS office or Microsoft office, it is sometimes necessary to create a Nightingale rose diagram to display the magnitude of a set of data. However, existing tools do not provide relevant functions for quick drawing, and users can only draw manually, which is often inefficient and consumes a lot of time of users. Summary of the Invention

[0003] This application provides a method and device for drawing a Nightingale rose diagram, which can realize automatic drawing of the Nightingale rose diagram.

[0004] This application provides a method for drawing a Nightingale rose diagram, including: when receiving a command to draw a diagram, obtaining data for drawing the diagram and basic parameters for drawing the diagram; wherein, the diagram is a Nightingale rose diagram; the basic parameters of the diagram include: the total number of data, the maximum value in the data, the diagram position coordinates, the size parameters of the diagram, and the angle parameters of the diagram; for each data corresponding to a graphic in the obtained data, draw the graphic respectively in the following manner: determine graphic parameters for drawing the graphic corresponding to the data according to the obtained basic parameters for drawing the diagram and the value of the data; wherein, the graphic parameters include: outer circle size parameters, position coordinates, start angle, and end angle. Draw the graphic corresponding to the data according to the determined graphic parameters; wherein, each graphic corresponding to the obtained data is a sector in the Nightingale rose diagram.

[0005] In an exemplary embodiment, the determining the graphic parameters for drawing the graphic corresponding to the data according to the obtained basic parameters for drawing the diagram and the value of the data includes one or more of the following operations: determining the outer circle size of the graphic according to the data maximum value, the value of the data, and the size parameters of the diagram; determining the position coordinates of the graphic according to the outer circle radius or diameter of the graphic and the diagram position coordinates; determining the start angle and end angle of the graphic according to the obtained angle parameters of the diagram, the total number of data, and the sequence number of the data.

[0006] In an exemplary embodiment, the size parameter of the chart includes the outer circle size of the chart; or, the size parameter of the chart includes the outer circle size of the chart and the proportion of the inner circle; when the size parameter of the chart includes the outer circle diameter or radius of the chart and the proportion of the inner circle; the method of determining the graphic parameters for drawing the graph corresponding to the data according to the obtained basic parameters for drawing the chart and the value of the data further includes: determining the inner circle size parameter of the graph according to the obtained proportion of the inner circle, the outer circle diameter or radius of the chart, and the outer circle radius or diameter of the graph.

[0007] In an exemplary embodiment, the angle parameter of the chart includes the total angle of the chart; or includes: the total angle of the icon and the starting angle of the first data.

[0008] In an exemplary embodiment, the method further includes: determining the color number filled in each graph and the brightness value corresponding to the color number in the following manner: wherein, the color number of any graph is determined as follows: determining the color number according to the sequence number and the color matching number included in the color matching scheme, and determining the brightness value corresponding to the color number according to the total number of data and the sequence number; displaying each graph according to the determined color number and brightness value.

[0009] In an exemplary embodiment, the inner circle size parameter of the graph is calculated by the following formula:

[0010] P = 0.5 - (CP × 0.5 × CR) / R; where, CP represents the proportion of the inner circle; CR represents the outer circle size parameter of the chart; R represents the outer circle size parameter of the graph; P represents the inner circle size parameter of the graph.

[0011] In an exemplary embodiment, when the size parameter of the chart includes the outer circle diameter or radius of the chart; the outer circle size parameter of the graph is calculated by the following formula: R = D*CR / maxD; where, D represents the data corresponding to the graph; maxD represents the maximum value in the data for drawing the chart; CR represents the outer circle size parameter of the chart; R represents the outer circle diameter of the graph; when the size parameter of the chart includes the outer circle diameter or radius of the chart and the proportion of the inner circle; the outer circle size parameter of the graph is calculated by the following formula: R = (D / (maxD^2 × (1 - CP)) + maxD × CP) × CR / maxD; where, D represents the data corresponding to the graph, CP represents the proportion of the inner circle; maxD represents the maximum value in the data for drawing the chart; CR represents the outer circle size parameter of the chart; R represents the outer circle diameter of the graph.

[0012] In an exemplary embodiment, the abscissa of the graphic position coordinates is calculated by the following formula: X = (CR - R) / 2 + RX; the ordinate of the graphic position coordinates is calculated by the following formula: Y = (CR - R) / 2 + RY; where CR represents the outer circle size parameter of the chart; R represents the outer circle size parameter of the graphic; RX and RY respectively represent the abscissa and ordinate of the chart position; X and Y respectively represent the abscissa and ordinate of the graphic position.

[0013] In an exemplary embodiment, when the angle parameter of the chart includes the total angle of the chart; the starting angle is calculated by the following formula: SA = ((I - 1)×CTA) / C - 90; the ending angle is calculated by the following formula: EA = (I*CTA) / C - 90; where CTA represents the total angle of the chart; C represents the total number of data; I represents the sequence number of the data; SA represents the starting angle of the graphic; EA represents the ending angle; when the angle parameter of the chart includes the total angle of the chart and the starting angle of the first data; the starting angle is calculated by the following formula: SA = ((I - 1)×CTA) / C + CSA - 90; the ending angle is calculated by the following formula: EA = (I*CTA) / C + CSA - 90; where CTA represents the total angle of the chart; C represents the total number of data; CSA represents the starting angle of the first data point; I represents the sequence number of the data; SA represents the starting angle of the graphic; EA represents the ending angle.

[0014] In an exemplary embodiment, the brightness value corresponding to the color number of the graphic is determined by the following formula: L = (0.4*floor(I÷6)) / floor(C÷6) - 0.6^(folor(I÷6)); where C represents the total number of data; I represents the sequence number of the data.

[0015] The present application provides a device for drawing a Nightingale rose chart, including: an acquisition module, configured to acquire data for drawing the chart and basic parameters for drawing the chart when receiving a command to draw the chart; where the basic parameters of the chart include: the total number of data, the maximum value in the data, the chart position coordinates, the outer circle size parameter of the chart, and the total angle of the chart; a drawing module: configured to draw each graphic corresponding to the data in the acquired data respectively in the following manner: determine graphic parameters for drawing the graphic corresponding to the data according to the acquired basic parameters for drawing the chart and the value of the data; where the graphic parameters include: the outer circle size parameter, the position coordinates, the starting angle, and the ending angle; draw the graphic corresponding to the data according to the determined graphic parameters.

[0016] Compared with the related art, the inventors of the present application studied the Nightingale diagram, identified the relationship between the basic parameters of the Nightingale diagram and the parameters of each graph in the diagram, and thus realized the automatic drawing of the Nightingale rose diagram.

[0017] The present application can determine the inner circle parameters, thereby enabling the drawing of solid Nightingale rose diagrams and hollow Nightingale rose diagrams, making them more diverse.

[0018] The present application can determine whether the form of the Nightingale rose diagram is a whole - circumference graph or a non - whole - circumference graph based on the total angle degree of the diagram, making it more diverse.

[0019] Other features and advantages of the present application will be described in the subsequent specification. And, in part, they will become obvious from the specification, or be understood by implementing the present application. Other advantages of the present application can be realized and obtained through the solutions described in the specification and the accompanying drawings. Description of the Drawings

[0020] The drawings are used to provide an understanding of the technical solutions of the present application, and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solutions of the present application, and do not constitute a limitation to the technical solutions of the present application.

[0021] Figure 1 It is a flowchart of the method for drawing the Nightingale rose diagram in the embodiment of the present application;

[0022] Figure 2 It is a partial illustration of the specific flowchart of the method for drawing the Nightingale rose diagram in the embodiment of the present application Figure 1 ;

[0023] Figure 3 It is a partial illustration of the specific flowchart of the method for drawing the Nightingale rose diagram in the embodiment of the present application Figure 2 ;

[0024] Figure 4 It is a partial illustration of the specific flowchart of the method for drawing the Nightingale rose diagram in the embodiment of the present application Figure 3 ;

[0025] Figure 5 It is a schematic diagram of the Nightingale rose diagram in the embodiment of the present application Figure 1 ;

[0026] Figure 6 It is a schematic diagram of the Nightingale rose diagram in the embodiment of the present application Figure 2 ;

[0027] Figure 7 It is a schematic diagram of the position coordinates in the graphic parameters in the embodiment of the present application;

[0028] Figure 8Schematic diagram of the module of the Nightingale rose diagram drawing device according to the embodiments of the present application. Detailed implementation manners

[0029] This application describes multiple embodiments, but the description is exemplary rather than restrictive, and it will be obvious to those of ordinary skill in the art that there can be more embodiments and implementation solutions within the scope covered by the embodiments described in this application. Although many possible feature combinations are shown in the drawings and discussed in the detailed implementation manners, many other combination ways of the disclosed features are also possible. Unless specifically restricted, any feature or element of any embodiment can be combined with any other feature or element in any other embodiment, or can replace any other feature or element in any other embodiment.

[0030] This application includes and contemplates combinations with features and elements known to those of ordinary skill in the art. The embodiments, features, and elements disclosed in this application can also be combined with any conventional features or elements to form a unique inventive solution defined by the claims. Any feature or element of any embodiment can also be combined with features or elements from other inventive solutions to form another unique inventive solution defined by the claims. Therefore, it should be understood that any feature shown and / or discussed in this application can be implemented alone or in any suitable combination. Therefore, except for the limitations made according to the appended claims and their equivalent replacements, the embodiments are not subject to other limitations. In addition, various modifications and changes can be made within the scope of protection of the appended claims.

[0031] In addition, when describing representative embodiments, the specification may have presented the method and / or process as a specific sequence of steps. However, to the extent that the method or process does not depend on the specific order of the steps described herein, the method or process should not be limited to the specific order of steps described. As will be understood by those of ordinary skill in the art, other step sequences are possible. Therefore, the specific order of steps set forth in the specification should not be construed as a limitation on the claims. In addition, the claims directed to the method and / or process should not be limited to performing their steps in the order written, and those skilled in the art can easily understand that these orders can be varied and still remain within the spirit and scope of the embodiments of this application.

[0032] As Figure 1 shown, a method for drawing a Nightingale rose diagram according to this application includes the following operations:

[0033] S1. When receiving a command to draw a chart, obtain the data for drawing the chart and the basic parameters for drawing the chart; wherein, the chart is a Nightingale rose chart; the basic parameters of the chart include: the total number of data, the maximum value in the data, the chart position coordinates, the size parameters of the chart, and the angle parameters of the chart;

[0034] Among them, the total number of data refers to the number of data in the rose chart sectors or the number of data in the rose chart petals when drawing the chart;

[0035] The chart position coordinates refer to the position where the chart is inserted;

[0036] The outer circle size parameter of the chart refers to the maximum outer circle size of the chart, which can be the diameter of the outer circle or the radius of the outer circle;

[0037] The proportion of the inner circle refers to the proportion of the blank circular area inside the chart to the entire outer circle of the chart;

[0038] The starting angle of the graph corresponding to the first data refers to the starting angle of the graph corresponding to the data ranked first in the drawing order, which is used to determine the display mode of each graph in the optimal chart or the graph display mode desired by the user. This angle can be predetermined or determined according to the parameters input by the user;

[0039] The total angle of the chart means that all the graphs in the Nightingale rose chart are arranged in a 360-degree entire circumference as shown in Figure 3 or not arranged in the entire circumference, for example, arranged in 270 degrees as shown in Figure 6 shown.

[0040] S2. Draw each graph corresponding to the data obtained in the following manner:

[0041] S21. Determine the graph parameters for drawing the graph corresponding to the data according to the basic parameters for drawing the chart obtained and the value of the data; wherein, the graph parameters include: the outer circle size parameter, the position coordinates, the starting angle, and the ending angle.

[0042] S22. Draw the graph corresponding to the data according to the determined graph parameters; wherein, each graph corresponding to the data obtained is a sector in the Nightingale rose chart.

[0043] Among them, the outer circle size parameter refers to the radius or diameter of the top arc of the graph;

[0044] The position coordinates refer to the position coordinates of the upper left corner of the rectangle corresponding to the graph, which is used to determine that the graph is centered with all the graphs in the chart, as shown in Figure 7 shown;

[0045] The starting angle and the ending angle are used to define the position and proportion of the figure in the circumferential direction;

[0046] The inner circle size parameter refers to the proportion of the span from the outer circle to the inner circle to the diameter of the outer circle. Generally, the maximum is 0.5 (that is, the inner circle size is 0, and the span from the outer circle to the inner circle occupies the entire radius of the outer circle, but the value is 0.5, so it can be inferred that the software itself calculates the size of the inner circle as P * the diameter of the outer circle), and the minimum is 0 (that is, the inner circle coincides with the outer circle, and the span from the outer circle to the inner circle is 0).

[0047] In an exemplary embodiment, the basic parameters of the chart can be presented through a program to show a basic parameter setting interface for the user to input, or can be predefined according to experience.

[0048] In an exemplary embodiment, the data for drawing the Nightingale rose chart can be the table data selected by the user, such as the data obtained from a table in WPS Office or Microsoft Office.

[0049] Such as Figure 5 and Figure 6 As shown, the Nightingale rose chart is a chart composed of multiple arcs. Each data corresponds to a figure. By drawing the figures corresponding to each data, the Nightingale rose chart is obtained.

[0050] In an exemplary embodiment, each data corresponding figure is drawn by selecting a basic figure, such as a hollow arc. The various figure parameters of the basic figure are modified according to different data, so as to obtain the figures corresponding to each data.

[0051] In an exemplary implementation, the determining of the figure parameters for drawing the figure corresponding to the data according to the obtained basic parameters for drawing the chart and the value of the data in S21 includes one or more of the following operations:

[0052] Operation 1: Determine the outer circle size of the figure according to the maximum value of the data, the value of the data, and the size parameters of the chart;

[0053] Operation 2: Determine the position coordinates of the figure according to the outer circle radius or diameter of the figure and the chart position coordinates;

[0054] Operation 3: Determine the starting angle and the ending angle of the figure according to the obtained angle parameters of the chart, the total number of data, and the sequence number of the data.

[0055] In an exemplary implementation, the size parameters of the chart include the outer circle size of the chart; or, the size parameters of the chart include the outer circle size of the chart and the proportion of the inner circle.

[0056] Generally, in a program, regardless of how many degrees of the 360 degrees an arc occupies, in OFFICE programs, its diameter is equal to its width and height, that is, the diameter is the width and height. When drawing graphics in OFFICE and other office software, generally, the radius or diameter is not used to represent the size of an arc, but the width and height are commonly used. In the embodiments of the present application, using the outer circle size facilitates readers to understand what this size is. Additionally, it enables readers to understand that the drawn graphic must have a width equal to its height (width to height ratio of 1:1). Therefore, the R value calculated in the embodiments of the present application can be regarded as the diameter and also the length and width of the sector.

[0057] In an exemplary embodiment, when the size parameters of the chart include the outer circle diameter or radius of the chart, and the proportion of the inner circle; S21 determining the graphic parameters for drawing the graphic corresponding to the data according to the obtained basic parameters for drawing the chart and the value of the data further includes:

[0058] Operation 4: Determine the inner circle size parameters of the graphic according to the obtained proportion of the inner circle, the outer circle diameter or radius of the chart, and the outer circle radius or diameter of the graphic.

[0059] In an exemplary implementation, the angle parameters of the chart include the total angle of the chart; or include: the total angle of the icon and the starting angle of the first data.

[0060] In an exemplary embodiment, when the size parameters of the chart include the outer circle diameter or radius of the chart; the outer circle size parameters of the graphic are calculated by the following formula:

[0061] R = D * CR / maxD

[0062] Wherein, D represents the data corresponding to the graphic; maxD represents the maximum value in the data for drawing the chart; CR represents the outer circle size parameter of the chart; R represents the outer circle diameter of the graphic;

[0063] When the size parameters of the chart include the outer circle diameter or radius of the chart, and the proportion of the inner circle; the outer circle size parameters of the graphic are calculated by the following formula:

[0064]

[0065] Wherein, D represents the data corresponding to the graphic, CP represents the proportion of the inner circle; maxD represents the maximum value in the data for drawing the chart; CR represents the outer circle size parameter of the chart; R represents the outer circle diameter of the graphic.

[0066] In an exemplary embodiment, the abscissa of the position coordinates of the graphic is calculated by the following formula:

[0067]

[0068] The ordinate of the position coordinates of the figure is calculated by the following formula:

[0069]

[0070] Wherein, CR represents the outer circle size parameter of the chart; R represents the outer circle size parameter of the figure; RX and RY respectively represent the abscissa and ordinate of the chart position; X and Y respectively represent the abscissa and ordinate of the figure position.

[0071] In an exemplary embodiment, obtaining the data for drawing the chart and the basic parameters for drawing the chart in S1 includes: determining the chart position coordinates according to the position of the table where the data is located. Specifically, the position of the cell can be directly taken as the chart position. In other embodiments, the chart position coordinates can be determined according to the cursor position, or can be determined by a pre-specified position, etc.

[0072] In an exemplary embodiment, when the angle parameter of the chart includes the total chart angle;

[0073] The starting angle is calculated by the following formula:

[0074]

[0075] The ending angle is calculated by the following formula:

[0076]

[0077] Wherein, CTA represents the total chart angle; C represents the total number of data; I represents the sequence number of the data; SA represents the starting angle of the figure; EA represents the ending angle;

[0078] When the angle parameter of the chart includes the total chart angle and the starting angle of the first data;

[0079] The starting angle is calculated by the following formula:

[0080]

[0081] The ending angle is calculated by the following formula:

[0082]

[0083] Wherein, CTA represents the total chart angle; C represents the total number of data; CSA represents the starting angle of the first data point; I represents the sequence number of the data; SA represents the starting angle of the figure; EA represents the ending angle.

[0084] In an exemplary embodiment, the inner circle size parameter of the figure is calculated using the following formula:

[0085]

[0086] Wherein, CP represents the proportion of the inner circle; CR represents the outer circle size parameter of the chart; R represents the outer circle size parameter of the figure; P represents the inner circle size parameter of the figure.

[0087] In an exemplary embodiment, the method further includes S3: determining the color number filled in the figure and the brightness value corresponding to the color number.

[0088] In an exemplary embodiment, S3 determining the color number filled in the figure and the brightness value corresponding to the color number includes: determining the color number filled in each figure and the brightness value corresponding to the color number in the following manner: wherein, the color number of any figure is adopted as follows:

[0089] Determine the color number according to the sequence number and the color matching numbers included in the color matching scheme, and determine the brightness value corresponding to the color number according to the total number of data and the sequence number.

[0090] Display each figure according to the determined color number and brightness value respectively.

[0091] In an exemplary embodiment, the determining the color number according to the sequence number and the color matching numbers included in the color matching scheme, and determining the brightness value corresponding to the color number according to the total number of data and the sequence number includes:

[0092] Determine the remainder of the sequence number of the data divided by the total number of remaining colors after removing the text and background colors in the color matching scheme; when the remainder is equal to 0, determine that the color matching number corresponding to the figure is the last color matching number in the color matching scheme; when the remainder is not equal to 0, determine that the color matching number corresponding to the figure is the sum of the remainder and the base color;

[0093] In an exemplary embodiment, the brightness value corresponding to the color number of the figure is determined using the following formula:

[0094]

[0095] Wherein, C represents the total number of data; I represents the sequence number of the data.

[0096] The embodiments of the present invention provide various methods for drawing a Nightingale rose diagram, such as Figure 3 A Nightingale rose diagram without a blank area in the center, and Figure 6 A Nightingale rose diagram with a blank area, also provide a form arranged in a full 360-degree circle, and a form arranged in a non-full circle, and at the same time provide the user with the option to select the arrangement order of the figures.

[0097] When the user needs to draw a solid Nightingale rose chart, the proportion of the inner circle does not need to be obtained when acquiring the chart parameters; on the contrary, when a hollow Nightingale rose chart needs to be drawn, the proportion of the inner circle and the inner circle size parameters of each graph need to be obtained. When the user needs to draw a Nightingale rose chart arranged in a full circle or a non-full circle, the total angle of the chart needs to be set. When the user limits the display position of the graph in the circumferential direction, the starting angle of the graph corresponding to the first data of the graph basic parameters needs to be limited.

[0098] In an exemplary embodiment, the obtaining of the data for drawing the chart and the basic parameters for drawing the chart includes: storing the obtained data for drawing the chart in a preset array; wherein, each data corresponds to an element in the array; determining the total number of the data according to the number of stored elements; determining the maximum value in the data according to the maximum value of the stored elements;

[0099] In an exemplary embodiment, the drawing of each graph corresponding to each data in the obtained data includes: traversing the elements corresponding to each data in the predetermined array to draw each graph corresponding to each data.

[0100] As Figures 2 - 4 shown, a specific embodiment of the method for drawing a Nightingale rose chart in the present application:

[0101] Step 1: According to the data selected by the user, start the command for drawing the chart;

[0102] Step 2: Store the obtained cell range as array A;

[0103] Step 3: Obtain the abscissa RX and ordinate RY of the selected cell range;

[0104] Step 4: Calculate the number of array elements and assign it to variable C;

[0105] Step 5: Calculate the maximum value of the elements in array A and assign it to variable maxD;

[0106] Step 6: Assign variable I the value of 1;

[0107] Step 7: Exit the preset parameter input interface, and the user inputs the following parameters: the outer diameter CR of the chart, the proportion CP of the inner circle diameter, the starting angle CSA of the first data point, the degree CTA of the total angle of the chart

[0108] Step 8: Traverse each element of array A and execute the following step 100: Calculate the outer diameter R for drawing the data point of the chart for the currently traversed array element D (hereinafter referred to as data point D), formula:

[0109]

[0110] 101: Calculate the abscissa X of data point D, formula:

[0111]

[0112] 103: Calculate the ordinate Y of data point D, formula:

[0113]

[0114] 104: Draw a hollow arc self - selected graphic S with width and height both being R at the X and Y positions (this shape will be used as the data point shape of the chart to display the size of data D, hereinafter referred to as S)

[0115] 105: Calculate and set the value SA of adjustment point 1 of S (i.e., the starting angle of the hollow arc), formula:

[0116]

[0117] It can be understood that subtracting 90 in the formula is because the 0 - degree of the hollow arc is at the 3 - o'clock direction of the clock, while the 0 - degree in common sense is at the 0 - o'clock direction of the clock. This is done to conform to common sense.

[0118] 106: Calculate and set the value EA of adjustment point 2 of S (i.e., the ending angle of the hollow arc), formula:

[0119]

[0120] 107: Calculate and set the value P of condition point 3 of S (i.e., the size of the inner circle of the hollow arc), formula:

[0121]

[0122] 108: Judge whether I mod 6 = 0 holds; if yes, calculate and set the color number CI of the color matching scheme to be filled in S, formula: CI = 10; if not, calculate and set the color number CI of the color matching scheme to be filled in S, formula: CI = I mod 6 + 4;

[0123] 109: Judge whether I / 6 > 0 holds; if yes, continue with the following steps;

[0124] 110: Calculate and set the brightness value L of the filling color of S, formula:

[0125]

[0126] 111: Set the border color of graphic S to color number 1 of the color matching scheme;

[0127] 112: Calculate and set the value of variable I, formula: I = I + 1;

[0128] 113: The next array element enters step 100.

[0129] Exemplarily, when the data selected by the user for drawing a Nightingale rose diagram is as shown in the following table, the drawing result obtained by using the above method is as shown below:

[0130] 139 123 159 144 100 148 147 105 146 117 157 136 173 172 140 137 134 126 157 124

[0131] The parameters set by the user obtained: the outer circle diameter CR of the chart = 400 (unit: pound), the proportion CP of the inner circle in the diameter = 0, the starting angle CSA of the first data point = 0, the total angle degree CTA of the chart = 360, and the drawing result is as Figure 5 shown.

[0132] Using the same data for drawing the Nightingale rose diagram as above, the parameters set by the user obtained: the outer circle diameter CR of the chart = 400 (unit: pound), the proportion CP of the inner circle in the diameter = 0.3, the starting angle CSA of the first data point = 225, the total angle degree CTA of the chart = 270; different from the above parameters, the drawing effect is as Figure 6 shown.

[0133] As Figure 8 shown, the drawing device for the Nightingale rose diagram of the present application includes:

[0134] An obtaining module 10, configured to obtain the data for drawing the chart and the basic parameters for drawing the chart when receiving a command for drawing a chart; wherein, the basic parameters of the chart include: the total number of data, the maximum value in the data, the chart position coordinates, the outer circle size parameters of the chart, the proportion occupied by the inner circle, the starting angle of the graph corresponding to the first data, and the total angle of the chart;

[0135] A drawing module 20: configured to draw each graph corresponding to the data in the obtained data in the following manner respectively:

[0136] Determine the graph parameters for drawing the graph corresponding to the data according to the basic parameters for drawing the chart obtained and the value of the data; wherein, the graph parameters include: outer circle size parameters, position coordinates, starting angle, ending angle, and inner circle size parameters.

[0137] Draw the graph corresponding to the data according to the determined graph parameters.

[0138] The present invention provides a drawing device for a Nightingale rose diagram, including a processor and a memory, wherein a program for drawing a Nightingale rose diagram is stored in the memory; the processor is configured to read the program for drawing a Nightingale rose diagram and execute the method according to any one of the above claims

[0139] Those of ordinary skill in the art will understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or a suitable combination thereof. In the hardware implementation, the division of functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be executed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software can be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that a communication medium typically contains computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.

Claims

1. A method for drawing a Nightingale rose diagram, characterized in that, Including: When receiving a command to draw a chart, obtaining data for drawing the chart and basic parameters for drawing the chart; wherein, the chart is a polar area diagram; the basic parameters of the chart include: the total number of data, the maximum value in the data, the chart position coordinates, the size parameters of the chart, and the angle parameters of the chart; Drawing each graph corresponding to each data in the obtained data respectively in the following manner: Determining the graph parameters for drawing the graph corresponding to this data according to the obtained basic parameters for drawing the chart and the value of this data; wherein, the graph parameters include: outer circle size parameters, position coordinates, starting angle, ending angle, and determining the graph parameters for drawing the graph corresponding to this data according to the obtained basic parameters for drawing the chart and the value of this data includes the following operations: determining the outer circle size of the graph according to the data maximum value, the value of this data, and the size parameters of the chart; determining the position coordinates of this graph according to the outer circle radius or diameter of this graph and the chart position coordinates; determining the starting angle and ending angle of this graph according to the obtained angle parameters of the chart, the total number of data, and the sequence number of the data; Drawing the graph corresponding to this data according to the determined graph parameters; Wherein, each graph corresponding to each obtained data is respectively a sector in the polar area diagram.

2. The drawing method of the Nightingale rose diagram according to claim 1, characterized in that, The size parameters of the chart include the outer circle size of the chart; or, the size parameters of the chart include the outer circle size of the chart and the proportion of the inner circle; When the size parameters of the chart include the outer circle diameter or radius of the chart and the proportion of the inner circle; Determining the graph parameters for drawing the graph corresponding to this data according to the obtained basic parameters for drawing the chart and the value of this data further includes: determining the inner circle size parameters of this graph according to the obtained proportion of the inner circle, the outer circle diameter or radius of the chart, and the outer circle radius or diameter of this graph.

3. The drawing method of the Nightingale rose diagram according to claim 1, wherein the angular parameter of the chart includes the total angle of the chart; or includes: The total angle of the icon and the starting angle of the first data.

4. The drawing method of the Nightingale rose diagram according to claim 1, characterized in that, The method further includes: respectively determining the color number filled in each graph and the brightness value corresponding to this color number in the following manner: Wherein, the color number of any graph is adopted in the following manner: Determining the color number according to the sequence number and the color matching number included in the color matching scheme, and determining the brightness value corresponding to the color number according to the total number of data and the sequence number; Displaying each graph respectively according to the determined color number and brightness value.

5. The drawing method of the Nightingale rose diagram according to claim 2, characterized in that The inner circle size parameters of this graph are calculated by the following formula: Wherein, CP represents the proportion of the inner circle; CR represents the outer circle size parameter of the chart; R represents the outer circle size parameter of this graph; P represents the inner circle size parameter of this graph.

6. The drawing method of the Nightingale rose diagram according to claim 2, characterized in that, When the size parameters of the chart include the outer circle diameter or radius of the chart; the outer circle size parameter of this graph is calculated by the following formula: R = D * CR / maxD Wherein, D represents the data corresponding to this graph; maxD represents the maximum value in the data for drawing the chart; CR represents the outer circle size parameter of the chart; R represents the outer circle diameter of this graph; When the size parameters of the chart include the outer circle diameter or radius of the chart and the proportion of the inner circle; the outer circle size parameter of this graph is calculated by the following formula: Wherein, D represents the data corresponding to the graph, CP represents the proportion of the inner circle; maxD represents the maximum value in the data for drawing the graph; CR represents the size parameter of the outer circle of the graph; R represents the diameter of the outer circle of the graph.

7. The drawing method of the Nightingale rose diagram according to claim 2, characterized in that, The abscissa of the position coordinates of the graph is calculated by the following formula: The ordinate of the position coordinates of the graph is calculated by the following formula: Wherein, CR represents the size parameter of the outer circle of the graph; R represents the size parameter of the outer circle of the graph; RX and RY respectively represent the abscissa and ordinate of the graph position; X and Y respectively represent the abscissa and ordinate of the position of the graph.

8. The drawing method of the Nightingale rose diagram according to claim 3, characterized in that, When the angle parameter of the graph includes the total angle of the graph; The starting angle is calculated by the following formula: The ending angle is calculated by the following formula: Wherein, CTA represents the total angle of the graph; C represents the total number of data; I represents the sequence number of the data; SA represents the starting angle of the graph; EA represents the ending angle; When the angle parameter of the graph includes the total angle of the graph and the starting angle of the first data; The starting angle is calculated by the following formula: The ending angle is calculated by the following formula: Wherein, CTA represents the total angle of the graph; C represents the total number of data; CSA represents the starting angle of the first data point; I represents the sequence number of the data; SA represents the starting angle of the graph; EA represents the ending angle.

9. The drawing method of the Nightingale rose diagram according to claim 4, characterized in that, The brightness value corresponding to the color number of the graph is determined by the following formula: Wherein, C represents the total number of data; I represents the sequence number of the data.

10. A drawing device for a Nightingale rose chart, characterized in that, Including: An acquisition module, configured to acquire the data for drawing the graph and the basic parameters for drawing the graph when receiving a command to draw a graph; wherein, the basic parameters of the graph include: the total number of data, the maximum value in the data, the graph position coordinates, the size parameter of the outer circle of the graph, and the total angle of the graph; A drawing module, configured to draw each graph corresponding to each data in the acquired data in the following manner: A drawing module, configured to determine the graph parameters for drawing the graph corresponding to the data according to the acquired basic parameters for drawing the graph and the value of the data; wherein, the graph parameters include: the size parameter of the outer circle, the position coordinates, the starting angle, and the ending angle; the determining the graph parameters for drawing the graph corresponding to the data according to the acquired basic parameters for drawing the graph and the value of the data includes the following operations: determining the size of the outer circle of the graph according to the maximum value of the data, the value of the data, and the size parameters of the graph; determining the position coordinates of the graph according to the outer radius or diameter of the graph and the graph position coordinates; determining the starting angle and the ending angle of the graph according to the acquired angle parameters of the graph, the total number of data, and the sequence number of the data A drawing module, configured to draw the graph corresponding to the data according to the determined graph parameters.

11. A device for drawing a Nightingale rose diagram, characterized in that, Including a processor and a memory, characterized in that, a program for drawing a Nightingale rose diagram is stored in the memory; the processor is configured to read the program for drawing a Nightingale rose diagram and execute the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Method and device for automatically creating radar graph

    CN101339665A

  • Webpage chart drawing method and device, computer equipment and storage medium

    CN109656652A