Hi, im facing a issue.All my series are showing all information from all series.
I know probably it's a basic question, but could someone help me to solve this?
01.
<
telerik:RadHtmlChart
runat
=
"server"
ID
=
"CompetencyByParticipant"
Width
=
"80%"
Height
=
"300"
Transitions
=
"true"
>
02.
<
ChartTitle
Text
=
"CompetĂȘncias por tipo de participante"
>
03.
</
ChartTitle
>
04.
<
PlotArea
>
05.
<
YAxis
>
06.
<
LabelsAppearance
DataFormatString
=
"{0:0.0}"
>
07.
</
LabelsAppearance
>
08.
<
MinorGridLines
Visible
=
"false"
/>
09.
</
YAxis
>
10.
<
XAxis
DataLabelsField
=
"ProfileName"
>
11.
<
TitleAppearance
Text
=
"Participantes"
>
12.
</
TitleAppearance
>
13.
<
LabelsAppearance
Step
=
"3"
>
14.
</
LabelsAppearance
>
15.
<
MajorGridLines
Visible
=
"true"
/>
16.
<
MinorGridLines
Visible
=
"false"
/>
17.
</
XAxis
>
18.
</
PlotArea
>
19.
</
telerik:RadHtmlChart
>
01.
var profileGroup = from k
in
evaluationData
02.
group k by
new
{ Profile = k.Profile, ProfileName = k.ProfileName, CompetencyId = k.Competency, CompetencyName = k.CompetencyName } into g
03.
select
new
04.
{
05.
Profile = g.Key.Profile,
06.
ProfileName = g.Key.ProfileName,
07.
Competency = g.Key.CompetencyId,
08.
CompetencyName = g.Key.CompetencyName,
09.
Score = g.Average(x => x.Score)
10.
};
11.
var chart = CompetencyByParticipant;
12.
var competencies = profileGroup.Select(x => x.CompetencyName).Distinct();
13.
foreach
(var p
in
competencies)
14.
{
15.
var serie =
new
ColumnSeries();
16.
serie.Name = p;
17.
serie.DataFieldY =
"Score"
;
18.
chart.PlotArea.Series.Add(serie);
19.
}
20.
chart.PlotArea.XAxis.DataLabelsField =
"ProfileName"
;
21.
chart.PlotArea.XAxis.LabelsAppearance.Step = 3;
22.
chart.DataSource = profileGroup.ToList();
23.
chart.DataBind();
Is there a way to bind an specific dataset to each serie?
Thanks.