Hi there;
After you've made sure your proyect's web.config file has the proper entries, take a look at this example (Content Page {.aspx}):
<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
...
<asp:Chart ID="PieChart1" runat="server" Width="365px"> <%--OnCustomizeLegend="PieChart1_CustomizeLegend"--%>
<Series>
<asp:Series Name="Series1" ChartType="Pie" YValueMembers="MarketShare" XValueMember="recIdCesionario" XAxisType="Primary" IsValueShownAsLabel="True" Legend="Cesionarios" CustomProperties="PieLabelStyle=Outside" LabelFormat="{P}" Palette="SemiTransparent"></asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1" Area3DStyle-Enable3D="true">
<Area3DStyle Enable3D="True" Inclination="35" Rotation="15"></Area3DStyle>
</asp:ChartArea>
</ChartAreas>
<Legends>
<asp:Legend Name="Cesionarios" Title="Cesionarios" LegendStyle="Column" LegendItemOrder="SameAsSeriesOrder"></asp:Legend>
</Legends>
</asp:Chart>
Pay close attention to the SERIES settings, for there's the key to make it work.
Here's the code behind (extract):
private void LoadCharts(string SearchKey)
{
PieChart1.DataSource = DBCore.Get_MarketShareData(SearchKey);
PieChart1.DataBind();
}
Hope this helps.
Cheers!.