Wed Oct 12, 2016 9:14 am
Hi Nina
this is my code C# Code
#region Chart
#region Chart - Define
RectangleF rect = new RectangleF(30, 30, pptSize.Width - 60, pptSize.Height - 60);
IChart chart = slide.Shapes.AppendChart(Spire.Presentation.Charts.ChartType.Column3DStacked, rect);
#endregion
#region Chart - Title
chart.HasTitle = true;
chart.ChartTitle.TextProperties.Text = "Group Score";
chart.ChartTitle.TextProperties.TextRange.LatinFont = new TextFont("Arial");
chart.ChartTitle.TextProperties.TextRange.IsBold = TriState.True;
chart.ChartTitle.TextProperties.TextRange.FontHeight = 24;
chart.ChartTitle.TextProperties.TextRange.Fill.FillType = FillFormatType.Solid;
chart.ChartTitle.TextProperties.TextRange.Fill.SolidColor.Color = ColorTranslator.FromHtml("#375A32");
chart.ChartTitle.TextProperties.IsCentered = true;
chart.ChartTitle.Height = 10;
#endregion
#region Chart - Legend
chart.HasLegend = false;
#endregion
#region Chart - Font
chart.PrimaryCategoryAxis.TextProperties.Paragraphs[0].DefaultCharacterProperties.FontHeight = 8;
chart.PrimaryCategoryAxis.TextRotationAngle = -45;
chart.PrimaryCategoryAxis.MinorTickMark = TickMarkType.TickMarkNone;
#endregion
#region Chart - Y-Axis
chart.PrimaryValueAxis.IsAutoMax = false;
chart.PrimaryValueAxis.IsAutoMin = false;
chart.PrimaryValueAxis.MinValue = 0f;
chart.PrimaryValueAxis.MaxValue = 100f;
#endregion
#region Chart - Main
DataTable dataTable = Common_DataGetRegionMarketScores(_clientPath, _regionID, _marketID, _surveyKey);
Common_InitChartData(chart, dataTable);
chart.Series.SeriesLabel = chart.ChartData["B1", "B1"];
chart.Categories.CategoryLabels = chart.ChartData["A2", "A" + (dataTable.Rows.Count + 1)];
chart.Series[0].Values = chart.ChartData["B2", "B" + (dataTable.Rows.Count + 1)];
chart.Series[0].Fill.FillType = FillFormatType.Solid;
chart.Series[0].Fill.SolidColor.Color = ColorOutlet;
#endregion
#region Chart - Set Region/National text and Colours
Common_SetRegionNationlTextColours( chart);
#endregion
#endregion
Login to view the files attached to this post.