For i = 1 To MSChart1.Plot.SeriesCollection.Count
MSChart1.Plot.SeriesCollection(i).DataPoints.Item(-1).DataPointLabel.LocationType = VtChLabelLocationTypeAbovePoint
Next i
MSChart1.Plot.SeriesCollection(i).DataPoints.Item(-1).DataPointLabel.LocationType = VtChLabelLocationTypeAbovePoint
Next i
解决方案 »
- 仿 QQ 2013 VB 源码
- VB可不可以这样写代码?
- 关于vb操作word的问题
- 已知根据某程序的窗体句柄,如何确定该窗体上某个控件的句柄呢?
- 关于打印的问题!!!!
- 如何只打印窗口中的PICUTREBOX和picutrebox里面的TEXTBOX表格
- 还是编码转换问题。如何将unicode码完好无损的转换成VB能识别的编码啊?急急急。。。。
- 求高手帮忙关于vb制作游戏答题器的问题
- 菜鸟问题(别拍砖):如何改变目录(cd)
- 关于Ado的问题,请帮忙!!!
- 如何将 PictureBox 或 Image 控件内的图像另存为一个图像文件呢??????
- 哥、姐帮帮小第,一生成并打印表格问题(有图片及字体适应),急急,十万火急。
' of a Form that has an MSChart control named
' "MSChart1".
Dim arrPrices(1 to 10)
Dim i As Integer
For i = 1 to 10
arrPrices(i)= i * 2
Next i
MSChart1.ChartData = arrPricesTo create a more complex, multi-series chart, you must create a multi-dimensioned array, as shown in the following example:' The number of series are determined by the second
' dimension. In this example, the chart will have two
' series, with five data points in each series.
Dim arrPriceQuantity(1 to 5, 1 to 2)
Dim i as Integer
For i = 1 to 5
arrPriceQuantity(i, 1) = i ' Series 1
arrPriceQuantity(i, 2) = 0 - i ' Series 2
Next i
MsChart1.ChartData = arrPriceQuantityPrivate Sub MSChart1_PointActivated(Series As _
Integer, DataPoint As Integer, MouseFlags As _
Integer, Cancel As Integer)
With MSChart1
.Column = Series
.Row = DataPoint
.Data = InputBox _
("Change the data point:", , .Data)
End With
End Sub--------------------------------------------------------------------------------
Once you have created a chart, using an array from a spreadsheet or other data source, you may also want to set or return the value of a particular data point. This can be done by first setting the Row and (if applicable) Column properties, then setting or returning the Data property. For example, in a simple (single-series) chart, the following code would change the third data point.With MSChart1
' Change third data point to 50.
.Row = 3
.Data = 50
End With