You need to sign in to do that
Don't have an account?
Rohit K Sethi
How to create google chart from apex class ?
hi ,
I have to create google chart from apex class and insert the chart into attachement.
Thanks.
I have to create google chart from apex class and insert the chart into attachement.
Thanks.
Refer these Links: 1. http://developer.force.com/cookbook/recipe/easy-visualforce-charts-with-javascript-remoting--google-charts-api
2. https://developer.salesforce.com/forums/?id=906F0000000BPXsIAO
3. https://developer.salesforce.com/forums/?id=906F000000098nHIAQ
Thanks
Siva
Thanks for reply , Here my requirement is that I want to genrate Pdf for google chart. And when we set the randerAs="Pdf" then no script can be executed. As i find that google chart can be only created thorugh Javascript and Apex:page not support js when it sets as pdf.
Is there any way that I can genrate Chart from Apex class. So that after http callout i can insert the chart in attachement and then it can be easily shown in pdf.
If you have any solution/Idea plz reply.
Thanks
I have gone through your question. You can use <c:PDFHTML> default lightning component to achieve this.
Please check the link below to get more details -
https://developer.salesforce.com/forums/?id=906F000000099LRIAY
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com
Google chart is run by javascript but in render as pdf in visualforce page, javascript is not working.
you can use 'ImageChart' API for this. Create an image URL from the apex and then bind it in <img> tag in the VF page. Like This:
https://documentation.image-charts.com