改变语言时HighChart问题

时间:2017-06-14 15:09:49

标签: jquery plugins charts highcharts jquery-plugins

我有一个多语言网站(ar-fr),我正在使用高图类型的馅饼,当我将语言从法语切换到阿拉伯语时,我得到了这个。有人有解决方案吗?

我无法在yAxis上使用Set opposite: true将其移至右侧 xAxis上的Set reversed: true使其从右向左流动 因为我有一个类型派,所以数据只是系列

ImageChart

我的代码:

<script type="text/javascript">

    var char = Highcharts.chart('containerPopulation', {
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false,
            type: 'pie'
        },
        title: {
            text: ''
        }
        ,
        tooltip: {
            headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
            pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y} / {point.percentage:.1f}%</b><br/>',
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                    style: {
                        color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
                    }
                }
            }
        },
        series: [{
                name: '',
                data: <?php echo $result ?>
            }]
    });

    char.series[0].name = "";
    $('.highcharts-credits').hide();

</script>

0 个答案:

没有答案