I have a strange issue. I have a component that constructs a visualforce line chart:
<apex:component id="ShowGraph" layout="block" controller="ControllerShowGraph" selfClosing="true">
<apex:messages />
<apex:attribute required="true" type="String" name="Show" description="The Show to make a graph of" assignTo="{!showId}"/>
<apex:attribute required="true" type="String" name="Type" description="What type of graph should be constructed" assignTo="{!graphType}"/>
<apex:attribute required="false" type="Date" name="StartDataDate" description="The Date in which to start the graph data" assignTo="{!startDate}"/>
<apex:attribute required="false" type="Date" name="EndDataDate" description="The Date in which to end the graph data" assignTo="{!endDate}"/>
<apex:chart height="400" width="1000" data="{!showData}">
<apex:axis type="Numeric" position="left" fields="averagePlayerCount,playerCountGameOne,playerCountGameTwo" title="Player Count"/>
<apex:axis type="Category" position="bottom" fields="formattedShowDate" title="Date of Show {!shw.Name}"/>
<apex:lineSeries title="Average Player Count" axis="left" xField="formattedShowDate" yField="averagePlayerCount" markerType="circle" strokeWidth="3" fillColor="blue" />
<apex:lineSeries title="Game One Player Count" axis="left" xField="formattedShowDate" yField="playerCountGameOne"/>
<apex:lineSeries title="Game Two Player Count" axis="left" xField="formattedShowDate" yField="playerCountGameTwo"/>
<apex:legend position="right"/>
</apex:chart>
I am calling it in my main page like this:
<apex:pageblock title="Show Performance" rendered="{!allActiveShowsHosting.size != 0}">
<apex:repeat value="{!allActiveShowsHosting}" var="shw">
<apex:pageBlockSection title="{!shw.Name} {!numWeeksToGoBack} week player counts">
<c:ShowGraph Show="{!shw.Id}" Type="Player Count" StartDataDate="{!graphStartDate}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="{!shw.Name} Lifetime player counts">
<c:ShowGraph Show="{!shw.Id}" Type="Player Count"/>
</apex:pageBlockSection>
</apex:repeat>
</apex:pageblock>
but for some reason visualforce is forcing charts to go into the same page block section:
As you can see from the picture, the first pageblock section is getting two charts while others have zero. Any clue what could be causing this issue?