Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi ..
i'm new sharepoint.. i tried to design custom chart control using .net chart control.. after deploying to sharepoint page, the chart image is not shown.. chart is not loaded..
anyone know what s the problem... plz help me...

i've web.config coding like below..

XML
<pages>
<controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.Datavisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </controls>
</pages>

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

<appSettings>
 <add key="ChartImageHandler" value="Storage=memory;Timeout=180;Url=~/tempImages/;" />
</appSettings>

and.. my chart control code is..
<asp:Chart ID="chrtDepartment" ImageStorageMode="UseHttpHandler" RenderType="ImageMap" runat="server" BorderSkin-SkinStyle="Emboss" BorderlineDashStyle="Solid" BorderlineColor="#1A3B69" Visible="true">
                <Series>
                    <asp:Series Name="Series1" YValueType="Int32" ChartArea="chrtAreaDepartment" ChartType="Line" IsValueShownAsLabel="true">
                        <Points>
                            <asp:DataPoint AxisLabel="1" YValues="12" />
                            <asp:DataPoint AxisLabel="2" YValues="34" />
                            <asp:DataPoint AxisLabel="3" YValues="10" />

                        </Points>
                    </asp:Series>
                </Series>
                <ChartAreas>
                    <asp:ChartArea Name="chrtAreaDepartment" Area3DStyle-Enable3D="true">
                    </asp:ChartArea>
                </ChartAreas>
            </asp:Chart>
Posted
Updated 10-Jan-12 2:21am
v2

thanks for ur post.. i solved..

i did changes in web config file of sharepoint page like below.. may help to someone like me...
HTML
<pages>
<controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.Datavisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </controls>
</pages>
 
<httpHandlers>
 <add path="ChartImg.axd" verb="GET, HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
</httpHandlers>
 
<appSettings>
 <add key="ChartImageHandler" value="Storage=memory;Timeout=180;Url=~/tempImages/;" />
</appSettings>

<handlers>
 <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </handlers>
 
Share this answer
 
v2
Comments
RaisKazi 11-Jan-12 6:43am    
Edited: Added "pre" tag.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900