1、修改Web.config
2、读取和绑定数据
<!--system.web is here-->
<httpHandlers>
<add verb="GET"
path="cachedimageservice.axd"
type="ComponentArt.Charting.CachedImageService,ComponentArt.Charting.WebChart"/>
</httpHandlers>
<httpHandlers>
<add verb="GET"
path="cachedimageservice.axd"
type="ComponentArt.Charting.CachedImageService,ComponentArt.Charting.WebChart"/>
</httpHandlers>
2、读取和绑定数据
double[] y = new double[]
{25.1, 35.1, 60.1, 98.1, 76.1, 70.9};
string[] x = new string[]
{"Jan 04", "Feb 04", "Mar 04", "Apr 04", "May 04", "Jun 04"};
Chart1.DefineValue("x", x);
Chart1.DefineValue("y", y);
Chart1.DataBind();
{25.1, 35.1, 60.1, 98.1, 76.1, 70.9};
string[] x = new string[]
{"Jan 04", "Feb 04", "Mar 04", "Apr 04", "May 04", "Jun 04"};
Chart1.DefineValue("x", x);
Chart1.DefineValue("y", y);
Chart1.DataBind();
double[] sales = new double[8] { 64.35, 66.84, 63.79, 52.36, 52.88, 77.87, 84.2, 104 };
Color[] colour = new Color[8] { Color.Red, Color.White, Color.Red, Color.White, Color.Red, Color.White, Color.Red, Color.White };
Chart1.DefineValue("S0:y", sales);
Chart1.DefineValue("S0:color", colour);
Color[] colour = new Color[8] { Color.Red, Color.White, Color.Red, Color.White, Color.Red, Color.White, Color.Red, Color.White };
Chart1.DefineValue("S0:y", sales);
Chart1.DefineValue("S0:color", colour);