links.style.marginBottom = '1rem';
var linkSVG = document.createElement('a');
linkSVG.href = '#';
- linkSVG.textContent = 'Download chart (SVG)';
+ linkSVG.textContent = '{/literal}{ts escape="js"}Download chart (SVG){/ts}{literal}';
linkSVG.addEventListener('click', e => {
e.preventDefault();
e.stopPropagation();
}
var linkPNG = document.createElement('a');
linkPNG.href = '#';
- linkPNG.textContent = 'Download chart (PNG)';
+ linkPNG.textContent = '{/literal}{ts escape="js"}Download chart (PNG){/ts}{literal}';
linkPNG.addEventListener('click', e => {
e.preventDefault();
e.stopPropagation();
.turnOnControls(true)
.renderTitle(true);
}
- // Delay rendering so that animation looks good.
- window.setTimeout(() => {
- div.appendChild(heading);
- div.appendChild(chartNode);
- div.appendChild(links);
+ div.appendChild(heading);
+ div.appendChild(chartNode);
+ div.appendChild(links);
- dc.renderAll();
- }, 1500);
+ dc.renderAll();
}
</script>
{/literal}