CN107085602A - The generation method and computer-readable storage medium of statistical chart - Google Patents

The generation method and computer-readable storage medium of statistical chart Download PDF

Info

Publication number
CN107085602A
CN107085602A CN201710210287.4A CN201710210287A CN107085602A CN 107085602 A CN107085602 A CN 107085602A CN 201710210287 A CN201710210287 A CN 201710210287A CN 107085602 A CN107085602 A CN 107085602A
Authority
CN
China
Prior art keywords
data
data item
option
chart
type
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.)
Granted
Application number
CN201710210287.4A
Other languages
Chinese (zh)
Other versions
CN107085602B (en
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.)
Bitimage Technology (Hainan) Co.,Ltd.
Original Assignee
Beijing Zhiju Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zhiju Technology Co Ltd filed Critical Beijing Zhiju Technology Co Ltd
Priority to CN201710210287.4A priority Critical patent/CN107085602B/en
Publication of CN107085602A publication Critical patent/CN107085602A/en
Application granted granted Critical
Publication of CN107085602B publication Critical patent/CN107085602B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a kind of generation method of statistical chart and computer-readable storage medium.The generation method of wherein statistical chart includes:Obtain data item to be counted;The data mode and data content of data item to be counted are extracted, data mode includes the title and data type of data item;Determine the syntagmatic between the data mode of data item to be counted;The corresponding chart style of syntagmatic is determined according to default mapping table, mapping table provides the corresponding relation of the syntagmatic and chart style between various data modes;And information needed for chart style is extracted from the data content of data item to be counted, and draw statistical chart using the information extracted according to chart style.The solution of the present invention reduces requirement of the designer to professional knowledge of charting, it is to avoid a large amount of processing of the designer to data are operated, and on the other hand can quickly and easily convert data to statistical chart, it is ensured that the correctness of data.

Description

