高图:将鼠标悬停在LWC组件中的图例抛出错误上

问题描述

当鼠标悬停在图例上时,它将引发错误,例如“未捕获的TypeError:无法构造'MouseEvent':成员sourceCapabilities的类型不是InputDeviceCapabilities。 朝https://salesforce.lightning.force.com/auraFW/javascript/7p9HLMpgnV2GO9MqZhXGUw/aura_prod.js:37:97048"

代码

` Highcharts.chart(container,{ 图表:{ 类型:“派”, // backgroundColor:“#c9dbeb”, options3d:{ 已启用:true, 阿尔法:45, Beta:0 } }, 标题:{ 文字:“饼图”, 风格:{ 颜色:“黑色”, fontWeight:'bold', fontSize:'30px', fontFamily:“ calibri” } }, 学分:{ 启用:false }, 出口:{ 启用:false }, 工具提示:{ pointFormat:'{series.name}: {point.percentage:.1f}%' }, 辅助功能:{ 点:{ valueSuffix:'%' } }, plotOptions:{ 馅饼:{ allowPointSelect:true, 光标:“指针”, 深度:35, //大小:300, dataLabels:{ 风格:{ 宽度:“ 90px” }

                        enabled: true,distance: -60,borderRadius: 5,backgroundColor: 'black',borderWidth: 2,borderColor: '#AAA',alignTo: 'toPlotEdges',format: '<b>{point.name}</b><br>   {point.percentage:.0f} %'
                    },showInLegend: true,states: {
                        hover: {
                            enabled: false
                        }
                    }
                }
            },legend: {
                enabled: true,align: 'right',layout: 'vertical',verticalAlign: 'middle',symbolRadius: 0
            },series: [{
                type: 'pie',colorByPoint: true,data: [{
        name: 'Chrome',y: 61.41,sliced: true,selected: true
    },{
        name: 'Internet Explorer',y: 11.84
    },{
        name: 'Firefox',y: 10.85
    },{
        name: 'Edge',y: 4.67
    },{
        name: 'Safari',y: 4.18
    },{
        name: 'Other',y: 7.05
    }]
            }],},);

`

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)