The pie chart doesn't update with the variable

Hello,

I'm trying to use a donut chart in my storyline module.
I have set two variables Num1 and Num2. When the learner clicks on a first object, it adjusts the variable Num1. When he clicks on a second object, it adjusts the variable Num2. I can see in the reference that the variables are doing fine.

But then, after I set a trigger with javascript and insert the link for the web object, as I preview the published project, the pie chart doesn't update simultaneously with the variables and there's a circle remaining in just one color.

I've tried with another slide and there's a message "Waiting for the data..." and then nothing happens even if I click on the objects and the variables are adjusting. This happens when I preview the published project in my computer.

Please note that I've inserted the web object on the same slide than the learner's activity.

Could you help me solve this, please ?

Many thanks in advance,

Anne

August 13, 2020, 10:33 am

Click for thumbs down.0Click for thumbs up.0#1

Hi Anne. If you can upload your project file using a filesharing service like WeTransfer or Dropbox and post the link here, I will take a look.

August 13, 2020, 12:48 pm

Click for thumbs down.0Click for thumbs up.0#2

Hi John,

great. Here's my storyline file. Now it's a drag and drop interaction with a score. The learner has to put eggs in both baskets, and that's adjusting too variables Drop1 and Drop2. It's in french but quite easy to understand.

Here's the link : https://we.tl/t-DOXzc2Vrqc

Thank you for your help !

August 13, 2020, 1:03 pm

Click for thumbs down.0Click for thumbs up.0#3

Anne, here's the updated file for you: https://we.tl/t-0j1rhxLGMc

The chart widget is static and is not supposed to update as the variables change. But I slightly modified the js code and placed the web object on a layer that resets whenever Drop total changes, so this way the chart reloads again and again with every change.

I will also put in a request to see if it's possible to make the widget dynamic to update the chart without having to reload the entire web object again and again. If it's something that can be done, the updated code and instructions will be posted on the How to Use page.

August 13, 2020, 3:15 pm

Click for thumbs down.0Click for thumbs up.0#4

John,

I've opened the file you've sent, but it seems to be the same as before. There's no additionnal layer. Could you send me the modified file again, please ?

By the way, the idea of a dynamic widget is perfect, I will definitly check if there's going to be an update.

Many thanks,

August 13, 2020, 5:37 pm

Click for thumbs down.0Click for thumbs up.0#5

Sorry about that. The mistake made me look at your file again, and I realized that you reload the slide each time after an item is dropped. So in your case, the entire widget reloads anyway because the whole slide reloads, so you won't need dynamic rendering anyway in this case. Here's the correct file: https://we.tl/t-Q03U9WbGcJ

But also, the team did add a trigger on the How To Use page to update the chart dynamically. So thank you for bringing this up, we improve widgets based on the feedback we hear.

August 13, 2020, 7:28 pm

Click for thumbs down.0Click for thumbs up.0#6