Thursday, 29 August 2013

HOW TO USE ASP.NET AJAX BAR CHART

HOW TO USE ASP.NET AJAX BAR CHART 

1) Create Website
2) Add aspx page
3) Add toolkitScriptManager
4) If you don't have ajax control toolkit  download from codeplex
5) Add BarChart


asp:BarChart Properties
1) CategoriesAxis  --> X-axis values here i choose years
2) Series -> is a container for BarCharSeries.
3)BarChartSeries Properties
             3.1) Name (ex.Country )
             3.2) BarColor
             3.3) Data (Data values should match categoriesaxis values i.e 1:1)


    <asp:BarChart runat="server" CategoriesAxis="2006,2007,2008"
    ChartTitle="Indiastrail Growth" ValueAxisLines="10">
    <Series>
    <asp:BarChartSeries Name="INDIA" Data="100, 200, 350" BarColor="Blue" />
    <asp:BarChartSeries Name="CHINA" Data="200, 300, 450" BarColor="Maroon" />
    </Series>
    </asp:BarChart>

4) Run the Web Page