c# Graph and Charts RRS feed

  • Question




    Can anybody tell me, "Graphs & charts" are possible in / or not?


    My requirement is to connect a dataset to a Graph / chart built in component /ActiveX / office compoent and show the graph.


    Any help in this regard will be greatly appriciated!!!


    Friday, February 8, 2008 6:01 AM


  • Yes, it's possible Smile

    The easiest option is to have your charting tool save the image to a file on your web server, and programmatically write an image link in your web page that points to the file.  You'll need a procedure in place to ensure the uniqueness of the file names, and you'll need a procedure in place to clean up the old ones.

    A more-versatile-but-harder option is to generate the charts in memory (if your charting tool supports that), and feed those to the client.  You would, in this case, link your image in the original ASPX file to another ASPX file... this other one sends the image bytes.  It would also have to set the Response.ContentType appropriately, and call Response.End when you're done writing the bytes to prevent ASP.NET from trying to send any HTML.  This requires your charts to be in-memory, and is harder to program, but doesn't write any files to disk and thus doesn't require any clean-up efforts.

    There are probably third party ASP.NET charting controls that do either of the above, if you're willing to make the investment.

    -Ryan / Kardax
    Friday, February 8, 2008 10:34 PM