Using ASP.NET Chart Control

Posted by Community Admin on 03-Aug-2018 15:34

Using ASP.NET Chart Control

All Replies

Posted by Community Admin on 19-Jul-2011 00:00

How can I get the ASP.NET Chart control to serve up images via the HttpHandler chartimg.axd? Adding the entry to the config file wasn't sufficient. For my custom HttpHandlers, I added routes during bootstrapper initialized event. Do I need to add a route for the chartimg.axd?

protected void Application_Start(object sender, EventArgs e)
    Bootstrapper.Initialized += Bootstrapper_Initialized;
 
private void Bootstrapper_Initialized(object sender, ExecutedEventArgs args)
    if (args.CommandName == "RegisterRoutes")
    
        var routes = (RouteCollection)args.Data;
        routes.MapHttpHandler<MyHandler>("myhandler.axd");
    

I could probably use RadChart, but I wanted to keep my options open for future deployments where I might want to use this control on a non-Sitefinity site (and I don't want to purchase a separate RadControls license).

Thanks,
Eric

Posted by Community Admin on 22-Jul-2011 00:00

Never mind. The first time I tried this it wasn't working, but probably because of something I screwed up. A second attempt and it worked flawlessly. I started with the RadChart which worked well then switched to the ASP.NET chart, which also worked. So I guess there's nothing extra you need to do (other than importing DataVIsualizations or whatever, adding the HttpHandler to the web config and register the asp:Chart tag).

This thread is closed