I have created a control called RealTimePieChart and droped a macro on home page and it thew an error. I am using web developer 2010 Express and Umbraco 4.7.1.
I googled it but I had no luck please could you tell me what I should do?
Error creating usercontrol (usercontrols/wuc_RealTimePieChart.ascx) Unknown
server tag 'asp:Chart'. at System.Web.UI.TemplateParser.ParseString(String
text, VirtualPath virtualPath, Encoding fileEncoding) at
System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath
virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at
System.Web.UI.TemplateParser.Parse() at
System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at
System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider
buildProvider) at
System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at
System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath
virtualPath) at
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath
virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
allowBuildInPrecompile, Boolean throwIfNotFound, Boolean
ensureIsUpToDate) at
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext
context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp,
Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean
ensureIsUpToDate) at
System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context,
VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
allowBuildInPrecompile, Boolean ensureIsUpToDate) at
System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at
umbraco.macro.loadUserControl(String fileName, MacroModel model, Hashtable
pageElements)
Hi. You just have to register your chart control with either the <%@ Register %> instruction in the beginning of your ascx file or in the web.cofig inside the "pages" section.
Any control should be registered in order to use it declaratively in your markup. It's true even for "standard" asp.net controls as well. Look into the web.config file:
The first and the secon <add> tags register standard asp.net controls associating them with the "asp:" prefix. The same thing does the third - it registers umbraco "item" and "macro" controls. If you use a 3rd part library of controls you have to register it the same way.
Invalid temp directory in chart handler configuration [c:\Temp\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.ChartHttpHandler.InitializeParameters()
then I googled it and created a TempImage folder in my project and now it throws a new error.
please could you tell me how to solve this one.
here is stack trace
Error
Object reference not set to an instance of an object. at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.GetHandlerUrl() at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.GetUrl(String query, String fileKey, String currentGuid) at
I did the same and when I run web site it writes the file into that folder but still throws an error.
Object reference not set to an instance of an object. at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.GetHandlerUrl() at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.GetUrl(String query, String fileKey, String currentGuid) at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.GetChartImageUrl(MemoryStream stream, String imageExt) at System.Web.UI.DataVisualization.Charting.Chart.Render(HtmlTextWriter writer)
here is the razor code which bind data to pie char using single query.
@{ var db =Database.Open("SmallBakery"); var data = db.Query("SELECT Name, Price FROM Product"); var myChart =newChart(width:600, height:400, theme:ChartTheme.Green) .AddTitle("Product Sales") .DataBindTable(data,"Name") .Write(); }
I wonder how to bind a stored procedure with chart in the razor.
I have created umbraco site using webmatrix and trying to test the asp:chart control from a asp.net usercontrol. Created the macro and inserted macro to a template.
I added the tag asp in web.config and created the tempimagefiles folder. I was not able to provide permission to this folder from windows explorer to iis_Iusrs--because it is not attached to the IIS server.
Pie chart and Stored procedure!
Hi All,
I have created a control called RealTimePieChart and droped a macro on home page and it thew an error. I am using web developer 2010 Express and Umbraco 4.7.1.
I googled it but I had no luck please could you tell me what I should do?
Error creating usercontrol (usercontrols/wuc_RealTimePieChart.ascx)
Unknown server tag 'asp:Chart'.
at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath)
at System.Web.UI.TemplateParser.ParseInternal()
at System.Web.UI.TemplateParser.Parse()
at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()
at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)
at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath)
at umbraco.macro.loadUserControl(String fileName, MacroModel model, Hashtable pageElements)
kind regards
saif
Hi. You just have to register your chart control with either the <%@ Register %> instruction in the beginning of your ascx file or in the web.cofig inside the "pages" section.
Thank you Rodion for quick reply. Actually I created a lot of other controls and I didnot register them. Is Chart control is exceptional or ...?
Any control should be registered in order to use it declaratively in your markup. It's true even for "standard" asp.net controls as well. Look into the web.config file:
Now I have created a web user control called RealTimePieCharts in umbraco userControl directory.
Here is web.config control tag
<controls>
<add tagPrefix="umbraco" namespace="umbraco.presentation.templateControls" assembly="umbraco" />
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"
assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</controls>
But this time it throws a different error.
Invalid temp directory in chart handler configuration [c:\Temp\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.ChartHttpHandler.InitializeParameters()
then I googled it and created a TempImage folder in my project and now it throws a new error.
please could you tell me how to solve this one.
here is stack trace
Object reference not set to an instance of an object.
at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.GetHandlerUrl()
at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.GetUrl(String query, String fileKey, String currentGuid)
at
thanks in adv.
It seems you need to create the folder mentioned (c:\Temp\TempImageFiles\) and obviously grant your application pool write access to it.
I did the same and when I run web site it writes the file into that folder but still throws an error.
Object reference not set to an instance of an object.
at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.GetHandlerUrl()
at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.GetUrl(String query, String fileKey, String currentGuid)
at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.GetChartImageUrl(MemoryStream stream, String imageExt)
at System.Web.UI.DataVisualization.Charting.Chart.Render(HtmlTextWriter writer)
Hi Rodion,
here is the razor code which bind data to pie char using single query.
I wonder how to bind a stored procedure with chart in the razor.
var dfe = mdobj.GetCurrentMember().dFES;
theDoc = wsrobj.Get_RealTimePieChart_Pivot(dfe);
string sql = "exec dbo.Get_RealTimePieChart_Pivot @0";
db.Execute(sql,dfe);
var machart = new Chart(width: 600, height: 400)
.AddTitle("Review Completness")
.DataBindTable(dataSource: _ _ _ _ _ _ _ xField: "Sec")
.Write();
Rodion thank you for all your help I have done it.
var dfe = mdobj.GetCurrentMember().dFES;
theDoc = wsrobj.Get_RealTimePieChart_Pivot(dfe);
var dataView = new DataView(theDoc.DT);
var machart = new Chart(width: 600, height: 400)
.AddTitle("Completeness Review")
.AddSeries("Default", chartType: "Pie",
xValue: dataView, xField: "Sec",
yValues: dataView, yFields: "Per")
.Write();
kind regards
saif
I have created umbraco site using webmatrix and trying to test the asp:chart control from a asp.net usercontrol. Created the macro and inserted macro to a template.
I added the tag asp in web.config and created the tempimagefiles folder. I was not able to provide permission to this folder from windows explorer to iis_Iusrs--because it is not attached to the IIS server.
and I am getting the following error
No http handler was found for request type 'GET'
entry in web.config files is...
I needed to add the handler in system.webserver and remove the url in appsettings and works.
Got the solution from this site http://stackoverflow.com/questions/2117102/mscharts-no-http-handler-was-found-for-request-type-get-error
It's been really interesting to see pie chart and stored procedure together helpful in my project. free charts
is working on a reply...