【问题标题】:Creating clustered bar chart using Aspose.Words使用 Aspose.Words 创建集群条形图
【发布时间】:2022-09-23 13:49:30
【问题描述】:

有没有办法在java中使用Aspose.Words在word文档中绘制聚集条形图? 请在下面的图像中找到集群条形图。

    标签: java aspose.words


    【解决方案1】:

    您可以使用 DocumentBuilder.insertChart 方法使用 Aspose.Words 创建图表。另请参阅 Aspose.Words 文档以了解有关 creating charts 的更多信息。 在您的情况下,您应该使用 ChartType.BAR。

    Document doc = new Document();
    DocumentBuilder builder = new DocumentBuilder(doc);
    
    Shape chartShape = builder.insertChart(ChartType.BAR, 200, 300);
    
    // Chart is created with default data
    // here you can modify the chart data
    // .....
    
    doc.save("C:\\Temp\\out.docx");
    

    【讨论】:

      猜你喜欢
      • 2019-05-10
      • 1970-01-01
      • 2021-02-19
      • 2020-12-01
      • 2015-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多