سؤال

Even if I set

 bChart.x(d3.scale.linear().domain([0, 1000]))

It shows x-axis ticks from -200 or so. I want to remove the negative marks. Please suggest.

هل كانت مفيدة؟

المحلول

I just figured out the problem. It was because of the X-axis padding that I was applying unknowingly to the bChart.

I reset the padding to zero and axis domain becomes as expected.

 bChart.xAxisPadding(0)
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top