How to put only the minimum and maximum scale in D3 scale?

0

Creating the Scale:

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]));

Result:

WhatIwant:

Is it possible? How do I?

    
asked by anonymous 26.06.2015 / 16:05

1 answer

1

I was able to use axis.ticks (2);

    
26.06.2015 / 21:53