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

LabelsColumn Chart

2 Answers 93 Views
Chart (obsolete as of Q1 2013)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
NightFlash
Top achievements
Rank 1
NightFlash asked on 28 Jun 2007, 10:20 AM
Hi,

I'm using a radChart (pie) for a small datasource. The dataset looks like this:

gebruiker     totaal
Kevin             11
Joeri              14
Ken               34

Now I want to see the pie, with a legend wich color is for wich name. I think this something easy to do, but I'm now trying for 3hours already and still cannot find it :(

If it can helps, this is how I make my Test DataSet:

            GrafiekData grafiekLijst = new GrafiekData();  
 
            GrafiekData.GrafiekDataRow newGrafiekRow;  
            newGrafiekRow = grafiekLijst._GrafiekData.NewGrafiekDataRow();  
            newGrafiekRow.gebruiker = "Kevin";  
            newGrafiekRow.totaal = 789;  
 
            grafiekLijst._GrafiekData.Rows.Add(newGrafiekRow);  
 
            GrafiekData.GrafiekDataRow newGrafiekRow2;  
            newGrafiekRow2 = grafiekLijst._GrafiekData.NewGrafiekDataRow();  
            newGrafiekRow2.gebruiker = "Ann";  
            newGrafiekRow2.totaal = 129;  
 
            grafiekLijst._GrafiekData.Rows.Add(newGrafiekRow2);  
 

2 Answers, 1 is accepted

Sort by
0
NightFlash
Top achievements
Rank 1
answered on 28 Jun 2007, 10:22 AM
and this is how I add my datasource to my chart:

radChart1.DataManager.DataSource = getGrafiekData.GetGrafiekTest();
radChart1.DataManager.LabelsColumn =
"gebruiker";
radChart1.DataBind();

0
Vassil Petev
Telerik team
answered on 29 Jun 2007, 07:21 AM
Hello NightFlash,

The following code changes the display mode of the legend to show Item labels instead of series labels:

radChart1.Series[0].DataLabelsColumn = "gebruiker"
radChart1.Series[0].Appearance.LegendDisplayMode = Telerik.Charting.ChartSeriesLegendDisplayMode.ItemLabels; 
 



Greetings,
Rob
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Chart (obsolete as of Q1 2013)
Asked by
NightFlash
Top achievements
Rank 1
Answers by
NightFlash
Top achievements
Rank 1
Vassil Petev
Telerik team
Share this question
or