Chart (Obsolete)


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.

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" "">
<html xmlns=''>
<head runat="server">
    <title>ASP.NET Chart Demo - Drill-down chart</title>
     <style type="text/css">
               outline: 0;
    <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">
               <telerik:AjaxSetting AjaxControlID="RadChart1">
                         <telerik:AjaxUpdatedControl ControlID="RadChart1" LoadingPanelID="LoadingPanel1">
               <telerik:AjaxSetting AjaxControlID="Refresh">
                         <telerik:AjaxUpdatedControl ControlID="RadChart1" LoadingPanelID="LoadingPanel1">
                         <telerik:AjaxUpdatedControl ControlID="Refresh"></telerik:AjaxUpdatedControl>
     <telerik:RadChart ID="RadChart1" runat="server" OnClick="RadChart1_Click" OnPrePaint="RadChart1_PrePaint"
          DataSourceID="SqlDataSource1" AlternateText="DrillDown RadChart" Skin="Office2007">
               <TextBlock Text="Revenue">
               <telerik:ChartSeries DataXColumn="Year" DataYColumn="Rev" Name="Years">
               <Appearance Dimensions-Margins="19%, 90px, 12%, 12%">
               <XAxis MaxValue="2005" IsZeroBased="False" DataLabelsColumn="Year" AutoScale="False"
                    MinValue="2003" Step="1">
                         <telerik:ChartAxisItem Value="2003">
                         <telerik:ChartAxisItem Value="2004">
                         <telerik:ChartAxisItem Value="2005">
     <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"
          SelectCommand="SELECT Sum(Revenue) as Rev, Year FROM Revenue GROUP BY Year">
     <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"
          SelectCommand="SELECT Sum(Revenue) as Rev, Quarter FROM Revenue WHERE Year=@Year GROUP BY Quarter">
               <asp:Parameter Name="Year"></asp:Parameter>
     <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">
               <asp:Parameter Name="Year"></asp:Parameter>
               <asp:Parameter Name="Quarter"></asp:Parameter>
     <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" Height="77px" Width="113px" runat="server">
     <br />
     <asp:Button runat="server" ID="Refresh" Text="Initialize Chart" OnClick="Refresh_Click">
     <!-- content end -->
Telerik UI for ASP.NET AJAX Q3'14 Release is here