Skip to content

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

@fresh5447

Description

@fresh5447

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions