Set size and font of legend/title/plot area in chart starts to support in Spire.Presentation 2.0.18
We are glad to announce a new hotfix version of Spire.Presentation 2.0.18 today. In this version, our Develop Team added a new feature to set size and font of legend/title/plot area in chart. Details are as followed:
Code Snippet:
- Add new feature to set width and height of ChartLegend/PlotArea and the font of ChartTitle in chart.
Code Snippet:
IChart chart = presentation.Slides[0].Shapes.AppendChart(Spire.Presentation.Charts.ChartType.BarStacked, rect); //add chart Title chart.ChartTitle.TextProperties.Text = "Report"; chart.ChartTitle.TextProperties.IsCentered = true; chart.HasTitle = true; chart.Top = 10; chart.Left = 50; //Set the font of ChartLegend chart.ChartLegend.EntryTextProperties[0].Fill.FillType = FillFormatType.Solid; chart.ChartLegend.EntryTextProperties[0].Fill.SolidColor.KnownColor = KnownColors.Green; chart.ChartLegend.EntryTextProperties[0].FontHeight = 20; chart.ChartLegend.EntryTextProperties[0].LatinFont = new TextFont("Arial Unicode MS"); //Set width and height of ChartLegend and PlotArea chart.ChartLegend.Width = 300; chart.ChartLegend.Height = 300; chart.PlotArea.Width = 200; chart.PlotArea.Height = 200; //Set the font of chart.ChartTitle chart.ChartTitle.TextProperties.TextRange.Fill.FillType = FillFormatType.Solid; chart.ChartTitle.TextProperties.TextRange.Fill.SolidColor.KnownColor = KnownColors.Gray; chart.ChartTitle.TextProperties.TextRange.FontHeight = 30; chart.ChartTitle.TextProperties.TextRange.LatinFont = new TextFont("Arial Unicode MS");
Free Trail to evaluate Spire.Presentation Version 2.0.18 here:
http://www.e-iceblue.com/Download/download-presentation-for-net-now.html