I’m trying to give users a cost overview with a bar showing the percentage of each part of the total cost. The value’s of said costs can be changed through a popup with custom states communicating the numeric values to the text elements shown on the page.
How can I then change the width of this corresponding element in the 100% bar to for example “mortgage expenses” / “total expenses” * 100?
“Overigbar” is the element in the total cost overview bar.
“ovalue” is an input element containing, for example, “€236,-” as its initial content.
“apps14” is an input element containing, for example, “€730,-” as its initial content.
I used input elements so that I can add the numeric values into the total.
Still new to using CSS, the brackets used look like dynamic data inserted in Bubble but I cannot replicate that. How have you set up the calculation shown in the text element?
I always use the experimental parenthesis feature in all my apps (it makes things much easier)…
But in this case it’s not relevant, as the expression will work just the same read from left to right (which is how Bubble reads expressions if you’re not using parenthesis).
So if you don’t have the parenthesis feature turned on in your app just write the expression from left to right:
So you should be able to copy what’s there to your other page.
But just so you know, there were a few issues with your CSS syntax, and you’d entered the expression incorrectly.
Also, as your app is using European formatting for numbers (i.e. using , as the decimal separator, instead of .), the CSS wasn’t recognising the number correctly, so I had to add formatting to the value to use a . as the decimal separator.