Legend legend = new Legend();
LegendItem li = new LegendItem();
li.Color = color[i - 3];
LegendCell lcColor = new LegendCell(LegendCellType.SeriesSymbol, null);
LegendCell lcText = new LegendCell(LegendCellType.Text, strColumnname);
//添加曲线说明,表明曲线颜色代表的内容
li.Cells.Add(lcColor);
li.Cells.Add(lcText);
legend.CustomItems.Add(li);