简体   繁体   English

如何在mschart中绘制更粗的线

[英]How to make line plotted thicker in mschart

I have a line which connects different points. 我有一条连接不同点的线。 I have generated the line dynamically. 我已经动态生成了该行。 I want to make the line thinker. 我想当线思想家。 My code is as below: 我的代码如下:

  //now lets plot lines between tow points.
 Series newLineSeries = new Series("LineSeries" + index);

 //--If the series already present lets remove from the chart 

 if(chart1.Series.IndexOf(newLineSeries.Name) != -1)
  {
  chart1.Series.RemoveAt(chart1.Series.IndexOf(newLineSeries.Name));
  } 
  newLineSeries.ChartType = SeriesChartType.Line;
   newLineSeries.MarkerBorderWidth.Equals(15);
  newLineSeries.MarkerSize.Equals(35);

 newLineSeries.Color = menuStripNodeInfoValues[index].colorValue;  
 newLineSeries.ToolTip = tooltipString;//tooltipString is cal. dynamically

newLineSeries.Points.Add(new DataPoint(valueX1,valueY1)); //valueX1,valueY1 are some dynamically calculated values
newLineSeries.Points.Add(new DataPoint(valueX2,valueY2));//These are also also dynamically calculated
chart1.Series.Add(newLineSeries);

This successfully generate a line but the size of the line doesnot change even when i change the MarkerSize property. 这样可以成功生成一条线,但是即使我更改MarkerSize属性,该线的大小也不会更改。

Have you tried chart1.Series[i].BorderWidth = 5 ? 您是否尝试过chart1.Series[i].BorderWidth = 5 If by size you mean thickness 如果用尺寸表示厚度

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM