我对群集的d3.js有问题.它给了我以下错误:
错误:属性变换的值无效="translate(undefined,undefined)"
我不知道为什么这会给我.
码:
var loadd3 = function () {
function elbow(d, i) {
return "M" + (d.source.y + 100) + "," + d.source.x + "V" + d.target.x + "H" + (d.target.y + 100);
}
var width = (window.innerWidth - 100),
height = (window.innerHeight - 20);
var cluster = d3.layout.cluster()
.size([height, width - 160]);
var diagonal = d3.svg.diagonal()
.projection(function (d) {
return [d.y, d.x];
});
d3.select("svg").remove();
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height)
.append("g")
.attr("transform", "translate(40,0)");
var root = …Run Code Online (Sandbox Code Playgroud) <p>The dentist's office opens at <time>8:00</time>.</p>
<p>The dentist's office opens at 8:00.</p>
Run Code Online (Sandbox Code Playgroud)
如果这两个段落标记显示相同的内容,为什么需要时间标记?这可能是一个总的noob问题,但我正在做一个整洁的项目.
测试:
牙医诊所于8:00开放.
牙医诊所于8:00开放.
我目前有一个表,其中包含一些值,2个输入字段和该表中每行的按钮.我想要发生的是,当我按下第三行中的按钮时,第三行中的输入字段将被禁用.其他行应保持不受影响.不幸的是,由于程序的性质,无法在输入和按钮中添加ID.
有谁知道这个问题的好方法?
<tr>
<td>Text A</td>
<td>Text B</td>
<td><input class="editable"></td>
<td>Text C</td>
<td><input class="editable></td>
<td>Text D</td>
<td><button class="disableInput">OK</button></td>
<tr>
Run Code Online (Sandbox Code Playgroud)
我有~40行这样的
此外,由于表不断地自动保存到数据库(用于输入),表每0.5秒刷新一次