我如何从HighCharts图例中隐藏系列? [英] How can I hide series from a HighCharts legend?

查看:346
本文介绍了我如何从HighCharts图例中隐藏系列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的图表中有4个系列。 2在图表加载时可见。 2隐藏。



当用户放大时,可见性切换。



如何获取仅显示2系列可见?

解决方案

传递 showInLegend t希望在图例中可见:

  series.showInLegend = false; 


I have 4 series in my chart. 2 are visible when the chart loads. 2 are hidden.

When the user zooms in, the visibility switches.

How can I have a legend that only displays the 2 visible series?

解决方案

Pass showInLegend parameter to series you don't want to be visible in legend like:

series.showInLegend = false;

这篇关于我如何从HighCharts图例中隐藏系列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