[Chartjs]-Chartjs Stacked bar chart not displaying correctly

1๐Ÿ‘

โœ…

I think a solution is to specify a value for the y axis anyway.

{
    "y": 0,
    "x": "2017-12-22 08:59"
}

The resulting dataset is:

[{
    "data": [{
        "y": 2,
            "x": "2017-12-22 08:59"
    }, {
        "y": 18,
            "x": "2017-12-22 09:00"
    }],
    "backgroundColor": "#32AA09",
    "label": "7726bj0dhtnmt"
    }, {
    "data": [{
        "y": 0,
            "x": "2017-12-22 08:59"
    }, {
        "y": 2,
            "x": "2017-12-22 09:00"
    }],
    "backgroundColor": "#CF5A26",
    "label": "0ks4u5nywjbdj"
    }, {
    "data": [{
        "y": 0,
            "x": "2017-12-22 08:59"
    }, {
        "y": 4,
            "x": "2017-12-22 09:00"
    }],
    "backgroundColor": "#DA43AA",
    "label": "1mnbsygj75jvx"
    }, {
    "data": [{
        "y": 0,
            "x": "2017-12-22 08:59"
    }, {
        "y": 2,
            "x": "2017-12-22 09:00"
    }],
    "backgroundColor": "#5200A0",
    "label": "39ymdt11ybwhz"
    }, {
    "data": [{
        "y": 0,
            "x": "2017-12-22 08:59"
    }, {
        "y": 2,
            "x": "2017-12-22 09:00"
    }],
    "backgroundColor": "#925E44",
    "label": "4v1whmzv76j2z"
    }, {
    "data": [{
        "y": 0,
            "x": "2017-12-22 08:59"
    }, {
        "y": 2,
            "x": "2017-12-22 09:00"
    }],
    "backgroundColor": "#477BD4",
    "label": "5sfyujuhwbj9n"
    }, {
    "data": [{
        "y": 0,
            "x": "2017-12-22 08:59"
    }, {
        "y": 4,
            "x": "2017-12-22 09:00"
    }],
    "backgroundColor": "#272755",
    "label": "6x0zvf2mw8t6g"
    }, {
    "data": [{
        "y": 0,
            "x": "2017-12-22 08:59"
    }, {
        "y": 2,
            "x": "2017-12-22 09:00"
    }],
    "backgroundColor": "#F581E0",
    "label": "7kpk62m5n8j9q"
    }, {
    "data": [{
        "y": 0,
            "x": "2017-12-22 08:59"
    }, {
        "y": 20,
            "x": "2017-12-22 09:00"
    }],
    "backgroundColor": "#4128A8",
    "label": "7mwz4m103nn1k"
}];

Leave a comment