[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN109254976A - A kind of method for drafting of figure, device, electronic equipment and storage medium - Google Patents

A kind of method for drafting of figure, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109254976A
CN109254976A CN201710561320.8A CN201710561320A CN109254976A CN 109254976 A CN109254976 A CN 109254976A CN 201710561320 A CN201710561320 A CN 201710561320A CN 109254976 A CN109254976 A CN 109254976A
Authority
CN
China
Prior art keywords
data
value
parameter
axis
component data
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
CN201710561320.8A
Other languages
Chinese (zh)
Inventor
杨明哲
陈文平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Group Beijing Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Beijing 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 China Mobile Communications Group Co Ltd, China Mobile Group Beijing Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201710561320.8A priority Critical patent/CN109254976A/en
Publication of CN109254976A publication Critical patent/CN109254976A/en
Pending legal-status Critical Current

Links

Classifications

    • 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

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a kind of method for drafting of figure, device, electronic equipment and storage mediums, bring poor experience to user to solve the problem of that the corresponding data of the parameter required when needing user by graphing are manually entered.This method comprises: receiving the graphic plotting request of user, the metadata parameters for carrying out graphic plotting are provided a user;According to the first metadata parameters that user selects, query statement is generated, wherein the first metadata parameters include at least: the parameter of the abscissa of figure and the parameter of ordinate;According to query statement and preconfigured service database, each target array corresponding with the first metadata parameters is determined;According to the type for the figure for including in each target array and the first metadata parameters, the parameter of the cross of figure, ordinate, graphing is simultaneously shown.It since data required when in embodiments of the present invention, not needing user for graphing are manually entered, is brought convenience to user, improves the experience of user.

Description

A kind of method for drafting of figure, device, electronic equipment and storage medium
Technical field
The present invention relates to data analysis technique field, in particular to a kind of method for drafting of figure, device, electronic equipment and Storage medium.
Background technique
With the continuous amplification of various businesses, business datum is also constantly increasing, in order to accurately understand business datum Variation tendency, the business datum that usual user can be analysed to is depicted as figure, is shown analysis, such as be depicted as histogram Figure, line chart etc..Analysis business datum is shown by way of figure, makes the variation of user's more intuitive understanding business datum Situation.
In the prior art, when user wants to be shown analysis to the variation tendency of business datum by way of figure, The type of determining figure is usually required, and the data analyzed will be needed to be input in the corresponding parameter of graphic plotting tool. For example, certain user wants to understand the situation of change of 2015 to 2017 incomes, the first class of the determining figure to be drawn of user Type, and determine horizontal, the corresponding parameter of ordinate, for example, the type for the figure drawn is line chart, the parameter of abscissa is day Phase, the parameter of ordinate are Revenue (unit: member), and when drawing the line chart, drawing tool can provide a tables of data, user 2015 to 2017 Revenues and corresponding date are filled up in tables of data, such as filled in January, 2015: 5000; 2 months: 5500 ... 2015, drawing tool then generated corresponding line chart according to the tables of data that user fills in, for customer analysis.
The prior art is every time in graphing, required parameter and corresponding data when being required to user for graphing It is filled in, greatly wastes manpower and time in this way, it is very inconvenient, and it is possible to fill in mistake, cause figure exhibition Show inaccuracy, poor usage experience is brought to user.
Summary of the invention
The embodiment of the invention discloses a kind of method for drafting of figure, device, electronic equipment and storage mediums, to solve The corresponding data of required parameter are manually entered when needing user in the prior art for graphing, are brought to user poor The problem of experience.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of method for drafting of figure, which comprises
The graphic plotting request for receiving user, the metadata parameters for carrying out graphic plotting are provided to the user;
According to the first metadata parameters that user selects, query statement is generated, wherein first metadata parameters are at least It include: the parameter of the abscissa of figure and the parameter of ordinate;
According to the query statement and preconfigured service database, determination is corresponding with first metadata parameters Each target array;
According to the type for the figure for including in each target array and first metadata parameters, the abscissa of figure The parameter of parameter and ordinate, graphing are simultaneously shown.
Further, the type according to the figure for including in each target array and first metadata parameters, The parameter of the abscissa of figure and the parameter of ordinate, graphing include:
For each target array, corresponding first component data of parameter of the abscissa in the target array is extracted, and First component data and second component data are constituted subnumber group by the corresponding second component data of the parameter of ordinate;
According to the length and width of the painting canvas pre-saved, corresponding first number of components of each of extraction target array According to second component data, graphing.
Further, the length and width for the painting canvas that the basis pre-saves, each of extraction target array pair The first component data and second component data, graphing answered include:
Identify in the first maximum value in first component data and the first minimum value and second component data Second minimum value of two maximum value sums;
According to the of the width of painting canvas and length, first maximum value and the first minimum value, the second maximum value sum Two minimum values, and the maximum radius pre-saved determine the data area that X-axis is shown and the data area that Y-axis is shown;
For each subnumber group, according in the width of painting canvas and length, the subnumber group the first component data and second point Data are measured, and the data area that the data area that shows of X-axis and Y-axis determined is shown, determines the subnumber group on painting canvas Display position.
Further, described according to the width and length of painting canvas, first maximum value and the first minimum value, described second Maximum value and the second minimum value, and the maximum radius pre-saved determine data area and Y that the X-axis in reference axis is shown The data area that axis is shown includes:
According to formula:
Xmax 2=Xmax 1+ (Xmax 1-Xmin 1)/Width*Rmax, determines the maximum data value that X-axis is shown;
Xmin 2=Xmin 1- (Xmax 1-Xmin 1)/Width*Rmax, determines the minimum data value that X-axis is shown;
Ymax 2=Ymax 1+ (Ymax 1-Ymin 1)/Lenght*Rmax, determines the maximum data value that Y-axis is shown;
Ymin 2=Ymin 1- (Ymax 1-Ymin 1)/Length*Rmax, determines the minimum data value that Y-axis is shown;
Wherein, Xmax 2 is the maximum data value that X-axis is shown, Xmin 2 is the minimum data value that X-axis is shown, Ymax 2 is The maximum data value that Y-axis is shown, Ymin 2 are the minimum data value that show of Y-axis, and Xmax 1 is the first maximum value, and Xmin 1 is the One minimum value, Ymax 1 are the second maximum value, and Ymin 1 is the second minimum value, and Width is the width of painting canvas, and Lenght is painting canvas Length, Rmax is the maximum radius pre-saved.
Further, the width and length according to painting canvas, the first component data and second component in the subnumber group Data, and the data area that the data area that show of X-axis and Y-axis that determine are shown, determine the subnumber group showing on painting canvas Show that position includes:
According to formula:
Rx=(X-Xmin 2)/(Xmax2-Xmin2) * Width determines the numerical value of the subnumber group on the width of painting canvas;
Ry=(Y-Ymin 2)/(Ymax2-Ymin2) * Length determines the numerical value of the subnumber group in the length of painting canvas;
Wherein, Rx is numerical value of the subnumber group on the width of painting canvas, and Ry is numerical value of the subnumber group in the length of painting canvas, X For the first component data in the subnumber group, Y is the second component data in the subnumber group.
Further, in first metadata parameters further include: quantization parameter;
The method also includes:
The corresponding each third component data of quantization parameter in each target array is extracted, according to preset maximum radius And the value of least radius and the corresponding third component data of each data point, determine the display radius of each data point.
Further, the method also includes:
For the corresponding data point of each subnumber group, according to adjacent each corresponding first component data of two data points and Second component data, the number of the data point after preset division and preset algorithm, two data points adjacent between this Line be smoothed, and show.
Further, the preset algorithm includes:
Secondary Bezier algorithm.
The embodiment of the invention discloses a kind of drawing apparatus of figure, described device includes:
Receiving module, the graphic plotting for receiving user are requested, and the first number for carrying out graphic plotting is provided to the user According to parameter;
Generation module, the first metadata parameters for being selected according to user generate query statement, wherein described first yuan Data parameters include at least: the parameter of the abscissa of figure and the parameter of ordinate;
Determining module, for determining and described first according to the query statement and preconfigured service database The corresponding each target array of metadata parameters;
Drafting module, for the type according to the figure for including in each target array and first metadata parameters, The parameter of the abscissa of figure and the parameter of ordinate, graphing are simultaneously shown.
The embodiment of the invention discloses a kind of electronic equipment, the electronic equipment includes: memory, processor and transmitting-receiving Machine;
The transceiver, the graphic plotting for receiving user under the control of a processor are requested;
The processor executes following process: realizing following steps: to institute for reading the program in the memory It states user and the metadata parameters for carrying out graphic plotting is provided;According to the first metadata parameters that user selects, query statement is generated, Wherein first metadata parameters include at least: the parameter of the abscissa of figure and the parameter of ordinate;According to the inquiry Sentence and preconfigured service database determine each target array corresponding with first metadata parameters;According to The type for the figure for including in each target array and first metadata parameters, the parameter and ordinate of the abscissa of figure Parameter, graphing simultaneously shows.
Further, the processor is specifically used for being directed to each target array, extracts the abscissa in the target array Corresponding first component data of parameter and ordinate the corresponding second component data of parameter, by first component data Subnumber group is constituted with second component data;According to the length and width of the painting canvas pre-saved, each of extraction number of targets Corresponding first component data of group and second component data, graphing.
Further, the processor, specifically for identifying the first maximum value and first in first component data Second minimum value of the second maximum value sum in minimum value and second component data;According to the width of painting canvas and length, described Second minimum value of the first maximum value and the first minimum value, the second maximum value sum, and the maximum radius pre-saved, really Determine the data area that X-axis is shown and the data area that Y-axis is shown;For each subnumber group, according to the width of painting canvas and length, it is somebody's turn to do The first component data and second component data in subnumber group, and the number that the data area that shows of X-axis and Y-axis that determine are shown According to range, the display position of the subnumber group on painting canvas is determined.
Further, the processor is specifically used for according to formula:
Xmax 2=Xmax 1+ (Xmax 1-Xmin 1)/Width*Rmax, determines the maximum data value that X-axis is shown;
Xmin 2=Xmin 1- (Xmax 1-Xmin 1)/Width*Rmax, determines the minimum data value that X-axis is shown;
Ymax 2=Ymax 1+ (Ymax 1-Ymin 1)/Lenght*Rmax, determines the maximum data value that Y-axis is shown;
Ymin 2=Ymin 1- (Ymax 1-Ymin 1)/Length*Rmax, determines the minimum data value that Y-axis is shown;Its In, Xmax 2 is the maximum data value that X-axis is shown, Xmin 2 is the minimum data value that X-axis is shown, Ymax 2 is what Y-axis was shown Maximum data value, Ymin 2 are the minimum data value that Y-axis is shown, Xmax 1 is the first maximum value, and Xmin 1 is the first minimum value, Ymax 1 is the second maximum value, and Ymin 1 is the second minimum value, and Width is the width of painting canvas, and Lenght is the length of painting canvas, Rmax is the maximum radius pre-saved.
Further, the processor is specifically used for according to formula:
Rx=(X-Xmin 2)/(Xmax2-Xmin2) * Width determines the numerical value of the subnumber group on the width of painting canvas;
Ry=(Y-Ymin 2)/(Ymax2-Ymin2) * Length determines the numerical value of the subnumber group in the length of painting canvas;
Wherein, Rx is numerical value of the subnumber group on the width of painting canvas, and Ry is numerical value of the subnumber group in the length of painting canvas, X For the first component data in the subnumber group, Y is the second component data in the subnumber group.
Further, in first metadata parameters further include: quantization parameter;
The processor is also used to extract the corresponding each third component data of quantization parameter in each target array, According to the value of preset maximum radius and least radius and the corresponding third component data of each data point, every number is determined The display radius at strong point.
Further, the processor is also used to for the corresponding data point of each subnumber group, according to two adjacent numbers Each corresponding first component data in strong point and second component data, the number of the data point after preset division and preset Algorithm, the line two data points adjacent between this is smoothed, and is showed.
The embodiment of the invention discloses a kind of electronic equipment, comprising: processor, communication interface, memory and communication bus, Wherein, processor, communication interface, memory complete mutual communication by communication bus;
It is stored with computer program in the memory, when described program is executed by the processor, so that the place The step of reason device executes the method for any of the above-described graphic plotting.
The embodiment of the invention discloses a kind of computer readable storage medium, it is stored with the meter that can be executed by electronic equipment Calculation machine program, when described program is run on the electronic equipment, so that the electronic equipment executes any of the above-described figure and draws The step of method of system.
The embodiment of the invention discloses a kind of method for drafting of figure, device, electronic equipment and storage medium, this method packets It includes: receiving the graphic plotting request of user, the metadata parameters for carrying out graphic plotting are provided to the user;It is selected according to user The first metadata parameters, generate query statement, wherein first metadata parameters include at least: the ginseng of the abscissa of figure Several and ordinate parameter;According to the query statement and preconfigured service database, determining and first yuan of number According to the corresponding each target array of parameter;According to the class for the figure for including in each target array and first metadata parameters Type, the parameter of the abscissa of figure and the parameter of ordinate, graphing are simultaneously shown.Due in embodiments of the present invention, according to The parameter of the cross of user's selection, ordinate, generates query statement, according to query statement and preconfigured service database, Determine target array, and then according to target array, the transverse and longitudinal of the type of figure and figure, the parameter of coordinate, graphing.No Required data are manually entered when needing user for graphing, are brought conveniently to user, are improved the experience of user.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of drawing process schematic diagram for figure that the embodiment of the present invention 1 provides;
Fig. 2 is a kind of electronic equipment internal structure chart provided in an embodiment of the present invention;
Fig. 3 is a kind of flow chart of graphing provided in an embodiment of the present invention;
Fig. 4 is a kind of four-quadrant diagram provided in an embodiment of the present invention;
Fig. 5 is a kind of drawing apparatus structure chart for figure that the embodiment of the present invention 5 provides;
Fig. 6 is the schematic diagram for a kind of electronic equipment that the embodiment of the present invention 6 provides;
Fig. 7 is the schematic diagram for a kind of electronic equipment that the embodiment of the present invention 7 provides.
Specific embodiment
Required data when in order to obtain graphing automatically improve user experience, the embodiment of the invention provides A kind of method for drafting of figure, device, electronic equipment and storage medium.
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Embodiment 1:
Fig. 1 is the drawing process schematic diagram of a kind of figure that the embodiment of the present invention 1 provides, the process the following steps are included:
S101: the graphic plotting request of user is received, the metadata parameters for carrying out graphic plotting are provided to the user.
The method for drafting of figure provided in an embodiment of the present invention is applied to electronic equipment.
User wants graphing in the electronic device, after entering drawing interface, electronic equipment can provide a user into The metadata parameters of row graphic plotting, user can according to their own needs select metadata parameters, metadata parameters Such as it can be the type etc. of income, province, population, time and figure.
S102: the first metadata parameters selected according to user generate query statement, wherein first metadata parameters It includes at least: the parameter of the abscissa of figure and the parameter of ordinate.
User selects the first metadata parameters according to the metadata parameters that electronic equipment provides, and electronic equipment is selected according to user The first metadata parameters selected generate query statement, the specific can be that, metadata parameters library is pre-saved in electronic equipment, And the mode of query statement is generated, after user has selected the first metadata parameters, electronic equipment can be according to first yuan The generating mode of data parameters and query statement generates query statement.Query statement can be structured query language (Structured Query Language, SQL) sentence.Under normal circumstances, user wants graphing, can draw and meet certainly The figure of the type of own demand, and horizontal, ordinate parameter will also meet the demand of oneself in the figure of drafting, so, User should include at least when selecting the first metadata parameters: the parameter and ordinate of the abscissa of the type and figure of figure Parameter.
The type of figure for example can be, line chart, histogram etc..
The parameter of abscissa includes at least one characteristic parameter and the corresponding content of characteristic parameter, the parameter packet of ordinate Include at least one characteristic parameter and the corresponding content of characteristic parameter.Characteristic parameter in the parameter of abscissa for example can be receipts Enter, province etc., the characteristic parameter in the parameter of ordinate for example can be date, population etc..
The characteristic parameter for including in the parameter of the characteristic parameter and ordinate that include in the parameter of abscissa can be completely It is different, it is also possible to have that part is identical, generally, a characteristic parameter cannot be chosen as the parameter of abscissa simultaneously and vertical sit Target parameter, if this feature parameter is selected as the parameter of abscissa by user, this feature parameter cannot be chosen as ordinate Parameter.
Some characteristic parameter is province, and corresponding content for example can be for Hebei province, Shaanxi Province, Shandong Province etc., some Characteristic parameter is the date, and corresponding content can be for example the August in -2017 years 2015 or -2017 years in March, 2017 Deng.
It is province that user, which can choose the corresponding parameter of abscissa, and selects Hebei province, selects the corresponding parameter of ordinate For the time, and select the August in -2017 years in March, 2017.
The first metadata parameters that electronic equipment is selected according to user generate query statement, primarily to inquiry is being drawn Required data, unrelated with the type of figure when shape of charting, so when generating query statement, it, can not in order to simpler Using the type of figure as the call parameter for generating query statement.
S103: determining to join with first metadata according to the query statement and preconfigured service database The corresponding each target array of number.
Service database is pre-saved in electronic equipment, service database can be user configuration into electronic equipment 's.Electronic equipment is in order to obtain the data required in graphing, can be according to the inquiry of generation after generating query statement Sentence and preconfigured service database determine each target array corresponding with first metadata parameters.Each mesh Mark each corresponding component data of parameter that the parameter and ordinate of abscissa are included at least in array.According to query statement and business Database determines that the process of target array belongs to the prior art, in embodiments of the present invention to this without repeating.
S104: according to the type for the figure for including in each target array and first metadata parameters, the cross of figure The parameter of coordinate and the parameter of ordinate, graphing are simultaneously shown.
When electronic equipment has determined the type of figure, parameter, the parameter of ordinate of abscissa, and cross, ordinate The corresponding each target array of parameter, so that it may graphing, and by the pattern exhibition of drafting to user.
In graphing, the specific can be that, for each target array, extract the abscissa in the target array The corresponding second component data of parameter of corresponding first component data of parameter and ordinate, by the first component data and second Component data constitutes a sub- array, the corresponding data point of each subnumber group, according to each first component data and each the Two component datas determine reference axis, and in conjunction with the size of the display screen of electronic equipment, each data point is shown in reference axis.
Due in embodiments of the present invention, according to the parameter of the cross of user's selection, ordinate, generating query statement, according to Query statement and preconfigured service database, determine target array, so according to target array, the type of figure and Transverse and longitudinal, the parameter of coordinate of figure, graphing.Required data are manually entered when not needing user for graphing, It is brought conveniently to user, improves the experience of user.
Embodiment 2:
The painting canvas for graphing is preserved in general electronic equipment, painting canvas has its corresponding length and width, painting canvas Size and electronic equipment display screen size can different from, in order to make the figure drawn be more in line with the need of user It asks, and figure is more aesthetically showed into user in the canvas area that electronic equipment is specified, on the basis of above-described embodiment On, in embodiments of the present invention, the class according to the figure for including in each target array and first metadata parameters Type, the parameter of the abscissa of figure and the parameter of ordinate, graphing include:
For each target array, corresponding first component data of parameter of the abscissa in the target array is extracted, and First component data and second component data are constituted subnumber group by the corresponding second component data of the parameter of ordinate;
According to the length and width of the painting canvas pre-saved, corresponding first number of components of each of extraction target array According to second component data, graphing.
In embodiments of the present invention, the painting canvas for graphing is preserved in electronic equipment, and preserves painting canvas Length and width.It, can be for each after electronic equipment has determined each target array corresponding with the first metadata parameters The parameter of target array, corresponding first component data of parameter and ordinate that extract the abscissa in the target array is corresponding Second component data, the first component data and second component data are constituted into a sub- array, each subnumber group is one corresponding Data point.
Electronic equipment can be according to the length and width of the painting canvas pre-saved, and each target array extracted is corresponding The first component data and the first component data and second component data in second component data, that is, each subnumber group, Graphing.
In the length and width according to the painting canvas pre-saved, and corresponding first component of each target array extracted Data and second component data when graphing, can be and arrange reference axis on painting canvas, draw in the width direction of painting canvas X-axis in reference axis, Y-axis is carried out with the length of painting canvas corresponding, that is, X-axis is parallel with the broadside of painting canvas, Y-axis and painting canvas Long side it is parallel, be also possible to carry out the Y-axis in reference axis with the width of painting canvas it is corresponding, by X-axis and the length of painting canvas into Row corresponds to.
If the X-axis in reference axis is carried out with the width of painting canvas it is corresponding, Y-axis is carried out with the length of painting canvas it is corresponding, Can determine position of the origin of reference axis on painting canvas first, and according to the length and width of painting canvas, the first component data and The numerical value of second component data, it is reasonable to determine X-axis numerical value corresponding with the unit length of Y-axis, then according to the first number of components According to the numerical value with second component data, X-axis numerical value corresponding with the unit length of Y-axis determines each data point, that is, each Display position of the subnumber group in painting canvas.
General user will not be such that data point is located on the boundary line of painting canvas in graphing, but on the boundary of painting canvas Line position is slightly left white, so that the figure drawn out is more beautiful, in embodiments of the present invention, the picture that the basis pre-saves The length and width of cloth, corresponding first component data of each of extraction target array and second component data draw figure Shape includes:
Identify in the first maximum value in first component data and the first minimum value and second component data Second minimum value of two maximum value sums;
According to the of the width of painting canvas and length, first maximum value and the first minimum value, the second maximum value sum Two minimum values, and the maximum radius pre-saved determine the data area that X-axis is shown and the data area that Y-axis is shown;
For each subnumber group, according in the width of painting canvas and length, the subnumber group the first component data and second point Data are measured, and the data area that the data area that shows of X-axis and Y-axis determined is shown, determines the subnumber group on painting canvas Display position.
In embodiments of the present invention, in the length and width according to the painting canvas pre-saved, each of extraction target Corresponding first component data of array and second component data when graphing, can be identified first in first component data The first maximum value and the second maximum value sum in the first minimum value and second component data the second minimum value, according to picture The width and length of cloth, the first maximum value in the first component data and second in the first minimum value, second component data are most Second minimum value of big value sum, and the maximum radius pre-saved determine that range that X-axis data are shown and Y-axis data are shown Range, and determine the display model of corresponding data in the indication range of corresponding data and the length of painting canvas on the width of painting canvas It encloses.
Abscissa is corresponded to the width of painting canvas, the length of painting canvas corresponds to ordinate, specifically, can be, according to formula:
Xmax 2=Xmax 1+ (Xmax 1-Xmin 1)/Width*Rmax, determines the maximum data value that X-axis is shown;
Xmin 2=Xmin 1- (Xmax 1-Xmin 1)/Width*Rmax, determines the minimum data value that X-axis is shown;
Ymax 2=Ymax 1+ (Ymax 1-Ymin 1)/Lenght*Rmax, determines the maximum data value that Y-axis is shown;
Ymin 2=Ymin 1- (Ymax 1-Ymin 1)/Length*Rmax, determines the minimum data value that Y-axis is shown;
Wherein, Xmax 2 is the maximum data value that X-axis is shown, Xmin 2 is the minimum data value that X-axis is shown, Ymax 2 is The maximum data value that Y-axis is shown, Ymin 2 are the minimum data value that show of Y-axis, and Xmax 1 is the first maximum value, and Xmin 1 is the One minimum value, Ymax 1 are the second maximum value, and Ymin 1 is the second minimum value, and Width is the width of painting canvas, and Lenght is painting canvas Length, Rmax is the maximum radius pre-saved.
The minimum data value that the maximum data value and X-axis shown according to X-axis is shown determines the data area that X-axis is shown, root The minimum data value that the maximum data value and Y-axis shown according to Y-axis is shown determines that the data area that Y-axis is shown, that is, X-axis are shown Data area be maximum data value that minimum data value to the X-axis that show of X-axis is shown, the data area that Y-axis is shown shows for Y-axis The maximum data value that minimum data value to the Y-axis shown is shown.
Then, for each subnumber group, according to the first component data and in the width of painting canvas and length, the subnumber group Two component datas, and the data area that the data area that shows of X-axis and Y-axis that determine are shown, determine the subnumber group in painting canvas On display position.
Specifically, can be according to formula:
Rx=(X-Xmin 2)/(Xmax2-Xmin2) * Width determines the numerical value of the subnumber group on the width of painting canvas;
Ry=(Y-Ymin 2)/(Ymax2-Ymin2) * Length determines the numerical value of the subnumber group in the length of painting canvas;
Wherein, Rx is numerical value of the subnumber group on the width of painting canvas, and Ry is numerical value of the subnumber group in the length of painting canvas, X For the first component data in the subnumber group, Y is the second component data in the subnumber group.
But in order to make the figure drawn be more in line with the demand of user, user is made preferably to analyze data according to figure, It, can be after having determined display position of the subnumber group on painting canvas in graphing, then arrange that reference axis is aobvious on painting canvas Show position, the X-axis in reference axis and axis are to carry out region division to the display position of sub- array i.e. data point.It determines and sits Display position of the intersection point of the namely determining X-axis in display position of the parameter on painting canvas and Y-axis in reference axis, is determining intersection point When, the X-axis and Y in reference axis can be determined according to corresponding first component data of each target array and second component data The corresponding first object classification data of the intersection point of axis and the second target component data, the specific can be that by the first component data Minimum value or intermediate value or maximum value be determined as first object classification data, by second component data minimum value or in Value or maximum value are determined as the second target component data.
Electronic equipment internal structure chart as shown in Figure 2, includes represent layer, data Layer and data source in electronic equipment, and one As electronic equipment in graphing, the drawing interface that user can see is known as represent layer, to provide the user with metadata The figure that parameter and displaying are drawn relies primarily on the graph drawing engine in represent layer in graphing.When user wants On an electronic device when graphing, user is initially entered, and represent layer requests to carry out the metadata ginseng of graphic plotting to data Layer Number, metadata parameters are stored in the metadata parameters library of data source, and user selects the first metadata parameters, and represent layer is to data Layer sends the data acquisition request for carrying the first metadata parameters.Represent layer is interacted with data Layer by blaze agreement.
Data Layer uses traditional Spring frame, and data Layer is obtained in the data for receiving represent layer transmission, accesses first number According to parameter library, the first metadata parameters are parsed, and generate query statement according to metadata configurations, that is, according to first The generating mode of metadata parameters and query statement generates SQL statement.According to the SQL statement of generation, the industry in data source is accessed Business database, obtains data required when graphing, that is, according to the query statement and preconfigured business number According to library, each target array corresponding with first metadata parameters is determined.Data Layer and data source are handed over by JDBC mode Mutually.
Data in service database are not distinctly claimed, as long as meeting true table, metadata parameters library is basis What service database was configured.
For data Layer after getting data i.e. target array, each target array that can be extracted is first point corresponding Amount data and second component data identify maximum value therein, minimum value, the specific data processing engine in data Layer Carry out identifying processing.When each target array is sent to represent layer, the maximum of the first component data identified can be marked The maximum value and minimum value of value and minimum value and second component data, such represent layer can reduce workload, and figure Drawing engine can determine corresponding on the width of painting canvas first according to the width and length of maximum value, minimum value and painting canvas The indication range of corresponding data in the indication range of data and the length of painting canvas.Then further according in each target data One component data and second component data determine display position of the data point on painting canvas.
Data Layer, can be with used figure organization object to target when the corresponding data of target array are sent to represent layer Data in array are packaged according to format needed for graphic plotting, are then forwarded to represent layer, are packaged term to data The prior art, in embodiments of the present invention to the process without repeating.
Embodiment 3:
In graphing, horizontal, ordinate the corresponding data of parameter can be not only shown on figure, can also be shown The corresponding data of the third parameter can be in order to make user quickly and accurately understand the size of the corresponding data of the third parameter It is to indicate the corresponding data of the third parameter by the size of each data point in figure.In the base of the various embodiments described above On plinth, in embodiments of the present invention, in first metadata parameters further include: quantization parameter;
The method also includes:
The corresponding each third component data of quantization parameter in each target array is extracted, according to preset maximum radius And the value of least radius and the corresponding third component data of each data point, determine the display radius of each data point.
In embodiments of the present invention, further include quantization parameter in the first metadata parameters of user's selection, pass through data point The corresponding third component data of size reflection quantization parameter size, generally, the value of third component data is bigger, corresponding number Strong point is also bigger, and the value of third component data is smaller, and corresponding data point is also just smaller.
It also include quantization in the query statement of generation in the first metadata parameters of user's selection when including quantization parameter Parameter, then according to including the corresponding third component data of quantization parameter in the determining target array of query statement, electronic equipment can To extract the corresponding each third component data of the quantization parameter in each target array, specifically, electronic equipment is determining mesh When marking array, position of the corresponding component data of each parameter in target array can be preserved, therefore can accurately extract Corresponding first component data of the parameter of abscissa, the corresponding second component data of parameter of ordinate and quantization parameter are corresponding Third component data.
Maximum radius and the corresponding value of least radius are preserved in electronic equipment, when being extracted each third component data Afterwards, each data can be determined according to maximum radius, the value of least radius and the corresponding third component data of each data point The display radius of point.The wherein method of determination of data point are as follows: be directed to each target array, extract the abscissa in the target array Corresponding first component data of parameter and ordinate the corresponding second component data of parameter, by the first component data and Two component datas constitute a sub- array, the corresponding data point of each subnumber group.
The specific can be that the radius of the corresponding data point of maximum value in third component data is determined as maximum half The radius of the corresponding data point of minimum value in third component data is determined as least radius, other third component datas by diameter The radius of corresponding data point, determines under a proportional relationship.
In the radius for determining data point, the graph drawing engine that can be in the represent layer in Fig. 2 carries out calculating determination , but in order to save the workload of represent layer, it is also possible to the data processing engine in data Layer and each data point has been determined After showing radius, it is sent to represent layer.
Embodiment 4:
When the type that user wants the figure drawn is tendency chart, the line between two data points can be straight line, with The variation tendency of the data between two data points is indicated, in order to keep the line before data point more beautiful, to user with dynamic Feeling, on the basis of the various embodiments described above, in embodiments of the present invention, the method also includes:
For the corresponding data point of each subnumber group, according to adjacent each corresponding first component data of two data points and Second component data, the number of the data point after preset division and preset algorithm, two data points adjacent between this Line be smoothed, and show.
In embodiments of the present invention, each subnumber group corresponds to a data point, and number a little is pre-saved in electronic equipment Amount and algorithm can be when the line between two adjacent data points to be smoothed according to two adjacent numbers Corresponding first component data of each data point and second component data in strong point, the quantity of preset point and preset Algorithm, the line between two data points adjacent to this is smoothed, and is showed.
Line between two data points adjacent to this is smoothed, that is, determines that the point of preset quantity is each right The data answered, i.e., the first component data and second component data in subnumber group.Then using determining subnumber group on painting canvas The mode of display position shows corresponding position of each data point on painting canvas, and connects to preset quantity data point It connects.
The preset algorithm can be secondary Bezier algorithm.
Specifically, smoothly being located according to secondary Bezier algorithm to the line between two adjacent data points When reason, determined according to the function B (t) of fixed point P0, P1, P2, wherein
B (t)=(1-t)2P0+2t(1-t)P1+t2The constant interval of P2, t are 0-1.
In embodiments of the present invention, the forward data point in using P0 as two data points, that is, line is corresponding Beginning data point, using P1 as the data point rearward in two data points, that is, the corresponding end data point of line, P2 For the intermediate data points between corresponding two data points of line, preferably, the corresponding data point of P2 is that two data points are corresponding The intermediate value of data, it is, the first component data of P2 is the intermediate value of the first component data of P1 and P0, the second component number of P2 According to the intermediate value of the second component data for P1 and P0.The constant interval of t is split, the number of segmentation adds 1 to be data point Quantity be preferably divided into a with and the constant interval of t divided equally, then the quantity of data point be N=1/a, by P0, P1, The component data of the corresponding data point of P2 and the value of t are updated in function B (t), that is, can determine that each in N number of data point Data point represent component data, N number of data point is attached, then can to the line between two adjacent data points into Row smoothing processing.
For example, the corresponding data of the corresponding beginning data point P0 of the line being smoothed are (20,100), terminate number P2 corresponding data in strong point are (30,200), and the corresponding data of intermediate data points P1 are (25,150), are divided into 0.05 couple of t's with Constant interval is split, then the quantity of data point is 1/0.05=20, and first quantity point namely starts data point The value of (20,100) corresponding t is 0, and the value of the corresponding t of second quantity point is 0.05 ... ..., and the 20th quantity point is also The value for being the corresponding t of end data point (30,200) is 1.
Start corresponding first component data of data point:
X=(1-0)2*20+2*0*(1-0)*25+02* 30=20, t=0;
Start the corresponding second component data of data point:
Y=(1-0)2*100+2*0*(1-0)*150+02* 200=100, t=0;It is overlapped with P0.
Corresponding first component data of second data point:
X=(1-0.05)2*20+2*0.05*(1-0.05)*25+0.052* 30=20.5, t=0.05;
Y=(1-0.05)2*100+2*0.05*(1-0.05)*150+0.052* 200=105, t=0.05;
And so on, the last one point, t=1, then the data point calculated is overlapped with P2.
All data points are linked up to a curve for then forming P0 a to P2, usually, the value of t is more, Curve is more smooth.
User can draw multiple figures using aforesaid way, if multiple figures are according to the time in graphing It successively sorts, multiple figures can also continuously be shown, the specific can be that, with the speed of 60 frame per second by multiple figures Shape is continuously shown.
User can also according to the demand of user mark some data point or some display area in graphing Color etc..
The flow chart of graphing as shown in Figure 3, represent layer receives the first metadata parameters of user's selection, to data Layer sends the data acquisition request for carrying the figure of the first metadata parameters, and data Layer is visited after receiving data acquisition request It asks metadata parameters library, parses the first metadata parameters, generate query statement.According to query statement, service database is accessed, is obtained Data needed for taking graphing, and according to the calculating of data progress partial data, such as the display radius of data point is calculated, it will The data for obtaining data and calculating are packaged, by organizing Drawing Object to be sent to represent layer.
Represent layer receives the data that data Layer obtains, and carries out Drawing Object and is parsed, i.e., is parsed according to encapsulation format Data, and on coordinates computed axis data indication range, and determine the display position of each data point on painting canvas.And it is right Line between two adjacent data points is smoothed, and to embody motion profile, and is shown.
Fig. 4 is a kind of four-quadrant diagram provided in an embodiment of the present invention, the parameter of abscissa be Add User income (unit: Member), the parameter of ordinate is operation income, through the foregoing embodiment in calculating, can obtain: the maximum data value that X-axis is shown is 10000000, the minimum data value that X-axis is shown is 5,000,000, and the maximum data value that Y-axis is shown is 100,000,000 yuan, the minimum number that Y-axis is shown It is to have the data point to differ in size in 10,000,000, Fig. 4 according to value, the size of each data point represents the corresponding third point of quantization parameter Measure data size, through the foregoing embodiment in the line two adjacent points is smoothed, embody it Motion profile.
Embodiment 5:
Fig. 5 is a kind of drawing apparatus structure chart for figure that the embodiment of the present invention 5 provides, and described device includes:
Receiving module 51, the graphic plotting for receiving user are requested, and the member for carrying out graphic plotting is provided to the user Data parameters;
Generation module 52, the first metadata parameters for being selected according to user generate query statement, wherein described first Metadata parameters include at least: the parameter of the abscissa of figure and the parameter of ordinate;
Determining module 53, it is determining with described for according to the query statement and preconfigured service database The corresponding each target array of one metadata parameters;
Drafting module 54, for the class according to the figure for including in each target array and first metadata parameters Type, the parameter of the abscissa of figure and the parameter of ordinate, graphing are simultaneously shown.
The drafting module 54 is specifically used for being directed to each target array, extracts the ginseng of the abscissa in the target array The corresponding second component data of parameter of corresponding first component datas of number and ordinate, by first component data and the Two component datas constitute subnumber group;According to the length and width of the painting canvas pre-saved, each of extraction target array pair The first component data and second component data answered, graphing.
The drafting module 54, specifically for identifying the first maximum value and the first minimum in first component data Second minimum value of value and the second maximum value sum in second component data;According to the width of painting canvas and length, described first Second minimum value of maximum value and the first minimum value, the second maximum value sum, and the maximum radius pre-saved, determine X The data area that the data area and Y-axis that axis is shown are shown;For each subnumber group, according to the width of painting canvas and length, the son The first component data and second component data in array, and the data that the data area that shows of X-axis and Y-axis that determine are shown Range determines the display position of the subnumber group on painting canvas.
The drafting module 54 is specifically used for according to formula:
Xmax 2=Xmax 1+ (Xmax 1-Xmin 1)/Width*Rmax, determines the maximum data value that X-axis is shown;
Xmin 2=Xmin 1- (Xmax 1-Xmin 1)/Width*Rmax, determines the minimum data value that X-axis is shown;
Ymax 2=Ymax 1+ (Ymax 1-Ymin 1)/Lenght*Rmax, determines the maximum data value that Y-axis is shown;
Ymin 2=Ymin 1- (Ymax 1-Ymin 1)/Length*Rmax, determines the minimum data value that Y-axis is shown;
Wherein, Xmax 2 is the maximum data value that X-axis is shown, Xmin 2 is the minimum data value that X-axis is shown, Ymax 2 is The maximum data value that Y-axis is shown, Ymin 2 are the minimum data value that show of Y-axis, and Xmax 1 is the first maximum value, and Xmin 1 is the One minimum value, Ymax 1 are the second maximum value, and Ymin 1 is the second minimum value, and Width is the width of painting canvas, and Lenght is painting canvas Length, Rmax is the maximum radius pre-saved.
The drafting module 54 is specifically used for according to formula:
Rx=(X-Xmin 2)/(Xmax2-Xmin2) * Width determines the numerical value of the subnumber group on the width of painting canvas;
Ry=(Y-Ymin 2)/(Ymax2-Ymin2) * Length determines the numerical value of the subnumber group in the length of painting canvas;
Wherein, Rx is numerical value of the subnumber group on the width of painting canvas, and Ry is numerical value of the subnumber group in the length of painting canvas, X For the first component data in the subnumber group, Y is the second component data in the subnumber group.
In first metadata parameters further include: quantization parameter;
The determining module 53 is also used to extract the corresponding each third number of components of quantization parameter in each target array According to determining each according to the value of preset maximum radius and least radius and the corresponding third component data of each data point The display radius of data point.
The drafting module 54 is also used to for the corresponding data point of each subnumber group, according to two adjacent data points Each corresponding first component data and second component data, the number of the data point after preset division and preset algorithm, Line two data points adjacent between this is smoothed, and is showed.
Embodiment 6:
On the basis of the various embodiments described above, a kind of electricity is additionally provided based on the same inventive concept, in the embodiment of the present invention Sub- equipment, since the principle that electronic equipment solves the problems, such as is similar to the method for drafting of figure, the electronics in the present embodiment is set Standby implementation may refer to the implementation of method, and overlaps will not be repeated.
The embodiment of the invention also provides a kind of electronic equipment, as shown in Figure 6, comprising: processor 61, memory 62 and receipts Hair machine 63;
In Fig. 6, bus architecture may include the bus and bridge of any number of interconnection, specifically be represented by processor 61 The various circuits for the memory that one or more processors and memory 62 represent link together.Bus architecture can also will be all If various other circuits of peripheral equipment, voltage-stablizer and management circuit or the like link together, these are all this fields Known, therefore, it will not be further described herein.Transceiver 63 can be multiple element, that is, include transmitter And receiver, the unit for communicating over a transmission medium with various other devices is provided.Processor 61 is responsible for the total coil holder of management Structure and common processing, memory 62 can store the used data when executing operation of processor 61.
Optionally, processor 61 can be CPU (centre buries device), ASIC (Application Specific Integrated Circuit, specific integrated circuit), (Field-Programmable Gate Array, scene can compile FPGA Journey gate array) or CPLD (Complex Programmable Logic Device, Complex Programmable Logic Devices).
The transceiver 63, for receiving the graphic plotting request of user under the control of processor 61;
The processor 61 executes following process for reading the program in the memory 62: realize following steps: The metadata parameters for carrying out graphic plotting are provided to the user;According to the first metadata parameters that user selects, inquiry is generated Sentence, wherein first metadata parameters include at least: the parameter of the abscissa of figure and the parameter of ordinate;According to described Query statement and preconfigured service database determine each target array corresponding with first metadata parameters; According to the type for the figure for including in each target array and first metadata parameters, the parameter of the abscissa of figure and vertical The parameter of coordinate, graphing are simultaneously shown.
The processor 61 is specifically used for being directed to each target array, extracts the parameter of the abscissa in the target array The corresponding second component data of the parameter of corresponding first component data and ordinate, by first component data and second Component data constitutes subnumber group;According to the length and width of the painting canvas pre-saved, each of extraction target array is corresponding The first component data and second component data, graphing.
The processor 61, specifically for identifying the first maximum value and the first minimum value in first component data, And the second minimum value of the second maximum value sum in second component data;Most according to the width of painting canvas and length, described first Big value and the first minimum value, the second minimum value of the second maximum value sum, and the maximum radius pre-saved, determine X-axis The data area that the data area and Y-axis of display are shown;For each subnumber group, according to the width of painting canvas and length, the subnumber The first component data and second component data in group, and the data model that the data area that shows of X-axis and Y-axis that determine are shown It encloses, determines the display position of the subnumber group on painting canvas.
The processor 61 is specifically used for according to formula:
Xmax 2=Xmax 1+ (Xmax 1-Xmin 1)/Width*Rmax, determines the maximum data value that X-axis is shown;
Xmin 2=Xmin 1- (Xmax 1-Xmin 1)/Width*Rmax, determines the minimum data value that X-axis is shown;
Ymax 2=Ymax 1+ (Ymax 1-Ymin 1)/Lenght*Rmax, determines the maximum data value that Y-axis is shown;
Ymin 2=Ymin 1- (Ymax 1-Ymin 1)/Length*Rmax, determines the minimum data value that Y-axis is shown;Its In, Xmax 2 is the maximum data value that X-axis is shown, Xmin 2 is the minimum data value that X-axis is shown, Ymax 2 is what Y-axis was shown Maximum data value, Ymin 2 are the minimum data value that Y-axis is shown, Xmax 1 is the first maximum value, and Xmin 1 is the first minimum value, Ymax 1 is the second maximum value, and Ymin 1 is the second minimum value, and Width is the width of painting canvas, and Lenght is the length of painting canvas, Rmax is the maximum radius pre-saved.
The processor 61 is specifically used for according to formula:
Rx=(X-Xmin 2)/(Xmax2-Xmin2) * Width determines the numerical value of the subnumber group on the width of painting canvas;
Ry=(Y-Ymin 2)/(Ymax2-Ymin2) * Length determines the numerical value of the subnumber group in the length of painting canvas;
Wherein, Rx is numerical value of the subnumber group on the width of painting canvas, and Ry is numerical value of the subnumber group in the length of painting canvas, X For the first component data in the subnumber group, Y is the second component data in the subnumber group.
In first metadata parameters further include: quantization parameter;
The processor 61 is also used to extract the corresponding each third number of components of quantization parameter in each target array According to determining each according to the value of preset maximum radius and least radius and the corresponding third component data of each data point The display radius of data point.
The processor 61 is also used to for the corresponding data point of each subnumber group, each according to two adjacent data points Corresponding first component data and second component data, the number of the data point after preset division and preset algorithm, it is right Line between two adjacent data points is smoothed, and is showed.
In embodiments of the present invention, when processor executes the program stored on memory, what realization was selected according to user Horizontal, ordinate parameter generates query statement according to query statement and preconfigured service database and determines number of targets Group, and then according to target array, the transverse and longitudinal of the type of figure and figure, the parameter of coordinate, graphing.Not needing user will Required data are manually entered when graphing, are brought conveniently to user, are improved the experience of user.
Embodiment 7:
On the basis of the various embodiments described above, the embodiment of the invention also provides a kind of electronic equipment, as shown in fig. 7, packet It includes: processor 71, communication interface 72, memory 73 and communication bus 74, wherein processor 71, communication interface 72, memory 73 Mutual communication is completed by communication bus 74;
It is stored with computer program in the memory, when described program is executed by the processor, so that the place It manages device and executes following steps:
The graphic plotting request for receiving user, the metadata parameters for carrying out graphic plotting are provided to the user;
According to the first metadata parameters that user selects, query statement is generated, wherein first metadata parameters are at least It include: the parameter of the abscissa of figure and the parameter of ordinate;
According to the query statement and preconfigured service database, determination is corresponding with first metadata parameters Each target array;
According to the type for the figure for including in each target array and first metadata parameters, the abscissa of figure The parameter of parameter and ordinate, graphing are simultaneously shown.
Electronic equipment provided in an embodiment of the present invention be specifically as follows desktop computer, portable computer, smart phone, Tablet computer, personal digital assistant (Personal Digital Assistant, PDA), network side equipment etc..
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface 72, for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit, network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), dedicated collection At circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hard Part component etc..
In embodiments of the present invention, when processor executes the program stored on memory, what realization was selected according to user Horizontal, ordinate parameter generates query statement according to query statement and preconfigured service database and determines number of targets Group, and then according to target array, the transverse and longitudinal of the type of figure and figure, the parameter of coordinate, graphing.Not needing user will Required data are manually entered when graphing, are brought conveniently to user, are improved the experience of user.
Embodiment 8:
On the basis of the various embodiments described above, the embodiment of the invention also provides a kind of computer readable storage medium, institutes Stating computer-readable recording medium storage has the computer program that can be executed by electronic equipment, when described program is set in the electronics When standby upper operation, so that the electronic equipment executes following steps:
The graphic plotting request for receiving user, the metadata parameters for carrying out graphic plotting are provided to the user;
According to the first metadata parameters that user selects, query statement is generated, wherein first metadata parameters are at least It include: the parameter of the abscissa of figure and the parameter of ordinate;
According to the query statement and preconfigured service database, determination is corresponding with first metadata parameters Each target array;
According to the type for the figure for including in each target array and first metadata parameters, the abscissa of figure The parameter of parameter and ordinate, graphing are simultaneously shown.
Above-mentioned computer readable storage medium can be any usable medium that the processor in electronic equipment can access Or data storage device, including but not limited to magnetic storage such as floppy disk, hard disk, tape, magneto-optic disk (MO) etc., optical memory Such as CD, DVD, BD, HVD and semiconductor memory such as ROM, EPROM, EEPROM, nonvolatile memory (NAND FLASH), solid state hard disk (SSD) etc..
Computer program, computer program are provided in the computer readable storage medium provided in embodiments of the present invention Realize the parameter of the cross, ordinate that selects according to user when being executed by processor, generation query statement, according to query statement and Preconfigured service database, determines target array, so according to target array, the transverse and longitudinal of the type of figure and figure, The parameter of coordinate, graphing.Required data are manually entered when not needing user for graphing, are brought to user It is convenient, improve the experience of user.
The embodiment of the invention discloses a kind of method for drafting of figure, device, electronic equipment and storage medium, this method packets It includes: receiving the graphic plotting request of user, the metadata parameters for carrying out graphic plotting are provided to the user;It is selected according to user The first metadata parameters, generate query statement, wherein first metadata parameters include at least: the ginseng of the abscissa of figure Several and ordinate parameter;According to the query statement and preconfigured service database, determining and first yuan of number According to the corresponding each target array of parameter;According to the class for the figure for including in each target array and first metadata parameters Type, the parameter of the abscissa of figure and the parameter of ordinate, graphing are simultaneously shown.Due in embodiments of the present invention, according to The parameter of the cross of user's selection, ordinate, generates query statement, according to query statement and preconfigured service database, Determine target array, and then according to target array, the transverse and longitudinal of the type of figure and figure, the parameter of coordinate, graphing.No Required data are manually entered when needing user for graphing, are brought conveniently to user, are improved the experience of user.
For systems/devices embodiment, since it is substantially similar to the method embodiment, so the comparison of description is simple Single, the relevent part can refer to the partial explaination of embodiments of method.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or an operation are distinguished with another entity or another operation, without necessarily requiring or implying these entities Or there are any actual relationship or orders between operation.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, the reality of complete hardware embodiment, complete Application Example or connected applications and hardware aspect can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of the application has been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications can be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the application range.
Obviously, those skilled in the art can carry out various modification and variations without departing from the essence of the application to the application Mind and range.In this way, if these modifications and variations of the application belong to the range of the claim of this application and its equivalent technologies Within, then the application is also intended to include these modifications and variations.

