有什么这样的控件吗?
以及如何使用?
谢谢!

解决方案 »

  1.   

    mschart
    引用ms mschart control 6.0
      

  2.   

    Option Explicit
    Dim chrtArray2() As Variant, chrtArray3() As Variant              'contain data to be plotted
    Dim numPointsTwoCurve As Integer, numPointsThreeCurve As Integer
    Dim intvalue As IntegerPrivate Sub Form_Load()
       'First Create some dummy data for a graph containing (1) x-set, and (2) y-sets of data
       '1st column will contain text (though it will show up as numeric characters).
       chrt.Visible = False
       numPointsTwoCurve = 0
       ReDim chrtArray2(1 To 10, 2)
       For intvalue = 1 To 10
          chrtArray2(intvalue, 0) = " " & intvalue
          chrtArray2(intvalue, 1) = intvalue * 2
          chrtArray2(intvalue, 2) = intvalue + 6
          numPointsTwoCurve = numPointsTwoCurve + 1
       Next intvalue
       
       'Create some dummy data for a graph containing (1) x-set and (3) y-sets of data   numPointsThreeCurve = 0
       ReDim chrtArray3(1 To 10, 3)
       For intvalue = 1 To 10
          chrtArray3(intvalue, 0) = " " & intvalue * 10
          chrtArray3(intvalue, 1) = intvalue
          chrtArray3(intvalue, 2) = intvalue * 2
          chrtArray3(intvalue, 3) = intvalue * 3
          numPointsThreeCurve = numPointsThreeCurve + 1
       Next intvalue
    End SubPrivate Sub cmdPlotThree_Click()
          With frmMain.chrt
          'Debug.Print "chrt.RowCount= "; chrt.RowCount
          .Visible = True
          .RowCount = numPointsThreeCurve
          'Debug.Print "chrt.RowCount= "; chrt.RowCount
          .ChartData = chrtArray3
          .ShowLegend = True
          .chartType = VtChChartType2dLine
          .Legend.Location.LocationType = VtChLocationTypeTop
          .Plot.UniformAxis = False
          .ColumnCount = 3
          .ColumnLabelCount = 3
          .Column = 1
          .ColumnLabel = "data set 1"
          .Column = 2
          .ColumnLabel = "data set 2"
          .Column = 3
          .ColumnLabel = "data set 3"
          .Refresh
       End With
    End SubPrivate Sub cmdPlotTwo_Click()
       With frmMain.chrt
          .Visible = True
          .RowCount = numPointsTwoCurve
          .ChartData = chrtArray2
          .ShowLegend = True
          .chartType = VtChChartType2dLine
          .Legend.Location.LocationType = VtChLocationTypeTop
          .Plot.UniformAxis = False
          .ColumnCount = 2
          .ColumnLabelCount = 2
          .Column = 1
          .ColumnLabel = "data set 1"
          .Column = 2
          .ColumnLabel = "data set 2"
          .Refresh
       End With
    End Sub
      

  3.   

    http://expert.csdn.net/Expert/topic/2275/2275732.xml?temp=.9757959