This question is locked. New answers and comments are not allowed.
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
Am i doing something wrong ?
Is there another way to do it ?
Thanks,
Damien
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 = tAxisYMajorLineStyleIs there another way to do it ?
Thanks,
Damien