The generation method and computer-readable storage medium of statistical chart
Technical field
The present invention relates to computer technology, the generation method and computer-readable storage medium of more particularly to a kind of statistical chart.
Background technology
Statistical chart is to be depicted as geometric figure using point, line, surface, body etc., to represent the relation between various quantity and its change The emotionally instrument of condition.The features such as it has directly perceived, vivid, lively, specific.Statistical chart can make the statistics of complexity simple Change, popularized, visualization, make one very clear, readily appreciate and compare.Therefore, statistical chart is arranged with analyzing in statistics In occupy critical role, and be used widely.
It is existing draw statistics drawing method, a kind of mode for by hand select statistical chart pattern and needed for data, such as When excel in MS Office Applications inserts statistical chart, it is necessary first to determine subtype, the number required for chart is then selected According to ultimately producing chart.This mode is not only cumbersome, may also need to handle original data, makes it can be with Match the data format needed for chart.
Another existing method for drawing statistical chart lays particular emphasis on the processing to data in itself, pre-defines statistics graph model, After handling the data that need to be counted, matched using above-mentioned data model, so as to generate corresponding figure according to model Shape.This mode is only capable of drawing specific figure, and the requirement to data is high, and limitation is larger.
The generating mode of both the above statistical chart, is required for anticipating data, it is necessary to which designer enters cumbersomely The substantial amounts of operation of row, and require that designer possesses certain data-handling capacity.
The content of the invention
It is an object of the present invention to provide a kind of generation method for the statistical chart for reducing designer's data processing operation And corresponding computer-readable storage medium.
The further object of the present invention is the efficiency for the conversion for improving data and statistical chart, it is ensured that data it is correct Property.
According to an aspect of the invention, there is provided a kind of generation method of statistical chart, this method includes:Obtain to be counted Data item;The syntagmatic between the data mode of data item to be counted is determined, and group is determined according to default mapping table The corresponding chart style of conjunction relation, data mode includes the title and data type of data item;Extract data item to be counted Data content, data content be data item in data value set;And carried from the data content of data item to be counted The information needed for chart style is taken out, and statistical chart is drawn using the information extracted according to chart style.
Alternatively, data type includes:In value type and option type, the data for the data item for belonging to value type Hold the set for numerical value, the data content for belonging to the data item of option type is the set of option value;Group between data mode Conjunction relation includes:The relation combined between the quantity of the quantity of the data item of value type and the data item of option type.
Alternatively, the step of obtaining data item to be counted includes:The selection operation to data item in data to be selected is received, And the step of extracting the data content of data item to be counted includes:Determine whether to be provided with the screening bar to data content Part;If so, filtering out the data content for meeting screening conditions from the data content for the data item being selected;If it is not, extracting quilt The total data content for the data item selected.
Alternatively, the holding time containing data content in data item, screening conditions include:Time screening conditions, time Screening conditions regulation has initial time and/or deadline, and filters out symbol from the data content for the data item being selected The step of data content for closing screening conditions, includes:Extract the holding time of data content in the data item being selected, and will Holding time is matched with time screening conditions, to filter out the data content for meeting time screening conditions.
Alternatively, screening conditions also include:Option screening conditions, option screening conditions regulation with a hook at the end option value and/or Exclusions Options value, and from the data content for the data item being selected filter out the data content for meeting screening conditions the step of Including:Extract the data content containing option value of withing a hook at the end in the data item of option type;And/or the data of Exclusions Options type Data content containing Exclusions Options value in, and extract remaining data content.
Alternatively, data to be selected are presented in the form of data sheet, wherein to the selection operation of data item in data to be selected Including the selection operation to the column data of row data or data sheet in data sheet.
Alternatively, data type includes:Syntagmatic between value type and option type, data mode includes: The relation combined between the quantity of the quantity of the data item of value type and the data item of option type.
Alternatively, chart style include it is following any one or more:Block diagram, curve map, pie chart, a small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram, Multidimensional curve map, and corresponding relation as defined in mapping table include it is following any one or more:It is single corresponding to syntagmatic The situation of the data item of individual value type, chart style is block diagram or curve map;It is single option class corresponding to syntagmatic The situation of the data item of type, chart style is pie chart;Corresponding to situation of the syntagmatic for the data item of multiple value types, figure Table sample formula is a small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram or multidimensional curve map;Corresponding to situation of the syntagmatic for the data item of multiple option types, figure Table sample formula is block diagram;Corresponding to the data item and the feelings of the data item of single option type that syntagmatic is single number type Condition, chart style is block diagram;It is the data item of multiple value types and the data of multiple option types corresponding to syntagmatic The situation of item, chart style is a small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram.
Alternatively, in the case of the data item of data item to be counted for multiple value types, between data mode Syntagmatic also includes:The operation relation of numerical value in the data item of multiple value types;And determine the data mode of data item Between syntagmatic the step of also include:Recognize and whether there is computing in the data item of multiple value types between data content Relation;If in the presence of determining syntagmatic according to the operation relation between data content.
Alternatively, chart style also includes:Accumulation graph, the accumulation graph include it is following any one or more:Constructional surface Product figure, accumulation block diagram, percentage area accumulation graph, percentage accumulation block diagram, and corresponding relation as defined in mapping table is also Including:Deposited corresponding between the data item and the numerical value of the data item of multiple value types that syntagmatic is multiple value types Adding the situation with operation relation, chart style is accumulation graph.
According to another aspect of the present invention, a kind of computer-readable storage medium is additionally provided, wherein the computer journey that is stored with Sequence, and cause the place equipment of computer-readable storage medium to perform any of the above-described kind of statistics map generalization during computer program operation Method.
The generation method of the statistical chart of the present invention, is pre-configured with the syntagmatic and figure for providing there is between various data modes The mapping table of the corresponding relation of table sample formula, when generating statistical chart, determines the group between the data mode of data item to be counted Conjunction relation, the corresponding chart style of syntagmatic is determined according to mapping table, is extracted from the data content of data item to be counted The information gone out needed for chart style, and draw statistical chart using the information extracted according to chart style.The chart sample of statistical chart Syntagmatic of the formula only between data mode is related, it is only necessary to combined by setting data mode, it is possible to be automatically performed system Count the generation of table.On the one hand requirement of the designer to professional knowledge of charting is reduced, it is to avoid a large amount of places of the designer to data Reason operation, on the other hand can quickly and easily convert data to statistical chart, it is ensured that the correctness of data.
Further, the generation method of statistical chart of the invention, can enter to the operation relation between data content automatically Row identification, selects there is the data content of operation relation the expression way of corresponding statistical chart, and the statistical chart of generation is more straight See, be easy to use.
Further, the generation method of statistical chart of the invention, can pass through the selection operation and number to data item The screening conditions crossed according to content, automatically extract out data item to be counted, improve the efficiency of tabulation.
According to the accompanying drawings to the detailed description of the specific embodiment of the invention, those skilled in the art will be brighter Above-mentioned and other purposes, the advantages and features of the present invention.
Brief description of the drawings
Some specific embodiments of the present invention are described in detail by way of example, and not by way of limitation with reference to the accompanying drawings hereinafter. Identical reference denotes same or similar part or part in accompanying drawing.It should be appreciated by those skilled in the art that these What accompanying drawing was not necessarily drawn to scale.In accompanying drawing:
Fig. 1 is the schematic diagram of the generation method of statistical chart according to an embodiment of the invention;
Fig. 2 is the block diagram generated according to the generation method of the statistical chart of one embodiment of the invention;
Fig. 3 is to generate line chart according to the generation method of the statistical chart of one embodiment of the invention;
Fig. 4 is a small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram generated according to the generation method of the statistical chart of one embodiment of the invention;
Fig. 5 is respectively the multidimensional curve map of the generation method generation of statistical chart according to an embodiment of the invention;
Fig. 6 is the pie chart generated according to the generation method of the statistical chart of one embodiment of the invention;
Fig. 7 is the data item correspondence of the option type generated according to the generation method of the statistical chart of one embodiment of the invention Block diagram;
Fig. 8 is the data item of the single number type generated according to the generation method of the statistical chart of one embodiment of the invention Block diagram corresponding with the data item of single option type;
Fig. 9 is the data item of the multiple value types generated according to the generation method of the statistical chart of one embodiment of the invention With a small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram of the data item of multiple option types;
Figure 10 is that the data item with operation relation is given birth to according to the generation method of the statistical chart of one embodiment of the invention Into column accumulation graph;
Figure 11 is that the data item with operation relation is given birth to according to the generation method of the statistical chart of one embodiment of the invention Into percentage accumulation graph;
Figure 12 is that the data item with operation relation is given birth to according to the generation method of the statistical chart of one embodiment of the invention Into stacked area figure;
Figure 13 is that the data item with operation relation is given birth to according to the generation method of the statistical chart of one embodiment of the invention Into percentage stacked area figure;And
Figure 14 is the schematic diagram of computer-readable storage medium 10 according to an embodiment of the invention.
Embodiment
The embodiments of the invention provide a kind of generation method of statistical chart and computer-readable storage medium, in the statistics generation side In method, the syntagmatic between data mode is mutually corresponding with chart style, so as to by judging data mode combination pass It is the syntagmatic and the corresponding relation of subtype for determining corresponding chart style, namely pre-defined data mode.Together When, the content of statistical chart is associated by data mode and data content collection, realizes the automatic filling and processing of data.From And statistical chart can be drawn automatically.Compared to the form and content of data defined in prior art, the statistical chart of the present embodiment Generation method defines data mode combination and data content collection, corresponding with chart style.
The generation method of statistical chart of the embodiment of the present invention utilizes the data generation statistical chart in data sheet, in data sheet Packet is defined containing two aspects, data mode and data content collection, wherein data mode includes the type of title and data, Data type includes:Value type and option type;Data content collection be option value set or numerical value set, wherein for Belong to the data item of value type, its data content is the set of numerical value;In data item for belonging to option type, its data Hold the set for option value, wherein option value is a limited number of pre-set texts.Table 1 is statistics map generalization of the embodiment of the present invention A format sample of data sheet in method:
Table 1
Title 1 Title 2 Title 3 Title 4 Title 5
Content 1-1 Content 2-1 Content 3-1 Content 4-1 Content 5-1
Content 1-2 Content 2-2 Content 3-2 Content 4-2 Content 5-2
Content 1-3 Content 2-3 Content 3-3 Content 4-3 Content 5-3
As shown in table 1, the entitled title 1 of the data item of first row, data content includes:It is content 1-1, content 1-2, interior Hold 1-3 ... ... by that analogy.It can be seen that data content is set (such as numerical value, option value of the data value included in data item Deng).
Table 2 be statistical chart of the embodiment of the present invention generation method in one of data to be selected citing:
Table 2
Applicant Application time Ask for leave type Ask for leave number of days Remarks
Zhang San 2016/12/1 Sick leave 3 Flu
Li Si 2016/12/2 Annual leave 5 Nothing
King five 2016/12/3 The leave of absence 2 Nothing
Zhang San 2016/12/4 Sick leave 1 Stomachache
In table 2, the title in data item form includes:Applicant, type of asking for leave, number of days of asking for leave.Wherein applicant and Type of asking for leave belongs to option type, and the option value of applicant includes Zhang San, Li Si, king five, the option value for type of asking for leave including sick Vacation, annual leave, the leave of absence.And number of days of asking for leave belongs to value type.The data mode of data item to be counted in the present embodiment is only wrapped Include option type and value type.Application time and remarks in table 2 are not belonging in the generation method of the statistical chart of the present embodiment The data mode of data item to be counted.
By taking the data item of the 3rd row as an example, entitled type of asking for leave, the data type of data item form is option type, number Include sick leave, annual leave, the leave of absence, sick leave (namely set of the respective option value) according to content, by taking the data item of the 4th row as an example, title For number of days of asking for leave, the data type of data item form is value type, and data content is numerical value set (3,5,2,1).
The generation method of the statistical chart of the present embodiment can be in above-mentioned chart data item to be counted, it is determined that correspondence Chart style, and according to data content carry out chart generation.Fig. 1 is statistics map generalization according to an embodiment of the invention The schematic diagram of method, the generation method of the statistical chart can include in general manner:
Step S102, obtains data item to be counted;
Step S104, determines the syntagmatic between the data mode of data item to be counted, and according to default mapping Table determines the corresponding chart style of syntagmatic, and data mode includes the title and data type of data item, wherein data class Type can include:Value type and option type.Syntagmatic between data mode can include:The data of value type Quantity and option type data item quantity between the relation that combines, such as data item of single number type, single The data item of option type, the data item of multiple value types, the data item of multiple option types, the data of single number type And the combining of data item of single option type, the data item of multiple value types and multiple option types data item group Close.The above-mentioned mapping table can specify that the corresponding relation of the syntagmatic and chart style between various data modes, chart Pattern can include but is not limited to block diagram, curve map, pie chart, a small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram, multidimensional curve map, a kind of optional mapping Corresponding relation as defined in table include it is following any one or more:It is the data item of single number type corresponding to syntagmatic Situation, chart style is block diagram or curve map;Corresponding to situation of the syntagmatic for the data item of single option type, chart Pattern is pie chart;Corresponding to syntagmatic for multiple value types data item situation, chart style be a small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram or Multidimensional curve map;Corresponding to situation of the syntagmatic for the data item of multiple option types, chart style is block diagram;Correspond to Syntagmatic for single number type data item and single option type data item situation, chart style is block diagram; Corresponding to the data item and the situation of the data item of multiple option types that syntagmatic is multiple value types, chart style is a small bundle of straw, etc. for silkworms to spin cocoons on Shape block diagram;
Step S106, extracts the data content of data item to be counted, and data content is the set of data value in data item, Data item for belonging to value type, its data content is the set of numerical value;Data item for belonging to option type, it is counted According to the set that content is option value;
Step S108, extracts the information needed for chart style from the data content of data item to be counted, and according to Chart style draws statistical chart using the information extracted.The information of extraction can include data content in itself, by data Hold data that computing draws, data for drawing etc. are counted by data content;The process for extracting information is automatically performed, without tabulation Person intervenes.
The data item that a kind of step S102 acquisition is to be counted can include:Receive the selection to data item in data to be selected Operation.Data to be selected can be presented in the form of data sheet, and such as data sheet can be with excel or other electronic watches Data item in the form that lattice software form is preserved, data sheet can be the row data of data sheet or the row of data sheet Data.Data to be selected can also be presented using other forms, such as the text with data, array, data array. In the present embodiment, including the data of data mode and data content can be as data to be selected, and have same data mode One group of data content can just form data item.
A kind of mode of step S102 acquisition data item to be counted is passes through in data sheet according to lister The selection of data item is obtained, and can be made the row of certain in data sheet or certain column data by selection operation using lister For data item to be counted.
In addition after data item is selected, lister is also provided with the screening conditions for data content.Correspondingly, The step of data content for extracting data item to be counted, includes:Determine whether lister is provided with the screening bar to data content Part;If there is provided screening conditions, filter out from the data content for the data item being selected and meet in the data of screening conditions Hold, for carrying out statistics map generalization;If being not provided with screening conditions, the total data for the data item being selected is extracted Content.
Screening conditions can be the condition of numerical values recited, such as, can be right after the data item of lister selected numerical value type The size of data content sets screening conditions in data item, will meet the data content of screening conditions as the number of generation statistical chart According to.
Screening conditions can also be option screening conditions, and such as lister can be to data content setting options in data item Screening conditions, only extract the data for meeting the data content of option screening conditions as generation statistical chart.
Data item to be counted in the present embodiment typically contains the holding time of data content (when forming time, record Between etc.).
Above-mentioned screening conditions can also be time screening conditions, time screening conditions can specify that initial time and/or Deadline.The step of filtering out the data content for meeting time screening conditions from the data content for the data item being selected can With including:The holding time of data content in the data item being selected is extracted, and the holding time is entered with time screening conditions Row matching, to filter out the data item for meeting time screening conditions.For example in the case where only setting initial time, then it is screened The data content collection of the data item gone out is only comprising the data content after between from the outset;When setting initial time and cut-off Between in the case of, then the data content collection of the data item being screened out is only comprising the data between initial time and deadline Content, in the case of only deadline, then the data content collection for the data item being screened out is only comprising before deadline Data content.
By taking table 2 as an example, if lister sets initial time as 2016-12-02, it is 2016-12- to be left the application time 02nd, 2016-12-03,2016-12-04 three records.If the time started is set as 2016-12-02, by time setting For 2016-12-03, then it is left two records of the application time for 2016-12-02,2016-12-03.If by time setting For 2016-12-03, it is left three records of the application time for 2016-12-01,2016-12-02,2016-12-03.
Screening conditions can also include:Option screening conditions, option screening conditions regulation with a hook at the end option value and/or Exclusions Options value.The data content for meeting option screening conditions is correspondingly filtered out from the data content for the data item being selected The step of include:Extract the data content containing option value of withing a hook at the end in the data item of option type;And/or Exclusions Options type Data item in the data content containing Exclusions Options value, and extract remaining data content.
By taking table 2 as an example, if lister sets reservation option value as sick leave, two sick leaves note of Zhang San is remained after screening Record;If lister sets Exclusions Options value as the annual leave, the record of sick leave and the leave of absence is remained after screening.
Option screening conditions now can go out have to retain a certain specific option in option type with automatic screening The data content of the chosen option.A certain particular options are for example have selected, and the data item of single number type is made For data item to be counted, for example, the data item of a value type is chosen in lister, and be provided with the specific choosing of reservation In the case of the option screening conditions of item, what chart style was represented is that change of the numerical value of the particular options in the correspondence time becomes Gesture.
Table 3 and table 4 respectively illustrate the example of data form to be selected,
Table 3
Application time Ask for leave type Ask for leave number of days
2016/12/1 Sick leave 3
2016/12/1 Annual leave 1
2016/12/2 Annual leave 1
2016/12/3 Annual leave 1
2016/12/3 The leave of absence 2
2016/12/4 Annual leave 1
2016/12/4 Sick leave 1
Table 4
So that lister only have selected the sick leave option in type of asking for leave as an example, then the statistical chart x-axis of generation is corresponding It is the entry time of every record, it is the data content of the temporal selected type that y-axis is corresponding.After screening, table 3 The data content filtered out is on December 1st, 2016 and December 4, and sick leave number of days of asking for leave is respectively 3 days and 1 day;And table 4 is screened The data content gone out is on December 1st, 2016, on December 4th, 2016, on December 5th, 2016,6 days, 2016 December in 2016 December 7, on December 8th, 2016, sick leave number of days of asking for leave is respectively 3,1,4,3,4,3.
In step S106, when extracting data content, for there is the data content of multi-option in data item, there is also multiple During option value, multiple option values can also be respectively processed, for example the data item for hobby, in same data Multiple options can be included by holding, and can include running, two options of swimming.When generating form to such data item, selection Chart style is constant, but when specifically extracting data content, can be carried out as multiple data contents with uniterming Processing.For example include running, the data content of two options of swimming, a uniterming run and a trip can be split as The uniterming of swimming.
In the generation method of the statistical chart of the present embodiment, chart style is between the data mode of data item to be counted Syntagmatic determine, the chart style of various syntagmatics is illustrated below in conjunction with example.
Corresponding to situation of the syntagmatic for the data item of single number type, chart style can be block diagram or song Line chart.For example when lister has chosen the data item of value type, what statistical chart was represented can be the change on time shaft Change trend, then according to the number of numerical value set, it is determined that using the chart style of block diagram or curve map.If of numerical value set Number is smaller, is, for example, less than 6, then can be block diagram, if number is more, is greater than being equal to 6, is then curve map, specifically Number threshold value can be configured, and threshold value 6 herein is only to enumerate.When generating statistical chart according to table 2, there are four notes in table 2 Record, then can use block diagram.Meanwhile, there can be an entry time (also to recognize with each record of default data content To be the holding time or the time of charging to of data content), such as " application time " in table 2, if it is not, needing tabulation Person provides after obtaining by other means.Corresponding x-axis is the time, and corresponding y-axis is the interior of the time corresponding selected data Hold (quantity).Table 5 and table 6 respectively illustrate the data item to be counted in two data sheets:
Table 5
Time Data item
2016/12/1 3
2016/12/2 5
2016/12/3 2
2016/12/4 1
Table 6
Time Data item
2016/12/1 3
2016/12/2 5
2016/12/3 2
2016/12/4 1
2016/12/5 4
2016/12/6 3
Fig. 2 and Fig. 3 are respectively the block diagram and folding of the generation method generation of statistical chart according to an embodiment of the invention Line chart.Wherein, Fig. 2 is the statistical chart that table 5 is generated, and Fig. 3 is the statistical chart that table 6 is generated.According to Fig. 4 it can be seen that in December, 2016 On December 4th, 1 day 1, corresponding numerical value change is respectively:3、5、2、1;And Fig. 5 can be seen that on December 1st, 2016 extremely On December 6th, 2016, corresponding numerical value change is respectively:3、5、2、1、4、3.
Corresponding to situation of the syntagmatic for the data item of multiple value types, chart style can for a small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram or Multidimensional curve map.For example when lister has chosen the data item of multiple value types, the corresponding statistics of that each data item Figure is respectively block diagram or multidimensional curve map, and corresponding chart style is a small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram and multidimensional curve map, if set of values The number of conjunction is smaller, is, for example, less than 6, then can be block diagram, if number is more, is greater than being equal to 6, is then curve map, Specific number threshold value can be configured, and threshold value 6 herein is only to enumerate.Table 7 and table 8 respectively illustrate two data sheets In data item to be counted:
Table 7
Time Data item 1 Data item 2
2016/12/1 3 5
2016/12/2 5 3
2016/12/3 2 6
2016/12/4 1 7
Table 8
Time Data item 1 Data item 2
2016/12/1 3 5
2016/12/2 5 3
2016/12/3 2 6
2016/12/4 1 7
2016/12/5 4 3
2016/12/6 3 2
Fig. 4 and Fig. 5 are respectively a small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram of the generation method generation of statistical chart according to an embodiment of the invention With multidimensional curve map.Wherein, Fig. 4 is the statistical chart that table 7 is generated, and Fig. 5 is the statistical chart that table 8 is generated.According to Fig. 6 it can be seen that In on December 4,1 day to 2016 December in 2016, the corresponding numerical value change of the first data item is respectively:3rd, 5,2,1, and the second number According to the corresponding numerical value change point of item than being 5,3,6,7;And Fig. 7 can be seen that on December 6,1 day to 2016 December in 2016, number It is respectively according to the corresponding numerical value change of item 1:3rd, 5,2,1,4,3, the corresponding numerical value change of data item 2 is respectively 5,3,6,7,3,2.
Should be in situation of the syntagmatic for the data item of single option type, chart style is pie chart;For example in lister Chosen the data item of an option type, then it represents that be the respective option percentage, so using pie chart.The element of pie chart For each option, the number of percentage is the number that option occurs in data content.Table 9 shows treating in data sheet The data item of the option type of statistics, table 9 can be obtained by the row of the 3rd in selection table 2.
Table 9
Ask for leave type
Sick leave
Annual leave
The leave of absence
Sick leave
Fig. 6 is the pie chart generated according to the generation method of the statistical chart of one embodiment of the invention.The pie chart is according to table 9 Data are generated.As seen in Figure 6, in type of asking for leave, the number of times for sick leave occur accounts for half, and the number of times of annual leave and the leave of absence is each Account for each several part in a quarter, i.e. pie chart and be demonstrated by option accounting.
Corresponding to situation of the syntagmatic for the data item of multiple option types, chart style can be block diagram.For example When lister has chosen the data item of multiple option types, expression is the other types accounting situation under a certain type, because This is preferred to use tufted column diagram.Wherein x-axis is the respective option of one of option type, and y-axis is other option types The appearance number of option.It can in addition contain provide operate interface (such as button, menu of the option type that can switch in x-axis Deng), it so can easily represent the accounting relation of different modes.Table 10 shows multiple choosings to be counted in data sheet The data item of item type, table 10 can be obtained by the first row in selection table 2 and the 3rd row.
Table 10
Applicant Ask for leave type
Zhang San Sick leave
Li Si Annual leave
King five The leave of absence
Zhang San Sick leave
Fig. 7 is the data item correspondence of the option type generated according to the generation method of the statistical chart of one embodiment of the invention Block diagram.Fig. 7 block diagram can be formed by the data of table 8.Zhang San has applied for 2 sick leaves, 0 leave of absence as seen from the figure And the annual leave, king five applied for 1 leave of absence, 0 sick leave and annual leave, and Li Si has applied 1 annual leave, 0 sick leave and annual leave.For choosing The data content of item type is again not limited to single choice or multiselect.
Corresponding to the data item and the situation of the data item of single option type that syntagmatic is single number type, chart Pattern can also be block diagram, for example, the data item of single number type and the data of single option type have been chosen in lister Xiang Shi, the quantity under different options shared by value type of expression, therefore it is preferred to use column diagram.
The x-axis of block diagram is the option of corresponding multi-option, the quantity of the corresponding data item for being selected value type of y-axis Value type is cumulative on the respective option.It the following is corresponding block diagram.Table 11 shows to be counted in data sheet Single number type data item and the data item of single option type, table 11 can by select in table 2 the 3rd arrange and 4th row are obtained.
Table 11
Ask for leave type Ask for leave number of days
Sick leave 3
Annual leave 5
The leave of absence 2
Sick leave 1
Fig. 8 is the data item of the single number type generated according to the generation method of the statistical chart of one embodiment of the invention Block diagram corresponding with the data item of single option type.Sick leave totally 4 days, 5 days annual leave, the leave of absence 2 days as seen from the figure.
Corresponding to the data item and the situation of the data item of multiple option types that syntagmatic is multiple value types, chart Pattern can be a small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram, the set of choices of the corresponding selected multi-option of x-axis, and corresponding y-axis is chosen on the option Data content (quantity) it is cumulative.Table 12 shows the data item of multiple value types to be counted in data sheet and multiple The data item of option type.
Table 12
Option one Option 2 Numerical value 1 Numerical value 2
Option one -1 Option 2-1 2 2
Option one -2 Option 2-2 2 2
Option one -3 Option 2-3 1 2
Option one -1 Option 2-1 2 0
Option one -2 Option 2-2 3 0
Option one -3 Option 2-3 1 0
It is empty Option 2-1 0 2
Option one -2 It is empty 0 1
Option one -3 It is empty 0 2
Fig. 9 is the data item of the multiple value types generated according to the generation method of the statistical chart of one embodiment of the invention With a small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram of the data item of multiple option types.A small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram shows the cumulative of each option correspondence numerical value.
The corresponding relation of syntagmatic and chart style between various data modes as defined in above-mentioned mapping table, can be by The data item of designer's selection is easily convertible to satisfactory statistical chart, and data are largely handled without designer, Substantially increase the efficiency of generation statistical chart.
In addition, in other alternative embodiments of the invention, in the data that data item to be counted is multiple value types In the case of, the syntagmatic between data mode can further include:Numerical value in the data item of multiple value types Operation relation.
In these embodiments, the step of determining the syntagmatic between the data mode of data item also includes:Identification is multiple It whether there is operation relation in the data item of value type between data content;If in the presence of according to the computing between data content Relation determines syntagmatic.Above-mentioned operation relation can be the operation relation of setting in data to be selected, can also pass through numerical value intelligence It can recognize and draw.Recognize that operation relation (can for example obtain the computing letter in excel forms to extract default operation relation Number), or extract the numerical value of the data item of multiple value types, and recognize and whether there is computing between the numerical value extracted Relation, if in the presence of determining operation relation;Syntagmatic is determined according to operation relation.For example there are four data class in data sheet , there is operation relation a=b+c+d in data item a, b, c, the d of type.So lister selects b, c data item and selection b, c, d Data item in the case of, the statistical graph drawn out can be different.
For example, corresponding to data item and the number of the data item of multiple value types that syntagmatic is multiple value types There is a situation where to add and operation relation between value, chart style can be accumulation graph.For example for the example of form 13:
Table 13
Applicant Application time a b c d
Zhang San 2016/12/1 6 2 1 3
Li Si 2016/12/2 6 3 2 1
King five 2016/12/3 6 1 3 2
Zhang San 2016/12/5 10 3 4 3
Li Si 2016/12/6 7 2 2 3
King five 2016/12/8 12 4 3 5
Zhang San 2016/12/9 4 1 1 2
In table 13 it can be seen that a be b, c, d tri- synthesis, namely multiple value types data item numerical value between There is a situation where to add and operation relation, relation is a=b+c+d, then total item is a, is itemized as b, c, d.If having chosen part to itemize, Then can be using accumulation block diagram;If subitem is checked completely, percentage accumulation graph can be used.
Figure 10 is that the data item with operation relation is given birth to according to the generation method of the statistical chart of one embodiment of the invention Into column accumulation graph.Figure 11 is the generation method according to the statistical chart of one embodiment of the invention to the number with operation relation The percentage accumulation graph generated according to item.Wherein Figure 10 be in lister selection table 13 two deadlines of b, c be December 6 in 2016 Day the corresponding statistical chart of data, due to without selecting all subitems, therefore using accumulation block diagram;Figure 11 selects for lister Select the corresponding statistical chart of data that tri- deadlines of b, c, d in table 13 are on December 6th, 2016, point all due to have selected , therefore use percentage accumulation graph.
In the case where the number of the data content collection of selection is more, stacked area figure can be used, according to Figure 12 Stacked area figure of the generation method of the statistical chart of one embodiment of the invention to the data item generation with operation relation.Figure 13 The percentage heap generated for the generation method of the statistical chart according to one embodiment of the invention to the data item with operation relation Product area-graph.
The generation method of the statistical chart of the present embodiment, the operation relation between data can be identified automatically, to depositing The expression way of corresponding statistical chart is selected in the data of operation relation, the statistical chart of generation is more directly perceived, further reduces The operation of lister.
The present embodiment additionally provides a kind of computer-readable storage medium 10, and Figure 14 is calculating according to an embodiment of the invention The schematic diagram of machine storage medium 10, the computer-readable storage medium preserves computer program 11, and computer program 11 is run When cause computer-readable storage medium 10 place equipment perform any of the above-described embodiment statistical chart generation method.
The computer-readable storage medium 10 of the present embodiment can be that (electrically erasable is read-only to be deposited for such as flash memory, EEPROM Reservoir), EPROM, hard disk or ROM etc electronic memory.Computer-readable storage medium 10, which has, to be used to perform the above method In any method and step computer program 11 memory space.These computer programs 11 can be from one or more meter Read or be written in calculation machine program product in this one or more computer program product.These computer program products Including such as hard disk, the program code carrier of compact-disc (CD), storage card or floppy disk etc.The institute of computer-readable storage medium 10 When equipment runs above computer program 11, each step in the method for foregoing description can be performed.
So far, although those skilled in the art will appreciate that detailed herein have shown and described multiple showing for the present invention Example property embodiment, still, still can be direct according to present disclosure without departing from the spirit and scope of the present invention It is determined that or deriving many other variations or modifications for meeting the principle of the invention.Therefore, the scope of the present invention is understood that and recognized It is set to and covers other all these variations or modifications.

