首页 > 解决方案 > 将 highchart 导出为图像阿拉伯文文本

问题描述

我正在尝试将 highchart 导出到图像,我的 highchart 在导出阿拉伯文本显示为问号后包含阿拉伯标签(标题),我尝试添加(useHTML)并将脚本编码更改为(utf8),它仍然显示为问号。

 var options = {
            chart: {
                style: {
                    fontFamily: 'arial'
                },
                height: 300,
                events: {
                    drilldown: function (e) {
                        generateDrillDownJSON(e, false);
                    },
                    drillup: function (e) {
                        generateDrillDownJSON(e, true);
                    }
                }
            },
            title: {
                text: Var_ChartTitleText,
            },
            subtitle: {
                text: Var_ChartSubtitleText,
            },
            tooltip: {
                formatter: function () {
                    return this.point.name + ' : ' + this.y + ' %';
                }
            },
            xAxis: {
                categories: true
            },
            drilldown: Var_drilldown,
            legend: {
                enabled: true

            },
            plotOptions: {
                allowhtml: true,
                series: {
                    dataLabels: {
                        enabled: true,
                        formatter: function () {
                            return this.point.name + ' : ' + this.y + ' %';
                        }
                    },
                    useHTML: true,
                    shadow: true
                },
                pie: {
                    size: '100%',
                    showInLegend: true
                }
            },

            series: Var_Series
        };

导出时显示如下 在此处输入图像描述

标签: javascriptjqueryjson

解决方案


推荐阅读