Skip to content

Bar Chart offset property Does not work with time axis type #10215

@jmtimko5

Description

@jmtimko5

Expected behavior

According to the documentation, the offset property of a scale on a bar chart should prevent the first and last bar on the chart from being cut off. The docs actually say this is true by default.

Current behavior

First and last bar are cut in half, even when offset is explicitly specified as true.

Reproducible sample

https://codesandbox.io/s/bar-chart-offset-issue-ofkyer

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

This primarily seems to happen with every scale type on the x-axis that is not category. This makes bar charts not usable for any axis type outside of category axis in my product.

chart.js version

v3.5.1

Browser name and version

Chrome

Link to your project

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions