Holi,我在使用Highchart库时遇到了一个条形图的问题,我正在尝试导出它,它在PNG、JPEG上运行得很好。但当我试图导出为PDF时,它有一些字体问题,即使是";默认">宋体。最初我使用Barlow作为我的主要字体,但它也有同样的问题。我正在使用脱机导出。
导出为PDF
导出为JPEG
"lang": {
"contextButtonTitle": "Opciones",
"viewFullscreen": "Ver en pantalla completa",
"exitFullScreen": "Salir de pantalla completa",
"printChart": "Imprimir",
"downloadJPEG": "Descargar imagen JPEG",
"downloadPDF": "Descargar PDF",
"downloadPNG": "Descargar imagen PNG",
"downloadSVG": "Descargar imagen SVG",
"thousandsSep": ","
},
"chart": {
"backgroundColor": "#3D4553"
},
"title": {
"visible": true,
"template": "date_range",
"templateConfig": {
"originalDateFormat": "Y-MM-DD",
"originalTimeFormat": "hh:mm:ss",
"dateFormat": "DD-MM-Y",
"timeFormat": "hh:mm a",
"dateProperty": "fecha_creacion",
"timeProperty": "hora_creacion"
},
"style": {
"color": "#FFFFFF",
"fontSize": "14px",
"fontFamily": "Arial",
"fontWeight": "bold"
},
"verticalAlign": "top",
"align": "center",
"floating": false
},
"subtitle": {
"style": {
"color": "#FFFFFF",
"fontFamily": "Arial"
}
},
"tooltip": {
"backgroundColor": "#1d222b",
"borderColor": "#1d222b",
"borderWidth": 1,
"borderRadius": 0,
"style": {
"color": "#FFFFFF"
}
},
"xAxis": [{
"type": "category",
"labels": {
"style": {
"color": "white",
"fontFamily": "Arial"
}
},
"title": {
"style": {
"color": "white",
"fontFamily": "Arial"
}
}
}],
"yAxis": {
"title": {
"text": "Reportes",
"style": {
"color": "white"
}
},
"labels": {
"style": {
"color": "white"
},
"format": "{value:,.0f}"
},
"gridLineColor": "#43b5e5",
"gridLineWidth": 0
},
"legend": {
"enabled": false
},
"exporting": {
"enabled": true
},
"noData": {
"style": {
"color": "white"
}
}
我最好的问候,希望有人能帮助我。谢谢
在某个时候我让它工作了,这似乎是一个导出问题,我试图显示的文本名称的大小和长度。。。感谢您的评论和帮助!