• Brent Stanger
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

I have a commandButton to reprocess a set of filters and on clicking Go, the page redraws the charts and tables. When the page first loads I process and display the charts on the page with no problem. When I click Go, all the charts and tables display except the bar chart.

 

I get this error in my browser console:

Visualforce Chart: Error loading configuration for chart 'jid0jid29jid55jid56jid57jid64': Did not find required field 'ftRev,tgtRev' in data for chart 'jid0jid29jid55jid56jid57jid64'. Make sure field was queried and/or provided and has a value.

 

 

Here are extracts from the page code:

...

<apex:commandButton action="{!updatePage}" value="Go" id="theButtonCM"/>

...

<apex:outputPanel id="barchart">
<apex:pageBlock >
<apex:pageBlockTable value="{!perfSummList}" var="d" align="center">
<apex:column value="{!d.ftRev}" headerValue="FT"/>
<apex:column value="{!d.tgtRev}" headerValue="tgt"/>
<apex:column value="{!d.monthYYYYMM}" headerValue="mth"/>
<apex:column value="{!d.monthStr}" headerValue="mth"/>
</apex:pageBlockTable>
<b>ft revenue vs target</b><br/>
<apex:chart data="{!perfSummList}" height="300" width="500">
<apex:legend position="bottom" spacing="10" padding="2" font="10px Helvetica"/>
<apex:axis type="Category" position="bottom" fields="monthStr">
<apex:chartLabel />
</apex:axis>
<apex:axis type="Numeric" position="left" fields="tgtRev,ftRev" minimum="0" >
<apex:chartLabel />
</apex:axis>
<apex:barSeries axis="left" orientation="vertical" xField="monthStr" yField="ftRev,tgtRev" title="F+T,Target">
<apex:chartLabel />
</apex:barSeries>
</apex:chart>
</apex:pageBlock>
</apex:outputPanel>

 

The data in the table is from the same list and shows up just fine - the fields reported have values as surely the table would show if they did not. Something is going on under the hood for the charts and I can find out the issue here.

 

Any ideas?