ComponentArt Charting简单的数据读取和数据绑定

Posted on 2007-07-26 23:29  IT蚂蚁  阅读(515)  评论(0编辑  收藏  举报
1、修改Web.config
<!--system.web is here-->
  
<httpHandlers>
    
<add verb="GET" 
      path
="cachedimageservice.axd" 
      type
="ComponentArt.Charting.CachedImageService,ComponentArt.Charting.WebChart"/>
  
</httpHandlers>

2、读取和绑定数据
double[] y = new double[] 
 
{25.135.160.198.176.170.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[864.3566.8463.7952.3652.8877.8784.2104 }
    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);

Copyright © 2024 IT蚂蚁
Powered by .NET 8.0 on Kubernetes