Forum Discussion
KythrieSilva-cd
3 years agoCommunity Member
Can you draw a line with Javascript in Storyline 360?
Hi, Is it possible to draw a line on the screen using JavaScript in Storyline 360?
I'm working on a statistics example where I want to draw a regression line on a scatterplot. The learner can add ...
MathNotermans-9
3 years agoCommunity Member
Storyline doesnot has a Canvas element in its HTML by default. So first thing you need to do is add a Canvas element to Storyline.
In my sample i add that at the start of the timeline.
https://360.articulate.com/review/content/cdd63deb-d937-4a20-84db-16144bdbf588/review
Add it to a shape on Storylines screen with a specified accessibility name so its easy selectable.
Then you can get the Canvas by its Id as in your code... and draw lines, shapes, triangles and anyother supported Canvas methods on it as seen on my sample.
Adding the basic Storyline for that.