Talking about the application of MSChart in ASP

Source: Internet
Author: User
Tags generator visual studio
Chart talk about how MSChart is used in ASP

MSChart is a powerful charting tool made by Microsoft that can
Easy to create a variety of charts. Make a variety of 3-D 2-D histogram, folding
Line diagram. In chinaasp, there have been several times when someone asked MSChart how
I'll give you an example here. I hope you understand.


Send Data program
<HTML><HEAD>
<meta name= "generator" content= "Microsoft Visual Studio 6.0" >
</HEAD><BODY>
<form method=post name= "Form1" action=mschart.asp>
<input type= "Submit" value= "send" id=submit1 name=submit1>
<!
ChTitle Title
Number of Rcount columns
Ccount Number of rows
Rc_type Arrangement (1 in rows, 2 in column mode)
Rc_data data
Rname Column Array Group
CNAME line array group >
<input type= "hidden" value= "Coolfatman growth mileage" name=chtitle>
<input type= "hidden" value=3 name=rcount>
<input type= "hidden" value=2 name=ccount>
<input type= "hidden" value=1 name=rc_type>
<input type= "hidden" value= "1993" Name=rname>
<input type= "hidden" value= "1996" Name=rname>
<input type= "hidden" value= "1999" Name=rname>
<input type= "hidden" value= "height" name=cname>
<input type= "hidden" value= "weight" name=cname>
<input type= "hidden" value=179 name=rc_data>
<input type= "hidden" value=160 name=rc_data>
<input type= "hidden" value=180 name=rc_data>
<input type= "hidden" value=170 name=rc_data>
<input type= "hidden" value=182 name=rc_data>
<input type= "hidden" value=182 name=rc_data>
</form></BODY></HTML>


Display Data Program mschart.asp
<%@ Language=vbscript%>
<HTML>
<HEAD>
<meta name= "generator" content= "Microsoft Visual Studio 6.0" >
<script Id=clienteventhandlersjs language=javascript>
<!--
function Window_onload () {
t=0;
MSChart1. TitleText = Document.form1.chtitle.value;
MSChart1. ShowLegend =true;
MSChart1. ColumnCount =document.form1.ccount.value;
MSChart1. RowCount =document.form1.rcount.value;
for (i=0;i<document.form1.rcount.value;i++)
{for (j=0;j<document.form1.ccount.value;j++)
{MSChart1. row=i+1;
MSChart1. column=j+1;
if (document.form1.ccount.value>1)
MSChart1. ColumnLabel =document.form1.cname (j). Value;
Else
MSChart1. ColumnLabel =document.form1.cname.value;
if ((document.form1.rcount.value*document.form1.ccount.value) >1)
MSChart1. Data=document.form1.rc_data (t). value;
Else
MSChart1. Data=document.form1.rc_data.value;
t++;
}
if (document.form1.rcount.value>1)
MSChart1. RowLabel =document.form1.rname (i). value;
Else
MSChart1. RowLabel =document.form1.rname.value;
}
}

function Select1_onchange () {
Mschart1.charttype =select1.value
MSChart1. Plot
}
-->
</SCRIPT>
<TITLE> Data Display Chart </TITLE>
</HEAD>
<body language=javascript onload= "return Window_onload ()" >
<object Insert MSChart ActiveX control here >
<BR>
Display mode
<select id=select1 name=select1 language=javascript onchange= "return Select1_onchange ()" >
<option value=1> Two-dimensional histogram </OPTION>
<option value=0> Three-dimensional histogram </OPTION>



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.