How to make responsive d3js line graph along with tooltip position

174 views
Skip to first unread message

Sushma Sagar

unread,
Oct 6, 2015, 2:38:06 PM10/6/15
to d3-js
How can I make responsive line graph by maintainig aspectratio? I need to maintain consistent tooltip position, And the responsive graph should display less ticks when window resizes. Can any one please help me in this? 

I tried this example stackoverflow.com/questions/9400615/…. width is responsive but not the height. When I refresh the page it adjusting the width and height. and also I have tooltips, I am not sure how to position them when width and height changes.

farrelld...@gmail.com

unread,
Oct 7, 2015, 10:27:16 AM10/7/15
to d3-js
Sushma,

For varying the number of ticks on resizing you might want to take a look at http://bl.ocks.org/curran/779f2db53e1e365e98d4, by Curran Kelleher. It's a nice example of how to do this.

Dean
Reply all
Reply to author
Forward
0 new messages