当前位置:编程学习 > C#/ASP.NET >>

dotnetCharting使用问题


    private void Drawing(string type)
    {
        ch.Title = "学生成绩表";     //标题
        ch.XName = "姓名";             //x轴名称
        ch.YName = "成绩";             //y轴名称 
        ch.PicHight = 500;
        ch.PicWidth = 700;
        ch.PhaysicalImagePath = "NewStudentScore";  //图表存储地址
        ch.FileName = "Statistics51aspx";    //图标存储命名
        ch.SeriseName = "语文成绩";   //图例名称
        //set(type);
       
        da = new SqlData();//打开数据库
        sql = new string[3];
        string selected = "";
        for (int i = 0; i < CheckBoxList1.Items.Count; i++)
        {
            
            if (CheckBoxList1.Items[i].Selected)
            {
                selected = CheckBoxList1.Items[i].Value.ToString();
                sql[i] = "select name," + selected + " FROM StudentScore";
                ds = da.ExecuteDateSet(sql[i]);

            }
            ch.DataSoure = ds.Tables[0];//产生DataTable
            if (type == "Combo")
                ch.CreateCombo(this.Chart1);
            else if (type == "Pie")
                ch.CreatePie(this.Chart1);
            else if (type == "Line")
                ch.CreateLine(this.Chart1);
        }

无论我多选还是单选,图表里显示组数一定是CheckBoxList1的总项数,怎么改呀 --------------------编程问答-------------------- 帮你顶一下 --------------------编程问答-------------------- 谢谢,刚刚问题解决了
补充:.NET技术 ,  图表区
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,