Claims (10)

1. a kind of generation method of statistical chart, including:
Obtain data item to be counted;
The syntagmatic between the data mode of the data item to be counted is determined, and it is described according to the determination of default mapping table The corresponding chart style of syntagmatic, the data mode includes the title and data type of the data item;
The data content of the data item to be counted is extracted, the data content is the set of data value in the data item;
The information needed for the chart style is extracted from the data content of the data item to be counted, and according to the figure Table sample formula draws the statistical chart using the information extracted.
2. according to the method described in claim 1, wherein
The data type includes:Value type and option type, belong to the data content of the data item of the value type For the set of numerical value, the data content for belonging to the data item of the option type is the set of option value;
Syntagmatic between the data mode includes:The quantity of the data item of the value type and the option type The relation combined between the quantity of data item.
3. method according to claim 2, wherein
The step of obtaining data item to be counted includes:The selection operation to data item in data to be selected is received, and
The step of data content for extracting the data item to be counted, includes:Determine whether to be provided with the screening to data content Condition;If so, filtering out the data content for meeting the screening conditions from the data content for the data item being selected;If it is not, Extract the total data content for the data item being selected.
4. method according to claim 3, wherein
Contain the holding time of the data content in the data item, the screening conditions include:Time screening conditions, it is described Time screening conditions regulation has initial time and/or deadline, and
The step of filtering out the data content for meeting the screening conditions from the data content for the data item being selected includes:Carry Take the holding time of data content in the data item being selected, and by the holding time and the time screening conditions Matched, to filter out the data content for meeting the time screening conditions.
5. method according to claim 3, wherein
The screening conditions also include:Option screening conditions, the option screening conditions provide with a hook at the end option value and/or exclusion Option value, and
The step of filtering out the data content for meeting the screening conditions from the data content for the data item being selected includes:
Extract the data content containing the reservation option value in the data item of the option type;And/or
The data content for containing the Exclusions Options value in the data item of the option type is excluded, and extracts remaining data Content.
6. the method described in claim 3, wherein
The data to be selected are presented in the form of data sheet, wherein the selection operation to data item in the data to be selected includes To the selection operation of the column data of row data or the data sheet in the data sheet.
7. method according to claim 6, wherein
The chart style include it is following any one or more:Block diagram, curve map, pie chart, a small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram, many dimension curves Figure, and
Corresponding relation as defined in the mapping table include it is following any one or more:
Corresponding to situation of the syntagmatic for the data item of single number type, the chart style is block diagram or curve Figure;
Corresponding to situation of the syntagmatic for the data item of single option type, the chart style is pie chart;
Corresponding to the syntagmatic for multiple value types data item situation, the chart style be a small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram or Multidimensional curve map;
Corresponding to situation of the syntagmatic for the data item of multiple option types, the chart style is block diagram;
It is described corresponding to the data item and the situation of the data item of single option type that the syntagmatic is single number type Chart style is block diagram;
It is described corresponding to the data item and the situation of the data item of multiple option types that the syntagmatic is multiple value types Chart style is a small bundle of straw, etc. for silkworms to spin cocoons on shape block diagram.
8. method according to claim 6, wherein
In the case of data item of the data item to be counted for multiple value types, the combination between the data mode Relation also includes:The operation relation of numerical value in the data item of the multiple value type;And determine the data of the data item The step of syntagmatic between form, also includes:
Recognize and whether there is operation relation in the data item of the multiple value type between data content;
If in the presence of determining the syntagmatic according to the operation relation between the data content.
9. method according to claim 8, wherein
The chart style also includes:Accumulation graph, the accumulation graph include it is following any one or more:Stacked area figure, heap Product block diagram, percentage area accumulation graph, percentage accumulation block diagram, and
Corresponding relation as defined in the mapping table also includes:
Corresponding to the data item and the number of the data item of the multiple value type that the syntagmatic is multiple value types There is a situation where to add and operation relation between value, the chart style is accumulation graph.
10. a kind of computer-readable storage medium, wherein the computer program that is stored with, and cause institute during computer program operation The place equipment for stating computer-readable storage medium performs the generation method of statistical chart according to any one of claim 1 to 9.
CN201710210287.4A 2017-03-31 2017-03-31 Statistical graph generation method and computer storage medium Active CN107085602B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710210287.4A CN107085602B (en) 2017-03-31 2017-03-31 Statistical graph generation method and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710210287.4A CN107085602B (en) 2017-03-31 2017-03-31 Statistical graph generation method and computer storage medium

