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

How do the simple line examples expect the time to be parsed? #11

Open
fresh5447 opened this issue Sep 5, 2017 · 0 comments
Open

How do the simple line examples expect the time to be parsed? #11

fresh5447 opened this issue Sep 5, 2017 · 0 comments

Comments

@fresh5447
Copy link

Looking at the example line_garbage_zoom.js (and many other line examples). It looks like the date needs to be parsed:
var parseDate = d3.time.format("%YM%m").parse;

And the parser is used like so:

    x = function(d) {
      return parseDate(d.month);
    }

The problem, however, is I do not believe d3 has a time method, so I wonder if this example is outdated.

Here is how I import D3
import * as d3 from 'd3'

When I inspect the import it has methods available such as timeParse and timeMonths , (no time) and I can not quite parse the time how the line graph expects it.

Am I right in thinking that d3.time is no longer available? Every example in the simple/line folder uses this time parser so I would really like to figure it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant