0

我在 VB.NET 中生成气泡图,我认为让气泡的边框更厚会很好,这样更容易查看是否存在重叠,但我不知道该怎么做。要手动完成,您只需右键单击气泡,转到边框样式并输入您的值。

我整理了如何改变气泡的颜色:

.chart.SeriesCollection(i).interior.color = RGB

我花了相当多的时间四处阅读,寻找类似的东西,可以让我将边框权重提高一个点左右,但我没有运气。

有人知道该怎么做吗?一如既往地感谢!

更新:我做了什么:

            With oChart

            With CType(.SeriesCollection, Excel.SeriesCollection)
                .NewSeries()
                With CType(.Item(counterVal - 43), Excel.Series)
                    .Name = mainSheet.Range("a" & counterVal).Value
                    .XValues = mainSheet.Range("b" & counterVal).Value
                    .Values = mainSheet.Range("d" & counterVal).Value
                    .BubbleSizes = mainSheet.Range("c" & counterVal).Value
                    .HasDataLabels = True
                    .DataLabels.Position = XlDataLabelPosition.xlLabelPositionAbove
                    'DL.ShowSeriesName = True
                    .Has3DEffect = True
                    .Format.ThreeD.SetThreeDFormat(Microsoft.Office.Core.MsoPresetThreeDFormat.msoThreeD1)
                    '.Format.Line.Weight = 1.5
                End With
            End With
        End With

我最终只使用了 3D 效果而不是线宽,但我把它们都留在了里面。

4

1 回答 1

1

例如

Dim ws As Worksheet
Dim co As ChartObject
Dim ch As Chart
Dim sr As Series
Dim pt As Point

Set ws = ActiveSheet
Set co = ws.ChartObjects(1)
Set ch = co.Chart
Set sr = ch.SeriesCollection(1)
Set pt = sr.Points(19)

pt.Select

With Selection.Format.Fill
    .Visible = msoTrue
    .ForeColor.ObjectThemeColor = msoThemeColorAccent2
    .ForeColor.TintAndShade = 0
    .ForeColor.Brightness = 0
    .Transparency = 0
    .Solid
End With
With Selection.Format.Line
    .Visible = msoTrue
    .ForeColor.RGB = RGB(0, 176, 80)
    .Transparency = 0
End With
于 2012-10-16T22:33:59.657 回答