List of usage examples for org.apache.poi.xssf.usermodel XSSFChart getParent
public final POIXMLDocumentPart getParent()
From source file:org.tiefaces.components.websheet.chart.ChartHelper.java
License:MIT License
/** * Gets the chart id from parent./*from w w w . j a v a2s . c om*/ * * @param chart * the chart * @param sheetName * the sheet name * @return the chart id from parent */ private String getChartIdFromParent(final XSSFChart chart, final String sheetName) { if (chart.getParent() != null) { for (RelationPart rp : chart.getParent().getRelationParts()) { if (rp.getDocumentPart() == chart) { return sheetName + "!" + rp.getRelationship().getId(); } } } return null; }