how to set line thickness on the LineChart?

Charts for WPF Forum

Posted 9 years ago by Jonathan Helfman
Version: 15.1.0621
Avatar

Any way to set the line thickness to a single-pixel wide line?

Thanks,

--jon

Comments (3)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Jon,

You can set the stroke thickness via the LineSeries.LineStyle property like:

<charts:LineSeries.LineStyle>
	<Style TargetType="Shape">
		<Setter Property="StrokeThickness" Value="5" />
	</Style>
</charts:LineSeries.LineStyle>


Actipro Software Support

Posted 9 years ago by Jonathan Helfman
Avatar

Thanks!

But how to accomplish the same in C#?

--jon

Posted 9 years ago by Jonathan Helfman
Avatar
            Style style = new System.Windows.Style();
            style.Setters.Add(new Setter(Shape.StrokeThicknessProperty, 5.0));
            lineSeries.LineStyle = style;

 I get something like this. Seems to work. Thanks.

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.