Publications (2)

Publication Number Publication Date
CN107085602A true CN107085602A (en) 2017-08-22
CN107085602B CN107085602B (en) 2021-01-22

Family

ID=59615026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710210287.4A Active CN107085602B (en) 2017-03-31 2017-03-31 Statistical graph generation method and computer storage medium

Country Status (1)

Country Link
CN (1) CN107085602B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107861929A (en) * 2017-09-30 2018-03-30 深圳市买买提乐购金融服务有限公司 Document structure tree method, terminal and computer-readable medium
CN108021624A (en) * 2017-11-21 2018-05-11 北京金堤科技有限公司 The method and device that a kind of timeliness dynamic collection of illustrative plates shows
CN109241507A (en) * 2018-07-27 2019-01-18 阿里巴巴集团控股有限公司 A kind of chart generation method and device, a kind of calculating equipment and storage medium
CN109684619A (en) * 2018-12-20 2019-04-26 成都四方伟业软件股份有限公司 Data visualization methods of exhibiting, device, electronic equipment and storage medium
CN109770893A (en) * 2019-03-08 2019-05-21 东南大学 The method and device of atrial fibrillation position are quickly positioned in a kind of Holter analysis system
CN110309207A (en) * 2018-02-07 2019-10-08 北京第一视角科技有限公司 Medical data variable method for visualizing, device, storage medium and electronic equipment
CN110427362A (en) * 2018-04-27 2019-11-08 杭州海康威视数字技术股份有限公司 A kind of method and device obtaining type of database
CN112365564A (en) * 2020-11-13 2021-02-12 华润电力(唐山曹妃甸)有限公司 Temperature monitoring method and device, electronic equipment and readable storage medium
CN113506356A (en) * 2021-07-26 2021-10-15 北京字节跳动网络技术有限公司 Drawing method and device of area map, readable medium and electronic equipment
CN115544985A (en) * 2022-11-30 2022-12-30 清华大学 Statistical chart making method, device, equipment and medium based on geographic computing language
WO2023142482A1 (en) * 2022-01-26 2023-08-03 华为云计算技术有限公司 Chart component selection method and data visualization device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101968812A (en) * 2010-10-25 2011-02-09 中国农业大学 Method and device for automatically generating cartogram by calling database data
CN102222105A (en) * 2011-06-23 2011-10-19 公安部交通管理科学研究所 Method for generating real-time statistical report
US8615715B1 (en) * 2001-07-24 2013-12-24 The Mathworks, Inc. Handling parameters in block diagram modeling
CN103914504A (en) * 2012-12-28 2014-07-09 富士通株式会社 Information processing apparatus and method for generating graphs
CN105653507A (en) * 2014-11-12 2016-06-08 北大方正集团有限公司 Chart generation method and device
CN105868310A (en) * 2016-03-25 2016-08-17 联想(北京)有限公司 Data processing method and device and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8615715B1 (en) * 2001-07-24 2013-12-24 The Mathworks, Inc. Handling parameters in block diagram modeling
CN101968812A (en) * 2010-10-25 2011-02-09 中国农业大学 Method and device for automatically generating cartogram by calling database data
CN102222105A (en) * 2011-06-23 2011-10-19 公安部交通管理科学研究所 Method for generating real-time statistical report
CN103914504A (en) * 2012-12-28 2014-07-09 富士通株式会社 Information processing apparatus and method for generating graphs
CN105653507A (en) * 2014-11-12 2016-06-08 北大方正集团有限公司 Chart generation method and device
CN105868310A (en) * 2016-03-25 2016-08-17 联想(北京)有限公司 Data processing method and device and electronic device

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107861929A (en) * 2017-09-30 2018-03-30 深圳市买买提乐购金融服务有限公司 Document structure tree method, terminal and computer-readable medium
CN108021624A (en) * 2017-11-21 2018-05-11 北京金堤科技有限公司 The method and device that a kind of timeliness dynamic collection of illustrative plates shows
CN108021624B (en) * 2017-11-21 2020-08-11 北京金堤科技有限公司 Method and device for displaying timeliness dynamic map
CN110309207A (en) * 2018-02-07 2019-10-08 北京第一视角科技有限公司 Medical data variable method for visualizing, device, storage medium and electronic equipment
CN110427362A (en) * 2018-04-27 2019-11-08 杭州海康威视数字技术股份有限公司 A kind of method and device obtaining type of database
CN109241507A (en) * 2018-07-27 2019-01-18 阿里巴巴集团控股有限公司 A kind of chart generation method and device, a kind of calculating equipment and storage medium
CN109684619A (en) * 2018-12-20 2019-04-26 成都四方伟业软件股份有限公司 Data visualization methods of exhibiting, device, electronic equipment and storage medium
CN109770893A (en) * 2019-03-08 2019-05-21 东南大学 The method and device of atrial fibrillation position are quickly positioned in a kind of Holter analysis system
CN109770893B (en) * 2019-03-08 2022-11-18 东南大学 Method and device for rapidly positioning atrial fibrillation position in Holter analysis system
CN112365564A (en) * 2020-11-13 2021-02-12 华润电力(唐山曹妃甸)有限公司 Temperature monitoring method and device, electronic equipment and readable storage medium
CN113506356A (en) * 2021-07-26 2021-10-15 北京字节跳动网络技术有限公司 Drawing method and device of area map, readable medium and electronic equipment
CN113506356B (en) * 2021-07-26 2023-09-01 抖音视界有限公司 Method and device for drawing area map, readable medium and electronic equipment
WO2023142482A1 (en) * 2022-01-26 2023-08-03 华为云计算技术有限公司 Chart component selection method and data visualization device
CN115544985A (en) * 2022-11-30 2022-12-30 清华大学 Statistical chart making method, device, equipment and medium based on geographic computing language

