Proper way to draw gridlines

前端 未结 6 1446
闹比i
闹比i 2020-12-08 04:11

Okay, I\'m starting to get a little more familiar with D3 but am still a little hazy on some things. I\'m now trying to draw grid lines but am realizing that I may be hackin

6条回答
  •  醉梦人生
    2020-12-08 04:52

    You could just use innerTickSize, instead of tickSize:

                var xAxis = d3.svg.axis()
                        .scale(xScale)
                        .orient("bottom")
                        .ticks(1)
                        .innerTickSize(-h);
    

提交回复
热议问题