【发布时间】:2016-06-12 07:27:31
【问题描述】:
我为每个创建的轨迹创建了一个独立的 y 轴。有时有很多轨迹/y 轴。
我希望在选项列表中包含具有相同本机功能的图例按钮:单击切换跟踪可见性。理想情况下,通过单击图例来隐藏轨迹时,它的 y 轴(刻度值)也将被隐藏。
如果显示所有迹线/y 轴也很好 -> 将最大宽度设置为容纳 y 轴的容器,以便绘图/图形区域/域始终占据至少 70% 的宽度(设置溢出:滚动到 y 轴容器)
我已经浏览了文档,但没有找到我需要的东西..
layout.showlegend = true/false -> hides/shows all the legend box
trace1.showlegend = true/false -> hides/shows one legend(for trace1) in the box
如果我这样做:
trace1.visible= false -> I hide both the trace and legend for it
trace1.opacity= 0 ->hides the trace not the legend for it but alters the legend icon(if line+dot -> only line)
在切换图例链接以隐藏跟踪但保持图例按钮不变时,哪个属性会原生更改?
需要知道通过多选下拉菜单实现功能
【问题讨论】:
-
介意解释为什么投反对票,以便在真的有必要时改进问题???
标签: javascript css angularjs svg plotly