foreach (Spire.Xls.Charts.ChartSerie cs in chart.Series){//Set vary color of the chartcs.Format.Options.IsVaryColor = true;//Set Gap Widthcs.Format.Options.GapWidth = 0;//Set the value is visible on the chart cs.DataPoints.DefaultDataPoint.DataLabels.HasCategoryName = true;cs.DataPoints.DefaultDataPoint.DataLabels.TextRotationAngle = 270;// <------ Used to rotate the DataLabel Textcs.DataPoints.DefaultDataPoint.DataFormat.BarType = BaseFormatType.Rectangle;cs.DataPoints.DefaultDataPoint.DataLabels.VerticalAlignment = FontVertialAlignmentType.Baseline;cs.DataPoints.DefaultDataPoint.DataLabels.Position = DataLabelPositionType.OutsideBase; }
Login to post response