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

dotted x and y axis line style ?

3 Answers 87 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Saravanan
Top achievements
Rank 1
Saravanan asked on 21 Sep 2011, 02:51 PM
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

3 Answers, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 26 Sep 2011, 03:45 PM
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 >>

0
Saravanan
Top achievements
Rank 1
answered on 05 Oct 2011, 01:49 PM
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
0
Sia
Telerik team
answered on 05 Oct 2011, 04:10 PM
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 >>

Tags
Chart
Asked by
Saravanan
Top achievements
Rank 1
Answers by
Sia
Telerik team
Saravanan
Top achievements
Rank 1
Share this question
or