vb.net 我可以更改折线图的宽度吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4452444/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 15:11:48  来源:igfitidea点击:

Can i change the width of a line chart?

vb.net.net-4.0widthlinecharts

提问by jrsconfitto

Is it possible to change the width of a line series with the chart bundled in .net 4? How would i do it?

是否可以使用 .net 4 中捆绑的图表更改线系列的宽度?我该怎么做?

回答by Leniel Maccaferri

Yes, you can.

是的你可以。

To increase the line width do this:

要增加线宽,请执行以下操作:

chart.Series["SeriesName"].BorderWidth = 3;

I just tested it right now and it works perfectly in a Spline 2D chart.

我现在刚刚对其进行了测试,它在样条 2D 图表中完美运行。

Before

enter image description here

在此处输入图片说明

After

enter image description here

在此处输入图片说明

回答by Mohamed Kamal

yes, you can

是的你可以

check this link

检查此链接

Working with MSChart in VB.Net

在 VB.Net 中使用 MSChart

. Setting color and width of Series

. 设置系列的颜色和宽度

For color –setting RBG format Mschart1.Plot.SeriesCollection(1).DataPoints(1).Brush.FillColor.Set(250,250,)

对于颜色设置 RBG 格式 Mschart1.Plot.SeriesCollection(1).DataPoints(1).Brush.FillColor.Set(250,250,)

For width -For that set the Width Property, need to specify Width in Point MSChart1.Plot.SeriesCollection(1).Pen.Width = 25

对于宽度 - 对于设置 Width 属性,需要在 Point MSChart1.Plot.SeriesCollection(1).Pen.Width = 25 中指定 Width