I am trying to construct a basic line graph. I have a Visualforce page, and a Component I put inside this page. The idea is, once the search button is clicked, the section with the component becomes visible by setting a boolean variable in the controller.

In the component, I have two things: an outputText which says "hello", and an apex:chart. The weird thing is, the outputText is shown, but the apex chart is not when the button is pressed. The only way I can get the chart to show is by showing it at all times, not just when the button is pressed. Why would one element rerender and not the other? The apex:chart isn't throwing any firebug errors...

VF Page Code:

<apex:pageBlockSectionItem >
       <apex:commandButton value="Search" action="{!methodx}" rerender="container, container2, thePageBlock"/>

<apex:outputPanel id="container2">  
   <apex:pageBlock rendered="{!showChart}">
      <apex:pageBlockSection id="myChart">
        <c:myComponent param="{!param}"/> 

Component Code:

<apex:component controller="MyChartController">
    <apex:attribute name="param" type="String" assignTo="{!myparam}" description="none"/>
    <apex:outputText value="hello"/>
    <apex:chart height="400" width="700" data="{!axisData}">
         <apex:axis type="Numeric" position="left" fields="field1" 
         <apex:axis type="Category" position="bottom" fields="name"/>
         <apex:lineSeries axis="left" fill="true" xField="name" yField="field1"
             markerType="circle" markerSize="3" markerFill="#FF0000"/>
  • Some controller code would be nice to see :) Commented Jan 29, 2013 at 20:17
  • If I remove the rendered="{!showChart}", the chart displays fine. So I don't think it's a problem with the controller :)
    – George S.
    Commented Jan 30, 2013 at 11:20
  • Wow, 4 years later and rerendering of an output panel with an apex:chart or a chart in a component still causes Internal SF Errors....so frustrating
    – Eric
    Commented Jun 13, 2017 at 7:44

2 Answers 2


I solved it by extracting the apex:chart from the Component and putting it in the VF Page in the same place. Shouldn't make a difference afaik but it did.


Try apex:chart's show/hide Javascript functions.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .