CN108920145A - A kind of UI table color lump moving method - Google Patents

A kind of UI table color lump moving method Download PDF

Info

Publication number
CN108920145A
CN108920145A CN201810432596.0A CN201810432596A CN108920145A CN 108920145 A CN108920145 A CN 108920145A CN 201810432596 A CN201810432596 A CN 201810432596A CN 108920145 A CN108920145 A CN 108920145A
Authority
CN
China
Prior art keywords
data
cell
current data
previous item
data packet
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
CN201810432596.0A
Other languages
Chinese (zh)
Other versions
CN108920145B (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.)
Shaanxi Fast Gear Co Ltd
Original Assignee
Shaanxi Fast Gear 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 Shaanxi Fast Gear Co Ltd filed Critical Shaanxi Fast Gear Co Ltd
Priority to CN201810432596.0A priority Critical patent/CN108920145B/en
Publication of CN108920145A publication Critical patent/CN108920145A/en
Application granted granted Critical
Publication of CN108920145B publication Critical patent/CN108920145B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Abstract

The present invention provides a kind of UI table color lump moving method, including step:1) ranks number of the cell where current data are calculated;2) ranks number of the cell where previous item data are calculated, wherein the call number of the data packet where previous item data is smaller by 1 than the data packet where current data;The call number of previous item data and current data in the packet is identical;3) background colour of the cell where the cell and previous item data where update current data.When this method can be realized the change of individual unit lattice background colour, does not change the background colour of other cells of same a line/same row, enable current data is more outstanding to show meet the needs of user tracking data.

Description

