Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

Chart / Poll

 
VOLKSWAGEN HONDA PEUGEOT MAZDA DODGE MITSUBISHI TOYOTA FORD SUBARU HYUNDAI NISSAN




What is you favourite car model?





Results:

Did you know that you can add Telerik Silverlight Charts to your ASP.NET applications?

RadControls for Silverlight


  • The example demonstrates an interactive pie chart with tooltips and postback events. When a pie slice is clicked for the first time it becomes exploded. The following clicks on the same item add additional value to the selected car make.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Register TagPrefix="telerik" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <%@ Register TagPrefix="telerik" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="telerik" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Charting" Assembly="Telerik.Web.UI" %>

    <%@ Page Inherits="Telerik.ChartExamplesCS.Poll.DefaultCS" Language="c#" CodeFile="DefaultCS.aspx.cs" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
    <head runat="server">
        <telerik:HeadTag runat="server" ID="Headtag1"></telerik:HeadTag>
        <!-- custom head section -->
    </head>
    <body class="BODY">
        <!-- end of custom head section -->
        <form runat="server" id="mainForm" method="post">
            <telerik:Header ShowSkinChooser="false" runat="server" ID="Header1" NavigationLanguage="C#" AccessibilityLevel="A">
            </telerik:Header>
            <asp:ScriptManager ID="ScriptManager" runat="server" />
            <!-- content start -->
            <table border="0" style="width: 740px;" summary="">
                <tr>
                    <td style="margin: 0px;">
                        &nbsp;<telerik:RadChart ID="RadChart1" runat="server" Height="333px" SeriesPalette="Pastel"
                            Width="340px">
                            <PlotArea>
                                <Appearance Dimensions-Margins="20px, 0px, 0px, 0px" SeriesPalette="Pastel">
                                </Appearance>
                                <YAxis MaxValue="1" Step="0.2">
                                    <Appearance>
                                        <TextAppearance Shadow-Color="180, 0, 0, 0" TextProperties-Font="Arial, 10pt">
                                        </TextAppearance>
                                    </Appearance>
                                </YAxis>
                                <YAxis2 MaxValue="5" MinValue="1" Step="1">
                                    <Appearance>
                                        <TextAppearance Shadow-Color="180, 0, 0, 0" Shadow-Position="BottomLeft" TextProperties-Font="Arial, 10pt">
                                        </TextAppearance>
                                    </Appearance>
                                </YAxis2>
                                <XAxis MaxValue="5" MinValue="1" Step="1">
                                    <Appearance>
                                        <MajorGridLines Visible="False" />
                                        <LabelAppearance Shadow-Color="180, 0, 0, 0">
                                        </LabelAppearance>
                                        <TextAppearance TextProperties-Font="Arial, 10pt">
                                        </TextAppearance>
                                    </Appearance>
                                </XAxis>
                                <EmptySeriesMessage>
                                    <TextBlock>
                                        <Appearance TextProperties-Font="Arial, 12pt, style=Bold">
                                        </Appearance>
                                    </TextBlock>
                                    <Appearance Shadow-Color="180, 0, 0, 0">
                                    </Appearance>
                                </EmptySeriesMessage>
                            </PlotArea>
                            <ChartTitle>
                                <TextBlock Text="Car Models Popularity Poll">
                                </TextBlock>
                            </ChartTitle>
                            <Appearance Dimensions-Height="333px" Dimensions-Width="340px">
                            </Appearance>
                            <Series>
                                <telerik:ChartSeries Appearance-LegendDisplayMode="ItemLabels" Name="Series 1" Type="Pie">
                                    <Appearance Shadow-Color="180, 0, 0, 0">
                                        <TextAppearance TextProperties-Color="Black" Shadow-Color="180, 0, 0, 0">
                                        </TextAppearance>
                                    </Appearance>
                                    <Items>
                                        <telerik:ChartSeriesItem YValue="1" Name="Item 1">
                                            <Appearance>
                                                <FillStyle MainColor="178, 186, 97" SecondColor="243, 244, 230">
                                                </FillStyle>
                                            </Appearance>
                                        </telerik:ChartSeriesItem>
                                        <telerik:ChartSeriesItem YValue="1" Name="Item 2">
                                            <Appearance>
                                                <FillStyle MainColor="213, 109, 79" SecondColor="248, 232, 227">
                                                </FillStyle>
                                            </Appearance>
                                        </telerik:ChartSeriesItem>
                                        <telerik:ChartSeriesItem YValue="1" Name="Item 3">
                                            <Appearance>
                                                <FillStyle MainColor="61, 186, 194" SecondColor="225, 244, 245">
                                                </FillStyle>
                                            </Appearance>
                                        </telerik:ChartSeriesItem>
                                        <telerik:ChartSeriesItem YValue="1" Name="Item 4">
                                            <Appearance>
                                                <FillStyle MainColor="Khaki" SecondColor="LemonChiffon">
                                                </FillStyle>
                                            </Appearance>
                                        </telerik:ChartSeriesItem>
                                        <telerik:ChartSeriesItem YValue="1" Name="Item 5">
                                            <Appearance>
                                                <FillStyle MainColor="MediumSlateBlue" SecondColor="Thistle">
                                                </FillStyle>
                                            </Appearance>
                                        </telerik:ChartSeriesItem>
                                    </Items>
                                </telerik:ChartSeries>
                            </Series>
                            <Legend Visible="False">
                                <TextBlock>
                                    <Appearance Border-Color="227, 227, 227">
                                        <FillStyle FillType="Solid" MainColor="White">
                                        </FillStyle>
                                    </Appearance>
                                </TextBlock>
                                <Appearance>
                                    <ItemTextAppearance TextProperties-Font="Times New Roman, 10pt">
                                    </ItemTextAppearance>
                                </Appearance>
                            </Legend>
                        </telerik:RadChart>
                    </td>
                    <td class="module" >
                        <br />
                        <br />
                        <br />
                        <br />
                        <asp:Label ID="Label1" runat="server" Style="font-weight: bold">What is you favourite car model?</asp:Label><br />
                        <br />
    <asp:RadioButtonList ID="radioBtnListCarMakes" runat="server" Width="245px" AutoPostBack="True"
    Font-Size="Smaller" RepeatColumns="2" OnSelectedIndexChanged="radioBtnListCarMakes_SelectedIndexChanged">

                            <asp:ListItem Value="VOLKSWAGEN">VOLKSWAGEN</asp:ListItem>
                            <asp:ListItem Value="HONDA">HONDA</asp:ListItem>
                            <asp:ListItem Value="PEUGEOT">PEUGEOT</asp:ListItem>
                            <asp:ListItem Value="MAZDA">MAZDA</asp:ListItem>
                            <asp:ListItem Value="DODGE">DODGE</asp:ListItem>
                            <asp:ListItem Value="MITSUBISHI">MITSUBISHI</asp:ListItem>
                            <asp:ListItem Value="TOYOTA">TOYOTA</asp:ListItem>
                            <asp:ListItem Value="FORD">FORD</asp:ListItem>
                            <asp:ListItem Value="SUBARU">SUBARU</asp:ListItem>
                            <asp:ListItem Value="HYUNDAI">HYUNDAI</asp:ListItem>
                            <asp:ListItem Value="NISSAN">NISSAN</asp:ListItem>
                        </asp:RadioButtonList>
                        <br />
                        <asp:Button ID="Button1" runat="server" Text="Vote" class="button" Width="130" OnClick="Button1_Click">
                        </asp:Button><br />
                        <br />
                        <br />
                        <table summary="">
                            <tr>
                                <td>
                                    <b>Results: </b>
                                </td>
                                <td>
    <asp:RadioButtonList ID="radioButtonsDisplayKind" runat="server" AutoPostBack="True"
    RepeatDirection="Horizontal" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">

                                        <asp:ListItem Value="Percent" Selected="True">Display Percent</asp:ListItem>
                                        <asp:ListItem Value="Votes">Display Votes</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <br />
            <!-- content end -->
            <telerik:Footer runat="server" ID="Footer1"></telerik:Footer>
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451