Stefan Schneider
Stefan Schneider

Reputation: 593

Drawing a Multi Line Chart from nested data

I'm trying to draw a simple multi line chart from nested data. I'm facing no javascript errors but there is no chart drawn. Even the x-Axis is missing but I cannot find the reason why. I have made an example here with only one user, the goal would be to have a multitude of users.

http://blockbuilder.org/con-ssc/56b1f647f43b03e8ad5fc923a551b0ed

Upvotes: 0

Views: 53

Answers (1)

Mark
Mark

Reputation: 108512

A few things:

  1. I can't make any sense out of your parseTime function. You parse it, then format it to a string, then parse it again, why?
  2. Your x-axis doesn't show because your SVG needs to be sized to the full width/height, not width/height minus margins.
  3. Your data is not-sorted by the x-axis variable.
  4. Your y scale domain is not being properly set.

Fixing all these problems results in this here.

Upvotes: 1

Related Questions