CN107544766A - A kind of data display method and device - Google Patents

A kind of data display method and device Download PDF

Info

Publication number
CN107544766A
CN107544766A CN201610464149.4A CN201610464149A CN107544766A CN 107544766 A CN107544766 A CN 107544766A CN 201610464149 A CN201610464149 A CN 201610464149A CN 107544766 A CN107544766 A CN 107544766A
Authority
CN
China
Prior art keywords
data
sum
viewing area
data source
back end
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
CN201610464149.4A
Other languages
Chinese (zh)
Other versions
CN107544766B (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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201610464149.4A priority Critical patent/CN107544766B/en
Publication of CN107544766A publication Critical patent/CN107544766A/en
Application granted granted Critical
Publication of CN107544766B publication Critical patent/CN107544766B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

Present disclose provides a kind of data display method and device,After data source to be shown is got,Generate figure corresponding to data source to be shown,And obtain the sum of back end in figure,When the sum of back end, which is more than, presets total,Data corresponding with default sum are dynamically obtained from data source to be shown,Generate and show the figure of data corresponding with default sum until getting total data from data source to be shown,I.e. when the sum of back end is more than quantity (the default sum) of once displayable back end in viewing area,Can to data in data source to be shown to graphically Dynamic Announce in viewing area,And the data count shown every time is default sum,Therefore for mass data,On the premise of it can be shown per data in ensureing mass data,Reduce the data count shown every time,And then the closeness of back end in viewing area is reduced.

Description

A kind of data display method and device
Technical field
This disclosure relates to technical field of data processing, in particular, more particularly to a kind of data display method and device.
Background technology
In order to allow the variation tendency of data to show more directly perceived, can using figure come the variation tendency of display data, Such as can be using line chart come the variation tendency of display data, wherein line chart is to be connected each back end with straightway The figure for coming and forming, its can in a manner of broken line display data variation tendency.Because line chart can show with the time and The continuous data of change, so line chart is highly suitable for being shown in the variation tendency of data under equal time distances.
Common business level chart such as ECharts and highCharts etc. on the market at present, is each provided with basic broken line Figure component can show the line chart for representing data variation trend on an electronic device by line chart component for using, but Be line chart component that current business level icon provides when for the display of mass data, using in constantly compression line chart The mode of the distance between adjacent two data node so that viewing area can show all back end simultaneously.
But different viewing area causes not of uniform size at present, when showing all back end in less viewing area When, it can cause data-intensive, and for mass data, the size regardless of viewing area is each in viewing area The display of back end all can be very intensive.
The content of the invention
In view of the above problems, it is proposed that the disclosure so as to provide one kind overcome above mentioned problem or at least in part solve on The data display method and device of problem are stated, realizes the Dynamic Announce of pieces of data to graphically in data source, reduces figure In each back end closeness.Specifically, technical scheme is as follows:
On the one hand, the disclosure provides a kind of data display method, and methods described includes:
After data source to be shown is got, figure corresponding to the data source to be shown is generated, the figure is used In the variation tendency for showing data in the data source to be shown;
The sum of back end in the figure is obtained, wherein each back end corresponds to the data to be shown A data in source;
Judge whether the sum of the back end is more than default sum, the default sum once may be used in viewing area The quantity of the back end of display;
If it is not, then show the figure in the viewing area;
If it is, Dynamic Announce is carried out to the data in the data source to be shown in the viewing area in batches Until the total data in the data source to be shown is shown.
Preferably, it is described Mobile state is entered to the data in the data source to be shown in the viewing area in batches to show Show until the total data in the data source to be shown is shown, including:
At interval of preset time since the data data [index] in the data source data [number] to be shown Untill the data data [index+n-1] in the data source data [number] to be shown, obtain and preset always with described Data corresponding to number, wherein index are subscript of the data in the data source data [number] to be shown, described Index initial value is 0, and at interval of index described in the preset time value on the basis of upper once value it is automatic It is the default sum to add 1, n, and number is the data count of the data source to be shown;
After often getting data corresponding with the default sum, the figure of data corresponding with the default sum is generated Shape, and show the figure in the viewing area.
Preferably, methods described also includes:It is pre-configured with the default sum.
Preferably, it is described to be pre-configured with the default sum, including:
Obtain the size of the viewing area;
Based on the size of the viewing area, the size pair with the viewing area is obtained from preset pattern parameter list The size for the graphic element answered, the graphic element are the minimum units of display data in the figure, and the graphic element With two back end;
The size of size and the graphic element based on the viewing area, obtains the default sum.
Preferably, methods described also includes:
When the sum of the back end, which is more than, presets total, the control that play control is sent in the viewing area is received System instruction;
Broadcasting situation based on the control instruction to the figure is controlled.
On the other hand, the disclosure provides a kind of data presentation device, and described device includes:
Graphics generation unit, for after data source to be shown is got, the generation data source to be shown to be corresponding Figure, the figure is used to show the variation tendencies of data in the data source to be shown;
Acquiring unit, for obtaining the sum of back end in the figure, wherein each back end corresponds to institute State a data in data source to be shown;
Judging unit, for judging whether the sum of the back end is more than default sum, the default sum is aobvious Show in region the once quantity of displayable back end;
First display unit, for when the back end sum no more than it is described default total when, in the display Region shows the figure;
Second display unit, for when the back end sum be more than it is described default total when, in batches described Viewing area carries out Dynamic Announce until complete in the data source to be shown to the data in the data source to be shown Portion's data are shown.
Preferably, second display unit includes:
Obtain subelement, at interval of preset time from the data in the data source data [number] to be shown Data [index] starts untill the data data [index+n-1] in the data source data [number] to be shown, obtains Data corresponding with the default sum are taken, wherein index is data in the data source data [number] to be shown Subscript, the initial value of the index is 0, and at interval of index described in the preset time value in upper once value On the basis of automatically plus 1, n be the default sum, number for the data source to be shown data count;
Graphics process subelement, after often getting data corresponding with the default sum, generation with it is described default The figure of data corresponding to sum, and show the figure in the viewing area.
Preferably, described device also includes:Dispensing unit, for being pre-configured with the default sum.
Preferably, the dispensing unit includes:
First obtains subelement, for obtaining the size of the viewing area;
Second obtains subelement, for the size based on the viewing area, obtained from preset pattern parameter list with The size of graphic element corresponding to the size of the viewing area, the graphic element are the minimums of display data in the figure Unit, and the graphic element has two back end;
Subelement is handled, for the size based on the viewing area and the size of the graphic element, is obtained described pre- It is if total.
Preferably, described device also includes:
Receiving unit, for when the sum of the back end is more than default total, receiving and being broadcast in the viewing area Put the control instruction of control transmission;
Control unit, for being controlled based on broadcasting situation of the control instruction to the figure.
By above-mentioned technical proposal, data display method and device that the disclosure provides are getting data source to be shown Afterwards, figure corresponding to data source to be shown is generated, and obtains the sum of back end in figure, when the sum of back end is big When default total, data corresponding with default sum are dynamically obtained from data source to be shown, generates and shows and in advance If the figure of data corresponding to sum from data source to be shown until get total data, the i.e. sum when back end More than in viewing area once quantity (default sum) of displayable back end when, can be to number in data source to be shown Graphics mode Dynamic Announce is in viewing area according to this, and the data count shown every time is default sum, therefore for magnanimity number For, on the premise of it can be shown per data in ensureing mass data, the data count shown every time is reduced, and then So that the closeness of back end reduces in viewing area.
Described above is only the general introduction of disclosed technique scheme, in order to better understand the technological means of the disclosure, And can be practiced according to the content of specification, and in order to allow above and other objects, features and advantages of the disclosure can Become apparent, below especially exemplified by the embodiment of the disclosure.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this area Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the disclosure Limitation.And in whole accompanying drawing, identical part is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 shows a kind of flow chart for the data display method that the exemplary embodiment of the disclosure provides;
Fig. 2 shows the flow of Dynamic Announce in batches in the data display method that the exemplary embodiment of the disclosure provides Figure;
Fig. 3 shows another flow chart for the data display method that the exemplary embodiment of the disclosure provides;
Fig. 4 shows the schematic diagram of play control in the viewing area that the exemplary embodiment of the disclosure provides;
Fig. 5 shows a kind of structural representation for the data presentation device that the exemplary embodiment of the disclosure provides;
Fig. 6 shows another structural representation for the data presentation device that the exemplary embodiment of the disclosure provides;
Fig. 7 shows the yet another construction schematic diagram for the data presentation device that the exemplary embodiment of the disclosure provides;
Fig. 8 shows the yet another construction schematic diagram for the data presentation device that the exemplary embodiment of the disclosure provides.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in accompanying drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
Referring to Fig. 1, a kind of flow chart of the data display method provided it illustrates the exemplary embodiment of the disclosure, For realizing the Dynamic Announce of pieces of data to graphically in data source, to reduce the intensive of each back end in figure Degree.Specifically, it may comprise steps of:
101:After data source to be shown is got, figure corresponding to data source to be shown is generated, wherein figure is used In the variation tendency for showing data in data source to be shown.For example, pieces of data is in data source to be shown is got In the case of the continuous data changed with equal time distances, its corresponding line chart can be generated, with by line chart come It is illustrated in the variation tendency of data under equal time distances.
That is, for any one data source to be shown, can be based on pieces of data in data source to be shown Specific change trend, generate corresponding with data source to be shown figure, facilitate the use in graph direct display data source The variation tendency of pieces of data.
102:The sum of back end in figure is obtained, wherein each back end corresponds to one in data source to be shown Data.For example, the type of back end can be represented with trunnion axis in the graphic, and vertical axis is then used to represent data section The specific value (data recorded in data source i.e. to be shown) of point.
Because each back end corresponds to a data in data source to be shown, number to be shown is being got Behind source, sum that can be directly using the data total amount recorded in data source to be shown as back end in figure.
103:Judge whether the sum of back end is more than default sum, if not, performing step 104;If it is, perform Step 105.
Wherein, default sum is the once quantity of displayable back end in viewing area, relative in viewing area Once show for mass data, above-mentioned default sum is less than the total amount of back end corresponding to mass data, aobvious so as to reduce Show the quantity of region once displayable back end.
In an exemplary embodiment of the disclosure, above-mentioned default sum can be pre-configured with, and be pre-configured with default Sum reduces data section in the figure shown every time on the premise of ensureing that rational display number carrys out Dynamic Announce total data The closeness of point, thus it is default total corresponding to being configured according to the size of viewing area.Its configuration process is as follows:
First, the size of viewing area is obtained, the size of wherein viewing area includes:Width w and height h, the two ginsengs Number can be got by JS and JQuery.For example, assuming that viewing area is:<Divid=" lineChart-container "> </div>, then function $ (" #lineChart-container ") .css can be obtained by the height of JQuery offers (" height ") and width obtain function $ (" #lineChart-container ") .css (" width ") to obtain viewing area Size;Or function document.getElementById (" can be obtained by the height that primary JS is provided LineChart-container ") .style.heigh and width obtain function document.getElementById (" LineChart-container ") .style.width obtain viewing area size.In an exemplary embodiment of the disclosure, Height h effect is to control the difference in height in figure between adjacent two data node to be not more than height h.
Secondly, the size based on viewing area, obtained from preset pattern parameter list corresponding with the size of viewing area Graphic element size, wherein graphic element is the minimum unit of display data in figure, and graphic element has two numbers According to node.By taking line chart as an example, the broken line between adjacent two data node and adjacent two data node in line chart Form graphic element.
In an exemplary embodiment of the disclosure, record has figure corresponding with viewing area in preset pattern parameter list The size of unit, and the size of graphic element is by being obtained to the multiple actual test of the display situation of figure in viewing area Arrive.Such as:For the viewing area of any one size, the display situation with a data source to figure in viewing area Actual test is carried out, specifically, being shown in batches in same viewing area using various sizes of graphic element same Data source, after the display situation of each figure is analyzed, the size of the best graphic element of display effect is remembered Record in preset pattern parameter list, and it is corresponding with corresponding viewing area, therefore subsequently in the viewing area of correspondingly-sized When showing other data sources, the size of corresponding graphic element can be directly got from preset pattern parameter list.Still with Exemplified by line chart, the size of graphic element can be the distance between adjacent two data node d.
Finally, the size based on viewing area and the size of graphic element, default sum is obtained.Still by taking line chart as an example, The size of size and graphic element based on viewing area obtains presetting total process:Default sum
104:Figure is shown in viewing area.When the sum of back end, which is less than or equal to, presets total, illustrate to wait to show The data count that the data source shown contains once can be shown in viewing area, now directly can then be shown in viewing area Figure corresponding to data source to be shown.
105:Dynamic Announce is carried out to the data in data source to be shown until to be shown in viewing area in batches Total data in data source is shown.
When the sum of back end, which is more than, presets total, illustrate that the data count that data source to be shown contains is larger, If being once shown in viewing area, the closeness of the back end of figure can be caused higher, therefore in the example of the disclosure Property embodiment in, can be in batches in viewing area to data to be shown when the sum of back end is more than default total Data in source carry out Dynamic Announce, until the total data in data source to be shown is shown.
In an exemplary embodiment of the disclosure, the feasible pattern shown in batches in viewing area is:At interval of default Time is since the data data [index] in the data source data [number] to be shown to the data to be shown Untill data data [index+n-1] in source data [number], data corresponding with the default sum are obtained;Often obtain To after data corresponding with default sum, the figure of data corresponding with default sum is generated, and figure is shown in viewing area.
Wherein index is subscript of the data in the data source data [number] to be shown, and the index's is first Initial value is 0, and adds 1, n to be institute automatically on the basis of upper once value at interval of the value of index described in the preset time Default sum is stated, number is the data count of the data source to be shown.
It was found from above-mentioned data corresponding with default sum being obtained every time from data source to be shown:Get every time Data between the data that change only have a data --- the index [i] in the data for getting last time is removed, and Increase index [i+n] in the data currently got, and it is from the index [0] in data source to be shown to obtain first Obtain.
Above-mentioned Dynamic Announce in batches and data acquisition are described in detail with reference to flow chart, it is assumed that treat The data source of display is data [number], and number is the data count of data source to be shown, its process as shown in Fig. 2 It may comprise steps of:
1051:Index is initialized, index value is arranged to 0.
1052:Judge whether index+n is less than number at interval of preset time, if it is, step 1053 is performed, if It is no, return and perform step 1051, index value is arranged to 0.When index+n value is more than number, illustrate a wheel Dynamic Announce process terminates, and now needs index value being arranged to 0, starts the Dynamic Announce process of next round.
In an exemplary embodiment of the disclosure, total wheel number of Dynamic Announce can be set, and then can be shown in Fig. 2 The deterministic process to the wheel number of Dynamic Announce is added in flow chart, when the wheel number of Dynamic Announce is less than total wheel number, continues dynamic Display process;And when the wheel number of Dynamic Announce is more than or equal to total wheel number, terminate the Dynamic Announce mistake to data source to be shown Journey, the figure of last batch shown in last wheel is shown in viewing area.
1053:Data data [index] to data [index+n-1] is obtained from data source to be shown, generation is corresponding The figure of data, shows figure in viewing area.
1054:Index value is added 1, returns and performs step 1052, to continue to obtain it from data source to be shown His not shown data.
Such as contain 100 datas in data source to be shown, preset total n and be equal to 10, then based on stream shown in above-mentioned Fig. 2 Cheng Tu, data [0] is obtained from 100 datas for the first time to the data of data [9], generation data [0] to data [9] data Corresponding figure is shown;Then data [10] is obtained to the data of data [19] after being spaced preset time, generates data [10] shown to figure corresponding to the data of data [19];……;It is spaced preset time and obtains data [90] to data [99] data, generation data [90] to figure corresponding to the data of data [99] are shown;Interval preset time is judged Index is equal to 100, illustrates to get total data from data source to be shown and figure corresponding to showing, so far can be with Index is arranged to 0, to start the Dynamic Announce of next round.
By above-mentioned technical proposal, the data display method that the disclosure provides is raw after data source to be shown is got Into figure corresponding to data source to be shown, and the sum of back end in figure is obtained, when the sum of back end is more than in advance If when total, data corresponding with default sum are dynamically obtained from data source to be shown, is generated and is shown and preset and be total The figure of data corresponding to number from data source to be shown until get total data, i.e., when the sum of back end is more than In viewing area once quantity (default sum) of displayable back end when, can to data in data source to be shown with Graphics mode Dynamic Announce is in viewing area, and the data count shown every time is default sum, therefore comes for mass data Say, on the premise of it can be shown per data in ensureing mass data, reduce the data count shown every time, and then cause The closeness of back end reduces in viewing area.
Referring to Fig. 3, another flow of the data display method provided it illustrates the exemplary embodiment of the disclosure Figure, on the basis of Fig. 1, can also comprise the following steps:
106:When the sum of back end, which is more than, presets total, receives the control that play control is sent in viewing area and refer to Order.
107:Broadcasting situation based on control instruction to figure is controlled.
In an exemplary embodiment of the disclosure, the control that play control is controlled for the broadcasting situation to figure, such as Shown in Fig. 4, wherein play control comprises at least:Broadcasting, F.F., rewind, pause and dragging play this five controls, each control Corresponding control instruction is associated with, specifically, control instruction corresponding to play control is normal play instruction, F.F. control is corresponding Control instruction be F.F. instruction, control instruction corresponding to rewind control be rewind instruction, suspend control corresponding to control instruction It is pause play instruction, and it is then to pull play instruction to pull control instruction corresponding to play control.In Fig. 4 play control and Pause control is same shared control, and when viewing area is initially shown, figure updates according to normal play instruction, and is schemed Shared control in 4 uses as pause control;After pause control is clicked, shares control and used as play control.
After any one control is touched, control instruction associated with it is sent in the controller of electronic equipment, Controller can be then controlled based on control instruction come the broadcasting situation to figure.Each control is described in detail below to figure The process that is controlled of broadcasting situation:
First, play control
After the normal play instruction of play control association is received, the data that the exemplary embodiment of the disclosure provides show Show that method can then control the broadcasting of figure with flow chart shown in Fig. 2, i.e., shown according to preset time to update in viewing area Figure.
Second, F.F. control
After the F.F. instruction of F.F. control association is received, it is determined that with the corresponding broadcasting speed of F.F. instruction, and with true Fixed broadcasting speed reduces preset time, updates the figure shown in viewing area with the preset time after diminution.Such as Broadcasting speed is 2 times of normal playback speed, and initial preset time is 10s (second), then the preset time after reducing is 5s, with At interval of 5s mode to give tacit consent to carousel direction to update the figure shown in viewing area.
Which which wherein give tacit consent to carousel direction to be used to indicate to be updated from direction of figure to direction, such as with level side Based on, the right from the left of figure to figure is updated, the image watermarking that will can thus have shown that, and will not The data of display are shown.
After receiving the normal play for receiving play control association after F.F. instruction again and instructing, preset time then can Initial value is reconfigured for, to update the figure shown in viewing area according to initial preset time.
3rd, rewind control
After the rewind instruction of rewind control association is received, it is determined that with the corresponding broadcasting speed of rewind instruction, and with true Fixed broadcasting speed reduces preset time, updates the figure shown in viewing area with the preset time after diminution.Such as Broadcasting speed is 2 times of normal playback speed, and initial preset time is 10s (second), then the preset time after reducing is 5s, with At interval of 5s mode to give tacit consent to the opposite direction in carousel direction to update the figure shown in viewing area.
Which which wherein give tacit consent to carousel direction to be used to indicate to be updated from direction of figure to direction, such as with level side Based on, the right from the left of figure to figure is updated, then the opposite direction for giving tacit consent to carousel direction is then from the right side of figure Side to the left of figure is updated, and thus can include the data shown before in viewing area again.
After receiving the normal play for receiving play control association after rewind instruction again and instructing, preset time then can Initial value is reconfigured for, to update the figure shown in viewing area according to initial preset time.
4th, pause control
After the pause instruction of pause control association is received, directly stop the dynamic renewal of figure, in viewing area Display receives the figure shown before pause instruction.
5th, dragging play control
In an exemplary embodiment of the disclosure, it is a progress bar being located in viewing area to pull play control, is led to The promotion of progress bar is crossed to show figure corresponding to corresponding data.In detailed process:Anchor point on progress bar is dragged when detecting When dragging operation, according to the dragging position of the anchor point during drag operation, target data is obtained from data source to be shown, Figure corresponding to generation target data is shown;At the end of drag operation is detected, the final position of anchor point is obtained, is based on The final position of anchor point obtains corresponding data corresponding with final position, and figure corresponding to corresponding data is shown in viewing area Shape, play by pulling and corresponding data can be positioned according to the dragging position of anchor point on progress bar, realize the quick of data Positioning.
Herein it should be noted is that:In an exemplary embodiment of the disclosure, can be by being controlled to above-mentioned five Broadcasting situation of the operation of part to figure is switched over, and F.F. control is clicked on such as after play control is clicked on, then figure is from normal Broadcasting switches to fast-forward play;Or rewind control is clicked on after F.F. control is clicked on, then figure returns to just from fast-forward play Often play, then switch to fast reverse play from normal play again.Only be here to the description of the feasible pattern of switching, specifically how The exemplary embodiment of the switching disclosure is not any limitation as.
For the exemplary embodiment of foregoing each method, in order to be briefly described, therefore it is all expressed as a series of dynamic Combine, but those skilled in the art should know, the disclosure is not limited by described sequence of movement, because foundation The disclosure, some steps can use other orders or carry out simultaneously.Secondly, those skilled in the art should also know, say Exemplary embodiment described in bright book belongs to preferred embodiment, involved action and the module not necessarily disclosure It is necessary.
Corresponding with the exemplary embodiment of the above method, the disclosure also provides a kind of data presentation device, such as Fig. 5 institutes Show, a kind of structural representation of the data presentation device provided it illustrates the exemplary embodiment of the disclosure, can include:Figure Shape generation unit 11, acquiring unit 12, judging unit 13, the first display unit 14 and the second display unit 15.
Graphics generation unit 11, for after data source to be shown is got, generating corresponding to data source to be shown Figure, wherein figure are used for the variation tendency for showing data in data source to be shown.For example, getting data to be shown In the case that pieces of data is the continuous data changed with equal time distances in source, its corresponding line chart can be generated, To be illustrated in the variation tendency of data under equal time distances by line chart.
Acquiring unit 12, for obtaining the sum of back end in figure, wherein each back end correspond to it is to be shown A data in data source.Because each back end corresponds to a data in data source to be shown, obtaining , can be directly using the data total amount recorded in data source to be shown as back end in figure to after data source to be shown Sum.
Judging unit 13, for judging whether the sum of back end is more than default sum, wherein default sum is display The once quantity of displayable back end in region, it is above-mentioned pre- for once mass data is shown in viewing area If sum is less than the total amount of back end corresponding to mass data, so as to reduce viewing area once displayable back end Quantity.And default sum reduces display every time on the premise of ensureing that rational display number carrys out Dynamic Announce total data Figure in back end closeness.
First display unit 14, for when the sum of back end is no more than presetting total, showing and scheming in viewing area Shape.When the sum of back end is less than or equal to default total, illustrate that data count that data source to be shown contains can be with Once it is shown in viewing area, now the first display unit 14 then can directly show data source to be shown in viewing area Corresponding figure.
Second display unit 15, for when the sum of back end is more than default total, in batches in viewing area pair Data in data source to be shown carry out Dynamic Announce up to the total data in data source to be shown is shown.
When the sum of back end, which is more than, presets total, illustrate that the data count that data source to be shown contains is larger, If being once shown in viewing area, the closeness of the back end of figure can be caused higher, therefore in the example of the disclosure Property embodiment in, when the sum of back end is more than default total, the second display unit 15 can be in batches in viewing area Dynamic Announce is carried out to the data in data source to be shown, until the total data in data source to be shown is shown.
In an exemplary embodiment of the disclosure, the second display unit 15 realizes data using the structure shown in Fig. 6 Show in batches, specific second display unit 15 can include:Obtain subelement 151 and graphics process subelement 152.
Obtain subelement 151, at interval of preset time from the data source data [number] to be shown Data data [index] starts Only, data corresponding with the default sum are obtained.
Graphics process subelement 152, after often getting data corresponding with default sum, generation and default sum are right The figure for the data answered, and show figure in viewing area.
Wherein index is subscript of the data in the data source data [number] to be shown, and the index's is first Initial value is 0, and adds 1, n to be institute automatically on the basis of upper once value at interval of the value of index described in the preset time Default sum is stated, number is the data count of the data source to be shown.
It was found from above-mentioned data corresponding with default sum being obtained every time from data source to be shown:Get every time Data between the data that change only have a data --- the index [i] in the data for getting last time is removed, and Increase index [i+n] in the data currently got, and it is from the index [0] in data source to be shown to obtain first Obtain.
By above-mentioned technical proposal, the data presentation device that the disclosure provides is raw after data source to be shown is got Into figure corresponding to data source to be shown, and the sum of back end in figure is obtained, when the sum of back end is more than in advance If when total, data corresponding with default sum are dynamically obtained from data source to be shown, is generated and is shown and preset and be total The figure of data corresponding to number from data source to be shown until get total data, i.e., when the sum of back end is more than In viewing area once quantity (default sum) of displayable back end when, can to data in data source to be shown with Graphics mode Dynamic Announce is in viewing area, and the data count shown every time is default sum, therefore comes for mass data Say, on the premise of it can be shown per data in ensureing mass data, reduce the data count shown every time, and then cause The closeness of back end reduces in viewing area.
In order that obtain the closeness for the figure that viewing area is shown reduces relative to existing way, the exemplary reality of the disclosure Applying the data presentation device of example offer also includes:Dispensing unit 10, as shown in Figure 7.Wherein dispensing unit 10, for being pre-configured with Default sum, and for different electronic equipments, dispensing unit 10 can configure pair according to the size of viewing area The default sum answered.
Corresponding dispensing unit 10 includes:First obtains subelement, the second acquisition subelement and processing subelement.Wherein First obtains subelement, for obtaining the size of viewing area.The size of viewing area includes:Width w and height h, the two Parameter can be got by JS and JQuery, specifically see the related description in the exemplary embodiment of method.
Second obtains subelement, for the size based on viewing area, obtains and shows from preset pattern parameter list The size of graphic element corresponding to the size in region, graphic element are the minimum units of display data in figure, and graphic element With two back end.By taking line chart as an example, adjacent two data node and adjacent two data node in line chart Between broken line composition graphic element.
In an exemplary embodiment of the disclosure, record has figure corresponding with viewing area in preset pattern parameter list The size of unit, and the size of graphic element is by being obtained to the multiple actual test of the display situation of figure in viewing area Arrive.Such as:For the viewing area of any one size, the display situation with a data source to figure in viewing area Actual test is carried out, specifically, being shown in batches in same viewing area using various sizes of graphic element same Data source, after the display situation of each figure is analyzed, the size of the best graphic element of display effect is remembered Record in preset pattern parameter list, and it is corresponding with corresponding viewing area, therefore subsequently in the viewing area of correspondingly-sized When showing other data sources, the size of corresponding graphic element can be directly got from preset pattern parameter list.Still with Exemplified by line chart, the size of graphic element can be the distance between adjacent two data node d.
Subelement is handled, for size and the size of graphic element based on viewing area, obtains default sum.Still with folding Exemplified by line chart, the process that the size of size and graphic element based on viewing area obtains presetting sum is:Default sum
Referring to Fig. 8, the yet another construction of the data presentation device provided it illustrates the exemplary embodiment of the disclosure Schematic diagram, it can also include on the basis of above-mentioned data presentation device:Receiving unit 16 and control unit 17.
Receiving unit 16, for when the sum of back end is more than default total, receiving play control in viewing area The control instruction of transmission.
Control unit 17, for being controlled based on broadcasting situation of the control instruction to figure.
In an exemplary embodiment of the disclosure, the control that play control is controlled for the broadcasting situation to figure, its Middle play control comprises at least:Broadcasting, F.F., rewind, pause and dragging play this five controls, and each control is associated with accordingly Control instruction, specifically, control instruction corresponding to play control be normal play instruction, control instruction corresponding to F.F. control It is F.F. instruction, control instruction corresponding to rewind control is rewind instruction, and control instruction corresponding to pause control is that pause plays Instruction, and it is then to pull play instruction to pull control instruction corresponding to play control.
After any one control is touched, control instruction associated with it is sent in the controller of electronic equipment, Controller can be then controlled based on control instruction come the broadcasting situation to figure.Each control is described in detail below to figure The process that is controlled of broadcasting situation:
First, play control
After the normal play instruction of play control association is received, control unit 17 can be with the second display unit 15 Mode controls the broadcasting of figure, i.e., updates the figure shown in viewing area according to preset time.
Second, F.F. control
After the F.F. instruction of F.F. control association is received, control unit 17 determines broadcasting speed corresponding with F.F. instruction Degree, and preset time is reduced with the broadcasting speed of determination, update what is shown in viewing area with preset time after diminution Figure.For example broadcasting speed is 2 times of normal playback speed, initial preset time is 10s (second), then reduce after it is default when Between be 5s, control unit 17 is in a manner of at interval of 5s to give tacit consent to carousel direction to update the figure shown in viewing area.
Which which wherein give tacit consent to carousel direction to be used to indicate to be updated from direction of figure to direction, such as with level side Based on, the right from the left of figure to figure is updated, the image watermarking that will can thus have shown that, and will not The data of display are shown.
After receiving the normal play for receiving play control association after F.F. instruction again and instructing, preset time then can It is reconfigured for initial value, control unit 17 according to initial preset time to update the figure shown in viewing area Shape.
3rd, rewind control
After the rewind instruction of rewind control association is received, control unit 17 determines broadcasting speed corresponding with rewind instruction Degree, and preset time is reduced with the broadcasting speed of determination, update what is shown in viewing area with preset time after diminution Figure.For example broadcasting speed is 2 times of normal playback speed, initial preset time is 10s (second), then reduce after it is default when Between be 5s, control unit 17 is in a manner of at interval of 5s to give tacit consent to the opposite direction in carousel direction to update what is shown in viewing area Figure.
Which which wherein give tacit consent to carousel direction to be used to indicate to be updated from direction of figure to direction, such as with level side Based on, the right from the left of figure to figure is updated, then the opposite direction for giving tacit consent to carousel direction is then from the right side of figure Side to the left of figure is updated, and thus can include the data shown before in viewing area again.
After receiving the normal play for receiving play control association after rewind instruction again and instructing, preset time then can It is reconfigured for initial value, control unit 17 according to initial preset time to update the figure shown in viewing area Shape.
4th, pause control
After the pause instruction of pause control association is received, control unit 17 directly stops the dynamic renewal of figure, Display receives the figure shown before pause instruction in viewing area.
5th, dragging play control
In an exemplary embodiment of the disclosure, it is a progress bar being located in viewing area to pull play control, is led to The promotion of progress bar is crossed to show figure corresponding to corresponding data.In detailed process:Anchor point on progress bar is dragged when detecting When dragging operation, control unit 17 obtains according to the dragging position of the anchor point during drag operation from data source to be shown Target data is taken, figure corresponding to generation target data is shown;At the end of drag operation is detected, control unit 17 obtains The final position of anchor point is taken, the final position based on anchor point obtains corresponding data corresponding with final position, and in viewing area Figure corresponding to middle display corresponding data, play and can be positioned accordingly according to the dragging position of anchor point on progress bar by pulling Data, realize the fast positionings of data.
Herein it should be noted is that:In an exemplary embodiment of the disclosure, control unit 17 can be by right Broadcasting situation of the operation of above-mentioned five controls to figure switches over, and F.F. control is clicked on such as after play control is clicked on, then Figure switches to fast-forward play from normal play;Or rewind control is clicked on after F.F. control is clicked on, then figure is from F.F. Broadcasting returns to normal play, then switches to fast reverse play from normal play again.Only it is that the feasible pattern of switching is retouched here State, the exemplary embodiment for specifically how switching the disclosure is not any limitation as.
In other exemplary embodiments of the disclosure, the data presentation device includes processor and memory, above-mentioned Graphics generation unit 11, acquiring unit 12, judging unit 13, the first display unit 14 and second display unit 15 etc. are used as journey Sequence unit is stored in memory, and corresponding work(is realized by the said procedure unit of computing device storage in memory Energy.
Kernel is included in processor, is gone in memory to transfer corresponding program unit by kernel.Kernel can set one Or more, by adjusting kernel parameter come pieces of data in Dynamic Announce data source to graphically, reduce each number in figure According to the closeness of node.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/ Or the form such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flashRAM), memory includes at least one storage Chip.
By above-mentioned technical proposal, the data presentation device that the disclosure provides is raw after data source to be shown is got Into figure corresponding to data source to be shown, and the sum of back end in figure is obtained, when the sum of back end is more than in advance If when total, data corresponding with default sum are dynamically obtained from data source to be shown, is generated and is shown and preset and be total The figure of data corresponding to number from data source to be shown until get total data, i.e., when the sum of back end is more than In viewing area once quantity (default sum) of displayable back end when, can to data in data source to be shown with Graphics mode Dynamic Announce is in viewing area, and the data count shown every time is default sum, therefore comes for mass data Say, on the premise of it can be shown per data in ensureing mass data, reduce the data count shown every time, and then cause The closeness of back end reduces in viewing area.
The disclosure additionally provides a kind of computer program product, when being performed on data processing equipment, is adapted for carrying out just The program code of beginningization there are as below methods step:
After getting data source to be shown, figure corresponding to the data source to be shown is generated, the figure is used for Show the variation tendency of data in the data source to be shown;
The sum of back end in the figure is obtained, wherein each back end corresponds to the data to be shown A data in source;
Judge whether the sum of the back end is more than default sum, the default sum once may be used in viewing area The quantity of the back end of display;
If it is not, then show the figure in the viewing area;
If it is, in batches viewing area in the data source to be shown data carry out Dynamic Announce until Total data in the data source to be shown is shown.
It should be understood by those skilled in the art that, the exemplary embodiment of the disclosure can be provided as method, system or calculate Machine program product.Therefore, the disclosure can use complete hardware exemplary embodiment, complete software exemplary embodiment or combine The form of exemplary embodiment in terms of software and hardware.Moreover, the disclosure can use wherein includes meter in one or more The computer-usable storage medium of calculation machine usable program code (includes but is not limited to magnetic disk storage, CD-ROM, optical memory Deng) on the form of computer program product implemented.
The disclosure is method, equipment (system) and the computer program production with reference to the exemplary embodiment according to the disclosure The flow chart and/or block diagram of product describes.It should be understood that can be by computer program instructions implementation process figure and/or block diagram Each flow and/or square frame and the flow in flow chart and/or block diagram and/or the combination of square frame.These meters can be provided Calculation machine programmed instruction is to the place of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices Device is managed to produce a machine so that the instruction for passing through computer or the computing device of other programmable data processing devices is produced It is raw to be used to realize the function of specifying in one flow of flow chart or multiple flows and/or one square frame of block diagram or multiple square frames Device.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and internal memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/ Or the form such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flashRAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
The exemplary embodiment of the disclosure is these are only, is not limited to the disclosure.For people in the art For member, the disclosure can have various modifications and variations.All any modifications made within the spirit and principle of the disclosure, etc. With replacement, improvement etc., should be included within the right of the disclosure.

Claims (10)

1. a kind of data display method, it is characterised in that methods described includes:
After data source to be shown is got, figure corresponding to the data source to be shown is generated, the figure is used to open up Show the variation tendency of data in the data source to be shown;
The sum of back end in the figure is obtained, wherein each back end is corresponded in the data source to be shown A data;
Judge whether the sum of the back end is more than default sum, the default sum can be once shown in viewing area Back end quantity;
If it is not, then show the figure in the viewing area;
If it is, in batches the viewing area in the data source to be shown data carry out Dynamic Announce until Total data in the data source to be shown is shown.
2. according to the method for claim 1, it is characterised in that described in batches in the viewing area to described to be shown Data source in data carry out Dynamic Announce until the total data in the data source to be shown is shown, including:
At interval of preset time since the data data [index] in the data source data [number] to be shown to institute Untill stating the data data [index+n-1] in data source data [number] to be shown, it is right with the default sum to obtain The data answered, wherein index are subscript of the data in the data source data [number] to be shown, the index's Initial value is 0, and at interval of index described in the preset time value on the basis of upper once value automatically plus 1, n be The default sum, number are the data count of the data source to be shown;
After often getting data corresponding with the default sum, the figure of data corresponding with the default sum is generated, and The figure is shown in the viewing area.
3. according to the method for claim 1, it is characterised in that methods described also includes:It is pre-configured with the default sum.
4. according to the method for claim 3, it is characterised in that it is described to be pre-configured with the default sum, including:
Obtain the size of the viewing area;
Based on the size of the viewing area, obtained from preset pattern parameter list corresponding with the size of the viewing area The size of graphic element, the graphic element is the minimum unit of display data in the figure, and the graphic element has Two back end;
The size of size and the graphic element based on the viewing area, obtains the default sum.
5. according to the method for claim 1, it is characterised in that methods described also includes:
When the sum of the back end, which is more than, presets total, receives the control that play control is sent in the viewing area and refer to Order;
Broadcasting situation based on the control instruction to the figure is controlled.
6. a kind of data presentation device, it is characterised in that described device includes:
Graphics generation unit, scheme for after data source to be shown is got, generating corresponding to the data source to be shown Shape, the figure are used for the variation tendency for showing data in the data source to be shown;
Acquiring unit, for obtaining the sum of back end in the figure, wherein being treated described in each back end is corresponding A data in the data source of display;
Judging unit, for judging whether the sum of the back end is more than default sum, the default sum is viewing area The once quantity of displayable back end in domain;
First display unit, for when the back end sum no more than it is described default total when, in the viewing area Show the figure;
Second display unit, for when the back end sum be more than it is described default total when, in batches in the display Region carries out Dynamic Announce to the data in the data source to be shown up to whole numbers in the data source to be shown According to shown.
7. device according to claim 6, it is characterised in that second display unit includes:
Obtain subelement, at interval of preset time from the data data in the data source data [number] to be shown [index] start untill the data data [index+n-1] in the data source data [number] to be shown, obtain with It is described it is default sum corresponding to data, wherein index be data in the data source data [number] to be shown under Mark, the initial value of the index are 0, and at interval of index described in the preset time value on the basis of upper once value Upper to add 1, n to be the default sum automatically, number is the data count of the data source to be shown;
Graphics process subelement, after often getting data corresponding with the default sum, generation and the default sum The figure of corresponding data, and show the figure in the viewing area.
8. device according to claim 6, it is characterised in that described device also includes:Dispensing unit, for being pre-configured with The default sum.
9. device according to claim 8, it is characterised in that the dispensing unit includes:
First obtains subelement, for obtaining the size of the viewing area;
Second obtains subelement, for the size based on the viewing area, obtained from preset pattern parameter list with it is described The size of graphic element corresponding to the size of viewing area, the graphic element are that the minimum of display data in the figure is single Member, and the graphic element has two back end;
Subelement is handled, for the size based on the viewing area and the size of the graphic element, is obtained described default total Number.
10. device according to claim 6, it is characterised in that described device also includes:
Receiving unit, for when the sum of the back end is more than default total, receiving and control being played in the viewing area The control instruction that part is sent;
Control unit, for being controlled based on broadcasting situation of the control instruction to the figure.
CN201610464149.4A 2016-06-23 2016-06-23 Data display method and device Active CN107544766B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610464149.4A CN107544766B (en) 2016-06-23 2016-06-23 Data display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610464149.4A CN107544766B (en) 2016-06-23 2016-06-23 Data display method and device

Publications (2)

Publication Number Publication Date
CN107544766A true CN107544766A (en) 2018-01-05
CN107544766B CN107544766B (en) 2021-01-22

Family

ID=60960483

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610464149.4A Active CN107544766B (en) 2016-06-23 2016-06-23 Data display method and device

Country Status (1)

Country Link
CN (1) CN107544766B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113110905A (en) * 2021-03-29 2021-07-13 联想(北京)有限公司 Control method, device, equipment and computer readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103135904A (en) * 2011-12-05 2013-06-05 英顺源(上海)科技有限公司 Chart dynamic display system and display method thereof
CN103345391A (en) * 2013-06-20 2013-10-09 深圳市亚特尔科技有限公司 Method for optimizing display data
CN103390110A (en) * 2013-07-26 2013-11-13 天津大学 Data display method
CN103869121A (en) * 2012-12-14 2014-06-18 北京普源精电科技有限公司 Waveform display device and method
CN104484203A (en) * 2014-12-11 2015-04-01 北京国双科技有限公司 Data display method and data display device for list data display control
CN105117404A (en) * 2015-07-17 2015-12-02 南京大学 Chart display defect optimization method based on chart types and data feature scenes
CN105574202A (en) * 2016-01-06 2016-05-11 北京金控数据技术股份有限公司 Real-time data multi-curve display method for operation facility
CN105718603A (en) * 2016-03-31 2016-06-29 北京理工大学 Candlestick graph-based time series data visualization method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103135904A (en) * 2011-12-05 2013-06-05 英顺源(上海)科技有限公司 Chart dynamic display system and display method thereof
CN103869121A (en) * 2012-12-14 2014-06-18 北京普源精电科技有限公司 Waveform display device and method
CN103345391A (en) * 2013-06-20 2013-10-09 深圳市亚特尔科技有限公司 Method for optimizing display data
CN103390110A (en) * 2013-07-26 2013-11-13 天津大学 Data display method
CN104484203A (en) * 2014-12-11 2015-04-01 北京国双科技有限公司 Data display method and data display device for list data display control
CN105117404A (en) * 2015-07-17 2015-12-02 南京大学 Chart display defect optimization method based on chart types and data feature scenes
CN105574202A (en) * 2016-01-06 2016-05-11 北京金控数据技术股份有限公司 Real-time data multi-curve display method for operation facility
CN105718603A (en) * 2016-03-31 2016-06-29 北京理工大学 Candlestick graph-based time series data visualization method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113110905A (en) * 2021-03-29 2021-07-13 联想(北京)有限公司 Control method, device, equipment and computer readable storage medium

Also Published As

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

Similar Documents

Publication Publication Date Title
CN110058856A (en) Page configuration method and device
US20130097476A1 (en) Content viewing apparatus, content distribution server, operation method and program for content viewing apparatus
AU2008305452B2 (en) Animating objects using a declarative animation scheme
CN109803180A (en) Video preview drawing generating method, device, computer equipment and storage medium
CN107728905B (en) Bullet screen display method and device and storage medium
CN104750731B (en) A kind of method and device obtaining whole user portrait
US9734555B2 (en) Generating a tree map
CN105578258B (en) A kind of method and device of video pre-filtering and video playback
CN112004137A (en) Intelligent video creation method and device
CN105659584A (en) Customizing mobile media captioning based on mobile media rendering
CN108364337A (en) The animated show method and device of image
CN107077375A (en) For the display methods of multiple operating system, device and electronic equipment
CN110019932A (en) The method and device of data processing
CN102074221A (en) Method and device for displaying characters
CN104517306A (en) Method and device for playing animation
CN109976632A (en) Text animation control methods and device, storage medium and processor
CN109857964A (en) A kind of heating power drawing drawing method, device, storage medium and the processor of page operation
CN107450904A (en) The method for drafting and device of title bar
CN107544766A (en) A kind of data display method and device
CN104254875A (en) Information processing device, information processing method, and information processing computer program product
CN106909397A (en) The method and device of input frame is generated in Unity interfaces
CN110020291A (en) The processing method and processing device of page layout
CN108345443A (en) Playback of songs method and device based on intelligent terminal
CN105408826A (en) System construction assist device, method, and recording medium
CN108134955A (en) A kind of method and device of program sequence

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
CB02 Change of applicant information

Address after: 100080 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant