letlines=text.replace(/.{60}\S*\s+/g,"$&@").split(/\s+@/)// rough splitting of text on the next space after 60 characters.
letd=d3.create('div')
.attr('class','text')
for(leti=0;i<lines.length;++i){
d.append('p')
.text(lines[i])
.attr('class',d=>(i%2)?'zip':'zap')
}
returnd.node()
}
<style>
.textp{margin:0;
font-size:'18px';
font-family:'Open Sans'}
.zap{text-decoration:underline#90202230;}
.zip{text-decoration:underlinedotted#90202240;}
</style>
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.