Invert function for ordinal scale is not working

18 views
Skip to first unread message

Pranay Binju

unread,
Feb 6, 2018, 6:39:54 AM2/6/18
to d3-js
Hi,

I have a category axis created using scaleOrdinal().I have a requirement that when we brush, we zoom to corresponding location in which . However, since its invert doesn't exist, I used scaleQuantize() to find its invert of pixels and get respective domain values. But I am only getting 1st and last domain values on inverting and not the middle values. Can anyone help me with this???

Reference for invert funcition

Thanks.

Pranay Binju

unread,
Feb 6, 2018, 8:41:40 AM2/6/18
to d3-js
Edit: I got to know the problem. Now , I'm using scaleQuantile() instead of scaleQuantize(). But problem now, is we can't get invert of y-axis from that as it is sorting domain even if we reverse domain just like we do to range when we create y-axis. Is there any workaround for this??
Reply all
Reply to author
Forward
0 new messages