|
本帖最后由 micch 于 2020-3-11 21:28 编辑
标签和颜色是个麻烦,做个最简单的样子出来,两个系列就可以了,一个做扇形,一个做标签
抽空琢磨了下,改改
FG两列插入雷达面积图,系列2添加标签,设置标签选择单元格内容E列。生成EFG数据和设置标签角度代码
- Sub test()
- ar = [a2:c31]
- Dim arr(1 To 360, 1 To 3)
- For i = 1 To 360
- k = Int(i / 12 + 11 / 12)
- If i Mod 12 = 6 Then arr(i, 1) = ar(k, 1) & " " & ar(k, 2): arr(i, 3) = ar(k, 3) * IIf(i > 200, 0.5, 0.7)
- If i Mod 12 Then arr(i, 2) = ar(k, 3) Else arr(i, 2) = 5
- Next
- [e2].Resize(360, 3) = arr
- Set cht = Sheet1.ChartObjects(1)
- cht.Chart.SeriesCollection(1).Interior.Color = 22222
- With cht.Chart.FullSeriesCollection(2)
- .HasDataLabels = True
- .DataLabels.NumberFormat = ";;;"
- For i = 6 To 354 Step 6
- .Points(i).DataLabel.Orientation = ((6 - i) Mod 180 + 90)
- Next
- End With
- End Sub
复制代码
|
|