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

Solid (not Dashed) Cartesian Grid Lines?

1 Answer 46 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 26 Jan 2020, 05:01 AM

Chart Type: RadCartesianChart

The default Major Y grid lines are dashed.  Is there a way to style these as solid lines instead?  
I can't find a Setter for the DashStyle. 

Applicable UWP XAML below

xmlns:chart ="using:Telerik.UI.Xaml.Controls.Chart"
<Page.Resources>

   <Style TargetType="Line" x:Key="TChartGridLineStyle">
      <Setter Property="Stroke" Value="Gray"/>
      <Setter Property="StrokeThickness" Value="1"/>
   </Style>
</Page.Resources>

<chart:RadCartesianChart x:Name="TChart" >                           

<chart:RadCartesianChart.Grid>
      <chart:CartesianChartGrid MajorLinesVisibility="XY" MajorYLineStyle="{StaticResource ResourceKey=TChartGridLineStyle}" />
   </chart:RadCartesianChart.Grid>

</chart:RadCartesianChart>

 

1 Answer, 1 is accepted

Sort by
0
Mark
Top achievements
Rank 1
answered on 26 Jan 2020, 05:23 AM

This is working for me now using the XAML code above.  I had to recompile.  The hot change mode of Visual Studio didn't support changing the line from dashed to solid.  (Yes I had already recompiled several times -- not sure why it started working.)

Tags
Chart
Asked by
Mark
Top achievements
Rank 1
Answers by
Mark
Top achievements
Rank 1
Share this question
or