Tony Mathew
Tony Mathew

Reputation: 910

Remove background color in chartjs line chart

I have setup my line chart like this:
I want to remove the green color from the background and make it transparent

How can I remove the green color from the background and make it transparent

Upvotes: 2

Views: 3345

Answers (1)

Sandeep Patel
Sandeep Patel

Reputation: 5148

Set fill property as false in Dataset options

 datasets: [
    {
        label: "",
        fill: false,
        .....
        .......
        data: [65, 59, 80, 0, 56, 55, 40],
    }
]

You can refer this fiddle: https://jsfiddle.net/red_stapler/u5aanta8/1/

Also Reffer chartJs Docs https://www.chartjs.org/docs/latest/charts/line.html

Upvotes: 5

Related Questions