function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dinesh Devaraj 7dinesh Devaraj 7 

How can i show piechart in pdf

I want to show vfpage in pdf.that will contain piechart.
but pie chart notshowing in pdf 
Alain CabonAlain Cabon
@dinesh Devaraj
 
  • Visualforce charts only render in browsers which support scalable vector graphics (SVG). For more information, see WC3 SVG Working Group.
  • Visualforce charting uses JavaScript to draw the charts. Visualforce charts won’t display in pages rendered as PDFs.
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_charting_limitations.htm

The workarounds are difficult to code for Excel too: 
https://developer.salesforce.com/forums/ForumsMain?id=9062I000000IFAyQAO

With Excel using remote action and alasql, there is this workaround:
https://nitinkhunalsalesforce.wordpress.com/2016/10/27/visualforce-export-excel-report-using-remote-action-and-alasql/
 
Ajay K DubediAjay K Dubedi
Hi Dinesh,

A Visualforce chart requires that you create a chart container component, which encloses at least one data series component. You can optionally add additional series components, chart axes, as well as labeling components such as a legend, chart labels, and tooltips for data points.

 You can have refer to the below links to make the pie chart in pdf:
- http://www.shelovestocode.com/2017/04/save-visualforce-chart-as-image-in.html

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks,
Ajay Dubedi