A kind of UI table color lump moving method
Technical field
The invention belongs to UI design fields, in particular to UI table color lump moving method.
Background technique
UI design in, the use of list be it is commonplace, current data is filled into list, with meet data analysis Demand.
It is soft in order to facilitate user tracking current data if necessary to carry out recycling multiple update to the data in list Part developer would generally prompt user by changing current line background colour.But if needing number of data lines to be shown much larger than column When line number (and scroll bar cannot be used) that table can be shown, columns can only be expanded at this time, show multi-group data on a same row, such as Fruit is at this point, prompt user's current data row yet by full line background colour is changed, it is clear that is unable to reach the purpose of prompt user.
Summary of the invention
The purpose of the present invention is to provide a kind of UI table color lump moving methods, so as to the change data cells of specificity Background colour achievees the purpose that data is prompted to update.
The present invention is to be achieved through the following technical solutions:
A kind of UI table color lump moving method, including step:
1) ranks number of the cell where current data are calculated;
2) ranks number of the cell where previous item data are calculated, wherein the rope of the data packet where previous item data Quotation marks are smaller by 1 than the data packet where current data;The call number of previous item data and current data in the packet is identical;
3) background colour of the cell where the cell and previous item data where update current data;.
Preferably, if the data packet where current data is first data packet, need to judge whether the data packet is located It is recycled in first time;If so, current data does not have corresponding previous item data, the cell where current data is only updated Background colour;If it is not, then previous item data is in upper the last one data packet once recycled.
Preferably, in step 1), the calculation formula of the ranks number (A, B) of the cell where current data is:
A=X%N, B=(X/N) * In+Ix-1;
Wherein, A is the line number of the cell where current data, since 0;B is the cell where current data Row number, since 0;X is the call number of the data packet where current data, since 0;In is the total of data in a data packet Number;Ix is call number of the current data in the data packet where it, since 1;N is total line number of list;Same data Data in packet are arranged successively in the same row according to index number.
Preferably, in step 2), the calculation formula of the ranks number (C, D) of the cell where previous item data is calculated For:
If A is not equal to 0, C=A-1, D=B;
If A=0 and B >=In, C=N-1, D=B-In;
If A=0 and 0≤B < In, C=(L-1) %N, D=((L-1)/N) * In+Ix-1;
Wherein, L is the total number for needing data packet to be shown.
Preferably, in step 3), the background colour of the cell where previous item data is first updated, then updates current data The background colour of the cell at place.
Preferably, step 1)~3 are repeated), realize the loopy moving of color lump.
Compared with prior art, the invention has the following beneficial technical effects:
A kind of UI table color lump moving method provided by the invention, calculates separately out the cell where current data Then the ranks number of cell where ranks number and previous item data change the background of the cell where current data respectively The background colour of cell where color and previous item data, achievees the purpose that the data for highlighting update.This method can be real When existing individual unit lattice background colour changes, do not change the background colour of other cells of same a line/same row, enables current data It is enough more outstanding to show meet the needs of user tracking data.
Detailed description of the invention
Fig. 1 is the method flow diagram for calculating the ranks number of Set cell.
Fig. 2 is UI table color lump moving method flow chart.
Fig. 3 is the schematic diagram of a table provided by the invention.
Specific embodiment
Below with reference to specific embodiment, the present invention is described in further detail, it is described be explanation of the invention and It is not to limit.
When needing to show multi-group data on a same row, in order to meet tracking of the user to current data, can pass through Change individual unit lattice background colour to reach demand.If data needs are cyclically updated, need to realize that individual event color lump circulation is moved Dynamic function.The difficult point of this imagination is that individual unit lattice background colour changes and color lump loopy moving.The selection of list, default is all It is to carry out high light selection as unit of row or column, therefore, individual event color lump first has to realize the only change in a line/column Current cell background colour;In this regard, needing to calculate current data indexes ranks number in corresponding list;And calculate previous item row Row number.
In this embodiment it is assumed that needing data to be shown includes In seed type (such as temperature, speed, revolving speed), these The index of data in the packet is I1=1, I2=2 ... In=n, the data in same data packet according to index number from a left side to The right side is arranged successively in the same row.If it is desired to the total quantity of the data packet of display is L, the index of data packet is X, and X is opened from 0 Begin.
Total line number of list is N in design, and capable call number (i.e. line number) is incremented by from top to bottom, since 0.The column of list Number to be incremented by successively from left to right, since 0.
As depicted in figs. 1 and 2, UI table color lump moving method of the invention includes step:
1) ranks number of the cell where current data are calculated;
2) ranks number of the cell where previous item data are calculated;
Wherein, the call number of the data packet where previous item data is smaller by 1 than the data packet where current data;Previous item number According to identical with the call number of current data in the packet;
3) background colour of the cell where the cell and previous item data where update current data.
Wherein, if the data packet where current data is first data packet, i.e., its call number is 0, needs to judge to need Recurring number locating for data to be shown is recycled if first, then it does not have corresponding previous item data;If not first Circulation, then corresponding previous item data is the corresponding data of the last one data packet.
For step 1), ranks number (A, B) circular of the cell where current data is:A=X%N, B =(X/N) * In+Ix-1;
Wherein, A is the line number of the cell where current data, since 0;B is the cell where current data Row number, since 0;X is the call number of the data packet where current data, since 0;In is the total of data in a data packet Number;Ix is call number of the current data in the data packet where it, since 1.N is total line number of list.
In step 1), total columns of list can also be judged, to determine the size of list.Judgment method is, if L% N=0, the i.e. number of data packet are the integral multiple of line number, then total columns M=(L/N) * In of list;If L%N is not equal to 0, i.e., The number of data packet is not the integral multiple of line number, then total columns M=(L/N+1) * In of list.More specific algorithm is M= ((L-1)/N+1)*In
In step 2), need to divide situation to judge previous item according to the ranks number (A, B) of the cell where current data The ranks number of cell where data.Specially:
If the line number of the cell where current data is not 0, the ranks number of the cell where previous item data are (A-1,B);
If the line number of the cell where current data be 0 but row number not [0, In) in range, then previous item data The ranks number of the cell at place are (N-1, B-In);
If the line number of the cell where current data be 0 and row number [0, In) in range, then need to judge current number Whether it is in first circulation according to the data packet at place, is recycled if first time, then directly updates the cell where current data Background colour, without previous item data;If not recycling for the first time, then it can be confirmed that previous item data is in preceding one cycle In the last one data packet, then the ranks number of the cell where previous item data are ((L-1) %N, ((L-1)/N) * In+Ix- 1)。
Fig. 3 illustrates a specific embodiment, wherein currently needs the data in data packet to be shown to be:Temperature, speed Degree, revolving speed, i.e. In=3;Current data packet total number is L=6;Total line number N=3, then for indexing the data packet of X=5, it The ranks number of speed (I2=2), can be derived as by the above workflow management:A=5%3=2;B=(5/3) * 3+2=5;Effect As shown in Figure 3.

