この質問を Google グループhttps://groups.google.com/forum/?fromgroups#!topic/d3-js/DYiVeC544wsにも投稿しましたが、ここでヘルプの質問をすることを好むことがわかりました。最初の列の邪魔にならないように、グラフの左側に y 軸を移動するのに問題があります。私が話していることがわかるように、Google グループに画像を提供しました。
軸を作成するコードは次のとおりです。
var MARGINS = {top: 20, right: 20, bottom: 20, left: 60}; // margins around the graph
var xRange = d3.scale.linear().range([MARGINS.left, width - MARGINS.right]), // x range function
yRange = d3.scale.linear().range([height - MARGINS.top, MARGINS.bottom]), // y range function
xAxis = d3.svg.axis().scale(xRange).tickSize(16).tickSubdivide(true), // x axis function
yAxis = d3.svg.axis().scale(yRange).tickSize(10).orient("right").tickSubdivide(true); // y axis function
// create the visualization chart
var vis = d3.select("#chart")
.append("svg")
.attr("width", width)
.attr("height", height + margin);
// add in the x axis
vis.append("svg: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("svg:g") // container element
.attr("class", "y axis") // so we can style it with CSS
.call(yAxis); // add to the visualisation