UltraChart绘制柱状图表 
    
1
//产生数据库数据2
        DataSet ds = new DataSet();3
        SqlConnection con = new SqlConnection(@"server=XINGSQLEXPRESS;database=Test;uid=sa;pwd=123456");4
        SqlCommand cmd = new SqlCommand("select Name,Money from test", con);5
        SqlDataAdapter sda = new SqlDataAdapter();6
        sda.SelectCommand = cmd;7
        con.Open();8
        cmd.ExecuteNonQuery();9
        sda.Fill(ds, "test");10
        con.Close();11
        //绘制柱状图表12
        Infragistics.UltraChart.Resources.Util.DemoSetup(this.UltraChart1);13
        this.UltraChart1.DataSource = ds.Tables["test"];14
        this.UltraChart1.DataBind();15
        this.UltraChart1.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.ColumnChart;16
        this.UltraChart1.Legend.Visible = true;17
        this.UltraChart1.Axis.X.Labels.Orientation =18
        this.UltraChart1.Axis.Y.Labels.Orientation =19
        Infragistics.UltraChart.Shared.Styles.TextOrientation.Custom;20
        this.UltraChart1.TitleTop.Text = "UltraChart演示程序";21
        this.UltraChart1.Tooltips.FormatString = "<font size=-1>Money:$<DATA_VALUE:00.00><BR>Item:<ITEM_LABEL>";//
                    
                
                

                
            
        
浙公网安备 33010602011771号