我在控制台中遇到此错误:
Highcharts warning: Consider including the "accessibility.js" module to make your chart more usable for people with disabilities. Set the "accessibility.enabled" option to false to remove this warning. See https://www.highcharts.com/docs/accessibility/accessibility-module.
在文档中找不到Set the "accessibility.enabled" option to false
。
这是我传递给组件的选项:
const optionNUsersPerService = {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: 'Utenti per servizio'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
accessibility: {
point: {
valueSuffix: '%'
}
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format: '<b>{point.name}</b>: {point.percentage:.1f} %'
}
}
},
series: [{
name: 'Utenti',
colorByPoint: true,
data: getDataUsersPerService(props.items)
}]
}
这是组件:
return (
<HighchartsReact
highcharts={Highcharts}
options={currentOptions}
immutable={true}
callback={props.callback}
/>
);
1条答案
按热度按时间xsuvu9jc1#
自Highcharts v10.1.0(2022年4月29日)起添加了警告
更改日志:https://www.highcharts.com/blog/changelog/
要禁用辅助功能,请设置:
现场演示:http://jsfiddle.net/BlackLabel/mvnjskqr/
API参考:https://api.highcharts.com/highcharts/accessibility.enabled