非常着急!c#引用vb6.0中MSChart的问题
假如我每次查询以后,查出4种情况,我把每种情况的记录数,即count数统计出来,用饼图或柱图统计出来。找来找去,决定用vb6.0中的MSChart。但引用完这个空间之后,却不知道怎么用它。哪个大侠帮帮忙,给个实际的例子,或者粘点代码,或者发我信箱里。我的信箱:eric2239520@126.com.PS:本人非常着急,在线等! --------------------编程问答-------------------- 顶 --------------------编程问答-------------------- MSDN --------------------编程问答--------------------
--------------------编程问答-------------------- 有点难度哦
Private Sub Command1_Click()
Dim iCol As Integer
Dim iRow As Integer
Dim i As Integer
With MSChart1
'// 以线条方式显示
.ChartType = VtChChartType2dLine
'// 把刻录改为手工方式
.Plot.Axis(VtChAxisIdY).ValueScale.Auto = False
'// 设置最大值
.Plot.Axis(VtChAxisIdY).ValueScale.Maximum = 700
'// 设置最小值
.Plot.Axis(VtChAxisIdY).ValueScale.Minimum = 0
'// 设置每格为 50
.Plot.Axis(VtChAxisIdY).ValueScale.MinorDivision = 50
'// 增加测试数据
.columnCount = 3
.rowCount = 3
For iCol = 1 To .columnCount
For iRow = 1 To .rowCount
.Column = iCol
.Row = iRow
.Data = iRow * 10
Next
Next
'// 将图表作为图例的背景。
.ShowLegend = True
'// 标记每个点的值
For i = 1 To .Plot.SeriesCollection.Count
.Plot.SeriesCollection(i).DataPoints(-1).DataPointLabel.LocationType = VtChLabelLocationTypeAbovePoint
Next
End With
End Sub
补充:.NET技术 , 图表区