标记轮廓线宽与串联线 [英] Line Weight of Marker Outline versus Series Line

查看:67
本文介绍了标记轮廓线宽与串联线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于折线图,在Excel UI中:

For a line chart, in the Excel UI:

  • 您可以在格式数据系列"的线型"中手动更改系列线的线宽.

  • You can manually change the line weight of the series line in 'Format Data Series', Line Style.

您可以在格式数据系列"的标记线型"中手动更改标记轮廓的线宽.

You can manually change the line weight of the marker outline in 'Format Data Series', Marker Line Style.

我无法在VBA对象模型中区分这两个.例如,如果在录制时依次更改每个代码,则代码如下:

I haven't been able to distinguish these two in the VBA object model. For example, if you change each one in sequence while recording, the code is as follows:

With Selection.Format.Line ' This block is from Line Style
    .Visible = msoTrue
    .Weight = 1.5
End With
With Selection.Format.Line ' This block is from Marker Line Style
    .Visible = msoTrue
    .Weight = 2
End With

我想编写VBA代码,使点之间的线变粗(例如2点),而围绕点本身的线变细(例如1点).但是,如果我使用上述代码,则更改一个代码也会更改另一个代码.

I want to write VBA code that will make the line between points thicker (like, 2 points), and the line around the point itself thinner (like 1 point). But if I use the code like above, changing one will change the other as well.

谢谢!

推荐答案

Dim co As ChartObject
Dim c As Chart
Dim s As Series
Dim p As Point

Set co = Sheet1.ChartObjects(1)
Set c = co.Chart
Set s = c.SeriesCollection(1)
Set p = s.Points(1)
p.Format.Line.Weight = 3

这篇关于标记轮廓线宽与串联线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