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.

Bar chart for full hour|day|any datetime timeranges

See original GitHub issue

Is your feature request related to a problem? Please describe. I am struggling to display a bar chart (with x being a datetime axis and y a value axis) in which each bar represents a value for a full-hour time range e.g. “we had 123 visitors in between 9am to 10am”. The bars are centered on the full hour, which is confusing for users (Does 10 am mean it’s from 10 to 11am or from 9 to 10am or from 9:30 to 10:30?)

Describe the solution you’d like Either a) let me specify a visual alignment property like barHorizontalAlignment: as one of center, left, right or b) let me specify a start and end timerange for each bar. Please see the following image for explanation:

Codepen to play around with: https://codepen.io/cb109/pen/qBbqgvx?editors=1010

apexcharts_bar_full_hours

Describe alternatives you’ve considered I have tried visualizing this using other chart types like area, but I’d really prefer having some visual “gap” between values so they are easier to distinguish, and that does not seem to be possible with the area chart.

Additional context Another example on how Google visualizes values in between full hours, that’s the kind of diagram I am trying to produce:

google_full_hours_diagram

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
junedchhipacommented, Jun 18, 2020

Valid points, I will consider this. Btw, I like your sketch!

1reaction
LukasMendezcommented, Nov 8, 2022

Any news regarding this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to create a bar chart with floating bars to show time ranges?
Easiest way probably is to use a horizontal, stacked bar chart: you need your data in two columns: start and duration; select it,...
Read more >
matplotlib bar chart with dates - python - Stack Overflow
The general method would be to use set_xticks and set_xticklabels , but I'd like something that can handle time scales from a few...
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