开发者

C#: System.Windows.Forms.DataVisualization.Charting.Chart Set Line Size

This is probably开发者_StackOverflow社区 a really simple question but I am having a lot of trouble trying to figure out which property sets the line size on the Chart or Series class. The line is really narrow and hard to see.

How do I set the line size for my FastLine chart?

Series set1 = new Series();
for (int i = 0; i < 10; i++) 
{
     set1.Points.addY(x);
}
set1.ChartType = SeriesChartType.FastLine;
set1.Color = Color.Green;
chart1.Series.Add(set1);
chart1.Invalidate();


Use Borderwidth and BorderStyle.

Series set1 = new Series();
for (int i = 0; i < 10; i++) 
{
     set1.Points.addY(x);
}
set1.BorderWidth = 10;
set1.BorderDashStyle = ChartDashStyle.Solid;
set1.ChartType = SeriesChartType.FastLine;
set1.Color = Color.Green;
chart1.Series.Add(set1);
chart1.Invalidate();

Border seems like a strange keyword for line width, but if you consider there are many types of graphs, not just fast line, it makes sense.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