Comments (5)
@fusheng-fate Could you please attach your source and output documents here for testing? We will check the issue and provide you more information.
PS: the main place for getting support is Aspose.Words support forum. It is better to post the questions there to get faster reply.
from aspose.words-for-java.
@Test
public void testas() throws Exception {
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Insert a chart shape with a document builder and get its chart.
Shape chartShape = builder.insertChart(ChartType.PIE, 432, 256);
Chart chart = chartShape.getChart();
chart.getSeries().clear();
chart.getSeries().add("Aspose Test Series",
new String[]{"Word", "PDF", "Excel", "GoogleDocs", "Note"},
new double[]{500.0, 1.0, 1.0, 2.0, 2.0});
ChartDataLabelCollection dataLabels = chart.getSeries().get(0).getDataLabels();
for (int i = 0; i < 5 ; i++) {
dataLabels.add(i).setShowLeaderLines(true);
dataLabels.get(i).setShowPercentage(true);
dataLabels.get(i).setShowValue(true);
dataLabels.get(i).getNumberFormat().setFormatCode("0.00%");
dataLabels.get(i).setShowDataLabelsRange(true);
}
// Use the "Title" property to give our chart a title, which appears at the top center of the chart area.
ChartTitle title = chart.getTitle();
title.setText("My Chart");
// Set the "Show" property to "true" to make the title visible.
title.setShow(true);
// Set the "Overlay" property to "true" Give other chart elements more room by allowing them to overlap the title
title.setOverlay(false);
doc.save("d:/" + "Charts.ChartTitle.docx");
}
from aspose.words-for-java.
@AlexNosk Thank you for your reply. This is my test code. I have found a corresponding API to handle the issue of setting percentage accuracy, but the issue of overlapping labels cannot be resolved.
from aspose.words-for-java.
@fusheng-fate Unfortunately, currently there is no way to specify position of data labels. This feature request is logged as WORDSNET-21965. We will keep you updated and let you know once it is resolved.
from aspose.words-for-java.
@AlexNosk Thank you.
from aspose.words-for-java.
Related Issues (20)
- 如何在手机上使用? HOT 1
- how to show all content of page by structure from top to bottom HOT 1
- Error in compressed image example on official website HOT 3
- All tests for table in LINQ_Reporting_Engine failed HOT 3
- 怎么更改生成的折线图的线的颜色? HOT 3
- How to generate a single image from multiple pages of a document HOT 1
- 如何插入word中表格或者图片的题注,就表序号和图的序号(How to insert the table or picture caption in the word, the table number and the number of the figure) HOT 5
- 使用ReportingEngine生成报告时,如果传入的数据源是List,那么模板中的变量应该怎么填写 HOT 1
- How can I convert .doc in .docx HOT 2
- I want to know if aspose can get the difference between two words or pdfs and customize the difference color HOT 1
- Invalid paragraph spacing setting HOT 2
- Typo Contents_managment HOT 1
- Missing text when convert word to pdf HOT 1
- word生成pdf时,段落中间若有——或短横线-,符号后会莫名加一个换行符 HOT 6
- fonts overlap using aspose HOT 1
- word添加水印后页眉变高 HOT 10
- word转pdf后行距增加 HOT 2
- reporting engine how to fill in content controls HOT 1
- 如何在指定页面渲染目录 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspose.words-for-java.