Skip to content

Need help resolving issues with bar chart #4701

Answered by ckifer
softwareDev-git asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! Thanks for making the codesandbox!

scale="time" and type="category" are incompatible. d3 scale expects numerical data when using a timescale, or else data cannot be interpreted as a date. If you remove scale="time" the categorical chart works fine and is just that, a list of categories. As long as your data is in order and you don't need to interpolate this should work for your case. This is generally preferred with bar charts.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@ckifer
Comment options

@softwareDev-git
Comment options

@softwareDev-git
Comment options

@ckifer
Comment options

@softwareDev-git
Comment options

Answer selected by softwareDev-git
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