-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛 BUG] Setting width/height with CSS units not working for metrics #2141
Comments
Hello @FlorianJacta :)
|
I think 150 and 150px are two different units. It is related to this issue too: #2142 so you should also be assigned there |
Parameters in the 'metric' component do not accept units like, px or rem. |
The issue lies in how you're setting the width and height properties in the metric widget. Taipy GUI uses a specific syntax for styling, and width and height should be defined within a style attribute. Try modifying your page string as follows: page = """ Or, for multiple styles: page = """ This should correctly apply the width and height styles to your metric widget. Additionally, consider using units like px for pixels or % for percentage-based sizing. For more information on Taipy GUI styling, refer to the official documentation: |
@Yubarajhalder your answer is not answering the issue |
This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines. |
This issue has been unassigned automatically because it has been marked as "🥶Waiting for contributor" for more than 14 days with no activity. |
What went wrong? 🤔
Setting width and height for metrics with CSS units is not working. This won't change the width/height as expected.
This works when just putting a number. It took a while for me to figure out (I went looking at the actual PR).
If this issue could be backported to another patch, this would be great.
Expected Behavior
This should work with all CSS units supported by Taipy. Or the documentation should change to reflect this behavior.
Steps to Reproduce Issue
Screenshots
Version of Taipy
4.0
Acceptance Criteria
Code of Conduct
The text was updated successfully, but these errors were encountered: