ASPX Code
<%@ Page Language="C#" MasterPageFile="~/SampleCode/SamplesMasterPage.master" AutoEventWireup="true" CodeFile="ProductHierarchy.aspx.cs" Inherits="SampleCode_SmartChartLite_ProductHierarchy" Title="Binding SmartChartLite to Product Data" %>
<%@ Register TagPrefix="swc" Namespace="SmartWebControls" Assembly="SmartWebControls.SmartChart" %>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMain" Runat="Server">
<div id="divTitle">Binding Product Data to the SmartChartLite Control Using the XmlDataSource</div>
<div id="divInstructions">
The SmartChartLite control can be bound to an XmlDataSource control as shown in this example. The example also shows how custom
images can be used for SmartChart items and backgrounds. Click an SmartChart item to drill-down into the chart more.
</div>
<br />
<swc:SmartChartLite id="WebSmartChart1" DataSourceID="xmlDS" runat="server"
Width="733px" Height="800px" DrawShadows="false"
DataTitleFields="name" DataNodeName="product" BoxColor="White"
DataFields="name" ImageHeight="115" ImageWidth="100" ImageField="image"
BoxTextColor="Black" ChartDepth="2" AllowDrillDown="True" FontStyle="Bold"
ShadowOffset="5" title="XBox 360 Products" MaxChildrenPerLevelGroup="4"
DrawBorder="false" OutputType="Html" DrawBoxBorder="false"></swc:SmartChartLite>
<asp:XmlDataSource ID="xmlDS" runat="server" DataFile="~/SampleCode/SmartChartLite/XML/Products.xml" />
</asp:Content>
C# Code:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
public partial class SampleCode_SmartChartLite_ProductHierarchy : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}