Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bar chart for full hour|day|any datetime timeranges #1688

Closed
cb109 opened this issue Jun 18, 2020 · 10 comments
Closed

Bar chart for full hour|day|any datetime timeranges #1688

cb109 opened this issue Jun 18, 2020 · 10 comments
Labels
bar issue related to bar charts feature-request New feature or request no-issue-activity xaxis

Comments

@cb109
Copy link

cb109 commented Jun 18, 2020

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

@cb109
Copy link
Author

cb109 commented Jun 18, 2020

https://apexcharts.com/docs/options/xaxis/ tickPlacement: 'between' would solve my problem, but it

only works for xaxis.type: category charts and not for datetime charts.

@cb109 cb109 changed the title Bar chart for full hour|day|any timeranges Bar chart for full hour|day|any datetime timeranges Jun 18, 2020
@junedchhipa
Copy link
Contributor

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

@junedchhipa junedchhipa added feature-request New feature or request bar issue related to bar charts xaxis labels Jun 18, 2020
@cb109
Copy link
Author

cb109 commented Jun 18, 2020

@junedchhipa Thanks for your consideration. All kudos go towards this fine drawing tool: https://excalidraw.com 👋

@github-actions
Copy link

github-actions bot commented Oct 7, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@LukasMendez
Copy link

Any news regarding this?

@Jopinder
Copy link

Any progress on this?

@StreborStrebor
Copy link

I would love to see this, fixed, so the bar starts exactly on the hour, not centered on the hour.
Also, because the now-line IS exactly on the X-axis where it should be.

@Vitek-1977
Copy link

I worked around this by shifting the chart by 30 minutes now the left side of the column fits the tickmark.

@S474N
Copy link

S474N commented Oct 10, 2023

+1!

Please REOPEN!

@xysun
Copy link

xysun commented Jul 12, 2024

this also breaks the zoom behavior -- in the drawn example, if you zoom over 9:00, the returned time range is actually 8:30 - 9:30, when i need 9:00 - 10:00.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bar issue related to bar charts feature-request New feature or request no-issue-activity xaxis
Projects
None yet
Development

No branches or pull requests

8 participants