千金不卖

探讨 RS BO C# Oracle Sql Server DB2 DataWareHouse Arcplan Cognos MB MQ 信息资源标准 主数据 元数据 数据质量 业务建模 ----姚刚

博客园 首页 新随笔 联系 订阅 管理

 

                  //产生数据库数据
        DataSet ds = new DataSet();

        SqlConnection con 
= new SqlConnection(@"server=XINGSQLEXPRESS;database=Test;uid=sa;pwd=123456");

        SqlCommand cmd 
= new SqlCommand("select Name,Money from test", con);

        SqlDataAdapter sda 
= new SqlDataAdapter();

        sda.SelectCommand 
= cmd;

        con.Open();

        cmd.ExecuteNonQuery();

        sda.Fill(ds, 
"test");

        con.Close();

        
//绘制柱状图表

        Infragistics.UltraChart.Resources.Util.DemoSetup(
this.UltraChart1);

        
this.UltraChart1.DataSource = ds.Tables["test"];

        
this.UltraChart1.DataBind();

        
this.UltraChart1.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.ColumnChart;

        
this.UltraChart1.Legend.Visible = true;

        
this.UltraChart1.Axis.X.Labels.Orientation =

        
this.UltraChart1.Axis.Y.Labels.Orientation =

        Infragistics.UltraChart.Shared.Styles.TextOrientation.Custom;

        
this.UltraChart1.TitleTop.Text = "UltraChart演示程序";

        
this.UltraChart1.Tooltips.FormatString = "<font size=-1>Money:$<DATA_VALUE:00.00><BR>Item:<ITEM_LABEL>";// //鼠标悬停有提示,非常精美!


posted on 2008-04-11 22:11  doc  阅读(556)  评论(0编辑  收藏  举报