Comments in visualizations

When building visualizations - I find that if I comment after the var template - these comments show up as text in the visualization. Yet I download others visualizations and see they comment items - and these do not show up as visualizations.

I use the standard commenting function of two “/”
// Style the button

But this shows as text. Does anyone know what I am doing wrong?

Hi @thomas.zdon,

Do you have an example of what you’re trying to do? If you comment before closing the template string then they’ll end up showing in the visualization, if you comment after the last ` it should be fine.

I found the answer. Under var template but before scripts you have to use html notation for comments. Such as <! >. Then they don’t apear as text in the visualization. Strange though that I’ve run others viz’s with comments using the // notation and do not see theirs as text.

<!--This is a comment in the html portion. The below places the logo on the page-->


<div class="image">
<a href= "https://documenter.getpostman.com/view/4545836/SW14VcNz? 
version=latest#8b44ab50-3ad0-4c07-8deb-e86b9512a9f8">
    <img id ="logo" img src="${pm.variables.get("summa")}" alt="SummaFT" width=170 >
  </div></a>
1 Like