请问使用Aspose.word 插件如何插入雷达图?

如图在word中插入下图
image.png (20.1 KB)

@eastnet You can use DocumentBuilder.InsertChart method to achieve this. For example see the following code:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Shape chartShape = builder.InsertChart(ChartType.Radar, 200, 200);

DateTime[] dates = new DateTime[] {
    new DateTime(2002, 1, 5),
    new DateTime(2002, 1, 6),
    new DateTime(2002, 1, 7),
    new DateTime(2002, 1, 8),
    new DateTime(2002, 1, 9) };

chartShape.Chart.Series.Clear();
chartShape.Chart.Series.Add("First", dates, new double[] { 31, 30, 28, 8, 10 });
chartShape.Chart.Series.Add("First", dates, new double[] { 8, 8, 8, 20, 30 });

chartShape.Chart.Legend.Position = LegendPosition.Top;
chartShape.Chart.Title.Text = "My Cool Radar Chart";

doc.Save(@"C:\Temp\out.docx");