Configuration of ChartPart

ChartPart for SharePoint depends on Microsoft .NET Framework 3.5 SP1 and the Microsoft .NET 3.5 Chart Controls.
By default ChartPart is configured to store the chart images created in the memory. To tune your SharePoint installation you might want to have it store the images on disk instead.

Use memory for temporary chart images

This is the default setting of ChartPart for SharePoint.
In the web.config appSettings you will have this element:
<add key="ChartImageHandler" value="storage=memory;timeout=20;" />

Store temporary images on disk

To store the temporary generated chart images on disk you have to open the web.config files and edit the ChartImageHandler appSetting like this:
<add key="ChartImageHandler" value="Storage=file;Timeout=20;Url=~/tempImages/;" />
Then you have to create the tempImages folder. The easiest way is to create a folder in the web application with tempImages as its name. You have to make sure that the users have write permissions on the folder.

Change the timeout settings for the temporary charts

You can change the timeout for all the temporary generated charts by editing the appSetting, described above. Just change the Timeout value to another value (in minutes).

Last edited Nov 29, 2008 at 6:57 PM by wictor, version 1

Comments

jremperas Jul 1, 2010 at 3:03 PM 
I installed chartpart as instructed. I was able to add the chartpart webpart when I was in the sharepoint server. But when go to my local machine, I get the following error:

"A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered on this site as safe."

It won't even allow me to add the webpart again. But if I go back to the sharepoint server, everything seems to be fine.
Please, help.
Thanks.

carcla Oct 27, 2009 at 5:03 PM 
I resolved my problem.

In web.config there wasn't on the tags <httpHandlers> the <add verb="*" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" validate="false" />

By Cardamone Claudio
Thank's

carcla Oct 22, 2009 at 4:32 PM 
Hi,
after the installation , and after configurated my web.config with <add key="ChartImageHandler" value="storage=file;timeout=20;dir=C:\TempImageFiles\;" /> I have this error :
An exception occurred:System.IO.DirectoryNotFoundException: Invalid temp directory in chart handler configuration [C:\TempImageFiles\]. at System.Web.UI.DataVisualization.Charting.ChartHttpHandlerSettings.Inspect() at System.Web.UI.DataVisualization.Charting.ChartHttpHandlerSettings.ParseParams(String parameters) at System.Web.UI.DataVisualization.Charting.ChartHttpHandlerSettings..ctor(String parameters) at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.InitializeParameters() at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.EnsureInitialized(Boolean hardCheck) at System.Web.UI.DataVisualization.Charting.Chart.GetImageStorageMode() at System.Web.UI.DataVisualization.Charting.Chart.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at ChartPart.ChartPartWebPart.Render(HtmlTextWriter writer)

I found more solutions but
not worked for my case.

Please , help me
Thank's

tapiwab Oct 20, 2009 at 9:01 AM 
thanks for the chart part, how can i make it to calculate data from different sharepoint lists