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

[Solved] hiding labels on bar3D

1 Answer 110 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
simon
Top achievements
Rank 1
simon asked on 08 Jul 2009, 08:19 PM
I used the following code to hide labels on bar3D chart but it didn't work, the labels are still showing:

chart.DefaultView.ChartArea.DataSeries[i].Definition.ShowItemLabels =

false;

I added a checkbox as the sample code, used the following code to hide the label:

 

chart.DefaultView.ChartArea.DataSeries[i].Definition.ShowItemLabels = (

bool)ShowLabelsCheckbox.IsChecked;

 


this worked but if I replace " (bool)ShowLabelsCheckbox.IsChecked" with "false", it stopped working again.

Anybody can reproduce this? Thanks.

1 Answer, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 10 Jul 2009, 12:07 PM
Hello simon,

Indeed we were able to reproduce the problematic behavior and we must admit this is a bug within the control with trying to hide the labels on initial load. The problem is now fixed and will be included in the official service pack release scheduled for the end of the month (also you will be able to download the fixed binaries next week from your Client.Net account under "Latest Internal Build" category).

For the time being we can suggest you the following workaround (set the property later in the page lifecycle):

public Page() 
    InitializeComponent(); 
 
    DataSeries series = new DataSeries(); 
 
    series.Definition = new Bar3DSeriesDefinition(); 
    series.Add(new DataPoint() { YValue = 20 }); 
    series.Add(new DataPoint() { YValue = 35 }); 
 
    RadChart1.DefaultView.ChartArea.DataSeries.Add(series); 
 
    this.SizeChanged += new System.Windows.SizeChangedEventHandler(Page_SizeChanged); 
 
void Page_SizeChanged(object sender, System.Windows.SizeChangedEventArgs e) 
    RadChart1.DefaultView.ChartArea.DataSeries[0].Definition.ShowItemLabels = false


Sorry for the temporary inconvenience. We have updated your Telerik points for the report as well.


Kind regards,
Manuel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Chart
Asked by
simon
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Share this question
or