用文本附加'rect'不一致

时间:2014-05-11 12:26:39

标签: d3.js

有关为什么第一个矩形缺少文本而其他人都没有问题的想法?

http://jsfiddle.net/sjp700/bhwpu/

vis = d3.select("#chart")
         .append('svg')
         .attr('width', width + margin.right + margin.left)
          .attr('height', height + margin.top + margin.bottom)
        .style("fill", "pink")
        .attr('class', 'chart');

vis.append("g") // container element
       .attr("class", "x axis") // so we can style it with CSS
       .attr("transform", "translate(0," + height + ")") // move into position
       .call(xAxis); // add to the visualisation

//add in the y axis
vis.append("g") // container element
    .attr("class", "y axis") // so we can style it with CSS
    .call(yAxis); // add to the visualisation

0 个答案:

没有答案