Highcharts: How do I change the legend location in the export of a chart?

你离开我真会死。 提交于 2020-01-06 15:14:59

问题


I'm trying to export a chart to various formats. Although the chart looks okay when rendered by the browser, in the PDF/PNG/JPEG export the legend seems to be overlapping. What setting should I change/add to change the position of the legend?


回答1:


Exporting options can be set in chart's configuration: exporting.chartOptions.legend (API: http://api.highcharts.com/highcharts#exporting.chartOptions)

Example: http://jsfiddle.net/w8z1uq9s/

exporting: {
            chartOptions: {
                legend: {
                    y: 100,
                    x: -50
                }
            }
        },


来源:https://stackoverflow.com/questions/30050839/highcharts-how-do-i-change-the-legend-location-in-the-export-of-a-chart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!