I have a visualforce page in which I lazy load elements (otherwise the page would take forever to load). I load charts with each call of a javascript function, but for whatever reason the charts do not load. If i load the charts without a re-render (make charts load from controller constructor) then the charts load perfectly fine. That's how i know the re-rendering is the problem

here is the relevant part of my visualforce page:

            <apex:repeat value="{!allComponents}" var="comp">
            <div class="componentCard">
                        <h1 class="boldFont headerFontSize textCenter">{!comp.componentName}</h1>
                    <div class="sixteenFontSize inlineBlock">
                        <apex:repeat value="{!comp.componentMetrics}" var="metric">
                            <apex:outputLabel value="{!metric.label}:"/>
                            <apex:outputLabel styleClass="boldFont" value="{!metric.value}"/>
                    <apex:variable var="GraphCounter" value="{!0}"/>
                    <apex:repeat value="{!comp.componentGraphs}" var="grph">
                        <div Id="{!comp.componentName}-Graph-{!GraphCounter}" style="" class="width70 height100 inlineBlock lightBorder">
                            <apex:outputPanel >
                            <apex:chart height="200px" width="100%" data="{!grph.graphData}" resizable="true" renderTo="{!comp.componentName}-Graph-{!GraphCounter}">
                                <apex:axis type="Numeric" position="left" fields="yVal" title="{!grph.yAxisLabel}"/>
                                <apex:axis type="Category" position="bottom" fields="xVal" title="{!grph.xAxisLabel}"/>
                                <apex:lineSeries title="Average Player Count" axis="left" xField="xVal" yField="yVal" markerType="circle" strokeWidth="3" fillColor="blue" />
                        <apex:variable var="GraphCounter" value="{!GraphCounter + 1}"/>
        <apex:outputPanel rendered="{!componentsLeftToRender}">

and here is the function called by renderNextComponent

   public void loadNextComponent()
        allComponents[numComponentsRendered].componentLoaded = true;
        if(numComponentsRendered == allComponents.size())
            componentsLeftToRender = false;


You must log in to answer this question.

Browse other questions tagged .