2017-02-09 38 views
0

我們希望下載或打印圖表時底部的文本出現在圖表上。我們正在使用Highcharts提供的下載功能。 我們希望圖形看起來像這樣在此圖像中(其中有黑色出現在那個說歐洲製漿造紙&底部的文本...): enter image description hereHighcharts註釋文本在圖中打印

的問題是,當我們下載中的圖形一個JPG,PNG,PDF格式,甚至只是打印它,文本不會出現。有沒有辦法包含這個文本? TIA

+0

如果文本沒有在創建圖表的一部分,但你希望它出口,你可以使用'exportChart'這樣做。我們使用這個來使用'subtitle'文本將腳註文本添加到導出的圖表上。 – wergeld

+0

感謝您的幫助! – Bastcri

回答

0

您可以通過exporting.chartOptions爲導出的圖表設置其他選項。其他文字可以設置爲字幕 - 請參閱API Docs中的可用選項。

exporting: { 
chartOptions: { 
     chart: { 
     spacingBottom: 90 
     }, 
     subtitle: { 
     verticalAlign: 'bottom', 
     text: `Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.` 
     } 
    } 
} 

例如:http://jsfiddle.net/b231fz7c/

+0

太棒了!謝謝你的幫助! – Bastcri