英文:
Display heatmap legend and regular legend together in highcharts
问题
如何在Highcharts中同时显示热力图图例和常规图例?
我在Highcharts中制作了一个热力图,上面还叠加了样条系列。我喜欢热力图显示的特殊颜色轴图例,但不幸的是,这意味着样条系列中没有显示。
其他系列更重要,如果我愿意,我可以阻止热力图显示在图例中,而选择它们...但是否可能同时显示两者?
英文:
How do I display both a heatmap legend and regular legend with highcharts?
I've got a heatmap I've made in highcharts that also has spline series laid over it. I love the special color axis legend that shows for the heatmap, but unfortunately it means none of the spline series show up with it.
The other series are more important, and I can just prevent the heatmap from showing on the legend if I want them instead... but is it possible to display both?
答案1
得分: 0
可以在Highcharts中显示颜色轴和常规图例项目,只需为特定系列启用showInLegend
选项。
系列: [{
showInLegend: true,
...
}, {
showInLegend: true,
...
}]
在线演示: https://jsfiddle.net/BlackLabel/amw63xke/
API参考: https://api.highcharts.com/highcharts/series.line.showInLegend
英文:
It is possible to show color-axis and regular legend items in Highcharts, you need to only enable showInLegend
option for a specific series.
series: [{
showInLegend: true,
...
}, {
showInLegend: true,
...
}]
Live demo: https://jsfiddle.net/BlackLabel/amw63xke/
API Reference: https://api.highcharts.com/highcharts/series.line.showInLegend
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论