我用的是dotnetCHARTING.dll 控件
我想用dotnetCHARTING.dll 控件来显示曲线图,经过添加控件dotnetCHARTING.dll后,在ShowData类当中写了一些各种图形的方法,在页面代码中调用。ShowData中的代码如下:using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System;
using System.Data;
using System.Text;
using System.Collections;
using dotnetCHARTING;
/// <summary>
///ShowData 的摘要说明
/// </summary>
public class ShowData
{
private string _phaysicalimagepath;//图片存放路径
private string _title; //图片标题
private string _xtitle;//图片x座标名称
private string _ytitle;//图片y座标名称
private string _seriesname;//图例名称
private int _picwidth;//图片宽度
private int _pichight;//图片高度
private DataTable _dt;//图片数据源
/**/
/// <summary>
/// 图片存放路径
/// </summary>
public string PhaysicalImagePath
{
set { _phaysicalimagepath = value; }
get { return _phaysicalimagepath; }
}
/**/
/// <summary>
/// 图片标题
/// </summary>
public string Title
{
set { _title = value; }
get { return _title; }
}
/**/
/// <summary>
/// 图片标题
/// </summary>
public string XTitle
{
set { _xtitle = value; }
get { return _xtitle; }
}
/**/
/// <summary>
/// 图片标题
/// </summary>
public string YTitle
{
set { _ytitle = value; }
get { return _ytitle; }
}
/**/
/// <summary>
/// 图例名称
/// </summary>
public string SeriesName
{
set { _seriesname = value; }
get { return _seriesname; }
}
/**/
/// <summary>
/// 图片宽度
/// </summary>
public int PicWidth
{
set { _picwidth = value; }
get { return _picwidth; }
}
/**/
/// <summary>
/// 图片高度
/// </summary>
public int PicHight
{
set { _pichight = value; }
get { return _pichight; }
}
/**/
/// <summary>
/// 图片数据源
/// </summary>
public DataTable DataSource
{
set { _dt = value; }
get { return _dt; }
}
public ShowData()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public ShowData(string PhaysicalImagePath, string Title, string XTitle, string YTitle, string SeriesName)
{
_phaysicalimagepath = PhaysicalImagePath;