Chartjs-Uncaught TypeError: e.type is not a constructor and trial level node is missing the "type" parameter errors

0👍

Any object on a jsPsych timeline must have either a type property that specifies which plugin to use for that trial, or it must have a timeline property that contains a nested set of trials.

In your current code the firstGraph and secondGraph variables don’t have a type parameter, so jsPsych doesn’t know what plugin to use to display the trial.

Given that your stimulus parameter is a function that is accessing a <canvas> element, the canvas-keyboard-response plugin might be the right choice. You can see demos and example code of how to use it at the bottom of the documentation page.

Leave a comment