Skip to content

scaleBand w/ dates doesn't plot over entire range #1216

Answered by williaster
nvolungis asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks! I converted this to a discussion since it's a usage question not a visx issue. I'm not 100% sure I follow what you mean by "y values are cut in half ... cut by 1/3" but I tried to update the sandbox to make it more clear what's happening. what I did:

  • added a chart margin, otherwise it was hard to tell where things should be placed
  • added a y-axis to more clearly see what values are plotted
  • created two lines: a red line which doesn't account for scale bandwidth, and a blue one one which does. For lines you need to account for scale bandwidth because otherwise the coordinate returned by the band scale maps to the start of the band which is typical for bar chart implementations (wher…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@nvolungis
Comment options

Answer selected by nvolungis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1215 on May 14, 2021 20:28.