dotted x and y axis line style ?

4 posts, 0 answers
  1. Saravanan
    Saravanan avatar
    36 posts
    Member since:
    Jun 2011

    Posted 21 Sep 2011 Link to this post

    Hi Team,
     
    i want to show the dotted line y axis line and x axis line,i can able to change the colour of the grid line stye,how to change the line type,could you tell me what style do i have to apply,here i have attached a screen for my need
    find the attachement
     
    Thanks,
    Saravanan
  2. Sia
    Admin
    Sia avatar
    745 posts

    Posted 26 Sep 2011 Link to this post

    Hi Saravanan,

    Unfortunately this is a known issue and changing the grid lines to be dashed/dotted is not possible at the moment. You can track the issue status here.

    As a workaround I can suggest you to use the following stroke which makes the horizontal grid lines look like dashed:
    <Style x:Key="CustomGridLine" TargetType="Line">
        <Setter Property="Stroke">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0,0.5" StartPoint="0.01,0.5" SpreadMethod="Repeat">
                    <GradientStop Color="Black" Offset="0"/>
                    <GradientStop Color="Black" Offset="0.499"/>
                    <GradientStop Color="#00FFFFFF" Offset="0.5"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
    </Style>

    Regards,
    Sia
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Saravanan
    Saravanan avatar
    36 posts
    Member since:
    Jun 2011

    Posted 05 Oct 2011 Link to this post

    Thanks Team,
     
    the style you gave satisfied,but i its not working in x axis grid line ?
     
    i applied the same style for x axis and y axis ,its working only y axis ,can't we apply for x axis grid line ?
     
    Thanks,
    Saravanan
  4. Sia
    Admin
    Sia avatar
    745 posts

    Posted 05 Oct 2011 Link to this post

    Hello Saravanan,

    You need to use different gradient with different orientation (start and end point) for the vertical grid lines:
    <Style x:Key="CustomGridLineX" TargetType="Line">
        <Setter Property="Stroke">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,0.01" SpreadMethod="Repeat">
                    <GradientStop Color="Black" Offset="0"/>
                    <GradientStop Color="Black" Offset="0.499"/>
                    <GradientStop Color="#00FFFFFF" Offset="0.5"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
    </Style>


    Best wishes,
    Sia
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top