D3缩放如何删除刻度文本并保留刻度并保持最大值和最小值

时间:2015-06-26 19:10:14

标签: d3.js d3plus

创建比例:

   headers.forEach(function(d) {
                // Coerce values to numbers.
                jsonObj.forEach(function(p) {
                    y[d] = d3.scale.linear().domain(
                            d3.extent(jsonObj, function(p) {
                                return +p[d] || 0;
                            })).range([ h, 0 ]);
                    y[d].brush = d3.svg.brush().y(y[d]).on("brush", brush);
                });
            }); 


g.append("svg:g").attr("class", "axis").each(function(d) {
            d3.select(this).call(axis.scale(y[d]));

我想保留规模。

比例正在[0.0,0.1,0.2,...,1.0]

我想要这样的东西[0, - , - , - , - , - , - , - , - , - ,1]。

有可能吗?我怎么能这样做?

0 个答案:

没有答案