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
Diane CochranDiane Cochran 

Attempting reRender of Google Visualization causes control to not load.

Hi,

 

I'm currently working on setting up a visualforce page that contains a gauge from the Google Visualization library, and while the gauge shows on initial page load, if I attempt to rerender the section (inside of an outputpanel) the header will show but the gauge itself won't.

 

I can examine the page and see that the JSON is being updated, so I'm not sure what I may be doing wrong here.  Can anyone help out or have struggled through this already?

Best Answer chosen by Admin (Salesforce Developers) 
Diane CochranDiane Cochran
What I discovered was that the google visualization tag is only set to run on page load, so the reRender would need to call the javascript function that generates the code.  Given that the visualization is using http:// instead of https://, the gauge tag doesn't have a hook for the major tick marks and this issue, I stopped using the tag and created the gauge via javascript myself.

All Answers

TehNrdTehNrd
I think what you may need to do is rerender the javascript that builds this gauge, not the gauge itself.
jlojlo
Diane - Were you able to fix your problem? If not, can you post your code?
Diane CochranDiane Cochran
What I discovered was that the google visualization tag is only set to run on page load, so the reRender would need to call the javascript function that generates the code.  Given that the visualization is using http:// instead of https://, the gauge tag doesn't have a hook for the major tick marks and this issue, I stopped using the tag and created the gauge via javascript myself.
This was selected as the best answer
AffinaquestAffinaquest

Can you please share with us the code you used to make this happen?

 

Thanks.