/// <summary> /// LineChart has a different structure for outline. /// </summary> public override ChartShapeProperties SetChartShapeProperties(OpenXmlCompositeElement chartSeries) { ChartShapeProperties chartShapeProperties = new ChartShapeProperties(); Outline outline = new Outline() { Width = 28575, CapType = LineCapValues.Round }; outline.Append(new SolidFill()); outline.Append(new Round()); chartShapeProperties.Append(new SolidFill()); chartShapeProperties.Append(outline); chartShapeProperties.Append(new EffectList()); Marker marker = new Marker(); marker.Append(new Symbol() { Val = MarkerStyleValues.None }); chartSeries.Append(chartShapeProperties); chartSeries.Append(marker); chartSeries.Append(new Smooth() { Val = false }); return(chartShapeProperties); }
/// <summary> /// Set display, width, color and fill of borders and data (line, bar etc.) in chart. /// </summary> public ChartShapeProperties SetChartShapeProperties(OpenXmlCompositeElement chartSeries, bool visible = true, uint colorPoints = 0) { ChartShapeProperties chartShapeProperties1 = new ChartShapeProperties(); Outline outline1 = new Outline() { Width = 28575, CapType = LineCapValues.Round }; Round round1 = new Round(); outline1.Append(new NoFill()); outline1.Append(round1); EffectList effectList1 = new EffectList(); if (!visible) { chartShapeProperties1.Append(new NoFill()); } chartShapeProperties1.Append(outline1); chartShapeProperties1.Append(effectList1); Marker marker1 = new Marker(); Symbol symbol1 = new Symbol() { Val = MarkerStyleValues.None }; marker1.Append(symbol1); Smooth smooth1 = new Smooth() { Val = false }; chartSeries.Append(chartShapeProperties1); chartSeries.Append(marker1); chartSeries.Append(smooth1); for (uint i = 0; i < colorPoints; i++) { chartSeries.Append(colorChartLines(i)); } return(chartShapeProperties1); }