SharpMap + ZedGraph 饼图实例,可生成各种统计图
//Set visible map extents map.Center = new SharpMap.Geometries.Point(centerX, centerY); map.Zoom = Zoom; //Generate map System.Drawing.Bitmap img = (System.Drawing.Bitmap)map.GetMap(); //Stream the image to the client context.Response.ContentType = "image/png"; System.IO.MemoryStream MS = new System.IO.MemoryStream(); img.Save(MS, System.Drawing.Imaging.ImageFormat.Png); // tidy up img.Dispose(); byte[] buffer = MS.ToArray(); context.Response.OutputStream.Write(buffer, 0, buffer.Length); p ublic SharpMap.Styles.VectorStyle GetChartingStyle(SharpMap.Data.FeatureDataRow row) { SharpMap.Styles.VectorStyle style = new SharpMap.Styles.VectorStyle(); int numMale = int.Parse(row["male"].ToString()); int numFemale = int.Parse(row["female"].ToString()); style.Symbol = this.GetChart(numMale, numFemale); return style; }
下载地址
用户评论
还可以吧,就是参考了一下代码。
代码不全,饼图不显示
还可以吧,就是版本太老了点
代码不全,没什么用,比较零散。
很實用,對剛學的人很有幫助
可以在一些简单GIS应用项目中使用
最后没用到这个代码
学习,项目应急了,代码还可以!!