sin*_*rba 4 javascript highcharts
我在控制台中出现此错误:
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.
Run Code Online (Sandbox Code Playgroud)
在文档中找不到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)
}]
}
Run Code Online (Sandbox Code Playgroud)
这是组件:
return (
<HighchartsReact
highcharts={Highcharts}
options={currentOptions}
immutable={true}
callback={props.callback}
/>
);
Run Code Online (Sandbox Code Playgroud)
自 Highcharts v10.1.0 (2022-04-29) 起添加了该警告
变更日志: https: //www.highcharts.com/blog/changelog/
要禁用辅助功能,请设置:
accessibility: {
enabled: false
}
Run Code Online (Sandbox Code Playgroud)
现场演示: http://jsfiddle.net/BlackLabel/mvnjskqr/
API 参考: https: //api.highcharts.com/highcharts/accessibility.enabled
| 归档时间: |
|
| 查看次数: |
6223 次 |
| 最近记录: |