Visualforce Charts with Javascript
Hi All, This post talks about creating CUSTOM CHARTS in visualforce pages with javascript. There are multiple ways to show charts in visualforce pages, such as we could create a report, dashboard and map the image to visualforce page, or use google charts api, or we can use charts tag which is direct and dynamic. Requirement : Embed a chart which shows the salesrep the quarterly Targets and Booked. Solution : It is assumed that we already have the data with the following fields. Q1_Target__cQ2_Target__c Q3_Target__c Q4_Target__c Q1_Booked__cQ2_Booked__c Q3_Booked__c Q4_Booked__c Targets are set by the managers, and Booked are calculated using Rollup summaries on Opportunities. Now that we have the data, lets create a visualforce page with charts. There is this tag <apex:chart> to render data as charts. Please read this link for more information. create a VF page and run the following code. <apex:page standardController="Accoun...