Claims (6)

1. a kind of UI table color lump moving method, which is characterized in that including step:
1) ranks number of the cell where current data are calculated;
2) ranks number of the cell where previous item data are calculated, wherein the call number of the data packet where previous item data It is smaller by 1 than the data packet where current data;The call number of previous item data and current data in the packet is identical;
3) background colour of the cell where the cell and previous item data where update current data.
2. UI table color lump moving method as described in claim 1, which is characterized in that if the data packet where current data For first data packet, needs to judge whether the data packet is in and recycle for the first time;If so, current data do not have it is corresponding before One item data only updates the background colour of the cell where current data;If it is not, then previous item data is once recycled upper In the last one data packet.
3. UI table color lump moving method as described in claim 1, which is characterized in that in step 1), where current data The calculation formula of ranks number (A, B) of cell be:
A=X%N, B=(X/N) * In+Ix-1;
Wherein, A is the line number of the cell where current data, since 0;B is the row number of the cell where current data, Since 0;X is the call number of the data packet where current data, since 0;In is the total number of data in a data packet; Ix is call number of the current data in the data packet where it, since 1;N is total line number of list;In same data packet Data are arranged successively in the same row according to index number.
4. UI table color lump moving method as claimed in claim 3, which is characterized in that in step 2), calculate previous item number Calculation formula according to the ranks number (C, D) of the cell at place is:
If A is not equal to 0, C=A-1, D=B;
If A=0 and B >=In, C=N-1, D=B-In;
If A=0 and 0≤B < In, C=(L-1) %N, D=((L-1)/N) * In+Ix-1;
Wherein, L is the total number for needing data packet to be shown.
5. UI table color lump moving method as claimed in claim 4, which is characterized in that in step 3), first update previous item The background colour of cell where data, then update the background colour of the cell where current data.
6. UI table color lump moving method as claimed in claim 5, which is characterized in that repeat step 1)~3), realize color lump Loopy moving.
CN201810432596.0A 2018-05-08 2018-05-08 UI table color block moving method Active CN108920145B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810432596.0A CN108920145B (en) 2018-05-08 2018-05-08 UI table color block moving method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810432596.0A CN108920145B (en) 2018-05-08 2018-05-08 UI table color block moving method

Publications (2)

Publication Number Publication Date
CN108920145A true CN108920145A (en) 2018-11-30
CN108920145B CN108920145B (en) 2022-04-19

Family

ID=64403667

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810432596.0A Active CN108920145B (en) 2018-05-08 2018-05-08 UI table color block moving method

Country Status (1)

