This is a migrated thread and some comments may be shown as answers.

Use a thicker line or even a double line?

4 Answers 106 Views
Chart
This is a migrated thread and some comments may be shown as answers.
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

4 Answers, 1 is accepted

Sort by
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:
series.Definition.Appearance.Stroke = 4;

But, does anybody know how to create a double line?

Thx,
Danny
0
Evgenia
Telerik team
answered on 03 Nov 2010, 03:45 PM
Hello Danny,

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
0
Evgenia
Telerik team
answered on 08 Nov 2010, 03:14 PM
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
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
Tags
Chart
Asked by
Danny Scheelings
Top achievements
Rank 1
Answers by
Danny Scheelings
Top achievements
Rank 1
Evgenia
Telerik team
Share this question
or