use a button to refresh popup window

  • 1
  • Question
  • Updated 2 years ago
  • Answered
I created a popup  from a button set and would like to use the button I created inside the popup to refresh the charts inside the popup after a user has cycled through each of them without having to hit the back button in the charts. 

I also want to avoid the user having to close the popup window and accessing the charts again. Trying to save them time and avoid clicking, closing and reopening.

Here's a screenshot of what I've laid out. Any help is greatly appreciated! Thanks!



 
Photo of ns

ns

  • 1,822 Points 1k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
nirouges,

I think you could do by just re-rendering the charts with some quick javascript:

skuid.$C('MyChartUniqueID').render();

Try a button that runs a snippet like that for one of your charts and see if it works. And if it does, then you can do it for all of your charts. :)
Photo of ploodeed

ploodeed

  • 162 Points 100 badge 2x thumb
Matt, 

I added the snippet, but clicking on my button only refreshes the current bar, but doesn't go back to the first chart. I have 3 charts setup in the Chart Set. I tried the snippet on chart 1 and chart 2, activated the button, and nothing happened besides the chart flashing. 

As I get to the 3rd chart and click the button, it only goes back to the 2nd chart and while clicking the button, it only refreshes on itself? 

http://www.screencast.com/t/1GJOJyL9ryi
Photo of ploodeed

ploodeed

  • 162 Points 100 badge 2x thumb
Got it Matt! I used the Unique ID from the responsive gride container instead. 
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Nice work!
Photo of ploodeed

ploodeed

  • 162 Points 100 badge 2x thumb
Thank you, much appreciated!