Claims (18)

1. a kind of method for drafting of figure, which is characterized in that the described method includes:
The graphic plotting request for receiving user, the metadata parameters for carrying out graphic plotting are provided to the user;
According to the first metadata parameters that user selects, query statement is generated, wherein first metadata parameters include at least: The parameter of the abscissa of figure and the parameter of ordinate;
According to the query statement and preconfigured service database, determine corresponding with first metadata parameters every A target array;
According to the type for the figure for including in each target array and first metadata parameters, the parameter of the abscissa of figure With the parameter of ordinate, graphing is simultaneously shown.
2. the method as described in claim 1, which is characterized in that described to be joined according to each target array and first metadata The type for the figure for including in number, the parameter of the abscissa of figure and the parameter of ordinate, graphing include:
For each target array, corresponding first component data of parameter of the abscissa in the target array, and vertical seat are extracted First component data and second component data are constituted subnumber group by the corresponding second component data of target parameter;
According to the length and width of the painting canvas pre-saved, corresponding first component data of each of extraction target array and Second component data, graphing.
3. method according to claim 2, which is characterized in that the length and width for the painting canvas that the basis pre-saves mention It each of takes corresponding first component data of the target array and second component data, graphing includes:
Identify in the first maximum value in first component data and the first minimum value and second component data second most Second minimum value of big value sum;
According to the width of painting canvas and length, first maximum value and the first minimum value, the second maximum value sum second most Small value, and the maximum radius pre-saved determine the data area that X-axis is shown and the data area that Y-axis is shown;
For each subnumber group, according to the first component data and second component number in the width of painting canvas and length, the subnumber group According to, and the data area that the data area that shows of X-axis and Y-axis that determine are shown, determine the display of the subnumber group on painting canvas Position.
4. method as claimed in claim 3, which is characterized in that the width and length according to painting canvas, first maximum Value and the first minimum value, second maximum value and the second minimum value, and the maximum radius pre-saved, determine in reference axis The data area that shows of X-axis and the data area that shows of Y-axis include:
According to formula:
Xmax 2=Xmax 1+ (Xmax 1-Xmin 1)/Width*Rmax, determines the maximum data value that X-axis is shown;
Xmin 2=Xmin 1- (Xmax 1-Xmin 1)/Width*Rmax, determines the minimum data value that X-axis is shown;
Ymax 2=Ymax 1+ (Ymax 1-Ymin 1)/Lenght*Rmax, determines the maximum data value that Y-axis is shown;
Ymin 2=Ymin 1- (Ymax 1-Ymin 1)/Length*Rmax, determines the minimum data value that Y-axis is shown;
Wherein, Xmax 2 is the maximum data value that X-axis is shown, Xmin 2 is the minimum data value that X-axis is shown, Ymax 2 is Y-axis The maximum data value of display, Ymin 2 are the minimum data value that Y-axis is shown, Xmax 1 is the first maximum value, and Xmin 1 is first Minimum value, Ymax 1 are the second maximum value, and Ymin 1 is the second minimum value, and Width is the width of painting canvas, and Lenght is painting canvas Length, Rmax are the maximum radius pre-saved.
5. method as claimed in claim 4, which is characterized in that the width and length according to painting canvas, in the subnumber group First component data and second component data, and the data area that the data area that shows of X-axis and Y-axis that determine are shown, really The fixed display position of the subnumber group on painting canvas includes:
According to formula:
Rx=(X-Xmin 2)/(Xmax2-Xmin2) * Width determines the numerical value of the subnumber group on the width of painting canvas;
Ry=(Y-Ymin 2)/(Ymax2-Ymin2) * Length determines the numerical value of the subnumber group in the length of painting canvas;
Wherein, Rx is numerical value of the subnumber group on the width of painting canvas, and Ry is numerical value of the subnumber group in the length of painting canvas, and X is should The first component data in subnumber group, Y are the second component data in the subnumber group.
6. such as the described in any item methods of claim 2-5, which is characterized in that in first metadata parameters further include: amount Change parameter;
The method also includes:
The corresponding each third component data of quantization parameter in each target array is extracted, according to preset maximum radius and most The value of minor radius and the corresponding third component data of each data point, determines the display radius of each data point.
7. such as the described in any item methods of claim 2-5, which is characterized in that the method also includes:
For the corresponding data point of each subnumber group, according to adjacent each corresponding first component data of two data points and second Component data, the number of the data point after preset division and preset algorithm, the company two data points adjacent between this Line is smoothed, and is showed.
8. the method for claim 7, which is characterized in that the preset algorithm includes:
Secondary Bezier algorithm.
9. a kind of drawing apparatus of figure, which is characterized in that described device includes:
Receiving module, the graphic plotting for receiving user are requested, and the metadata ginseng for carrying out graphic plotting is provided to the user Number;
Generation module, the first metadata parameters for being selected according to user generate query statement, wherein first metadata Parameter includes at least: the parameter of the abscissa of figure and the parameter of ordinate;
Determining module, for according to the query statement and preconfigured service database, determining and first yuan of number According to the corresponding each target array of parameter;
Drafting module, for the type according to the figure for including in each target array and first metadata parameters, figure Abscissa parameter and ordinate parameter, graphing simultaneously shows.
10. a kind of electronic equipment, which is characterized in that the electronic equipment includes: memory, processor and transceiver;
The transceiver, the graphic plotting for receiving user under the control of a processor are requested;
The processor executes following process: realizing following steps: to the use for reading the program in the memory Family provides the metadata parameters for carrying out graphic plotting;According to the first metadata parameters that user selects, query statement is generated, wherein First metadata parameters include at least: the parameter of the abscissa of figure and the parameter of ordinate;According to the query statement And preconfigured service database, determine each target array corresponding with first metadata parameters;According to each The type for the figure for including in target array and first metadata parameters, the parameter of the abscissa of figure and the ginseng of ordinate Number, graphing are simultaneously shown.
11. electronic equipment as claimed in claim 10, which is characterized in that the processor is specifically used for being directed to each target Array, the parameter of corresponding first component data of parameter and ordinate that extract the abscissa in the target array corresponding First component data and second component data are constituted subnumber group by two component datas;According to the length of the painting canvas pre-saved Degree and width, corresponding first component data of each of extraction target array and second component data, graphing.
12. electronic equipment as claimed in claim 10, which is characterized in that the processor is specifically used for identification described first Second minimum of the first maximum value and the first minimum value in component data and the second maximum value sum in second component data Value;According to the width of painting canvas and length, first maximum value and the first minimum value, the second minimum of the second maximum value sum Value, and the maximum radius pre-saved, determine the data area that X-axis is shown and the data area that Y-axis is shown;For every height Array, according to the first component data and second component data in the width of painting canvas and length, the subnumber group, and the X determined The data area that the data area and Y-axis that axis is shown are shown determines the display position of the subnumber group on painting canvas.
13. electronic equipment as claimed in claim 12, which is characterized in that the processor is specifically used for according to formula:
Xmax 2=Xmax 1+ (Xmax 1-Xmin 1)/Width*Rmax, determines the maximum data value that X-axis is shown;
Xmin 2=Xmin 1- (Xmax 1-Xmin 1)/Width*Rmax, determines the minimum data value that X-axis is shown;
Ymax 2=Ymax 1+ (Ymax 1-Ymin 1)/Lenght*Rmax, determines the maximum data value that Y-axis is shown;
Ymin 2=Ymin 1- (Ymax 1-Ymin 1)/Length*Rmax, determines the minimum data value that Y-axis is shown;Wherein, Xmax 2 is the maximum data value that X-axis is shown, Xmin 2 is the minimum data value that X-axis is shown, Ymax 2 is the maximum that Y-axis is shown Data value, Ymin 2 are the minimum data value that Y-axis is shown, Xmax 1 is the first maximum value, and Xmin 1 is the first minimum value, Ymax 1 is the second maximum value, and Ymin 1 is the second minimum value, and Width is the width of painting canvas, and Lenght is the length of painting canvas, and Rmax is The maximum radius pre-saved.
14. electronic equipment as claimed in claim 13, which is characterized in that the processor is specifically used for according to formula:
Rx=(X-Xmin 2)/(Xmax2-Xmin2) * Width determines the numerical value of the subnumber group on the width of painting canvas;
Ry=(Y-Ymin 2)/(Ymax2-Ymin2) * Length determines the numerical value of the subnumber group in the length of painting canvas;
Wherein, Rx is numerical value of the subnumber group on the width of painting canvas, and Ry is numerical value of the subnumber group in the length of painting canvas, and X is should The first component data in subnumber group, Y are the second component data in the subnumber group.
15. such as the described in any item electronic equipments of claim 11-14, which is characterized in that in first metadata parameters also It include: quantization parameter;
The processor is also used to extract the corresponding each third component data of quantization parameter in each target array, according to The value of preset maximum radius and least radius and the corresponding third component data of each data point, determines each data point Display radius.
16. such as the described in any item electronic equipments of claim 11-14, which is characterized in that the processor is also used to for every The corresponding data point of a sub- array, according to adjacent each corresponding first component data of two data points and second component data, The number of data point after preset division and preset algorithm, the line two data points adjacent between this carry out flat Sliding processing, and show.
17. a kind of electronic equipment characterized by comprising processor, communication interface, memory and communication bus, wherein place Device, communication interface are managed, memory completes mutual communication by communication bus;
It is stored with computer program in the memory, when described program is executed by the processor, so that the processor Perform claim requires the step of 1~8 any claim the method.
18. a kind of computer readable storage medium, which is characterized in that it is stored with the computer journey that can be executed by electronic equipment Sequence, when described program is run on the electronic equipment, so that electronic equipment perform claim requirement 1~8 is any described The step of method.
CN201710561320.8A 2017-07-11 2017-07-11 A kind of method for drafting of figure, device, electronic equipment and storage medium Pending CN109254976A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710561320.8A CN109254976A (en) 2017-07-11 2017-07-11 A kind of method for drafting of figure, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710561320.8A CN109254976A (en) 2017-07-11 2017-07-11 A kind of method for drafting of figure, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109254976A true CN109254976A (en) 2019-01-22

