question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ResponsiveLine - Is there a way to handle x value of epochtime?

See original GitHub issue

Is your feature request related to a problem? Please describe. Is there a type mapping of epoch time for xScale attribute for Line graph? Below is the array of data object where x holds value of type epoch time:

"data": [{x: 1591808400000, y: 0.01913120654800059}
{x: 1591815600000, y: 0.01980695317959469}
{x: 1591822800000, y: 0.015162935047661271}
{x: 1591830000000, y: 0.016875782812190994}
{x: 1591837200000, y: 0.04286819136007071}]

Describe the solution you’d like Does the solution exists for xScale and axisBottom? If not how can I achieve this?

Describe alternatives you’ve considered I have not found any direct solution for epoch type.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
plouccommented, Sep 5, 2020

@Deliaz, the issue when you enable useMesh is that x values are now Date objects, which cannot be rendered as is, please add xFormat="time:%d.%b %H:%M", this is gonna fix it.

2reactions
wyzecommented, Aug 31, 2020

@paigewilliams Sorry about that. I think I cleaned up some of my sandboxes and this one got deleted. Based on the issue I have recreated one here: https://codesandbox.io/s/spring-violet-rqi02

Read more comments on GitHub >

github_iconTop Results From Across the Web

Beautiful and Responsive Line Charts Using Nivo, React and ...
The X -axis will display time values, and since our data has the time value as the number of seconds elapsed since the...
Read more >
Solved: How to convert epoch time to human readable format...
the function strftime(X,Y ) takes an epochtime value, X, as the first argument and renders it as a string using the format specified...
Read more >
Epoch Converter - Unix Timestamp Converter
Easy epoch/Unix timestamp converter for computer programmers. Includes epoch explanation and conversion syntax in various programming languages.
Read more >
Get current time in seconds since the Epoch on Linux, Bash
date doesn't seem to offer that option. Is there an easy way? linux · bash · datetime · Share.
Read more >
How do I get the current Unix time in milliseconds in Bash?
This: date +%s. will return the number of seconds since the epoch. This: date +%s%N. returns the seconds and current nanoseconds.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found