Charts - Export

Charts are canvas based and can be exported as static images with client side api.

Chart as an Image
<script type="text/javascript">
			function exportChart() {
				//export image

				//show the dialog

		<p:barChart model="#{chartJsView.barModel}"	style="width: 100%; height: 500px;" widgetVar="chart" />
		 <br />

<p:commandButton type="button" value="Export" icon="pi pi-home" onclick="exportChart()"/>

<p:dialog widgetVar="dlg" showEffect="fade" modal="true" header="Chart as an Image" resizable="false">
    <p:outputPanel id="output" layout="block" style="width:500px;height:300px"/>