Family

ID=65050975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710561320.8A Pending CN109254976A (en) 2017-07-11 2017-07-11 A kind of method for drafting of figure, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109254976A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110992443A (en) * 2019-12-18 2020-04-10 政采云有限公司 Business flow chart construction method and device and computer readable storage medium
CN111045768A (en) * 2019-11-27 2020-04-21 青岛歌尔智能传感器有限公司 Graph module application method, graph module application device and storage medium
CN111696169A (en) * 2019-03-13 2020-09-22 珠海金山办公软件有限公司 Method and device for generating equilateral polygon and electronic equipment
CN112529984A (en) * 2020-12-23 2021-03-19 中移(杭州)信息技术有限公司 Method and device for drawing polygon, electronic equipment and storage medium
CN112884349A (en) * 2021-03-12 2021-06-01 沈阳麟龙科技股份有限公司 Stock technical index display method, device and system
CN113536748A (en) * 2020-04-15 2021-10-22 北京沃东天骏信息技术有限公司 Method and device for generating chart data
CN114529630A (en) * 2022-01-27 2022-05-24 深圳市明源云空间电子商务有限公司 Method, device and equipment for generating sector primitives and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484353A (en) * 2014-11-28 2015-04-01 华为技术有限公司 Data imaging method, data imaging device and database server
CN105335508A (en) * 2015-10-29 2016-02-17 苏州国云数据科技有限公司 Method for visually displaying data source information by dragging on basis of browser
CN105389170A (en) * 2015-11-20 2016-03-09 中国农业大学 Drawing method and system
CN105808682A (en) * 2016-03-02 2016-07-27 浪潮软件股份有限公司 Relational graph display method and apparatus
CN106651994A (en) * 2015-10-30 2017-05-10 北京国双科技有限公司 Bubble chart display method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484353A (en) * 2014-11-28 2015-04-01 华为技术有限公司 Data imaging method, data imaging device and database server
CN105335508A (en) * 2015-10-29 2016-02-17 苏州国云数据科技有限公司 Method for visually displaying data source information by dragging on basis of browser
CN106651994A (en) * 2015-10-30 2017-05-10 北京国双科技有限公司 Bubble chart display method and device
CN105389170A (en) * 2015-11-20 2016-03-09 中国农业大学 Drawing method and system
CN105808682A (en) * 2016-03-02 2016-07-27 浪潮软件股份有限公司 Relational graph display method and apparatus

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111696169A (en) * 2019-03-13 2020-09-22 珠海金山办公软件有限公司 Method and device for generating equilateral polygon and electronic equipment
CN111045768A (en) * 2019-11-27 2020-04-21 青岛歌尔智能传感器有限公司 Graph module application method, graph module application device and storage medium
CN111045768B (en) * 2019-11-27 2023-06-23 青岛歌尔智能传感器有限公司 Application method of chart module, application device of chart module and storage medium
CN110992443A (en) * 2019-12-18 2020-04-10 政采云有限公司 Business flow chart construction method and device and computer readable storage medium
CN110992443B (en) * 2019-12-18 2023-09-26 政采云有限公司 Business flow chart construction method and device and computer readable storage medium
CN113536748A (en) * 2020-04-15 2021-10-22 北京沃东天骏信息技术有限公司 Method and device for generating chart data
CN112529984A (en) * 2020-12-23 2021-03-19 中移(杭州)信息技术有限公司 Method and device for drawing polygon, electronic equipment and storage medium
CN112529984B (en) * 2020-12-23 2023-12-26 中移(杭州)信息技术有限公司 Method, device, electronic equipment and storage medium for drawing polygon
CN112884349A (en) * 2021-03-12 2021-06-01 沈阳麟龙科技股份有限公司 Stock technical index display method, device and system
CN114529630A (en) * 2022-01-27 2022-05-24 深圳市明源云空间电子商务有限公司 Method, device and equipment for generating sector primitives and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN109254976A (en) A kind of method for drafting of figure, device, electronic equipment and storage medium
CN107256265B (en) A kind of search-engine results data visualization methods of exhibiting and system
US20070216681A1 (en) Method, apparatus, and system for processing geometric data of assembled parts
US20110214081A1 (en) Systems and methods for flexibly scheduled dashboard creation
CN110503556A (en) The visual configuration method and device of trading strategies model
US10282360B2 (en) Uniform chart formatting based on semantics in data models
CN111275297A (en) Building engineering EPC (electronic product code) cost and progress management system and management method based on BIM (building information modeling) technology
CN109543162A (en) More diagrammatic representation method, apparatus, computer equipment and the storage medium of data
CN107918831A (en) BIM Schedule managements method and its system based on browser
US11847381B2 (en) Three-dimensional graphical annotations with semantic attributes
CN110675728A (en) Generation method, device and equipment of thermodynamic diagram and computer readable storage medium
CN110533389A (en) The determination method and device of Project Cost
CN109800401A (en) Information report automatic generation method and device
CN109858934A (en) Pricing method, device and computer readable storage medium
CN109753710A (en) A kind of check of drawings method, apparatus, system and the readable storage medium storing program for executing of component design drawing
CN108090952A (en) 3 d modeling of building method and apparatus
CN101587504A (en) Custom curved surface test report system and custom surface test report method
Peng et al. Higher Dimensional Vector Field Visualization: A Survey.
CN109408502A (en) A kind of data standard processing method, device and its storage medium
CN108961406A (en) Geographical information visualization method, apparatus and user terminal
Ferstl et al. Zero-coupon yield curve estimation with the package termstrc
CN115081414A (en) Spreadsheet generation method, device, equipment and medium based on data model
Santhanavanich et al. Enabling interoperability of urban building energy data based on ogc api standards and citygml 3D city models
CN117390195A (en) Knowledge traceability connecting method, system, equipment and medium based on graph editor
CN110348983A (en) Transaction Information management method and device, electronic equipment and non-transient storage media

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190122