score:0

Accepted answer

i've found a solution to my problem. the issue was that i was trying to create some space between my datasets and my datas attribute y doesnt start and end at 0. therefor i added two extra datapoints in each dataset with a borderwidth of 3 and bordercolor that matches the backgroundcolor of the chart. each extra added datapoint will have a y with the value of 0. an example of adding a dataset to my chart is below.

chart.data.datasets.push({
            fill: true,
            backgroundcolor: gradient,
            borderwidth: 3,
            bordercolor: '#333',
            data: [
            {
                x: startxvalue,
                y: 0
            },
            {
                x: startxvalue,
                y: starty,
                .. other attributes
            },
            {
                x: newentryxend,
                y: endy,
                .. other attributes
            },
            {
                x: newentryxend,
                y : 0
            }]
        });

score:0

any reason why you can wanted to keep the same background colors for ,

why cant you try as below

demo

fill: true,
backgroundcolor: 'red',

Related Query