Hello,
Can you provide an example of how to set the font size for a charts title and legend?
Thanks
Hello,
Can you provide an example of how to set the font size for a charts title and legend?
Thanks
Hi Stephen,
Also,
When i add a Clustered Column chart with only one data series i get a chart title with the series name, setting HasTitle to false or trying to set the text of the title has no effect on it.
Hi Stephen,
Need this too (Font size of chart title and legend) , will it be released on the next version?
Hi Stephen,
Hi Mudassir,
Can you please confirm if these changes have been implemented or not.
Thanks!!
Hi Stephen,
Hi Mudassir,
Can you please confirm if these changes have been implemented now or not.
Thanks!!
Hi Stephen,
PresentationEx pres = new PresentationEx();SlideEx slide = pres.Slides[0];ChartEx chart = slide.Shapes.AddChart(ChartTypeEx.LineWithMarkers, 140, 118, 320, 370);//Hiding chart Titlechart.HasTitle = false;///Hiding Values axischart.ValueAxis.IsVisible = false;//Category Axis visibilitychart.CategoryAxis.IsVisible = false;// chart.ChartData.ChartDataCellFactory.Clear(0);for (int i = 0; i < chart.ChartData.Series.Count; i++){chart.ChartData.Series.RemoveAt(i);}ChartDataCellFactory fact = chart.ChartData.ChartDataCellFactory;ChartSeriesEx series = chart.ChartData.Series[0];fact.GetCell(0, 0, 1, “New_Series1”);series.Values[0].Value = 1.7;series.Values[1].Value = 1.7;series.Values[2].Value = 1.9;series.Values[3].Value = 1.6;series.MarkerSymbol = MarkerStyleTypeEx.Circle;series.Labels.ShowValue = true;series.Labels.Position = LegendDataLabelPositionEx.Top;series.MarkerSize = 15;series.Format.Line.DashStyle = LineDashStyleEx.Dot;//Setting series line color// series.Format.Fill.FillType = FillTypeEx.Solid;// series.Format.Fill.SolidFillColor.Color = Color.Pink;series.Format.Line.FillFormat.FillType = FillTypeEx.Solid;series.Format.Line.FillFormat.SolidFillColor.Color = System.Drawing.Color.Purple;series.Format.Line.DashStyle = LineDashStyleEx.Solid;//Setting series marker color and symbolseries.MarkerSymbol = MarkerStyleTypeEx.Diamond;// series.MarkerFill.Fill.FillType = FillTypeEx.Solid;// series.MarkerFill.Fill.SolidFillColor.Color = Color.Purple;//Settinng Label color and fontDataLabelEx val = new DataLabelEx(series);val.TextFrame.Text = “Asd”;series.Labels.Add(val);TextFrameEx txt = series.Labels[0].TextFrame;ParagraphEx para = txt.Paragraphs[0];PortionEx por = para.Portions[0];por.PortionFormat.FontHeight = 30;por.PortionFormat.FillFormat.FillType = FillTypeEx.Solid;por.PortionFormat.FillFormat.SolidFillColor.Color = System.Drawing.Color.Blue;chart.Legend.Format.Fill.FillType = FillTypeEx.Solid;chart.Legend.Format.Fill.SolidFillColor.Color = Color.Green;TextFrameEx txt2 = chart.Legend.TextProperties;txt2.Paragraphs[0].ParagraphFormat.DefaultPortionFormat.FontBold = NullableBool.True;txt2.Paragraphs[0].ParagraphFormat.DefaultPortionFormat.FontHeight = 30;txt2.Paragraphs[0].ParagraphFormat.DefaultPortionFormat.FontItalic = NullableBool.True;txt2.Paragraphs[0].ParagraphFormat.DefaultPortionFormat.FillFormat.FillType = FillTypeEx.Solid; ;txt2.Paragraphs[0].ParagraphFormat.DefaultPortionFormat.FillFormat.SolidFillColor.Color = Color.Blue;pres.Write(“D:\Aspose Data\Presentation2.pptx”);
Hi Stephen,
PresentationEx pres2 = new PresentationEx();ChartEx chart2 = pres2.Slides[0].Shapes.AddChart(ChartTypeEx.StackedColumn, 100, 100, 500, 400);chart2.HasTitle = true;chart2.ChartTitle.Text.Text = “My New Title”;chart2.ChartTitle.Text.Paragraphs[0].ParagraphFormat.DefaultPortionFormat.FillFormat.FillType = FillTypeEx.Solid;chart2.ChartTitle.Text.Paragraphs[0].ParagraphFormat.DefaultPortionFormat.FillFormat.SolidFillColor.Color = Color.Green;chart2.ChartTitle.Text.Paragraphs[0].ParagraphFormat.DefaultPortionFormat.FontItalic = NullableBool.True;pres2.Write(path + “out.pptx”);