I'd like to allow my users to fill in custom fields on a post with numbers indicating the percentages of student satisfaction. I would like to then write a view which would display this information as a graph.
Is this possible? As in, can I take some ready graph code, e.g. from here (hidden link), and insert Toolset custom field shortcodes in place of the variables? Then the shortcodes would pull the data my users enter.
I'm not sure how to integrate the JS from the page linked though... Is this at all possible? If not, can you recommend some other option for displaying numbers entered in custom fields as a graph?
Unfortunately, Shane then closed that ticket leaving me no opportunity to reply. I checked out this plugin and alas, it doesn't seem to allow me to use custom fields in the free version. Could there be some other, more useful solution?
The issue why the ticket was closed was because it was opened as a chat ticket. Unfortunately there was no response from you in the first 10 minutes of opening the ticket.
However helping you with the code to setup this would be out of the scope of our support forum. This is why the suggestion was made to use a plugin instead.
The plugin that was suggested, may or may not meet your requirements.
I don't know the difference between a chat ticket and a regular ticket - when I was opening it, it looked exactly the same. Either way, it seems quite weird to not leave people an chance to reply because they missed a 10-minute window of opportunity.
I appreciate that this might not be possible, and would be perfectly happy with an answer 'this can't be easily done because of X'.
I just wanted to add, it is not possible with Toolset natively.
This is because Toolset doesn't incorporate any mechanisms to output any chart or graph. It allows only to display data in HTML structures, which you can add liberally in Toolset's Views Loop Editors, or Content Templates.
Hence, you can take a graph renderer and populate that with Toolset Data, as you explained above.
I've elaborated on such approaches in the past, even though, it's not something we suggest directly, or can support - it may be of use to you: https://toolset.com/forums/topic/charts-and-graphs-with-toolset/#post-361492
Note, it's not really suggested to mix in JavaScript in HTML editors, which is what you'll need to do if you follow my above example.
It works, but WordPress doesn't love it, and it may stop working.
Note that Views can be set so to return "raw" data, allowing you to return {} JSON valid script for example, which is often required to populate charts.
You can find that when editing the Loop of a view with the Wizard, it's named "List output"