如何使用IceFaces / JSF打印图表

时间:2018-06-13 15:46:40

标签: jsf icefaces-3

如何使用downloadAsImage()以PNG格式下载/打印图表?

我使用了exportToChart(),如下所述,但它只显示现有图表下的图表。

<h:form id="exportForm">
    <h:commandButton id="exportButton" value="Export as Image"
                     onclick="exportChart.exportToImage(ice.ace.jq('.chartExport')); 
                              return false;" />
<ace:chart ...
               widgetVar="exportChart" />
</h:form>
<h:graphicImage styleClass="chartExport" />  

修改
试过这个:

<ice:commandButton  value="Print" 
        onclick="$('barChart').printElement();" >
        <ace:printer for="barChart"></ace:printer>
</ice:commandButton>  

其中 barChart 是图表的ID。这仅打印图例和数值,但不打印实际图形。

0 个答案:

没有答案