Danny Scheelings
Top achievements
Rank 1
Danny Scheelings
asked on 29 Oct 2010, 11:37 AM
Hi,
I want to change the Style used for the Chart Line using my own Style (i.e. <Style x:Key="TrendLine" TargetType="telerikCharting:Line">).
Is it possible to make the line thicker than the normal thickness? Or make the line a double line?
Thx,
Danny
I want to change the Style used for the Chart Line using my own Style (i.e. <Style x:Key="TrendLine" TargetType="telerikCharting:Line">).
Is it possible to make the line thicker than the normal thickness? Or make the line a double line?
Thx,
Danny
4 Answers, 1 is accepted
0
Danny Scheelings
Top achievements
Rank 1
answered on 01 Nov 2010, 08:35 AM
OK, I found out how to create a thicker line:
But, does anybody know how to create a double line?
Thx,
Danny
series.Definition.Appearance.Stroke = 4;
But, does anybody know how to create a double line?
Thx,
Danny
0
Hello Danny,
You can create a custom Style to show line as Dotted or Dashed. Here is how you can specify a Dashed Line:
Note the StrokeThickness property setter -- this allows you to specify the line thickness.
All the best,
Evgenia
the Telerik team
You can create a custom Style to show line as Dotted or Dashed. Here is how you can specify a Dashed Line:
<
Style
x:Name
=
"DottedLineStyle1"
TargetType
=
"telerikCharting:SelfDrawingSeries"
>
<
Setter
Property
=
"BorderLineStyle"
>
<
Setter.Value
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"StrokeDashArray"
Value
=
"1"
/>
<
Setter
Property
=
"Stroke"
Value
=
"Black"
/>
<
Setter
Property
=
"StrokeThickness"
Value
=
"3"
/>
</
Style
>
</
Setter.Value
>
</
Setter
>
</
Style
>
Note the StrokeThickness property setter -- this allows you to specify the line thickness.
All the best,
Evgenia
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Danny Scheelings
Top achievements
Rank 1
answered on 03 Nov 2010, 03:53 PM
Hi Evgenia,
Thanks for your reply, but is there also a way to create 2 lines in stead of 1, so a double line?
Thx,
Danny
Thanks for your reply, but is there also a way to create 2 lines in stead of 1, so a double line?
Thx,
Danny
0
Hi Danny,
You can find a sample project attached that creates "double line" via retemplating the default Line style and Transforming the Line by Y with Value -8 for example. Note that I changed the default Line Fill, Stroke and StrokeThickness so that they are same as the properties defined in the Style.
The example is made via ObservableCollection but is not co-related to the styling. You can populate Line series as you like.
I hope this gets you started properly.
Sincerely yours,
Evgenia
the Telerik team
You can find a sample project attached that creates "double line" via retemplating the default Line style and Transforming the Line by Y with Value -8 for example. Note that I changed the default Line Fill, Stroke and StrokeThickness so that they are same as the properties defined in the Style.
The example is made via ObservableCollection but is not co-related to the styling. You can populate Line series as you like.
I hope this gets you started properly.
Sincerely yours,
Evgenia
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items