Country Link
CN (1) CN108920145B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110066933A1 (en) * 2009-09-02 2011-03-17 Ludwig Lester F Value-driven visualization primitives for spreadsheets, tabular data, and advanced spreadsheet visualization
CN102043586A (en) * 2010-12-21 2011-05-04 无锡永中软件有限公司 Method and device for displaying background color in electronic form
US20120013539A1 (en) * 2010-07-13 2012-01-19 Hogan Edward P A Systems with gesture-based editing of tables
US20120203676A1 (en) * 2011-02-04 2012-08-09 Benjamin Chou Software for Automatic Processing of Paper Financial Documents
CN103970735A (en) * 2013-01-25 2014-08-06 苏州精易会信息技术有限公司 Row-column highlighting method of target cell in webpage Table
CN107766314A (en) * 2017-10-20 2018-03-06 网易(杭州)网络有限公司 The data processing method and device of electrical form
CN107766309A (en) * 2017-08-29 2018-03-06 腾讯科技(深圳)有限公司 Data form generation method, device and storage medium, electronic installation

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110066933A1 (en) * 2009-09-02 2011-03-17 Ludwig Lester F Value-driven visualization primitives for spreadsheets, tabular data, and advanced spreadsheet visualization
US20120013539A1 (en) * 2010-07-13 2012-01-19 Hogan Edward P A Systems with gesture-based editing of tables
CN102043586A (en) * 2010-12-21 2011-05-04 无锡永中软件有限公司 Method and device for displaying background color in electronic form
US20120203676A1 (en) * 2011-02-04 2012-08-09 Benjamin Chou Software for Automatic Processing of Paper Financial Documents
CN103970735A (en) * 2013-01-25 2014-08-06 苏州精易会信息技术有限公司 Row-column highlighting method of target cell in webpage Table
CN107766309A (en) * 2017-08-29 2018-03-06 腾讯科技(深圳)有限公司 Data form generation method, device and storage medium, electronic installation
CN107766314A (en) * 2017-10-20 2018-03-06 网易(杭州)网络有限公司 The data processing method and device of electrical form

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
J.诺斯特: "《巧学活用Microsoft excel97中文版》", 7 July 1997, 机械工业出版社 *
PAVERA等: "Highlight cell in array of clusters", 《HTTPS://LAVAG.ORG/TOPIC/14814-HIGHLIGHT-CELL-IN-ARRAY-OF-CLUSTERS/》 *
伍云辉: "《完全手册-excelVBA典型实例大全》", 31 August 2008, 电子工业出版社 *
帆软传说哥: "JS实现改变当前选中单元格的背景色,离开后恢复原色", 《HTTPS://HELP.FINEREPORT.COM/FINEREPORT8.0/DOC-VIEW-1814.HTML》 *

Also Published As

Publication number Publication date
CN108920145B (en) 2022-04-19

Similar Documents

Publication Publication Date Title
CN107301473B (en) Similar parallel machine based on improved adaptive GA-IAGA batch dispatching method and system
CN106599519B (en) The cut deal motherboard and slab collaborative design method and system of facing to manufacture order combination optimization
CN107688999A (en) A kind of parallel transaction based on block chain performs method
CN104572783A (en) Webpage click condition displaying method and device
CN105426499A (en) Implementation method of data visualization
CN103218448B (en) Self-service report form generation method, device and system
CN107748752A (en) A kind of data processing method and device
CN106250933A (en) Method, system and the FPGA processor of data clusters based on FPGA
CN104217013A (en) Course positive and negative mode excavation method and system based on item weighing and item set association degree
CN107909194A (en) System level testing designs Multipurpose Optimal Method
CN108920145A (en) A kind of UI table color lump moving method
CN103559249B (en) Webpage thermodynamic coloring treatment process and device
CN112330767A (en) Maximum differentiation color matching method, system, medium and electronic equipment
Einasto et al. The biasing phenomenon
CN106934485A (en) A kind of new one-dimensional based on genetic algorithm rehearses baiting method
CN104156618B (en) Economic data automatic analysis system based on map
CN103796226B (en) A kind of network optimized approach and device
CN106021228A (en) Method and system for performing text analysis by utilizing knowledge topographic map
CN105159946A (en) Table sorting method and system based on jQuery
CN102346915B (en) Method for rapidly generating voltage contour curve diagram
CN103763302A (en) Web service combination generating method
CN103136397B (en) A kind of method obtaining electromagnetic response curvilinear characteristic parameter and device thereof
CN106095882A (en) A kind of personalization cloud recommendation method under cloudy platform environment
CN103810395B (en) Computational methods, device and the arranging system of electric network current diagram plant stand node coordinate
CN104778223B (en) The data model method for building up and device in a kind of hand trip house

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