Ejemplo n.º 1
0
        /// <summary>
        /// 创建数据图形文件
        /// </summary>
        /// <param name="dt">数据源</param>
        /// <param name="charType">图类型 Column,Pie</param>
        /// <param name="imagePath">图像存放目录</param>
        /// <param name="title">图形标题</param>
        /// <returns></returns>
        public static string CreateChart(DataTable dt, string charType, string imagePath, string title)
        {
            var phaysicalImagePath = imagePath;
            var mychart = new OWCChartFactory(title, phaysicalImagePath, 530, 300, new OWCChartFontStyle());
            var myItem = new OWCSeriesClass {SeriesName = "次数"};

            myItem.SetDataSource(dt, "Item", "Value");
            switch (charType)
            {
                case "Column":
                    mychart.CreateOneColumn("时间", "次", myItem);
                    break;
                case "Pie":
                    mychart.CreateSinglePie(myItem);
                    break;

            }
            var imageName = mychart.ExportPictuire();
            return imageName;
            //			Image1.ImageUrl = ".\\"+m_imagePath+imageName;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// ��������ͼ���ļ�
        /// </summary>
        /// <param name="dt">����Դ</param>
        /// <param name="CharType">ͼ���� Column,Pie</param>
        /// <param name="ImagePath">ͼ����Ŀ¼</param>
        /// <param name="Title">ͼ�α���</param>
        /// <returns></returns>
        public static string CreateChart(DataTable dt,string CharType,string ImagePath,string Title)
        {
            String PhaysicalImagePath = ImagePath;
            OWCChart.OWCChartFactory mychart =new OWCChartFactory(Title,PhaysicalImagePath,530,300,new OWCChartFontStyle());
            OWCChart.OWCSeriesClass MyItem = new OWCSeriesClass();

            MyItem.SeriesName = "����";
            MyItem.SetDataSource(dt,"Item","Value");
            switch(CharType)
            {
                case "Column":
                    mychart.CreateOneColumn("ʱ��","��",MyItem);
                    break;
                case "Pie":
                    mychart.CreateSinglePie(MyItem);
                    break;

            }
            String imageName = mychart.ExportPictuire();
            return imageName;
            //			Image1.ImageUrl = ".\\"+m_imagePath+imageName;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 创建数据图形文件
        /// </summary>
        /// <param name="dt">数据源</param>
        /// <param name="charType">图类型 Column,Pie</param>
        /// <param name="imagePath">图像存放目录</param>
        /// <param name="title">图形标题</param>
        /// <returns></returns>
        public static string CreateChart(DataTable dt, string charType, string imagePath, string title)
        {
            var phaysicalImagePath = imagePath;
            var mychart            = new OWCChartFactory(title, phaysicalImagePath, 530, 300, new OWCChartFontStyle());
            var myItem             = new OWCSeriesClass();

            myItem.SeriesName = "次数";
            myItem.SetDataSource(dt, "Item", "Value");
            switch (charType)
            {
            case "Column":
                mychart.CreateOneColumn("时间", "次", myItem);
                break;

            case "Pie":
                mychart.CreateSinglePie(myItem);
                break;
            }
            var imageName = mychart.ExportPictuire();

            return(imageName);
            //			Image1.ImageUrl = ".\\"+m_imagePath+imageName;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 创建数据图形文件
        /// </summary>
        /// <param name="dt">数据源</param>
        /// <param name="CharType">图类型 Column,Pie</param>
        /// <param name="ImagePath">图像存放目录</param>
        /// <param name="Title">图形标题</param>
        /// <returns></returns>
        public static string CreateChart(DataTable dt, string CharType, string ImagePath, string Title)
        {
            String PhaysicalImagePath = ImagePath;

            OWCChart.OWCChartFactory mychart = new OWCChartFactory(Title, PhaysicalImagePath, 530, 300, new OWCChartFontStyle());
            OWCChart.OWCSeriesClass  MyItem  = new OWCSeriesClass();

            MyItem.SeriesName = "次数";
            MyItem.SetDataSource(dt, "Item", "Value");
            switch (CharType)
            {
            case "Column":
                mychart.CreateOneColumn("时间", "次", MyItem);
                break;

            case "Pie":
                mychart.CreateSinglePie(MyItem);
                break;
            }
            String imageName = mychart.ExportPictuire();

            return(imageName);
            //			Image1.ImageUrl = ".\\"+m_imagePath+imageName;
        }