Hi everyone,
I'm using an ASP.NET Chart control, and it takes the data from a database. Sometimes, this data is empty, and I can't find any way to show some text or similar instead of a blank screen. There is no attribute that allows me to do that.
Besides, I think that because of the empty data, I get an exception every time I try to show the chart without data:
16.48.27 ERROR: System.Web.HttpException: File does not exist.
at System.Web.StaticFileHandler.GetFileInfo(String virtualPathWithPathInfo, String physicalPath, HttpResponse response)
at System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context)
at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I suppose that it's because of the "ImageLocation" attribute on Chart object, because it doesn't create any image with empty data, so it cannot find that location.
This is the image I want to avoid:
Question: Is there any way to detect when Chart receives empty data?