louis chan
Top achievements
Rank 1
Iron
louis chan
asked on 12 Mar 2010, 03:25 PM
Hello all,
I have spent a couple hours to find out how to hide the item label, but I am keeping fail. I think this is a simple property but I dun know which belongs to. So does anyone know?
thx
I have spent a couple hours to find out how to hide the item label, but I am keeping fail. I think this is a simple property but I dun know which belongs to. So does anyone know?
thx
5 Answers, 1 is accepted
0
louis chan
Top achievements
Rank 1
Iron
answered on 15 Mar 2010, 04:11 AM
Waiting for this answer for a couple days but no reply...here is the solution
Chart1.Series(0).Appearance.ShowLabels = False
Chart1.Series(0).Appearance.ShowLabels = False
0
Maciej Pilichowski
Top achievements
Rank 1
answered on 29 Sep 2010, 12:55 PM
Thank you very much. It is totally crazy, that the same code, but put in ASP (I mean I used tags, not C# code) does not work.
0
Hello Maciej,
The reason for this behavior is in the way RadChart databinding works. You have two options:
Hope this helps.
Regards,
Evgenia
the Telerik team
The reason for this behavior is in the way RadChart databinding works. You have two options:
- Create the series you need -- in this case you have to set their DataYColumn property with the name of the column/field you need to plot.
- Let the chart create the series for you - it will create series for every numeric column/field in the underlying datasource.
radChart.Series[i].Appearance.LabelAppearance.Visible = false;
Hope this helps.
Regards,
Evgenia
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
prayag ganoje
Top achievements
Rank 1
answered on 28 Jun 2011, 09:30 AM
Hello,
I have few queries on the similar line.
1. I wish to hide few label in itemdatabound event of radchart. I added itemdatabound event but it does not called. does it require to enable any specific property of radchart ?
2. How to get and hide a specific series item label value in itemdatabound event runtime ?
please see attached image, where i wish to hide label values less than 6 since these are overlapping with other label values.
I have few queries on the similar line.
1. I wish to hide few label in itemdatabound event of radchart. I added itemdatabound event but it does not called. does it require to enable any specific property of radchart ?
<
telerik:RadChart
ID
=
"rc_CSCO_Case_Source_Trend"
runat
=
"server"
OnItemDataBound
=
"rc_CSCO_Case_Source_Trend_ItemDataBound"
>
</
telerik:RadChart
>
Protected
Sub
rc_CSCO_Case_Source_Trend_ItemDataBound(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Charting.ChartItemDataBoundEventArgs)
Handles
rc_CSCO_Case_Source_Trend.ItemDataBound
End
If
End
Sub
2. How to get and hide a specific series item label value in itemdatabound event runtime ?
please see attached image, where i wish to hide label values less than 6 since these are overlapping with other label values.
0
Hello Prayag,
What I can suggest is that you handle the BeforeLayout event of the Chart and hide those Series Items labels that have YValue < 6 for example. Here is how to hide those labels that have Value < 6 handling the event:
Have in mind that the above code snippet is set to loop through Series[0] only and you should modify it to check for all other series.
Kind regards,
Evgenia
the Telerik team
What I can suggest is that you handle the BeforeLayout event of the Chart and hide those Series Items labels that have YValue < 6 for example. Here is how to hide those labels that have Value < 6 handling the event:
Private MilestoneChart.BeforeLayout += New EventHandler(Of EventArgs)(AddressOf MilestoneChart_BeforeLayout)
Private Sub MilestoneChart_BeforeLayout(ByVal sender As Object, ByVal e As EventArgs)
For i As Integer = 0 To MilestoneChart.Series(0).Items.Count - 1
If Double.Parse(MilestoneChart.Series(0).Items(i).Label.TextBlock.Text) < 20 Then
MilestoneChart.Series(0).Items(i).Label.Visible = False
End If
Next i
End Sub
Have in mind that the above code snippet is set to loop through Series[0] only and you should modify it to check for all other series.
Kind regards,
Evgenia
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.