本文整理了Java中org.apache.poi.xssf.usermodel.XSSFDrawing.createChart()
方法的一些代码示例,展示了XSSFDrawing.createChart()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSSFDrawing.createChart()
方法的具体详情如下:
包路径:org.apache.poi.xssf.usermodel.XSSFDrawing
类名称:XSSFDrawing
方法名:createChart
[英]Creates a chart.
[中]创建一个图表。
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Creates a chart.
*
* @param anchor
* the client anchor describes how this chart is attached to the
* sheet.
* @return the newly created chart
*/
public XSSFChart createChart(ClientAnchor anchor) {
return createChart((XSSFClientAnchor) anchor);
}
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Imports the chart from the <code>srcChart</code> into this drawing.
*
* @param srcChart
* the source chart to be cloned into this drawing.
* @return the newly created chart.
* @throws XmlException
* @throws IOException
* @since 4.0.0
*/
public XSSFChart importChart(XSSFChart srcChart) throws IOException, XmlException {
CTTwoCellAnchor anchor = ((XSSFDrawing) srcChart.getParent()).getCTDrawing().getTwoCellAnchorArray(0);
CTMarker from = (CTMarker) anchor.getFrom().copy();
CTMarker to = (CTMarker) anchor.getTo().copy();
XSSFClientAnchor destAnchor = new XSSFClientAnchor(from, to);
destAnchor.setAnchorType(ClientAnchor.AnchorType.MOVE_AND_RESIZE);
XSSFChart destChart = createChart(destAnchor);
destChart.getCTChartSpace().set(srcChart.getCTChartSpace().copy());
destChart.getCTChart().set(srcChart.getCTChart().copy());
return destChart;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Creates a chart.
*
* @param anchor
* the client anchor describes how this chart is attached to the
* sheet.
* @return the newly created chart
*/
public XSSFChart createChart(ClientAnchor anchor) {
return createChart((XSSFClientAnchor) anchor);
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
public XSSFChart createChart(ClientAnchor anchor) {
return createChart((XSSFClientAnchor)anchor);
}
代码示例来源:origin: org.apache.poi/poi-examples
XSSFClientAnchor anchor = drawing.createAnchor(0, 0, 0, 0, 0, 5, 10, 15);
XSSFChart chart = drawing.createChart(anchor);
XDDFChartLegend legend = chart.getOrAddLegend();
legend.setPosition(LegendPosition.TOP_RIGHT);
代码示例来源:origin: org.apache.poi/poi-examples
XSSFClientAnchor anchor = drawing.createAnchor(0, 0, 0, 0, 0, 5, 10, 15);
XSSFChart chart = drawing.createChart(anchor);
chart.setTitleText("x = 2x and x = 3x");
chart.setTitleOverlay(false);
代码示例来源:origin: org.apache.poi/poi-examples
XSSFClientAnchor anchor = drawing.createAnchor(0, 0, 0, 0, 0, 5, 10, 15);
XSSFChart chart = drawing.createChart(anchor);
XDDFChartLegend legend = chart.getOrAddLegend();
legend.setPosition(LegendPosition.TOP_RIGHT);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Imports the chart from the <code>srcChart</code> into this drawing.
*
* @param srcChart
* the source chart to be cloned into this drawing.
* @return the newly created chart.
* @throws XmlException
* @throws IOException
* @since 4.0.0
*/
public XSSFChart importChart(XSSFChart srcChart) throws IOException, XmlException {
CTTwoCellAnchor anchor = ((XSSFDrawing) srcChart.getParent()).getCTDrawing().getTwoCellAnchorArray(0);
CTMarker from = (CTMarker) anchor.getFrom().copy();
CTMarker to = (CTMarker) anchor.getTo().copy();
XSSFClientAnchor destAnchor = new XSSFClientAnchor(from, to);
destAnchor.setAnchorType(ClientAnchor.AnchorType.MOVE_AND_RESIZE);
XSSFChart destChart = createChart(destAnchor);
destChart.getCTChartSpace().set(srcChart.getCTChartSpace().copy());
destChart.getCTChart().set(srcChart.getCTChart().copy());
return destChart;
}
代码示例来源:origin: org.apache.poi/poi-examples
XSSFClientAnchor anchor = drawing.createAnchor(0, 0, 0, 0, 4, 0, 11, 15);
XSSFChart chart = drawing.createChart(anchor);
chart.setTitleText("This is my title");
chart.setTitleOverlay(true);
内容来源于网络,如有侵权,请联系作者删除!