DynDeveloper.com

DynDeveloper.com

Sign Up Now!Log In
bobx 11/16/2011 9:15:37 AM

Telerik - How To Create A Line Chart And Save It To Disk

* This article, and all our great Telerik ASP.NET documentation, Is available on the Telerik ASP.NET menu

This article will show how to create a line chart using the Telerik Win Form charting controls and save it to disk

In a recent project I needed to set out statistics to users. I had the idea of creating a chart, saving it to disk, and then emailing it out nightly. In the code sample below I walk through the process of creating the chart and then saving it. 

In a separate article I'll cover how to include it in an email. 

It's all pretty self explanatory, but one difficulty I had was in dealing with the dates. The chart doesn't handle date types, you have to convert them to Julian dates in the SQL query to get them to work, like this:

datediff(day,'1/1/1900',logdate) + 2 as julianDate

You'll also see 'ToAODate()' in the code, that's the VB way of doing the same thing. 




Version:
Section: