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.

x-axis time stamps configuration

See original GitHub issue

@leeoniya do you mind explaining what is the 3rd column in the values array when customizing time formatting as described here https://github.com/leeoniya/uPlot/tree/master/docs#axis--grid-opts ?

values: [
  [3600 * 24 * 365,    "{YYYY}",               7,   "{YYYY}"                    ],
  [3600 * 24 * 28,     "{MMM}",                7,   "{MMM}\n{YYYY}"             ],
  [3600 * 24,          "{M}/{D}",              7,   "{M}/{D}\n{YYYY}"           ],
  [3600,               "{h}{aa}",              4,   "{h}{aa}\n{M}/{D}"          ],
  [60,                 "{h}:{mm}{aa}",         4,   "{h}:{mm}{aa}\n{M}/{D}"     ],
  [1,                  "{h}:{mm}:{ss}{aa}",    4,   "{h}:{mm}:{ss}{aa}\n{M}/{D}"],
],

Also - what is the relation between values and the _timeAxisStamps?

I went through the code but there’s plenty to digest there 😃

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
leeoniyacommented, Sep 16, 2020

1.2.0 is published.

1reaction
leeoniyacommented, Sep 15, 2020

the formatter goes through a selection process based on the axis splits spacing. this s line will get selected when the split spacing is >= 1s but less than the line above it (1min). that’s what [0] is.

next, it will go through a selection process of whether to render the default tick format [1] or a more detailed rollover tick format [2]-[7] which will get appended (due to [8]) to the default tick format.

the first tick on the axis will always be a rollover tick because there’s no prior context. the rest will track rollovers and modify which format to use dynamically based on what rolls over (year, month, day, etc…).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use timestamp as chart's x-axis? - python
I would like to set the datetime as my x-axis but seems like Bokeh can't show this chart correctly. Does anyone have a...
Read more >
Using a date/time scale
In this section we will show a very common use case where the x-axis have the unit of timestamps and where the start...
Read more >
Reading time stamp and displaying on X-axis on XY graph
Hi, I am trying to build a XY graph. On X-axis I need to display the time stamp( thats actually number of seconds...
Read more >
Timestamps, Time Zones, Time Ranges, and Date Formats
Learn how Sumo Logic manages timestamps, time zones, time ranges, and dates, and the configuration options that are available.
Read more >
Show timestamp values but grouping in x axis
You need to setting 'sort by' x axis fields before turn off this option, then label will been expanded to multiple rows. Operation...
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