CN103345391A - Method for optimizing display data - Google Patents
Method for optimizing display data Download PDFInfo
- Publication number
- CN103345391A CN103345391A CN2013102456160A CN201310245616A CN103345391A CN 103345391 A CN103345391 A CN 103345391A CN 2013102456160 A CN2013102456160 A CN 2013102456160A CN 201310245616 A CN201310245616 A CN 201310245616A CN 103345391 A CN103345391 A CN 103345391A
- Authority
- CN
- China
- Prior art keywords
- data
- chart
- picture
- mentioned
- control
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000000875 corresponding Effects 0.000 claims abstract description 16
- 230000003068 static Effects 0.000 claims abstract description 7
- 238000001514 detection method Methods 0.000 claims description 4
- 238000000034 method Methods 0.000 abstract description 5
- 230000001960 triggered Effects 0.000 abstract 1
- 238000005457 optimization Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 2
- 230000001105 regulatory Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
Abstract
The invention discloses a method for optimizing display data. The method comprises the steps that data are imported into a static array; the number of the data and the maximum value of a horizontal reel are calculated, wherein the number of the data and the maximum value of the horizontal reel can be normally displayed in the set width of a chart control; data, corresponding to the data number which can be normally displayed, in the imported data are imported into a dynamic array starting from the starting position, corresponding to the initial value preset by the horizontal reel, in the imported data; the data in the dynamic array are assigned to the chart control to form a chart; the present chart is converted into a picture; the picture is displayed; the present value of the horizontal reel is detected, and the picture displaying process is triggered again according to the value. According to the method for optimizing the display data, the data can be displayed in the chart control at equal intervals, and imported data volume cannot be limited by the chart control any more.
Description
Technical field
The present invention relates to a kind of method that shows data, especially in VB6.0, show the method for data.
Background technology
VB6.0 carries graphical control Mschart, and the interval that data show can not be set when drawing, and makes data when showing, shows that spacing can be according to the automatic five equilibrium adjustment of the width of Mschart control.When showing less data, data can normally show at the drawing interface; When data during greater than some, the demonstration spacing of data can diminish even can make image become black, influences experience.For example the breadth extreme of Mschart control is 245745, if data presented is a lot, satisfying under the situation of its clear correct demonstration, the width of data can be greater than Mschart control breadth extreme, when this moment, above-mentioned data showed in the drawing interface simultaneously, the situation that can cause the interface to see clearly.
Summary of the invention
The objective of the invention is to propose a kind of method that shows data of optimizing, equidistantly show in chart control to realize data, and the data sum that imports will no longer be subjected to the restriction of chart control.
To achieve these goals, the present invention proposes a kind of method that shows data of optimizing, this method comprises:
In the static array of data importing;
With the frames images width in the graphical interfaces, the width of picture box width and chart control is arranged to wide;
Calculate under above-mentioned chart control width, normally the data presented number;
Calculate the maximal value of horizontal spool;
The corresponding reference position of the initial value of presetting with horizontal spool from the data that import begins, with the data importing dynamic array corresponding with above-mentioned normally data presented number in the data that import;
Data assignment in this dynamic array is formed chart to chart control;
Convert current chart to picture;
Above-mentioned picture is shown in picture box;
The currency of detection level spool;
The reference position corresponding with above-mentioned horizontal spool currency begins from the data that import, with the data importing dynamic array corresponding with above-mentioned normally data presented number in the data that import;
Give chart control to form the chart that upgrades the data assignment in this dynamic array;
Convert the chart of this renewal to picture; And
Above-mentioned picture is shown in picture box.
The beneficial effect of the program of the present invention is that the optimization that proposes by the present invention shows the method for data, can make chart control show data with fixing quantity, with the data that the import number of packets according to said fixing, by regulating horizontal spool, according to the value of horizontal spool, show the corresponding data after the above-mentioned grouping, thereby realized that data equidistantly show in chart control, and the data sum that imports will no longer be subjected to the restriction of chart control, make more convenient being applied to of chart control draw.
Preferably, after the static array of data importing, these data according to set requirement ordering, are realized that data show according to set order.
Description of drawings
Fig. 1 shows the interface synoptic diagram of VB6.0.
Fig. 2 shows the process flow diagram of display packing involved in the present invention.
The data that Fig. 3 shows under the prior art situation show situation.
Data showed situation after Fig. 4 showed and adopts display packing of the present invention.
Embodiment
With reference to the accompanying drawings the specific embodiment of the present invention is further described:
As shown in Figure 1, relate to Mschart control A, frames images B, picture box C and horizontal spool D among the VB6.0 according to embodiments of the present invention.
The concrete implementing procedure figure of the method for the optimization demonstration data that the present invention relates to as shown in Figure 2, at first will need data presented to import in the static array, shown in S01 among Fig. 2, afterwards the data in the above-mentioned static array are sorted according to set requirement, shown in S02 among Fig. 2, in order to make Mschart control A, frames images B and picture box C data presented number unanimity, with the Mschart control A in the VB6.0 interface, the width of frames images B and picture box C is arranged to the same size, shown in S03 among Fig. 2, calculate afterwards under the width of above-mentioned Mschart control A, can normal clear data presented number, with the number of this number as one group of data, shown in S04 among Fig. 2, according to total number of the data that import and the number of above-mentioned one group of data, calculate the maximal value of horizontal spool D, shown in S05 among Fig. 2, the corresponding reference position of the initial value of presetting with horizontal spool D from the data after the ordering begins afterwards, give dynamic array with data assignment corresponding with above-mentioned normally data presented number in the data that import, shown in S06 among Fig. 2, data assignment in the at this moment dynamic array is given the ChartData of Mschart, the chart of Mschart is normally shown, shown in the S07 among Fig. 2, use the EditCopy order of Mschart afterwards, convert picture to during current chart copied to Clipboard with Windows metafile form, shown in the S08 among Fig. 2, above-mentioned picture is shown in frames images B, and then in picture box C, show, shown in S09 among Fig. 2, in the entire process process, Mschart control A and frames images B hide and do not show, the currency of detection level spool D afterwards, shown in S10 among Fig. 2, the reference position corresponding with above-mentioned horizontal spool D currency begins from the data after the ordering, give dynamic array with data assignment corresponding with above-mentioned normally data presented number in the data that import, shown in S11 among Fig. 2, data assignment in the at this moment dynamic array is given the ChartData of Mschart, the chart of Mschart is normally shown, shown in the S12 among Fig. 2, use the EditCopy order of Mschart afterwards, convert picture to during current chart copied to Clipboard with Windows metafile form, shown in the S13 among Fig. 2, above-mentioned picture is shown in frames images B, and then in picture box C, show, shown in S14 among Fig. 2.
Now provide a specific embodiment, total number of the data that import is 120, width according to Mschart control A, reality can clear correct data presented number be 40 in Mschart control A, calculating the maximal value of horizontal spool D this moment so is 3, the default initial value of horizontal spool D is 1, give dynamic array with 1~40 data assignment in above-mentioned 120 data, afterwards these 40 the data assignment in the at this moment dynamic array are given the ChartData of Mschart, use the EditCopy order of Mschart afterwards, convert picture to during current chart copied to Clipboard with Windows metafile form, above-mentioned picture is shown in frames images B, and then in picture box C, show, the currency of detection level spool D afterwards, if horizontal spool D is not mobile, currency still is initial value 1, and the interface of drawing so still shows above-mentioned 1~40 data; If horizontal spool D moves, when its currency is 2, give dynamic array with 41~80 data assignment in above-mentioned 120 data, afterwards these 40 the data assignment in the at this moment dynamic array are given the ChartData of Mschart, use the EditCopy order of Mschart afterwards, convert picture to during current chart copied to Clipboard with Windows metafile form, above-mentioned picture is shown in frames images B, and then in picture box C, show; When its currency is 3, give dynamic array with 81~120 data assignment in above-mentioned 120 data, afterwards these 40 the data assignment in the at this moment dynamic array are given the ChartData of Mschart, use the EditCopy order of Mschart afterwards, convert picture to during current chart copied to Clipboard with Windows metafile form, above-mentioned picture is shown in frames images B, and then in picture box C, show.
Optimization involved in the present invention shows that the method for data can make the Mschart control A among the VB6.0 show data with fixing quantity, with the data that the import number of packets according to said fixing, by regulating horizontal spool D, value according to horizontal spool D, show the corresponding data after the above-mentioned grouping, thereby realized that data equidistantly show in Mschart control A, and the data sum that imports will no longer be subjected to the restriction of Mschart control A.By with Fig. 3 and Fig. 4 contrast, adopt optimization of the present invention to show the method for data as can be seen after, data can show clearly, no longer are subjected to Mschart control A to show the restriction of quantity.
Optimization involved in the present invention shows that the method for data is equally applicable to have other programming softwares of identical drawing control.
Claims (2)
1. optimize the method that shows data for one kind, this method comprises:
In the static array of data importing;
With the frames images width in the graphical interfaces, the width of picture box width and chart control is arranged to wide;
Calculate under above-mentioned chart control width, normally the data presented number;
Calculate the maximal value of horizontal spool;
The corresponding reference position of the initial value of presetting with horizontal spool from the data that import begins, with the data importing dynamic array corresponding with above-mentioned normally data presented number in the data that import;
Data assignment in this dynamic array is formed chart to chart control;
Convert current chart to picture;
Above-mentioned picture is shown in picture box;
The currency of detection level spool;
The reference position corresponding with above-mentioned horizontal spool currency begins from the data that import, with the data importing dynamic array corresponding with above-mentioned normally data presented number in the data that import;
Give chart control to form the chart that upgrades the data assignment in this dynamic array;
Convert the chart of this renewal to picture; And
Above-mentioned picture is shown in picture box.
2. method according to claim 1 is characterized in that: after the static array of data importing, these data are sorted according to set requirement.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013102456160A CN103345391A (en) | 2013-06-20 | 2013-06-20 | Method for optimizing display data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013102456160A CN103345391A (en) | 2013-06-20 | 2013-06-20 | Method for optimizing display data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103345391A true CN103345391A (en) | 2013-10-09 |
Family
ID=49280189
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2013102456160A Pending CN103345391A (en) | 2013-06-20 | 2013-06-20 | Method for optimizing display data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103345391A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105117404A (en) * | 2015-07-17 | 2015-12-02 | 南京大学 | Chart display defect optimization method based on chart types and data feature scenes |
CN105824515A (en) * | 2016-03-22 | 2016-08-03 | 乐视网信息技术(北京)股份有限公司 | Element display method and device |
CN107544766A (en) * | 2016-06-23 | 2018-01-05 | 北京国双科技有限公司 | A kind of data display method and device |
CN108416024A (en) * | 2018-03-08 | 2018-08-17 | 网易乐得科技有限公司 | Data processing method and device, medium and computing device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001356755A (en) * | 2000-06-13 | 2001-12-26 | Hitachi Ltd | Data display device |
CN101796477A (en) * | 2007-09-07 | 2010-08-04 | 国际商业机器公司 | Scroll bar control |
-
2013
- 2013-06-20 CN CN2013102456160A patent/CN103345391A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001356755A (en) * | 2000-06-13 | 2001-12-26 | Hitachi Ltd | Data display device |
CN101796477A (en) * | 2007-09-07 | 2010-08-04 | 国际商业机器公司 | Scroll bar control |
Non-Patent Citations (2)
Title |
---|
OF123: "mschart控件数据过多 导致曲线图显示太紧密看不清楚", 《HTTP://BBS.CSDN.NET/TOPICS/390421422》 * |
朱春香: "VB的图形框控件在程序设计中的应用", 《科技信息》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105117404A (en) * | 2015-07-17 | 2015-12-02 | 南京大学 | Chart display defect optimization method based on chart types and data feature scenes |
CN105117404B (en) * | 2015-07-17 | 2018-12-21 | 南京大学 | Based on the chart display defect optimization method under subtype and data feature scene |
CN105824515A (en) * | 2016-03-22 | 2016-08-03 | 乐视网信息技术(北京)股份有限公司 | Element display method and device |
CN107544766A (en) * | 2016-06-23 | 2018-01-05 | 北京国双科技有限公司 | A kind of data display method and device |
CN107544766B (en) * | 2016-06-23 | 2021-01-22 | 北京国双科技有限公司 | Data display method and device |
CN108416024A (en) * | 2018-03-08 | 2018-08-17 | 网易乐得科技有限公司 | Data processing method and device, medium and computing device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103345391A (en) | Method for optimizing display data | |
US20150186010A1 (en) | Electronic device and method thereof for adjusting desktop icons displayed thereon | |
CN104503655A (en) | Application program interface display control method and device | |
CN104105004A (en) | Method and device for processing live broadcast stream | |
KR102257948B1 (en) | Displaying applications on a fixed orientation display | |
CA2894197A1 (en) | Method of implementing screen adaptation for owner-drawn elements and apparatus | |
CN103336691A (en) | Dynamic layout method and system based on Android | |
US20160063672A1 (en) | Electronic device and method for generating thumbnail picture | |
CN103530117A (en) | Method and device for adapting to screens, of different sizes, of mobile terminals | |
CN102117176A (en) | Method for realizing sliding picture display in electronic device | |
CN106802758B (en) | Processing method and device for screen capture | |
WO2014101573A1 (en) | Method and device for adjusting display effect | |
CN105760066A (en) | Method and device for updating page | |
CN105868420A (en) | Network resource loading mode configuration method and device | |
CN103914213A (en) | Method and device for eliminating page dithering | |
CN104168427A (en) | Multipicture synthesizing method and system | |
JP2015038619A5 (en) | ||
CN107391148B (en) | View element saving method and device, electronic equipment and computer storage medium | |
CN104243870B (en) | Display system and its control method | |
JP2010176528A5 (en) | Information processing apparatus, information processing apparatus control method, program, and storage medium | |
CN105100862A (en) | Grid movement display processing method and grid movement display processing system | |
JP2013167797A5 (en) | ||
CN103870091A (en) | Multi-window display method and system | |
CN102238432A (en) | Method and system for displaying set-top box pictures by utilizing transition effects | |
US10699384B2 (en) | Image processing apparatus and control method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20131009 |
|
WD01 | Invention patent application deemed withdrawn after publication |