Question

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

Was it helpful?

Solution

.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.

OTHER TIPS

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/

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

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

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

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

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.

Have a look at DojoX

http://dojotoolkit.org/projects/dojox

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

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

http://myserver/drawgraph.aspx

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.

use microsoft chart controls. it's very easy to use!

here are the step by step instruction for VS2008

http://parasdoshi1989.wordpress.com/2010/10/03/how-to-include-charts-in-visual-studio-2008-express-edition-using-microsoft-chart-control/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top