I am attempting to create my first HTML Chart. This will be a simple pie chart based on a SQL query.
The query returns five rows with two columns of data: (1) language (English/French/etc) and (2) a count of each.
The intention is to display a pie chart showing the relative distribution of the top five languages used in my application.
I have copied an example and also looked at the data binding documentation but have not been able to connect my data with the pie slices.
I presume I need to add some type of template that is unique to a pie chart. All the examples I found refer to other chart types.
When I add this markup to my page I get no results unless I add a few series items directly. I see that Intellisense includes an item "db" (markup snippet for data-bind attribute). I don't know what to do from there, it appears to be non-functional or expecting me to do something unknown to me.
<telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" DataSourceID="Language_Chart_Data"> <PlotArea> <Series> <telerik:PieSeries StartAngle="90" DataFieldY="count" NameField="language"> <SeriesItems > <telerik:PieSeriesItem BackgroundColor="#666666" Exploded="false" Name="Safari" Y="4.5"></telerik:PieSeriesItem> <telerik:PieSeriesItem BackgroundColor="#333333" Exploded="false" Name="Opera" Y="2.3"></telerik:PieSeriesItem> </SeriesItems> <LabelsAppearance Position="OutsideEnd" DataFormatString="{0} %" /> <TooltipsAppearance DataFormatString="{0} %" /> </telerik:PieSeries> </Series> </PlotArea> <ChartTitle Text="Top Five Languages"> </ChartTitle></telerik:RadHtmlChart>