palantir/plottable

.entitiesIn() excluding first entity on area plot

timwis opened this issue · 4 comments

Bug report

It appears that the Area plot's entitiesIn() method excludes the left-most entity. For it to be included, you must put your cursor slightly before it. I'm not confident my users could figure that out :-/ This issue seems to be limited to Area plots.

I appreciate your time if anyone can help!

Live example URL: https://codepen.io/timwis/pen/MOMgaQ?editors=0010
Better live example URL: https://codepen.io/timwis/full/MOMgaQ/

Steps to repro:

  1. Open your browser javascript console
  2. Drag a selection on the plot from left to right
  3. Notice that what is logged (the results of .entitiesIn() excludes the month you started dragging on
  4. Drag again, but this time, start your selection slightly to the left of the month you want to start at
  5. Notice that if you do this right-to-left, it's still the left one that's excluded

Expected behavior

Console logs all of the months you touched

Actual behavior

Console logs every month except the left-most one

My theory is that the area plot treats each value as a thin vertical line above the tick on the scale, and unless you touch it, it's not included by entitiesIn(). But I've traced it to _lineIntersectsBox and @ztsai appears to have accounted for this possibility already :-/

Hey folks, any way to get advice on this? Unfortunately my project has stalled because of this bug :-(

Hi! Just checking in on this. I've put the project on the shelf, unfortunately. Any chance of assistance here?

The full-screen demo illustrates the impact a little better. You can clearly select "july" and have it not show up in what's logged to the console, unless you start before the line to the left of july.