Home > Software engineering >  Vb use mschart entirely, filled in the column number 16, the figure is 17, more than a null columns,
Vb use mschart entirely, filled in the column number 16, the figure is 17, more than a null columns,

Time:10-12

Vb use mschart entirely, filled in the column number 16, the figure is 17, more than a null columns, how to remove the null columns, the following is the original code I wrote




StrSQL="select * from the province's wind direction frequency month or year where station number=" + Zcode. Text + "and month or year='year'"
Myreader=obj. ExecReaderSql (strSQL)
If myreader. Read=False Then
Obj. Close ()
MsgBox (" the free station data, please check station number!" )
The Exit Sub
End the If
For I=2 To 17
C (I, 2)=myreader (I)
Next
D (0)="N"
D (1)="NNE"
D (2)="NE"
D (3)="ENE"
D (4)="E"
D (5)="ESE"
D (6)="SE"
D (7)="SSE"
D="S" (8)
D (9)="SSW"
D (10)="SW"
D (11)="WSW"
D (12)="W"
D (13)="WNW"
D (14)="NW"
D (15)="NNW"
MSchart2. Series. The Clear ()
MSchart2. Series. The Add (0)
MSchart2. Series (0). Points. DataBindXY (d, c) 'insert xy value
MSchart2. ChartAreas (0). AxisX. MajorTickMark. Enabled=True 'x main scale line
MSchart2. ChartAreas (0). AxisX. Interval=1 'set the Interval
MSchart2. Width=250
MSchart2. Height=250
MSchart2. Series (0). The ChartType=SeriesChartType. Radar 'set figure type
MSchart2. Series (0). Whether you show IsValueShownAsLabel=False 'tag
MSchart2. Series (0). IsVisibleInLegend=False "whether to show legend
'MSchart2. ChartAreas (0). AxisX. MajorGrid. Enabled=False
MSchart2. ChartAreas (0). AxisY. MajorGrid. Enabled=True
MSchart2. ChartAreas (0). AxisY. LabelAutoFitMaxFontSize=8
MSchart2. ChartAreas (0). AxisX. LabelAutoFitMinFontSize=6
MSchart2. ChartAreas (0). AxisX. IntervalOffset=False
MSchart2. ChartAreas (0). AxisX. Maximum=15.9
MSchart2. ChartAreas (0). AxisX. LineColor=Color. Black
'MSChart1. Legends (0). The Docking=Docking. The Bottom' illustrations on the diagram shows the
'MSChart1. Legends (0). The Alignment=StringAlignment. Center
'MSChart1. Series (0). YAxisType=AxisType. Primary
MSchart2. Titles. The Add (" year ")


Obj. Close ()

CodePudding user response:

Their top, thank!

CodePudding user response:

Found that I ordered 16 points, but the points. The count for 17, what is this situation?

CodePudding user response:

http://download.csdn.net/detail/veron_04/1483925

CodePudding user response:

I want to draw entirely, but somehow one more point,

CodePudding user response:

MSChart is according to your drawing of the length of the array, it is impossible to judge which elements are valid,

Use the Redim Preserve statements truncated your array,
  • Related