views:

199

answers:

2

I need to show a Line Chart on an ASP.NET page where each data point has a tooltip that shows its exact X and Y values. A chart for a particular dataset will probably only ever be requested once, so caching is disabled and the chart will be regenerated if it ever needs to be shown again.

Restrictions:

  1. Needs to work in a web garden environment
  2. Cannot use Session
  3. Cannot use rich media, such as Flash or Silverlight.

The approaches I've seen used an image map for a generated chart image. Due to the restrictions, all of my charts so far have been generated in a handler in memory, streamed directly back to the user, and then disposed of. Now I need to add tool tips, which would requires both HTML and an image.

My current plan is to generate the chart once on the page to get the HTML, ignore the generated image, and rewrite the "src" of the image tag to point to a second page. The second page generates the same exact chart as the first, ignores the HTML markup, and streams the image back to the client. This all seems very kludgy.

Is there an better way to do this that doesn't involve generating the chart twice?

Available chart controls:

  1. Dev Express 8.2
  2. Syncfusion 6.2
  3. ?? - Recommend something
A: 

What about using the Google Chart API, and a .Net wrapper? See this SO discussion for more information.

Julien Chastang
A: 

I solved this by using the MS Chart Control. The disk handler can share images across servers in the web garden and automatically cleans up after itself.

Greg