Reputation: 131
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.
Upvotes: 0
Views: 789
Reputation: 598
Have you tried chart1.Series[i].BorderWidth = 5
? If by size you mean thickness
Upvotes: 1