<
telerik:RadHtmlChart
runat
=
"server"
Width
=
"400px"
Height
=
"300px"
ID
=
"RadHTMLChart1"
DataSourceID
=
"SqlDataSource2"
>
<
Legend
>
<
Appearance
Position
=
"Top"
>
</
Appearance
>
</
Legend
>
<
PlotArea
>
<
Series
>
<
telerik:PieSeries
DataFieldY
=
"SumPeopleServed"
Name
=
"People Served"
StartAngle
=
"90"
>
</
telerik:PieSeries
>
</
Series
>
</
PlotArea
>
<
ChartTitle
Text
=
"% Samples by RDS"
>
<
Appearance
>
<
TextStyle
FontSize
=
"16px"
></
TextStyle
>
</
Appearance
>
</
ChartTitle
>
</
telerik:RadHtmlChart
>
<
asp:SqlDataSource
ID
=
"SqlDataSource2"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:cnPanDMSWEB_dead %>" SelectCommand="Select RDSNUm, Sum(PeopleServed) as 'SumPeopleServed' from mcop_OrderEntry Where TransDate >= @StartDate and TransDate <= @EndDate Group By RDSNum">
<
SelectParameters
>
<
asp:ControlParameter
ControlID
=
"dtStartDate"
DefaultValue
=
"7/1/2013"
Name
=
"StartDate"
PropertyName
=
"SelectedDate"
/>
<
asp:ControlParameter
ControlID
=
"dtEndDate"
DefaultValue
=
"7/31/2013"
Name
=
"EndDate"
PropertyName
=
"SelectedDate"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>
I'm trying to get a RadHTMLChart in PieChart mode to generate the legend from a column in a SQL-Generated dataset
Here is the example of the dataset:
RDSNum SumPeopleServed
----------------------------------------------------
1 834989
8888 36956
9999 641836
Attached is a snapshot of the control that correctly shows the "SumPeopleServed" values in the pie chart.
But, I can't seem to get the "RDSNum" to show in the legend so that the user can see what each color represents.
I don't see anything in the 'Config Wizard" that allows me to set the column used for the legend, much like the "Y-axis" column to be used for the pie chart values....
And I examples I see for SQL-Databound stuff for piecharts seem to have the legend values assigned at design-time, which doesn't help me.
Can anyone point me in the right direction? I'm sure I'm missing something really really dumb... I can't image a control like this would have the ability to use values dynamically generated from a dataset, but then have to have the legend pre-defined at design-time...
Jay