0
내가 지금처럼 내 축의 폭을 업데이트하기 위해 노력하고있어 변화 폭 :d3.js - 업데이트 축과 경로
제로 폭초기 설정 :
var x2 = d3.scale.linear()
.domain([0, 10])
.range([0, 0])
.clamp(true);
svg.append("g")
.attr("class", "x axis2")
.attr("transform", "translate(0," + height/2 + ")")
.call(d3.svg.axis()
.scale(x2)
.orient("bottom")
.tickFormat(function(d) { return d; })
.tickSize(0)
.tickPadding(12))
.select(".domain")
.select(function() { return this.parentNode.appendChild(this.cloneNode(true)); })
.attr("class", "bar-highlight");
나중에 내가 업데이트 할 경로의 너비 (멋진 전환으로) 좋을 것입니다. 이 answer에서 제안처럼 나는 행운과 그것을 시도 :
x2 = d3.scale.linear()
.domain([0, data.page_count])
.range([0, 15])
.clamp(true);
d3.selectAll("g.x.axis2")
.call(x2);