ASPX Code
<%@ Page language="c#" MasterPageFile="~/SampleCode/SamplesMasterPage.master" Inherits="SmartWebControls.SampleCode.Orgs" CodeFile="Orgs.aspx.cs" %>
<%@ Register TagPrefix="swc" Namespace="SmartWebControls" Assembly="SmartWebControls.SmartChart" %>
<asp:Content ID="content" runat="server" ContentPlaceHolderID="cphMain">
<div id="divTitle">Displaying Organizations</div>
<swc:SmartChartPro id="SmartChart1" runat="server" DrawShadows="True" BackgroundImage="" DataTitleFields="name,desc,contact"
DataNodeName="organization" DataKeyField="" MaxTextLength="25" DataFields="name,state"
BoxColor="LightGray" BoxGradient="True" BoxTextColor="Navy" ChartDepth="3" SmartChartDirectory="ImageFolder"
AllowDrillDown="True" ShadowOffset="5" title="Test Chart" TitleColor="MidnightBlue"
MaxChildrenPerLevelGroup="5" ImageHeight="70" ImageWidth="90" DrawBorder="False" Width="784px" Height="360px" OutputType="Html" Font-Bold="True" Font-Names="Verdana" ShadowColor="Silver"></swc:SmartChartPro>
</asp:Content>
C# Code:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
namespace SmartWebControls.SampleCode {
/// <summary>
/// Summary description for OrgsTest.
/// </summary>
public partial class Orgs : System.Web.UI.Page {
protected void Page_Load(object sender, System.EventArgs e) {
if (!Page.IsPostBack) {
string xmlPath = Server.MapPath("~/SampleCode/SmartChartPro/XML/Orgs.xml");
XmlDocument doc = new XmlDocument();
doc.Load(xmlPath);
SmartChart1.DataSource = doc;
SmartChart1.DataBind();
}
}
}
}