For any chart.js people out there …
The site allows a user to view the results of any completed poll (survey). It does so by calling a lightbox called “Community – Display Poll Results”. In the lightbox, the user may select the type of poll and the specific poll name (along with target audience filtering) to display its results. When the user makes those selections and clicks on “Display Results”, an embedded HTML object is called within the lightbox that displays a pie chart of the results. A modified chart.js code template is used to display to custom chart.
When the lightbox is first called, the user makes the poll selection choice, then clicks the “Display Results” button. In this case, the pie chart is correctly displayed (meaning both the communication between the lightbox and the embedded HTML widget along with the chart.js pie chart html set up works perfectly). But, if the lightbox is not closed and the user makes a new poll to display results from the drop down box, then clicks “Display Results,” the pie chart is not updated with the new data and the old one is displayed.
I tried various ways to address this as shown in page 6 of the screen shots below, but no improvement. Is it even possible to refresh the pie chart with the new data or does the user have to close the lightbox, then re-open it to display another poll result? I’ve burned a lot of time trying to figure this one out. If you can figure it out, please send me the code patch and I’ll integrate it in. Thank you so VERY MUCH!
Here is a link to screen shots and details of what I tried already.