rt

解决方案 »

  1.   

    '将背景设为“填充画刷”方式。
       MSChart1.Backdrop.Fill.Style = VtFillStyleBrush
       '将图表的填充颜色设为红色。
       With MSChart1.Backdrop.Fill.Brush.FillColor
          .Red = 255   '使用属性来设置颜色。
          .Green = 0
          .Blue = 0
       End With
      

  2.   

    If Data1.Recordset.RecordCount <> 0 Then
       Data1.Recordset.MoveFirst
       Do While Not Data1.Recordset.EOF
          MSChart1.Row = i
          
          MSChart1.RowLabel = Data1.Recordset("dd")
          i = i + 1
          Data1.Recordset.MoveNext
       Loop
    End If
    用于控制图形下的标签If Data3.Recordset.RecordCount <> 0 Then
    MSChart1.RowCount = Data3.Recordset.RecordCount
    i = 1
    Do While Not Data3.Recordset.EOF
       With MSChart1
            .Row = i
            .RowLabel = Data3.Recordset("ggg")
            .Column = 1
            .Data = 0
            .Column = 2
            .Data = 0
            .Column = 3
            .Data = 0
       End With
       Data3.Recordset.MoveNext
       i = i + 1
    Loop
    End If
    每一个图形分多少部分,初始化为0If Data3.Recordset.RecordCount <> 0 Then
    i = 1
    Data3.Recordset.MoveFirst
    Do While Not Data3.Recordset.EOF
       With MSChart1
            .Row = i
            .RowLabel = Data3.Recordset("辖区名称")
            .Column = 1
            .Data = Data3.Recordset("总罚金额") / 10000
            .Column = 2
            .Data = Data3.Recordset("未交金额") / 10000
            .Column = 3
            .Data = Data3.Recordset("已交金额") / 10000
       End With
       Data3.Recordset.MoveNext
       i = i + 1
    Loop
    End If
    为每一个动态复值。
      

  3.   

    MSChart1.Repaint = True
            ''显示每列上的数值
            For I = 1 To MSChart1.Plot.SeriesCollection.count
               MSChart1.Plot.SeriesCollection(I).DataPoints.Item(-1).DataPointLabel.LocationType = VtChLabelLocationTypeAbovePoint
            Next I
    注意:关键是FOR循环体内的语句
      

  4.   

    对不起,上面两位没有看清
    1 我要画饼状图(pie)
    2 我想设置每块的颜色和所占百分比