private dynamic GetChartType(eChartType type, ExcelChart chart, RSerie serie) { if (type.Equals(eChartType.Line)) { var c = chart as ExcelLineChart; if (serie.ShowDataLabel) { c.DataLabel.ShowValue = true; } c.DataLabel.ShowPercent = true; return(c); } else if (type.Equals(eChartType.ColumnStacked)) { var c = chart as ExcelBarChart; if (serie.ShowDataLabel) { c.DataLabel.ShowValue = true; } return(c); } var cc = chart as ExcelBarChart; return(cc); }
private dynamic GetChartSerie(eChartType type, ExcelChartSerie serie, RSerie rserie) { if (type.Equals(eChartType.Line)) { var s = serie as ExcelLineChartSerie; if (rserie.ColorString != null) { if (rserie.ColorString != null) { s.LineColor = rserie.ColorString; } // not use, i cannot change the marker color! // s.Marker = eMarkerStyle.Diamond; } return(s); } //else if (type.Equals(eChartType.ColumnStacked)) //{ // var c = serie as ExcelChartSerie; // c.ChartColor = rserie.ColorString; // return c; // } return(serie); }