Could you please clarify the functions described below?
newViz = createTableauViz(containerDiv, url, options);
function listenForMarkSelection() { newViz.addEventListener(tableau.TableauEventName.MARKS_SELECTION, handleMarksSelection); }
function handleMarksSelection(marksEvent) { return marksEvent.getMarksAsync().then(displaySelectedMarks); }
function displaySelectedMarks(marks) {
var htmlOutput = "";
for (var index = 0; index < marks.length; index++) { var pairs = marks[index].getPairs(); htmlOutput += "<b>Mark " + index + ":</b><ul>"; for (var pairIndex = 0; pairIndex < pairs.length; pairIndex++) { var pair = pairs[pairIndex]; htmlOutput += "<li><b>Field Name:</b> " + pair.fieldName; htmlOutput += "<br/><b>Value:</b> " + pair.formattedValue + "</li>"; } } }