职位名称 Aspose幻灯片图表
Position title Aspose slide chart
是否可以定位Aspose powerpoint幻灯片图表的标题?
我试过以下方法:
chart.ChartTitle.X = 100;
chart.ChartTitle.Y = 100;
有不同的值,但标题没有移动。
我观察了您共享的代码,尽管为其设置了值,但它还可以。在图表区域内,该值介于 0-1 之间。 (0,0)(X,Y) 是左下角,(1,1)(X,Y) 是图表的右上角。但此功能仍然无法正常工作,API 中似乎存在问题。您可以通过关注 link 联系 Aspose.Slides 支持团队,以记录您的问题请求。
http://www.aspose.com/community/forums/aspose.slides-product-family/109/showforum.aspx
由于无法移动图表标题,我只是使用常规自选图形在图表上方创建了一个标题,如下所示:
IAutoShape autoshape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 20, 0, 600, 50);
autoshape.UseBackgroundFill = true;
autoshape.LineFormat.FillFormat.FillType = FillType.NoFill;
autoshape.AddTextFrame(" ");
ITextFrame txtFrame = autoshape.TextFrame;
IParagraph para = txtFrame.Paragraphs[0];
IPortion portion = para.Portions[0];
portion.Text = title;
portion.PortionFormat.FillFormat.SolidFillColor.Color = Color.Black;
portion.PortionFormat.FillFormat.FillType = FillType.Solid;
是的,你是对的。这是另一种方法,您可以在最后尝试将包含图表标题的自动形状叠加在图表上。但是,在这种方法中,您需要确定自动形状在图表上的适当位置以用作标题。
是的,这是您可以使用的备选方案之一。
是否可以定位Aspose powerpoint幻灯片图表的标题?
我试过以下方法:
chart.ChartTitle.X = 100;
chart.ChartTitle.Y = 100;
有不同的值,但标题没有移动。
我观察了您共享的代码,尽管为其设置了值,但它还可以。在图表区域内,该值介于 0-1 之间。 (0,0)(X,Y) 是左下角,(1,1)(X,Y) 是图表的右上角。但此功能仍然无法正常工作,API 中似乎存在问题。您可以通过关注 link 联系 Aspose.Slides 支持团队,以记录您的问题请求。
http://www.aspose.com/community/forums/aspose.slides-product-family/109/showforum.aspx
由于无法移动图表标题,我只是使用常规自选图形在图表上方创建了一个标题,如下所示:
IAutoShape autoshape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 20, 0, 600, 50);
autoshape.UseBackgroundFill = true;
autoshape.LineFormat.FillFormat.FillType = FillType.NoFill;
autoshape.AddTextFrame(" ");
ITextFrame txtFrame = autoshape.TextFrame;
IParagraph para = txtFrame.Paragraphs[0];
IPortion portion = para.Portions[0];
portion.Text = title;
portion.PortionFormat.FillFormat.SolidFillColor.Color = Color.Black;
portion.PortionFormat.FillFormat.FillType = FillType.Solid;
是的,你是对的。这是另一种方法,您可以在最后尝试将包含图表标题的自动形状叠加在图表上。但是,在这种方法中,您需要确定自动形状在图表上的适当位置以用作标题。
是的,这是您可以使用的备选方案之一。