Skip to content

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

@cb109

Description

@cb109

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions