Use a thicker line or even a double line?

5 posts, 0 answers
  1. Danny Scheelings
    Danny Scheelings avatar
    69 posts
    Member since:
    Jan 2006

    Posted 29 Oct 2010 Link to this post

    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
  2. Danny Scheelings
    Danny Scheelings avatar
    69 posts
    Member since:
    Jan 2006

    Posted 01 Nov 2010 Link to this post

    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
  3. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 03 Nov 2010 Link to this post

    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
  4. Danny Scheelings
    Danny Scheelings avatar
    69 posts
    Member since:
    Jan 2006

    Posted 03 Nov 2010 Link to this post

    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
  5. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 08 Nov 2010 Link to this post

    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
Back to Top