Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript ngx泳道和html2canvas-图像背景即使设置为null或默认值也不能透明_Javascript_Css_Angular_Html2canvas_Html2pdf - Fatal编程技术网

Javascript ngx泳道和html2canvas-图像背景即使设置为null或默认值也不能透明

Javascript ngx泳道和html2canvas-图像背景即使设置为null或默认值也不能透明,javascript,css,angular,html2canvas,html2pdf,Javascript,Css,Angular,Html2canvas,Html2pdf,我正在玩ngx泳道图表,并将它们转换成pdf格式。 在以下示例中: 每当我尝试将背景更改为某种颜色时,它都会保持黑色 我试过: 使用backgroundColor:undefined,backgroundColor:null, 背景:未定义,背景:null(也尝试使用透明属性)。上面你可以看到确切的代码。 还尝试在css中设置背景色 html2canvas(chart, { height: 500, width: 1000, scale: 3,

我正在玩ngx泳道图表,并将它们转换成pdf格式。 在以下示例中:

每当我尝试将背景更改为某种颜色时,它都会保持黑色

我试过:

使用backgroundColor:undefined,backgroundColor:null, 背景:未定义,背景:null(也尝试使用透明属性)。上面你可以看到确切的代码。 还尝试在css中设置背景色

html2canvas(chart, {
        height: 500,
        width: 1000,
        scale: 3,
        backgroundColor: null,
        logging: false,
        onclone: (document) => {
        document.getElementById('chart').style.visibility = 'visible';
}
无论何时我尝试渲染的背景色都是黑色!有没有人面对同样的问题,成功地摆脱了黑色背景

任何建议,谢谢