Also Published As

Publication number Publication date
CN107085602B (en) 2021-01-22

Similar Documents

Publication Publication Date Title
CN107085602A (en) The generation method and computer-readable storage medium of statistical chart
CN104298736B (en) Data acquisition system connection method, device and Database Systems
CN107103057A (en) A kind of resource supplying method and device
CN108563796A (en) Data compressing method, device and the electronic equipment of block chain
JP5218544B2 (en) E-book trial reading data creation device and creation method
CN103955577B (en) Computer automatic design method for mechanical equipment
CN109636497A (en) A kind of Products Show method and apparatus
CN108280225B (en) Semantic retrieval method and semantic retrieval system
CN107463683A (en) The naming method and terminal device of code element
CN107679208A (en) A kind of searching method of picture, terminal device and storage medium
CN107800894A (en) A kind of phonetic prompt method and terminal device for telephony service system
CN102576362B (en) Method for setting metadata, system for setting metadata, and program
CN106484785A (en) A kind of method of efficient Automatic Adaptation Data field mapping
CN109255703A (en) Transaction data processing method and device
CN110020773A (en) A kind of data processing method, equipment and computer-readable medium
CN107315647A (en) Outlier detection method and system
CN106126522A (en) A kind of processing system of accounting statement
CN107644299A (en) Bill funds flow analysis method and computer-readable recording medium
CN107766313B (en) A kind of introduction method and its terminal of data list
CN106096957A (en) The update method of service attribute value and system
CN108875048A (en) Report form generation method, device, electronic equipment and readable storage medium storing program for executing
CN109992761A (en) The rule-based adaptive text information extracting method of one kind and software memory
CN105023353A (en) Method and apparatus for depositing and withdrawing money with reasonable use of money cassettes
CN103778247B (en) Data apportion method, device and equipment
CN110516220B (en) Report data input method, system and related equipment

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210121

Address after: 571199 1-108, Shangcheng Mingdu, 133 Longkun South Road, Fucheng Town, Qiongshan District, Haikou City, Hainan Province

Patentee after: Bitimage Technology (Hainan) Co.,Ltd.

Address before: B1-287, building 1, 88 Nongda South Road, Haidian District, Beijing 100084

Patentee before: BEIJING ZHIJU TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right