Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
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 - Fatal编程技术网

D3.js中的换行符 d3.select('svg g.chart#countryLabel')) .html(d.Patient_id+“”+说明[xAxis]+':“+d[xAxis]+””+ 说明[Axis]+':'+d[yAxis]) .transition() .style('opacity',1);

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

我无法把线插入图表。现在我该怎么办?

您想添加分隔符还是删除分隔符?我想添加换行符Lars链接到的示例显示了如何手动将文本换行到多行上。检查其中的
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);