如何使图例中的图例出现在highcharts中?

时间:2017-09-16 04:43:05

标签: highcharts highcharts-ng

var websiteVidsArr = ['vid1.wmv', 'vid1.wmv', 'vid2.wmv', 'vid3.wmv', 'vid4.wmv'];
var downloadedVidsArr = ['vid1.wmv', 'vid2.wmv', 'vid3.wmv'];

var tempDownloadedArr = downloadedVidsArr.slice();
var nonDownloadedVidsArr = websiteVidsArr.map(function (video) {
    var downloadedIndex = tempDownloadedArr.indexOf(video);
    if (downloadedIndex === -1) {
        return video + ' NOT DOWNLOADED'
    } else {
        tempDownloadedArr.splice(downloadedIndex, 1);
        return video;
    }
})

console.log(nonDownloadedVidsArr)

如何在将图表导出为png图像时使图例出现在图像中?

请参阅JSFIDDLE

1 个答案:

答案 0 :(得分:1)

Highcharts专为仅出口图表而设计。如果您还要导出图表外的元素,可以使用例如html2canvas。看看下面发布的示例。

例:
http://jsfiddle.net/h96daj1k/