Skip to content

Bug stacked bar #5141

Description

@ybarbaria

Description
I noticed this bug [I think it would be a BUG], when I set line bar stacked with only one element and it's data = [-25.6], the chartjs draw only one bar horizontally extended.

Expected Behavior
Bar stacked to the bottom

image

Current Behavior
The bar is extended horizontally.

image

Possible Solution
I fix this bug in my code by setted the data with empty values.. data = [-25.6,,,,]

Steps to Reproduce (for bugs)

Configuration of the dataset=>

backgroundColor:"#f57f17"
borderWidth:1
data:[-25.6]
label:"Order Sell"
type:"bar"
yAxisID:"y-axis-0"

Configuration of the y axes =>

 gridLines: {
        display: true     }

Configuration of the x axe =>

stacked:true
    gridLines: {
        display: true, 
        offsetGridLines: true
     }

Environment
Chartjs 2.6.0/2.7.0/2.7.1
Version 63.0.3239.132
Windows 10 64bit

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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