@jspsych-contrib/plugin-densitychart-button-response
v1.0.0
Published
Displays a densitychart of results to show the participant on a trial
Downloads
21
Readme
plugin-densitychart-button-response
Overview
The densitychart-button-response plugin displays a density plot chart and records responses generated by a button click. The chart is displayed until a response is given. The button itself can be customized using HTML formatting.
The density plot stimulus is generated from a numeric array of data, with optional parameters for customizing how smooth the densities are and the colours used. You can also add an annotation to the chart indicated by a vertical line with an accompanying text annotation.
This plugin uses Chart.js under the hood, and supports features like axis labeling, legend display, and percentage formatting on the y-axis.
Loading
Using the CDN-hosted JavaScript file:
<script src="https://unpkg.com/@jspsych-contrib/plugin-densitychart-button-response"></script>Using NPM:
npm install @jspsych-contrib/plugin-densitychart-button-responseimport jsPsychBarchartButtonResponse from "@jspsych-contrib/plugin-densitychart-button-response";Compatibility
- jsPsych version: v8.0.0 or later
Author / Citation
Courtney B. Hilton
If you use this plugin in your research, please cite the corresponding repository or paper when available.
