You need to sign in to do that
Don't have an account?
Visualforce Charting
Hi, we are trying to use Visualforce Charting in our Sandbox environment and are having difficulties rendering the charts. We can get the data to display but not the chart. The chart itself is blank. Below are our controller and page. There seems to be a disconnect between the two. Any ideas on what we may be doing incorrectly?
Does Salesforce Support need to enable the functionality in either the production or sandbox environment.
Controller:
public class vfcTimeToServe {
// Get a set of Opportunities
public ApexPages.StandardSetController setCon {
get {
if(setCon == null) {
setCon = new ApexPages.StandardSetController(Database.getQueryLocator(
[SELECT submitted_to_delivery__c,
assigned_to_start__c,
negotiated_date__c
FROM PLC_Job__c
WHERE date_time_of_delivery__c= LAST_N_DAYS:90
and Team_1__c = 'MCM-Market Research'
limit 5]));
setCon.setPageSize(5);
}
return setCon;
}
set;
}
public List<PLC_Job__c> getPLCs() {
return (List<PLC_Job__c>) setCon.getRecords();
}
}
PAGE:
<apex:page controller="vfcTimeToServe">
<apex:chart height="400" width="700" data="{!PLCs}">
<apex:axis type="Numeric" position="left" fields="submitted_to_delivery__c" title="Days" grid="true"/>
<apex:axis type="Numeric" position="bottom" fields="negotiated_date__c" title="Month of the Year">
</apex:axis>
<apex:lineSeries axis="left" fill="false" xField="negotiated_date__c" yField="submitted_to_delivery__c" markerType="cross" markerSize="4" markerFill="#FF0000"/>
</apex:chart>
</apex:page>
Thanks,
Debbie
Hi EStowe,
Is there some specific reason for what you are using ApexPages.StandardSetController to get dataon visualforce page? I think this is the problem with ApexPages.StandardSetController., instead of ApexPages.StandardSetController you can use apex method or apex property to retrieve data on vf page.
Thanks!