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

Point chart overlapping values

2 Answers 31 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Pete
Top achievements
Rank 1
Pete asked on 15 Oct 2008, 01:37 PM
Hi,

I'm having problems with overlapping points in the point chart. I tried to use IntelligentLabelsEnabled="true" but that is not enough because then you can't tell to which point the label belongs to if there are many points near each other. So my question is that is it possible to customize the labels so that if there is overlapping points then those points label values are concatenated somehow to one label and are for e.g. separetad with commas like val2,val2,val3

Thanks & regards,
Pete

2 Answers, 1 is accepted

Sort by
0
Pete
Top achievements
Rank 1
answered on 15 Oct 2008, 02:32 PM
Hi,

OK, I managed to built up some kind of solution just after my first post.
I don't know is this the most efficient one but the result is what I wanted.

protected void rcRiskMap_ItemDataBound(object sender, ChartItemDataBoundEventArgs e)  
{  
   e.SeriesItem.Label.TextBlock.Text = (e.DataItem as DataRowView)["RiskNumber"].ToString();  
 
   foreach (ChartSeriesItem item in rcRiskMap.Series[0].Items)  
   {  
      if (item.XValue == e.SeriesItem.XValue && item.YValue == e.SeriesItem.YValue && item.Name != e.SeriesItem.Name)  
      {  
         e.SeriesItem.Label.TextBlock.Text = item.Label.TextBlock.Text + "," + (e.DataItem as DataRowView)["RiskNumber"].ToString();  
         item.Label.TextBlock.Text = " ";  
       }  
   }  


Pete
0
Vladimir Milev
Telerik team
answered on 17 Oct 2008, 08:28 AM
Hello Pete,

RadChart does not offer such a label grouping feature out of the box. If your solution works for you then its most probably the best solution.

All the best,
Vladimir Milev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Chart (Obsolete)
Asked by
Pete
Top achievements
Rank 1
Answers by
Pete
Top achievements
Rank 1
Vladimir Milev
Telerik team
Share this question
or