Binding Data to the SmartChart Control Using the SiteMapDataSource control
The SmartChart control can be bound to a SiteMapDataSource control as shown in this example. Click on an SmartChart item to drill-down into the site map. View a custom implementation of a site map here.

Web Site Map
-
Samples




-
-
SmartChartLite Samples
SmartChartPro Samples
ASPX Code

<%@ Page Language="C#" MasterPageFile="~/SampleCode/SamplesMasterPage.master" AutoEventWireup="true" CodeFile="UsingSiteMapDataSource.aspx.cs" Inherits="SampleCode_DataSourceControls_UsingSiteMapDataSource" %>
<%@ Register TagPrefix="swc" Namespace="SmartWebControls" Assembly="SmartWebControls.SmartChart" %>
<asp:Content ID="content" runat="server" ContentPlaceHolderID="cphMain">
    <div id="divTitle">Binding Data to the SmartChart Control Using the SiteMapDataSource control</div>
        <div id="divInstructions">
        The SmartChart control can be bound to a SiteMapDataSource control as shown in this example.  Click on an 
        SmartChart item to drill-down into the site map. View a custom implementation of a site map <a href="CustomSiteMap.aspx">here</a>.
    </div>
    <p></p>
    <swc:SmartChartPro id="WebSmartChart1" DataSourceID="smDS" runat="server" Width="850px" Height="200px" 
        BoxColor="LightGray" BoxGradient="True" BoxTextColor="Navy" DrawShadows="True"
        ChartDepth="2" AllowDrillDown="True" FontStyle="Bold" OutputType="Html"
        ShadowOffset="5" title="Web Site Map" TitleColor="MidnightBlue" 
        MaxChildrenPerLevelGroup="8" HighlightChildrenOnMouseOver="True" 
        ShadowColor="LightGray"></swc:SmartChartPro>
    <asp:SiteMapDataSource ID="smDS" runat="server" />
</asp:Content>

C# Code:

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class SampleCode_DataSourceControls_UsingSiteMapDataSource : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}