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

GridLineStyle and dashed / dotted / line

2 Answers 103 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Courouble Damien
Top achievements
Rank 1
Courouble Damien asked on 04 Jan 2011, 01:42 PM
Hi guys, 

I'm trying to apply some visual effects on major / minor grid lines
I need to do it code behind so basicly i create a style object that i add to AxisStyles.GridLineStyle 

Working pretty much fine for Thickness, Color .. but i'm not able to create some dotted lines, dashed lines or even a combination of this ones

' Style object creation
 Dim tAxisYMajorLineStyle As New Style(GetType(Line))
 tAxisYMajorLineStyle.Setters.Add(New Setter(Line.StrokeThicknessProperty, MyThickness))
 tAxisYMajorLineStyle.Setters.Add(New Setter(Line.StrokeProperty, MyColor))
 
 ' Ive tried both combination for a dashedline
  tAxisYMajorLineStyle.Setters.Add(New Setter(Line.StrokeDashArrayProperty, "5, 2"))
   
 ' Or
 Dim tDoubleCollection As New DoubleCollection()
 tDoubleCollection.Add(5)
  tDoubleCollection.Add(2)
 
 tAxisYMajorLineStyle.Setters.Add(New Setter(Line.StrokeDashArrayProperty, tDoubleCollection ))
 
' Apply style
   _Chart.DefaultView.ChartArea.AxisY.AxisStyles.GridLineStyle = tAxisYMajorLineStyle

Am i doing something wrong ? 
Is there another way to do it ? 

Thanks,

Damien

2 Answers, 1 is accepted

Sort by
0
Courouble Damien
Top achievements
Rank 1
answered on 07 Jan 2011, 12:26 PM
Anyone ? 
0
Evgenia
Telerik team
answered on 07 Jan 2011, 05:21 PM
Hi Courouble,

Unfortunately, I can confirm that there is a problem with the GridLine when StrokeDashArray is set in its style. Your Telerik points are updated. Thank you for bringing this to our attention. Our developers will investigate it in detail.

You can check the status of this issue in our Public Issues Tracking system.

All the best,
Evgenia
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
Chart
Asked by
Courouble Damien
Top achievements
Rank 1
Answers by
Courouble Damien
Top achievements
Rank 1
Evgenia
Telerik team
Share this question
or