Actually yes, there is a way to do it, first you need to set a transparent background like this:
let color = cf.Color()
.theme({ background:'rgba(0,0,0,0)', font: 'black'}) // with this you make the chart background transparent
.palette(["#0095b7", "#a0b774", "#f4c658", "#fe8b3e"]);
myCart.set("color", color)
Then you need to set the styles of your chart element like this:
<div id="my-chart-id" style="background: linear-gradient(310deg, #2152ff, #21d4fd);"></div>