views:

976

answers:

9
+3  Q: 

Charts in webpages

What I'd like to accomplish is to present charts on webpages. For example aspx pages gridviews that present a two column table are able to be copied & placed into Excel then a chart created. The pages I currently use most are ASP.NET 3.0 or SharePoint team sites with stored procedures. People are very interested in how people perform chats in webpages.

Thanks in advance, Catto

A: 

So you want to maybe export the GridView to MS Excel which should I can imagine contain a generated macro to generate the chart on the data. Something like that you mean. Or do you just want to get the data from the website into excel? i.e. CSV format is really simple to accomplish. For the Excel format, this is also possible and in my opinion good fun. I would imagine you can also generate the macros through C# tp embed in the generated Excel file.

Andrew

REA_ANDREW
A: 

You may try Roll your own ASP.NET Chart Control. It may be a bit out-dated, though.

You may also check out Charting Controls.

Jonathan Lonowski
+1  A: 

If you want to display a chart directly in your web page, you could possibly use either VML (Vector Markup Language) or SVG (Scalable Vector Graphics). VML is supported by IE, whereas SVG is supported by many other browsers (although IE can display SVG by means of a plugin). Google Maps, for example, uses VML when running in IE, and SVG for other browsers.

Both VML and SVG use an XML format for defining the grahical charts you want to display. For example, this is a sample of VML

<v:shape
    fillcolor="green"
    style="position:relative;top:1;left:1;width:200;height:200"
    path = "m 1,1 l 1,200, 200,200, 200,1 x e">
</v:shape>

These links may explain in more detail:

VML

SVG

Tim C
+13  A: 

The Google Chart API makes it easy to embed charts into web pages. No server-side install needed, at all.

http://code.google.com/apis/chart/

Joeri Sebrechts
A: 

Have a look at DojoX

http://dojotoolkit.org/projects/dojox

dojox.charting provides many common chart types–including line, bar, area and pie charts

Paul Whelan
+1  A: 

Look no further then the current site - it uses flot to draw a chart in JavaScript.

gimel
A: 

Most charting solutions invovle setting the URL to an img tag that requests a page that draws the image into a bitmap.

in the draw graph you usually great a bitmap, draw the chart and then server the bitmap back in the response. This is all you need to do your own and there are numerous libraries free and for fee on the web that will do this. its a matter of picking a library that has an API and feature set that meets your needs/style.

MikeJ
+1  A: 

For sharepoint, it is possible to use the dataview webpart and customised xslt to render a visifire (or other javascript based charting) to render charts based on sharepoint list data or database data

Nat
+3  A: 

.NET have actually released their own charting controls, Scott announced it some time ago now.

http://weblogs.asp.net/scottgu/archive/2008/11/24/new-asp-net-charting-control-lt-asp-chart-runat-quot-server-quot-gt.aspx

They are very good and I believe purchased from Dundas, however I have no information on that and may be completely untrue.

John_