Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Custom response summary chart in JavaScript

I am using Sawtooth for the CBC in my PhD research project and I was wondering if it is possible to offer each survey participant a super simple summary bar chart of their own responses (only their own, nobody else’s) after they have completed the questionnaire.

I know in Qualtrics this can be done through JavaScript, so I contacted Sawtooth Support with this request and they referred me to the forum.

If anyone can help it would be much appreciated!
asked Oct 28, 2022 by anonymous
No, the y-axis does stop at the max value. The issue is that it adjusts itself when the greatest value is below max value. For example: the greatest value is 3, so the y-axis only goes up to 3, but I would like it to always go up to 6 no matter what. I'll send you the code for review. Thank you!
None of your charts have the "options" code as put in my comment on January 10.
That's strange because I can see the code below in my Lighthouse Studio (page 28 of the study in the 'Variables / Question HTML' tab). Do I have to activate it somehow?

options: {
    plugins: {
        legend: {
            display: true
    scales: {
        y: {
            display: true,
            ticks: {
                max: 13
That's not the same as the code above.
Now I see it, too.
Thank you for your help - it works great without the erraneous code snippet mixed in there...

Your solution to the original question

Please only use this to answer the original question. Otherwise please use comments.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

To avoid this verification in future, please log in or register.