Daniel Woodard
Top achievements
Rank 1
Daniel Woodard
asked on 15 Mar 2011, 10:40 PM
Is there a way to completely hide the X and Y axis lines and labels? I am doing a console with many small line graphs and all I want is the graph lines to show and nothing else. Is this possible? I have been going through the documentation, but haven't been able to figure out how to accomplish this yet.
4 Answers, 1 is accepted
0
Daniel Woodard
Top achievements
Rank 1
answered on 15 Mar 2011, 10:58 PM
Never mind, I figured it out. Just have to set the Visibility to Collapsed on AxisX and AxisY.... duh!
0
Rahul
Top achievements
Rank 2
answered on 16 Mar 2011, 07:10 AM
Can u show me the code for hiding Y-axis.
Thanks in advance.
Thanks in advance.
0
Daniel Woodard
Top achievements
Rank 1
answered on 16 Mar 2011, 05:52 PM
Sure, here is what I ended doing in XAML (below).
You can set the same properties from code:
<
telerik:RadChart
Height
=
"48"
HorizontalAlignment
=
"Left"
Margin
=
"325,116,0,0"
Name
=
"chartIndexed"
VerticalAlignment
=
"Top"
Width
=
"208"
>
<
telerik:RadChart.DefaultSeriesDefinition
>
<
telerik:LineSeriesDefinition
ShowPointMarks
=
"False"
ShowItemLabels
=
"False"
/>
</
telerik:RadChart.DefaultSeriesDefinition
>
<
telerik:RadChart.DefaultView
>
<
telerik:ChartDefaultView
>
<
telerik:ChartDefaultView.ChartLegend
>
<
telerik:ChartLegend
Visibility
=
"Collapsed"
/>
</
telerik:ChartDefaultView.ChartLegend
>
<
telerik:ChartDefaultView.ChartTitle
>
<
telerik:ChartTitle
Visibility
=
"Collapsed"
/>
</
telerik:ChartDefaultView.ChartTitle
>
<
telerik:ChartDefaultView.ChartArea
>
<
telerik:ChartArea
NoDataString
=
"Loading..."
>
<
telerik:ChartArea.AxisX
>
<
telerik:AxisX
StripLinesVisibility
=
"Collapsed"
MajorGridLinesVisibility
=
"Collapsed"
MinorGridLinesVisibility
=
"Collapsed"
MajorTicksVisibility
=
"Collapsed"
MinorTicksVisibility
=
"Collapsed"
Visibility
=
"Collapsed"
/>
</
telerik:ChartArea.AxisX
>
<
telerik:ChartArea.AxisY
>
<
telerik:AxisY
StripLinesVisibility
=
"Collapsed"
MajorGridLinesVisibility
=
"Collapsed"
MinorGridLinesVisibility
=
"Collapsed"
MajorTicksVisibility
=
"Collapsed"
MinorTicksVisibility
=
"Collapsed"
Visibility
=
"Collapsed"
/>
</
telerik:ChartArea.AxisY
>
</
telerik:ChartArea
>
</
telerik:ChartDefaultView.ChartArea
>
</
telerik:ChartDefaultView
>
</
telerik:RadChart.DefaultView
>
</
telerik:RadChart
>
You can set the same properties from code:
myChart.DefaultView.ChartArea.AxisY.Visibility = System.Windows.Visibility.Collapsed;
0
Rahul
Top achievements
Rank 2
answered on 17 Mar 2011, 03:25 PM
Thanx A lot for sharing Code. :)
xD:
xD: