AddDataPointForMapSeries

ChartDataPointCollection.AddDataPointForMapSeries method

创建新数据点并将其添加到集合的末尾。 适用于图表类型为地图的系列。

public IChartDataPoint AddDataPointForMapSeries(IChartDataCell value)
范围类型描述
valueIChartDataCell数据点 ColorValue

返回值

新数据点。

例子

[C#]
using (Presentation pres = new Presentation())
{
   IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.Map, 50, 50, 500, 400, false);
   IChartDataWorkbook wb = chart.ChartData.ChartDataWorkbook;

   IChartSeries series = chart.ChartData.Series.Add(ChartType.Map);
   series.DataPoints.AddDataPointForMapSeries(wb.GetCell(0, "B2", 5));
   series.DataPoints.AddDataPointForMapSeries(wb.GetCell(0, "B3", 1));
   series.DataPoints.AddDataPointForMapSeries(wb.GetCell(0, "B4", 10));
}

也可以看看