Hello all,
Fair warning - I am very, very new to javascript and really need some help.
I am trying to build an experiment in oTree. My end goal is to reveal two timeseries using a chart to a subject and then have the subject forecast the next value of one of the two timeseries. I would like for the subject to produce a forecast using a slider and for whatever value the subject selects with the slider to show on the chart in real-time. I've built the chart and added the slider. However, I can't quite figure out how to get the value the subject selects with the slider to appear on the chart.
My code is here: https://jsfiddle.net/8rk35ayh/
(an aside - this code runs in oTree but does not work in the jsfiddle for some reason - I tried fixing this but gave up after about thirty minutes. I am assuming anyone with any modicum of experience will recognize the issue quite quickly. )