Data Binding Basics

The ShieldChart has several data bound properties which can be populated runtime with data. You can bind data to CategoricalValues of each ChartAxisX to data fields pointed into CategoricalValuesField.
All x and y properties of each series can be bound to a data fields listed into DataFieldY and DataFieldX properties of all series except range series. Range series low and high values can be bound to fields listed in
DataFieldLow and DataFieldHigh. Also for all range series the x values can be bound via DataFieldX property.

<shield:ShieldChart ID="ShieldChart1" Width="100%" Height="400px" runat="server" 
    OnTakeDataSource="ShieldChart1_TakeDataSource" IsInverted="true"
    CssClass="chart">
    <PrimaryHeader Text="Internet usage statistics"></PrimaryHeader>
    <Axes>
        <shield:ChartAxisX 
            CategoricalValuesField="Year" ></shield:ChartAxisX>
        <shield:ChartAxisY>
            <Title Text="Visitor statistics"></Title>
        </shield:ChartAxisY>
    </Axes>
    <DataSeries>
        <shield:ChartBarSeries DataFieldY="Total" 
             CollectionAlias="Total Visits">
        </shield:ChartBarSeries>
    </DataSeries>
</shield:ShieldChart>
protected void ShieldChart1_TakeDataSource(object sender, Shield.Web.UI.ChartTakeDataSourceEventArgs e)
{
    List datasource = new List() 
    { 
        new VisitorStatistic() { Total = 565000, Year = 2001 },
        new VisitorStatistic() { Total = 630400, Year = 2002 },
        new VisitorStatistic() { Total = 743000, Year = 2003 },
        new VisitorStatistic() { Total = 910200, Year = 2004 },
        new VisitorStatistic() { Total = 1170200, Year = 2005 },
        new VisitorStatistic() { Total = 1383000, Year = 2006 }
    };

    ShieldChart1.DataSource = datasource;
}

private class VisitorStatistic
{
    public double Year { get; set; }
    public double Total { get; set; }
}