Place Clicks/Add Points on Heat Maps With JavaScript | XM Community
Skip to main content
Solved

Place Clicks/Add Points on Heat Maps With JavaScript

  • November 5, 2018
  • 1 reply
  • 89 views

How do I reference/change the coordinates of clicks in heat map questions? I want to make a hidden heat map question that automatically clicks on certain predefined coordinates on an image, depending on other questions. Example: Respondents answer questions about tables in a restaurant where I basically I determine whether or not a table is "ok". If it's not, I want a hidden heat map question to place clicks (sadly only up to 10) on the heat map, where each pair of coordinates correspond to a table. I want to display the heat map in my reports and see critical tables being highlighted there. Reading coordinates of a heat map question is done by this code: ${q://QID2/ChoiceNumericEntryValue/1/X} but how do I change it? I have used something similar, but the code looked like this: jQuery("#"+this.questionId+" .InputText").val("some string") I suppose I have to replace ".InputText" with something else, but I don't know what. How could I find out without asking here? Best Regards Edit: A column name for a coordinate in exported data looks like this: Q2_1_x This probably means I will need to tweak my query anyway. A value in the data tab for this question looks like this: ["POINT (318 41)","POINT (286 24)","POINT (529 112)"] This is an array of points, so does this mean I can add (or remove) points to an existing array or do I have to pass a whole array to Qualtrics? Any help appreciated.

Best answer by TomG

You can't. The heatmap image is an SVG, so you have no control over it with JavaScript.
View original

1 reply

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5935 replies
  • Answer
  • November 5, 2018
You can't. The heatmap image is an SVG, so you have no control over it with JavaScript.

Leave a Reply