D3.js中的换行符 d3.select('svg g.chart#countryLabel')) .html(d.Patient_id+“”+说明[xAxis]+':“+d[xAxis]+””+ 说明[Axis]+':'+d[yAxis]) .transition() .style('opacity',1);
我无法把线插入图表。现在我该怎么办?您想添加分隔符还是删除分隔符?我想添加换行符Lars链接到的示例显示了如何手动将文本换行到多行上。检查其中的D3.js中的换行符 d3.select('svg g.chart#countryLabel')) .html(d.Patient_id+“”+说明[xAxis]+':“+d[xAxis]+””+ 说明[Axis]+':'+d[yAxis]) .transition() .style('opacity',1);,svg,d3.js,Svg,D3.js,我无法把线插入图表。现在我该怎么办?您想添加分隔符还是删除分隔符?我想添加换行符Lars链接到的示例显示了如何手动将文本换行到多行上。检查其中的wrap功能。将HTML嵌套到SVG中的方法也可能有效,但我们需要更多的上下文来帮助您。您是否有图表(数据、js和html)中的一个小示例可供我们查看?还可以看到以下问题:,即html()仅在您仅输出html时有用,而不是在SVG中嵌套html。 d3.select('svg g.chart #countryLabel') .html(d.Patie
wrap
功能。将HTML嵌套到SVG中的方法也可能有效,但我们需要更多的上下文来帮助您。您是否有图表(数据、js和html)中的一个小示例可供我们查看?还可以看到以下问题:,即html()
仅在您仅输出html时有用,而不是在SVG中嵌套html。
d3.select('svg g.chart #countryLabel')
.html(d.Patient_id+"<br/>"+descriptions[xAxis]+':'+d[xAxis]+"<br/>"+
descriptions[Axis]+':'+d[yAxis])
.transition()
.style('opacity', 1);