How to use Chart Control in EP 2009?

ASP.NET Chart Control


(1)    Install the components

Chart Controls for .NET Framework

Chart Controls Add-on for Visual Studio 2008



Add the below as the child node to  <HttpHandlers> section

<add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />


Add the just after </system.web>

key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />


Add the just before </pages>



    <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />




(3)   Create c:\TempImageFiles folder and give read access to the app pool



Here is a sample markup for user control using Chart control ( replace the highlighted ones with your datasource  control and the field or display field name)

<asp:Chart ID="Chart1" runat="server" DataMember="CustTable_Current"



        <asp:Legend Alignment="Center" Docking="Bottom" LegendStyle="Row"





        <asp:Series Legend="Legend1" Name="Open Sales Orders"

            YValueMembers="openSalesOrders**" YValuesPerPoint="4">


        <asp:Series ChartArea="ChartArea1" Legend="Legend1" Name="Total Sales Orders"

            YValueMembers="NoSalesOrders**" YValuesPerPoint="4">




        <asp:ChartArea Name="ChartArea1">

            <Area3DStyle Enable3D="True" />




Comments (2)

  1. Kannan says:


         Thanks for this post. I did the way which you have explained. But after adding the user control page in an Enterprise Portal am getting the error as

    Unable to load content ChartDiagram. Please contact your system administrator.

    Could you please tell me how to rectify this error? Please…



Skip to main content