Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.
This repository was archived by the owner on May 18, 2019. It is now read-only.

using dates in linechart as x axis not working #338

@aTylerRice

Description

@aTylerRice

I've tried multiple things to get this worker even tried the solution in the other issue, but to no avail.

I have an x axis that is passing in unix dates in the x function like so:

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

then here is my line chart code:

var dateFormatter = d3.time.format("%d-%m-%Y");
tickDateFormatter = function(d) {
     console.log(d);
    return dateFormatter(new Date(d.x));
  }
<LineChart data={downloadChartDataPoints} chartSeries={chartSeries} x={x} xAxisTickCount={30}
  xAxisTickFormat={tickDateFormatter} />

I am still getting the x label output as the unix timestamp numbers rather than the formatted date. If I remove the x function from the props from linechart I get an error that says x function doesn't exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions