Using checkbox to resize Graph and Make Table Disappear using Flex Container

Hello Everyone!

I am new to the python/perspective world and need a tad bit of help. As by the title of my topic, I am trying to enlarge a graph and make a table invisible whenever a checkbox is selected giving the graph more real estate so the end user can see the data a bit easier. For context, I am creating an application where the user will be able to use this screen and several others on either desktop or mobile device to monitor pressures, thus why I am using a flexible container to give the user that flexibility.

Attached are images of the screen before clicking the check box, the script that I made, and what the screen looks like when the checkbox is selected. As you can see, the scroll bar then shows up at the bottom and my graph does not really occupy the space left behind by the table. I understand that just because is not visible it does not mean its not there, so I would need some guidance in getting this to work.

Any help would be appreciated!

I was able to get it to work using the positions.display

Yes, you shouldn't need the script. Just bind the props.position.display to the checkbox's props.selected value.

Tip: get rid of the LED display and replace it with a label that is legible. They were acceptable in the 1970s when there was nothing better. There's a reason we don't print numbers or do Excel using LED or LCD fonts!

1 Like