根据单字段渲染的代码(可扩展为多字段): //柱形图渲染,参数为字段名称 private void ChartBarMap(string strField) { IGeoFeatureLayer pGeoFeatureL; IFeatureLayer pFeatureLayer; ITable pTable; ICursor pCursor; IQueryFilter pQueryFilter; IRowBuffer pRowBuffer; IMap pMap; IActiveView pActiveView; int numFields = 1;//可以设置为多个字段 int[] fieldIndexies = new int[numFields]; double dmaxValue; bool firstValue; double dfieldValue; IChartRenderer pChartRenderer; IRendererFields pRendererFields; IFillSymbol pFillSymbol; IMarkerSymbol pMarkerSymbol; ISymbolArray pSymbolArray; IChartSymbol pChartSymbol; string strPopField1 = strField; pMap = this.pMapControl.Map; pActiveView = this.pMapControl.ActiveView; pMap.ReferenceScale = pMap.MapScale;//保证label和chart随地图缩放而缩放 pFeatureLayer = (IGeoFeatureLayer)pMap.get_Layer(0); pGeoFeatureL = (IGeoFeatureLayer)pFeatureLayer; pTable = (ITable)pGeoFeatureL; pGeoFeatureL.ScaleSymbols = true; pChartRenderer = new ChartRendererClass(); pRendererFields = (IRendererFields)pChartRenderer; pRendererFields.AddField(strPopField1, strPopField1);//可以设置多个字段 pQueryFilter = new QueryFilterClass(); pQueryFilter.AddField(strPopField1);//可以设置多个字段 pCursor = pTable.Search(pQueryFilter, true); fieldIndexies[0] = pTable.FindField(strPopField1); firstValue = true; dmaxValue = 0; pRowBuffer = pCursor.NextRow(); while (pRowBuffer != null) { dfieldValue = (double)pRowBuffer.get_Value(fieldIndexies[0]); if (firstValue) { dmaxValue = dfieldValue; firstValue = false; } else { if (dfieldValue > dmaxValue) { dmaxValue = dfieldValue; } } pRowBuffer = pCursor.NextRow(); } if (dmaxValue <= 0) { //MessageBox.Show("各地区该指标值均为0,无需渲染!"); } IBarChartSymbol pBarChartSymbol; pBarChartSymbol = new BarChartSymbolClass(); pChartSymbol = (IChartSymbol)pBarChartSymbol; pBarChartSymbol.Width = 12; pMarkerSymbol = (IMarkerSymbol)pBarChartSymbol; pChartSymbol.MaxValue = dmaxValue; pMarkerSymbol.Size = 80; pSymbolArray = (ISymbolArray)pBarChartSymbol; pFillSymbol = new SimpleFillSymbolClass(); pFillSymbol.Color = getRGB(213, 212, 252); pSymbolArray.AddSymbol((ISymbol)pFillSymbol); pChartRenderer.ChartSymbol = (IChartSymbol)pBarChartSymbol; pChartRenderer.Label = strField; pFillSymbol = new SimpleFillSymbolClass(); pFillSymbol.Color = getRGB(239, 228, 190); pChartRenderer.BaseSymbol = (ISymbol)pFillSymbol; pChartRenderer.UseOverposter = false; pChartRenderer.CreateLegend();// pGeoFeatureL.Renderer = (IFeatureRenderer)pChartRenderer; pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null); }