Chart (Obsolete)

Controls

Rate this demo

Thank you for your post!
Submit a support ticket
If you have an active license or trial, you have access to dedicated support from Telerik’s developers. Response time is 24h for active licenses and 72h for trials, Mon-Fri.
Post in the forums
If you don’t have access to support or would like to help other people by sharing your problem, reach out to our active community in the forums.

Chart - Drill-down chart

If you are considering Telerik’s Chart control for new development, you might be interested in checking out our newer HTML5-based Chart for ASP.NET AJAX.
DrillDown RadChart

The example shows how the drill down functionality of the chart can be used. On the first chart the data is grouped by the greatest time span, which is year. The year is divided into quarters. By clicking on an item on the chart you can see the values correspoding to the quarters of the selected year. Each quarter consists of 3 months. After choosing a quarter for the selected year you can see the values for each month of the this quarter.

C# VB
Show code in new window Demo isolation steps
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Chart.Examples.Functionality.DrillDown.DefaultCS" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Charting" Assembly="Telerik.Web.UI" %>
<%@ Register Namespace="Telerik.QuickStart" TagPrefix="qsf" %>
<%@ Register TagPrefix="uc1" TagName="RadHtmlChartInfoBox" Src="~/Chart/Common/RadHmlChartInfoBox.ascx" %>
<!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'>
<head runat="server">
    <title>ASP.NET Chart Demo - Drill-down chart</title>
     <style type="text/css">
          area
          {
               outline: 0;
          }
     </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
     <!-- content start -->
     <uc1:RadHtmlChartInfoBox ID="RadHtmlChartInfoBox1" runat="server" />
     <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
          <AjaxSettings>
               <telerik:AjaxSetting AjaxControlID="RadChart1">
                    <UpdatedControls>
                         <telerik:AjaxUpdatedControl ControlID="RadChart1" LoadingPanelID="LoadingPanel1">
                         </telerik:AjaxUpdatedControl>
                    </UpdatedControls>
               </telerik:AjaxSetting>
               <telerik:AjaxSetting AjaxControlID="Refresh">
                    <UpdatedControls>
                         <telerik:AjaxUpdatedControl ControlID="RadChart1" LoadingPanelID="LoadingPanel1">
                         </telerik:AjaxUpdatedControl>
                         <telerik:AjaxUpdatedControl ControlID="Refresh"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
               </telerik:AjaxSetting>
          </AjaxSettings>
     </telerik:RadAjaxManager>
     <telerik:RadChart ID="RadChart1" runat="server" OnClick="RadChart1_Click" OnPrePaint="RadChart1_PrePaint"
          DataSourceID="SqlDataSource1" AlternateText="DrillDown RadChart" Skin="Office2007">
          <ChartTitle>
               <TextBlock Text="Revenue">
               </TextBlock>
          </ChartTitle>
          <Series>
               <telerik:ChartSeries DataXColumn="Year" DataYColumn="Rev" Name="Years">
               </telerik:ChartSeries>
          </Series>
          <PlotArea>
               <Appearance Dimensions-Margins="19%, 90px, 12%, 12%">
               </Appearance>
               <XAxis MaxValue="2005" IsZeroBased="False" DataLabelsColumn="Year" AutoScale="False"
                    MinValue="2003" Step="1">
                    <Items>
                         <telerik:ChartAxisItem Value="2003">
                         </telerik:ChartAxisItem>
                         <telerik:ChartAxisItem Value="2004">
                         </telerik:ChartAxisItem>
                         <telerik:ChartAxisItem Value="2005">
                         </telerik:ChartAxisItem>
                    </Items>
               </XAxis>
          </PlotArea>
     </telerik:RadChart>
     <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"
          SelectCommand="SELECT Sum(Revenue) as Rev, Year FROM Revenue GROUP BY Year">
     </asp:SqlDataSource>
     <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"
          SelectCommand="SELECT Sum(Revenue) as Rev, Quarter FROM Revenue WHERE Year=@Year GROUP BY Quarter">
          <SelectParameters>
               <asp:Parameter Name="Year"></asp:Parameter>
          </SelectParameters>
     </asp:SqlDataSource>
     <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"
          SelectCommand="SELECT Sum(Revenue) as Rev, Month FROM Revenue WHERE Year=@Year AND Quarter = @Quarter GROUP BY Month">
          <SelectParameters>
               <asp:Parameter Name="Year"></asp:Parameter>
               <asp:Parameter Name="Quarter"></asp:Parameter>
          </SelectParameters>
     </asp:SqlDataSource>
     <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" Height="77px" Width="113px" runat="server">
     </telerik:RadAjaxLoadingPanel>
     <br />
     <asp:Button runat="server" ID="Refresh" Text="Initialize Chart" OnClick="Refresh_Click">
     </asp:Button>
     <!-- content end -->
    </form>
</body>
</html>
Telerik UI for ASP.NET AJAX Q3'14 Release is here