【发布时间】:2017-10-30 19:16:19
【问题描述】:
我使用 high charts API 创建了一个饼图。饼图有图例(标签),我想做的是在图例中添加一些 html。例如,在 Microsoft 的标签上,我希望图例在其名称旁边有一个链接带有图标。我添加了 High Charts 文档中提到的 use html 功能,但我没有看到图例中出现的图标。有人知道为什么是这样吗?
小提琴 http://jsfiddle.net/k0utfqbs/3/
series: [{
name: 'Brands',
colorByPoint: true,
data: [{
name: 'Microsoft Internet Explorer <a href="https://www.microsoft.com/en-us/" ><span class="glyphicon glyphicon-arrow-left"></span></a>',
y: 56.33
}, {
name: '<a href="https://www.google.com/" >Chrome</a>',
y: 24.03
}, {
name: '<a href="https://www.mozilla.org/en-US/firefox/new/" >Firefox</a>',
y: 10.38
}]
【问题讨论】:
标签: javascript html charts highcharts