@jspsych-contrib/plugin-histogram-button-response
v1.0.0
Published
Displays a histogram of results to show the participant on a trial
Readme
plugin-histogram-button-response
Overview
The histogram-button-response plugin displays a histogram 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 histogram stimulus is generated from a numeric array of data, with optional parameters for setting the number of bins to use. You can also add an annotation to the chart by setting the bin corresponding to a particular score as a different colour, with a corresponding 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-histogram-button-response"></script>Using NPM:
npm install @jspsych-contrib/plugin-histogram-button-responseimport jsPsychHistogramButtonResponse from "@jspsych-contrib/plugin-histogram-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.
