PC Review


Reply
Thread Tools Rating: Thread Rating: 4 votes, 2.00 average.

ASP.NET Chart and Graph

 
 
SeePee
Guest
Posts: n/a
 
      16th Jun 2010
I am using Microsoft Visual Studio 2008 and need to know the most popular
method of creating charts and graphs. Also if you could supply an example.

Many thanks

 
Reply With Quote
 
 
 
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      16th Jun 2010
"SeePee" <(E-Mail Removed)> wrote in message
news:C90B3872-AB01-4379-A10D-(E-Mail Removed)...

> I am using Microsoft Visual Studio 2008 and need to know the most popular
> method of creating charts and graphs. Also if you could supply an example.


http://www.google.co.uk/search?sourc...-8&q=asp:Chart


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
SeePee
Guest
Posts: n/a
 
      16th Jun 2010
Mark,

I have downloaded and installed Microsoft Chart Controls Add-on for
Microsoft Visual Studio 2008 -
http://www.microsoft.com/downloads/d...displaylang=en

I then created a new project in MS Visual Studio 2008 and added the Chart
control to a form however it does not show any chart or data when I run it in
debug.

This is the code in my default.aspx
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb"
Inherits="Report_Test._Default" %>

<%@ Register assembly="System.Web.DataVisualization, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"
namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>

Chart Example 1</div>
<asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSourceReport1">
<series>
<asp:Series Name="Series1">
</asp:Series>
</series>
<chartareas>
<asp:ChartArea Name="ChartArea1">
</asp:ChartArea>
</chartareas>
</asp:Chart>
<asp:SqlDataSource ID="SqlDataSourceReport1" runat="server"
ConnectionString="<%$ ConnectionStrings:PADSConnectionString %>"
SelectCommand="SELECT [Currency], [FXRate] FROM [tlkpCurrency]">
</asp:SqlDataSource>
</form>
</body>
</html>

I want to show the currency and its FXRate
-----------------------------------------------------------------------------------------------
"Mark Rae [MVP]" wrote:

> "SeePee" <(E-Mail Removed)> wrote in message
> news:C90B3872-AB01-4379-A10D-(E-Mail Removed)...
>
> > I am using Microsoft Visual Studio 2008 and need to know the most popular
> > method of creating charts and graphs. Also if you could supply an example.

>
> http://www.google.co.uk/search?sourc...-8&q=asp:Chart
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net
>

 
Reply With Quote
 
SeePee
Guest
Posts: n/a
 
      17th Jun 2010
Mark,

I have now sorted this problem and can now run the chart locally, however is
does not work on our host’s server.

Do they need to install anything on there server for it to work?

Many Thanks

"SeePee" wrote:

> Mark,
>
> I have downloaded and installed Microsoft Chart Controls Add-on for
> Microsoft Visual Studio 2008 -
> http://www.microsoft.com/downloads/d...displaylang=en
>
> I then created a new project in MS Visual Studio 2008 and added the Chart
> control to a form however it does not show any chart or data when I run it in
> debug.
>
> This is the code in my default.aspx
> <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb"
> Inherits="Report_Test._Default" %>
>
> <%@ Register assembly="System.Web.DataVisualization, Version=3.5.0.0,
> Culture=neutral, PublicKeyToken=31bf3856ad364e35"
> namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head runat="server">
> <title>Untitled Page</title>
> </head>
> <body>
> <form id="form1" runat="server">
> <div>
>
> Chart Example 1</div>
> <asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSourceReport1">
> <series>
> <asp:Series Name="Series1">
> </asp:Series>
> </series>
> <chartareas>
> <asp:ChartArea Name="ChartArea1">
> </asp:ChartArea>
> </chartareas>
> </asp:Chart>
> <asp:SqlDataSource ID="SqlDataSourceReport1" runat="server"
> ConnectionString="<%$ ConnectionStrings:PADSConnectionString %>"
> SelectCommand="SELECT [Currency], [FXRate] FROM [tlkpCurrency]">
> </asp:SqlDataSource>
> </form>
> </body>
> </html>
>
> I want to show the currency and its FXRate
> -----------------------------------------------------------------------------------------------
> "Mark Rae [MVP]" wrote:
>
> > "SeePee" <(E-Mail Removed)> wrote in message
> > news:C90B3872-AB01-4379-A10D-(E-Mail Removed)...
> >
> > > I am using Microsoft Visual Studio 2008 and need to know the most popular
> > > method of creating charts and graphs. Also if you could supply an example.

> >
> > http://www.google.co.uk/search?sourc...-8&q=asp:Chart
> >
> >
> > --
> > Mark Rae
> > ASP.NET MVP
> > http://www.markrae.net
> >

 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      17th Jun 2010
"SeePee" <(E-Mail Removed)> wrote in message
news:0D879A65-3928-4F51-9B2C-(E-Mail Removed)...

> I have now sorted this problem and can now run the chart locally, however
> is
> does not work on our host’s server.
>
> Do they need to install anything on there server for it to work?


http://www.4guysfromrolla.com/articles/072209-1.aspx


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
Zhi-Qiang Ni[MSFT]
Guest
Posts: n/a
 
      18th Jun 2010
Hi SeePee,

Firstly, we need to make sure the host server has installed .NET Framework
3.5 SP1. Then, APS.NET chart control add-one is a must. Otherwise the code
cannot find the Chart dll to load and no graph will be displayed.

In addition, if you need samples of how to use APS.NET chart controls,
please download the code package from
http://code.msdn.microsoft.com/mschart. For more information, please refer
to Scott Gu¡¯s blog at
http://weblogs.asp.net/scottgu/archi...charting-contr
ol-lt-asp-chart-runat-quot-server-quot-gt.aspx


--
Sincerely,
Zhi-Qiang Ni
Microsoft Online Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

MSDN Managed Newsgroup support offering is for non-urgent issues where an
initial response from the community or a Microsoft Support Engineer within
2 business day is acceptable. Please note that each follow up response may
take approximately 2 business days as the support professional working with
you may need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations that require urgent,
real-time or phone-based interactions. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chart/Graph =?Utf-8?B?Qk9PTkVS?= Microsoft Access 0 25th Oct 2006 09:30 PM
Need help with chart graph not on chart wizard =?Utf-8?B?SmVmZiBmcm9tIEtlcm4gQ291bnR5?= Microsoft Excel Charting 4 16th Nov 2005 10:15 PM
Graph Chart OLE =?Utf-8?B?TXVyIEVicmE=?= Microsoft Access VBA Modules 0 24th Feb 2004 07:31 PM
Chart / Graph Herbert Boegner Microsoft Access Reports 0 11th Sep 2003 12:05 PM
Re: Graph/Chart John Henriksen Microsoft Access Reports 1 8th Sep 2003 05:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:29 AM.