-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add Example for Slider Labels in Taipy GUI #2077
base: develop
Are you sure you want to change the base?
Add Example for Slider Labels in Taipy GUI #2077
Conversation
Signed-off-by: JeevaRamanathan <jeevaramanathan.m@infosys.com>
Signed-off-by: jeevaramanathan <jeevaramanathan.m@infosys.com>
Signed-off-by: jeevaramanathan <jeevaramanathan.m@infosys.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even slightly simpler...
Really helpful, @JeevaRamanathan, thanks!
page = """ | ||
Labels with Dictionary | ||
|
||
<|{value}|slider|min=0|max=5|labels={labels_with_dict}|> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need min and max: values are based on the dict keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=> <|{value}|slider|labels={labels}|>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: jeevaramanathan <jeevaramanathan.m@infosys.com>
Hi @FabienLelaquais, I have fixed according to your suggestions expect #2077 (review) |
value = 2 | ||
|
||
page = """ | ||
<|{value}|slider|min=0|max=5|labels={labels}|> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as @FabienLelaquais mentioned, can you remove min and max ?
and change the labels dictionary to spread from 0 to 100 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure @FredLL-Avaiga, I have made the requested changes.
Signed-off-by: JeevaRamanathan M <jeevaramanathan.m@infosys.com>
Added an example demonstrating how to implement slider labels using a dictionary and lov in Taipy GUI.