0

I am currently creating a dashboard with Plotly Dash in Python and have a layout problem that I just couldn't fix over the last couple days: I have a bar chart with a metric, that is always shown and multiple additional metrics that can be shown by ticking checkboxes. I am using bootstrap for the layout. The legend for all metrics is always shown and now I want to position the checkboxes left to the legend without additional text so that there is just a checkbox next to each corresponding metric.

I can do it manually with absolute positioning, but that doesn't work with different screen/window sizes.

Is there a way to do it in a more flexible way? I can provide code with sample data if necessary.

I tried dynamic checkboxes with absolute positioning and many different style settings for the container, chart and checklist. I also tried custom legend, but didn't dive too deep into it, since everything I tried resulted in an empty chart.

EDIT: I just realised you can click the metrics in the legends by default and don't even need checkboxes... Thats probably why I couldn't find a solution for this :) I'll leave this post here in case someone else is about to waste three days of their time lol.

0