作者:小哥脾气 | 来源:互联网 | 2023-02-03 13:57
我正在使用Highcharts,我在Pie Charts中遇到阿拉伯语问题.它适用于英语.我试过rtl<r但它不起作用.
var chart = new Highcharts.Chart({chart:{renderTo:'container',type:'pie'},
title: {
text: '?? ???????!',
useHTML: true, //bug fixed `IE9` and `EDGE`
style: {
fontSize: '20px',
fontFamily: 'tahoma',
direction: 'rtl',
},
},
tooltip: {
useHTML: true,
style: {
fontSize: '20px',
fontFamily: 'tahoma',
direction: 'rtl',
},
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
y: -5, //Optional
format: '\u202B' + '{point.name}', // \u202B is RLE char for RTL support
style: {
fontSize: '15px',
fontFamily: 'tahoma',
textShadow: false, //bug fixed IE9 and EDGE
},
},
},
},
series: [{
name: '????',
colorByPoint: true,
data: [{
name: '????? ??????',
y: 56.33
}, {
name: '?????? ?????',
y: 24.03,
}, {
name: '?????? ?????',
y: 10.38
}, {
name: '??????!',
y: 4.77
}, {
name: '??????!',
y: 0.91
}, {
name: '?????!',
y: 0.2
}],
}],
});
示例在这里https://jsfiddle.net/NabiKAZ/h4kv0t9v/4/
1> Deep 3015..:
在plotOption
加useHTML: true,
叉小提琴
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
y: -5, //Optional
format: '\u202B' + '{point.name}', // \u202B is RLE char for RTL support
style: {
fontSize: '15px',
fontFamily: 'tahoma',
textShadow: false, //bug fixed IE9 and EDGE
},
useHTML: true,
},
//showInLegend: true,
},
},