• 大小: 310KB
    文件类型: .rar
    金币: 2
    下载: 2 次
    发布日期: 2021-05-10
  • 语言: C#
  • 标签: ArcGIS  Engine  C#  

资源简介

ArcGIS+Engine+C#实例开发源代码以及图表统计图源代码.统计图表使用开放源代码的工具Zegraph。代码清晰。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using System.IO;//用于文件存取  
using System.Drawing.Text;//提供画GDI+图形的高级功能 
using System.Drawing.Drawing2D;//提供画高级二维,矢量图形功能 
using System.Drawing.Imaging;
using System.Data.OracleClient;//提供画GDI+图形的高级功能 

using ZedGraph;

namespace FirstGISWinform
{
    /**/
    /// 
    /// 显示统计图形类型
    /// 

    public enum AnalyticsType
    {
        Line   //折线图
        Bar    //柱状图
        Pie     //饼图
    };


    public partial class DrawCharForm : Form
    {


        public DrawCharForm()
        {
            InitializeComponent();
        }

        private void DrawCharForm_Load(object sender EventArgs e)
        {
            #region
            /*
            //从数据库中取得数据,用于画图 
            string sql = “select t.EXPLAININFO_NOWGTt.EXPLAININFO_GROUNDAREA “
                +“from sv_explainlayerarea t “
                +“where t.EXPLAININFO_PROVINCE=‘望虞河‘ and t.mapvn_seq=9“;
            ConnHelper connHelper = new ConnHelper();
            DataSet dataSet = new DataSet();
            OracleDataAdapter oracleDataAdapter = new OracleDataAdapter(sql connHelper.Connection);
            DataSet ds = connHelper.ExecuteQuery(sql);// new DataSet();
            int rows = oracleDataAdapter.Fill(ds “chartData“);


            //设定产生图的类型(pie or bar) 
            string type = “PIE“;
            //设置图大小 
            int width = 600;            
            int height = 600;
           
            //设置图表标题 
            string title = “titletitletitletitle“;
            string subtitle = “subtitle“;
            if (0 < rows)
            {
                switch (type)
                {
                    case “PIE“:
                        PieChart pc = new PieChart();
                      pictureBox1.Image= pc.Render(title subtitle width height ds);
                        break;
                    default:
                        break;
                }
            }
             * */
            #endregion
            DrawBar();



        }

        #region 动态折线图
        private void DrawLine()
        {
            Random ran = new Random();
            PointPairList list = new PointPairList();
            LineItem myCurve;
            this.zedGraphControl1.GraphPane.title.Text = “动态折线图“;
            this.zedGraphControl1.GraphPane.XAxis.title.Text = “时间“;
            this.zedGraphControl1.GraphPane.YAxis.title.Text = “数量“;
            this.zedGraphControl1.GraphPane.XAxis.Type = ZedGraph.AxisType.DateAsOrdinal;

            double[] d1 = new double[100];
            double[] d2 = new double[100];
            for (int i = 0; i < 100; i++)
            {
                double x = (double)new XDate(DateTime.Now.AddSeconds(-(100 - i)));
                doub

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     106496  2009-11-27 09:43  MyGIS\FirstGISWinform\bin\Debug\FirstGISWinform.exe

     文件     128512  2009-11-27 09:43  MyGIS\FirstGISWinform\bin\Debug\FirstGISWinform.pdb

     文件      14328  2009-11-27 09:43  MyGIS\FirstGISWinform\bin\Debug\FirstGISWinform.vshost.exe

     文件        490  2007-07-21 01:33  MyGIS\FirstGISWinform\bin\Debug\FirstGISWinform.vshost.exe.manifest

     文件     330752  2009-11-25 15:19  MyGIS\FirstGISWinform\bin\Debug\ZedGraph.dll

     文件      15490  2009-11-25 13:28  MyGIS\FirstGISWinform\Class\ControlsSynchronizer.cs

     文件       3022  2009-11-25 13:29  MyGIS\FirstGISWinform\Class\Maps.cs

     文件       4785  2009-11-25 13:30  MyGIS\FirstGISWinform\Class\OpenNewMapDocument.cs

     文件       3140  2009-11-25 14:45  MyGIS\FirstGISWinform\ConnOracle\ConnHelper.cs

     文件       5809  2009-11-27 09:42  MyGIS\FirstGISWinform\DrawCharForm.cs

     文件       5398  2009-11-27 09:42  MyGIS\FirstGISWinform\DrawCharForm.Designer.cs

     文件       6012  2009-11-27 09:42  MyGIS\FirstGISWinform\DrawCharForm.resx

     文件        980  2009-11-25 14:28  MyGIS\FirstGISWinform\Drawing\ChartUtil.cs

     文件       4373  2009-11-25 14:55  MyGIS\FirstGISWinform\Drawing\PieChart.cs

     文件       3295  2009-11-26 15:19  MyGIS\FirstGISWinform\DrawPieForm.cs

     文件       4277  2009-11-26 15:05  MyGIS\FirstGISWinform\DrawPieForm.Designer.cs

     文件      37710  2009-11-26 15:05  MyGIS\FirstGISWinform\DrawPieForm.resx

     文件       2233  2009-11-25 13:58  MyGIS\FirstGISWinform\FirstGISWinform.cs

     文件      19351  2009-11-25 13:25  MyGIS\FirstGISWinform\FirstGISWinform.Designer.cs

     文件      56071  2009-11-25 13:25  MyGIS\FirstGISWinform\FirstGISWinform.resx

     文件        501  2009-11-25 17:18  MyGIS\FirstGISWinform\Form1.cs

     文件       2220  2009-11-25 17:18  MyGIS\FirstGISWinform\Form1.Designer.cs

     文件       5814  2009-11-25 17:18  MyGIS\FirstGISWinform\Form1.resx

     文件       8276  2009-11-26 15:09  MyGIS\FirstGISWinform\MyGIS.csproj

     文件      28715  2009-11-25 17:15  MyGIS\FirstGISWinform\NewFolder1\DataSet1.Designer.cs

     文件        361  2009-11-25 17:15  MyGIS\FirstGISWinform\NewFolder1\DataSet1.xsc

     文件       2461  2009-11-25 17:15  MyGIS\FirstGISWinform\NewFolder1\DataSet1.xsd

     文件        851  2009-11-25 17:15  MyGIS\FirstGISWinform\NewFolder1\DataSet1.xss

     文件       1366  2009-11-25 17:17  MyGIS\FirstGISWinform\NewFolder1\Report1.rdlc

     文件        180  2009-11-27 09:42  MyGIS\FirstGISWinform\obj\Debug\FirstGISWinform.DrawCharForm.resources

............此处省略45个文件信息

评论

共有 条评论