Skip to content

Add "toggle legend" button #4042

Closed
@AdnanBoota

Description

@AdnanBoota

Hi Team Plotly,

I was wondering if it is possible to add a "legend minimize/maximize (show/hide)" feature in Piecharts. I want to show/hide legend with a button (screenshots attached), so that I can use the space for the chart and also see legend whenever needed.

This feature would be very useful in cases where we have simply too many items in the legend or legend items have long text. In such cases, the user would like to resolve the label by simply hovering over the item, instead of looking for it in the legend.

I actually got this idea from Kibana dashboard (https://demo.elastic.co/app/kibana#/dashboard/edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b). They have legend minimization in their pie charts.

I'm using this library in ReactJS, will the Plotly.js also update the ReactJS package, any suggestion on this?

Thank you very much for your help.

Regards,
Adnan
pie-chart-btn-2
pie-chart-btn-1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions