function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Naveen saini 10Naveen saini 10 

Two apex chart not RERENDERING in a VF page. Need Help

Hi,

I am using two apex pie chart and I am rerendering the output panel using action polar. After a single refresh, the pie chart automatically vanish away.
I am getting this error in console - SfdcCore.js:386 Visualforce Chart: Error loading configuration for chart 'xjid0jid23': TypeError: Cannot read property 'dom' of null.
<apex:outputPanel id = "main">
	<apex:outputPanel rendered="{!IF(Type2 == 'test' && Type1 =='test2',true,false)}">
			<div style="text-align:center; height:115px;float:left;position: relative;top: 10px;}">
				<apex:chart height="115" width="115" data="{!pieData}" animate="false" colorSet="{!IF((widthInterval >= 90 && widthInterval < 100) ,'Yellow,#F8F8F8',if(widthInterval < 90, '#009933,#F8F8F8', 'Red,#F8F8F8'))}" > 
					<apex:pieSeries dataField="data" highlight="false" showInLegend="false" tips="false" donut="85" /> 
				</apex:chart>
				<div> 
					<div style="font-size: 20px;left: 5px;"><b style="position:relative;bottom: 68px;left: 5px;"> {!widthInterval}% </b></div>
					<apex:outputPanel rendered="{!widthInterval < 100}">
					 <div style="position: relative;top: -26px;">
						<div style="position: relative;bottom: 135px;font-size: 15px;"><b> {!test}</b></div>
						<div style="text-align:center;margin-top: -12px;"><b>Target-{!test2} </b></div>
					  </div>
					</apex:outputPanel>        
		<apex:outputPanel
		
		<apex:outputPanel rendered="{!IF(Type2 == 'test' && Type1 =='test2',true,false)}">
			<div style="text-align:center; height:115px;float:left;position: relative;top: 10px;}">
				<apex:chart height="115" width="115" data="{!pieData2}" animate="false" colorSet="{!IF((widthInterval >= 90 && widthInterval < 100) ,'Yellow,#F8F8F8',if(widthInterval < 90, '#009933,#F8F8F8', 'Red,#F8F8F8'))}" > 
					<apex:pieSeries dataField="data" highlight="false" showInLegend="false" tips="false" donut="85" /> 
				</apex:chart>
				<div> 
					<div style="font-size: 20px;left: 5px;"><b style="position:relative;bottom: 68px;left: 5px;"> {!widthInterval2}% </b></div>
					<apex:outputPanel rendered="{!widthInterval2 < 100}">
					 <div style="position: relative;top: -26px;">
						<div style="position: relative;bottom: 135px;font-size: 15px;"><b> {!test}</b></div>
						<div style="text-align:center;margin-top: -12px;"><b>Target-{!test2} </b></div>
					  </div>
					</apex:outputPanel>        
		<apex:outputPanel
		
		 <apex:outputPanel>
            <apex:actionPoller action="{!CallMethod}" reRender="main" interval="5"/>
         </apex:outputPanel>
	
</apex:outputPanel>

 
Sai KethuSai Kethu
I'm kind of facing similar issue, were you able you to fix it?