解决方案 »

  1.   


    With MSChart1       '// 以线条方式显示
          .ChartType = 3      '// 把刻录改为手工方式
          .Plot.Axis(VtChAxisIdY).ValueScale.Auto = False       '// 设置最大值
          .Plot.Axis(VtChAxisIdY).ValueScale.Maximum = 5200      '// 设置最小值
          .Plot.Axis(VtChAxisIdY).ValueScale.Minimum = 0      '// 设置每格为 1
          .Plot.Axis(VtChAxisIdY).ValueScale.MinorDivision = 1
          '//轴坐标标题字体大小的设置
          .Plot.Axis(VtChAxisIdX, 0).AxisTitle.VtFont.Size = 20
          .Plot.Axis(VtChAxisIdY, 0).AxisTitle.VtFont.Size = 20
          
          '// 显示图例说明
          .ShowLegend = True
          
           ''// 标记每个点的值
          For i = 1 To .Plot.SeriesCollection.Count
             .Plot.SeriesCollection(i).DataPoints(-1).DataPointLabel.LocationType = VtChLabelLocationTypeAbovePoint
          Next      .ColumnCount = 1      '//轴坐标标题
          .Plot.Axis(VtChAxisIdX, 0).AxisTitle = "日期"
          .Plot.Axis(VtChAxisIdY, 0).AxisTitle = "数据值"
          '//设置图表标题
          .Title.Text = "日期和通道" + Combo1.Text + "对应曲线图"
                  
                  .RowCount = Adodc1.Recordset.RecordCount
            
              For i = 1 To Adodc1.Recordset.RecordCount
              .Row = i
      
              .Data = Adodc1.Recordset.Fields("V")  ''纵坐标显示
              .RowLabel = Adodc1.Recordset.Fields("T") ''这句就表示横坐标的来源
              .ColumnLabel = "V"          '图例说明文字
             Adodc1.Recordset.MoveNext
            
              Next i
            
              End With先加载Adodc控件连接数据库;然后将这段代码放到你要显示曲线的地方!