Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colours used: ticks to match bin boundaries #58

Open
5 tasks done
rolyp opened this issue Nov 12, 2021 · 3 comments
Open
5 tasks done

Colours used: ticks to match bin boundaries #58

rolyp opened this issue Nov 12, 2021 · 3 comments
Assignees
Labels
design-challenge There may not be an easy solution to this problem

Comments

@rolyp
Copy link
Collaborator

rolyp commented Nov 12, 2021

Y-axis ticks should match bin boundaries. Might have to draw these manually, since there isn't a way to get at the bin boundaries (unless you set them yourself, in which case you know them already).

  • experiment with using mark_tick and encode to draw ticks
  • set ticks to reasonable width ❌ minimum width is too thick 🤦
  • try mark_line ❌ same problem with line thickness
  • try strokeWidth instead of thickness ❌ same problem
  • try mark_rect and set y2 to y + 1y is domain units, so 1 typically inappropriate value
@rolyp rolyp added the feature label Nov 12, 2021
@rolyp rolyp self-assigned this Nov 12, 2021
@rolyp rolyp added bug and removed feature labels Nov 12, 2021
@rolyp rolyp added the design-challenge There may not be an easy solution to this problem label Nov 18, 2021
@rolyp
Copy link
Collaborator Author

rolyp commented Nov 18, 2021

@edwardchalstrey1 Just to report on my experiments with this last week: I was able to use mark_line and mark_tick to implement our own tick marks. However, using strokeWidth or thickness I wasn't able to make the line thin enough for it to serve as a tick mark. My guess is that these are intended as "plotting" features, not axis-rendering features, and by design are drawn with a minimum thickness.

I also tried mark_rect to draw a "small rectangle" in lieu of a tick. This doesn't quite work either: it's not clear what to set the height of the rectangle to be (which must be expressed in units corresponding to the data domain). If it's too small, then the rectangle doesn't render at all (it doesn't have a minimum visual height of, say, 1 pixel).

Summary: this may also turn out to be a hard-to-resolve problem.

@edwardchalstrey1
Copy link
Member

edwardchalstrey1 commented Nov 22, 2021

have removed bug as this doesn't break anything, think design-challenge more appropriate here!

@rolyp
Copy link
Collaborator Author

rolyp commented Nov 22, 2021

@edwardchalstrey1 Makes sense to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-challenge There may not be an easy solution to this problem
Projects
None yet
Development

No branches or pull requests

2 participants