HtmlChart - Pie Chart

Demo Configurator

Spin UpSpin Down
Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

The Pie Chart type in RadHtmlChart has a rich functionality for any ASP.NET project. It displays the data as sectors from a circle and is useful in all scenarios when we need to represent data as parts of a whole. Each series in the Pie Chart displays a portion of the data in a two-dimensional circle. Use the rich customization options and animation of the Pie Chart and create your data-driven applications. The labels of Pie chart can be positioned through the LabelsAppearance.Position property of the series since Q1 2014:

  • Center — the labels are positioned at the center of the pie.
  • InsideEnd — the labels are positioned inside, near the end of the pie.
  • OutsideEnd — the labels are positioned outside, near the end of the pie.

The demo shows a simple example of how a PieSeries looks and works. You can use the configurators to see how setting each of the properties affects the control. The configurators also expose the meaningful properties in the context of a PieSeries.

By default every configuration panel is collapsed, to change a particular setting choose the according category and expand it via the arrow button.

Related Resources

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.Web.Examples.HtmlChart.ChartTypes.PieChart.DefaultCS" %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns=''>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />

    <div class="demo-container size-wide">
        <telerik:RadHtmlChart runat="server" ID="PieChart1" Width="800" Height="500" Transitions="true" Skin="Silk">
            <ChartTitle Text="Browser Usage for April 2012">
                <Appearance Align="Center" Position="Top">
                <Appearance Position="Right" Visible="true">
                    <telerik:PieSeries StartAngle="90">
                        <LabelsAppearance Position="OutsideEnd" DataFormatString="{0} %">
                        <TooltipsAppearance Color="White" DataFormatString="{0} %"></TooltipsAppearance>
                            <telerik:PieSeriesItem BackgroundColor="#ff9900" Exploded="true" Name="Internet Explorer"
                            <telerik:PieSeriesItem BackgroundColor="#cccccc" Exploded="false" Name="Firefox"
                            <telerik:PieSeriesItem BackgroundColor="#999999" Exploded="false" Name="Chrome" Y="38.3"></telerik:PieSeriesItem>
                            <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>
    <telerik:RadAjaxManager runat="server" ID="theAjaxMaanger">
            <telerik:AjaxSetting AjaxControlID="demoConfigurator">
                    <telerik:AjaxUpdatedControl ControlID="demoConfigurator" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="PieChart1" LoadingPanelID="RadAjaxLoadingPanel1" />
    <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" Skin="Silk">
    <qsf:ConfiguratorPanel ID="demoConfigurator" runat="server">
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn1" runat="server" Size="Narrow">
                    <qsf:NumericTextBox ID="StartingAngleValue" runat="server" Label="Start Angle" Value="90" MaxLength="4" AutoPostBack="true">
                        <NumberFormat DecimalDigits="0" />
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn2" runat="server" Size="Medium">
                    <qsf:ComboBox runat="server" ID="comboLabelsPositionChooser" Label="Label Position" AutoPostBack="true">
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn3" runat="server" Size="Narrow">
                    <span class="checkbox">
                        <asp:CheckBox ID="ItemExploded" Text="Item is Exploded" Checked="true" runat="server" AutoPostBack="true"></asp:CheckBox></span>

Find Assistance

Help Us Improve

Was this example helpful?