简体   繁体   English

使用 Aspose.Words 创建聚集条形图

[英]Creating clustered bar chart using Aspose.Words

Is there any way to draw clustered bar chart in word document using Aspose.Words in java?有没有办法在 java 中使用 Aspose.Words 在 word 文档中绘制聚集条形图? Please find the below image for clustered bar chart.请在下面的图像中找到集群条形图。

聚类条形图

You can use DocumentBuilder.insertChart method to create chart using Aspose.Words.您可以使用DocumentBuilder.insertChart方法使用 Aspose.Words 创建图表。 Also see Aspose.Words documentation to learn more about creating charts .另请参阅 Aspose.Words 文档以了解有关创建图表的更多信息。 In your case you should use ChartType.BAR.在您的情况下,您应该使用 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");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM