How to use VBA to colour pie chart

前端 未结 1 1799
说谎
说谎 2021-01-07 15:23

I have the following code in which the code tries to create a bubble chart with pie charts as the bubbles. As in this version colour themes are used to create a different co

相关标签:
1条回答
  • 2021-01-07 15:50

    Here's how to set the colors of each slice in a pie chart. Not sure how you want to determine which slice gets what color.

    Dim clr As Long, x As Long
    
    For x = 1 To 30
        clr = RGB(0, x * 8, 0)
        With ActiveSheet.ChartObjects(1).Chart.SeriesCollection(1).Points(x)
            .Format.Fill.ForeColor.RGB = clr
        End With
    Next x
    
    0 讨论(0)
提交回复
热议问题