Opened 8 years ago

Closed 3 years ago

#12060 closed enhancement (worksforme)

Add formatting option to @interact slider value display

Reported by: benjaminfjones Owned by: jason, mpatel, was
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: notebook Keywords: interact slider notebook
Cc: kcrisman, paulmasson Merged in:
Authors: Reviewers:
Report Upstream: Reported upstream. No feedback yet. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by benjaminfjones)

It would be useful if the slider object in an @interact could display it's value in different formats. Right now, if the slider value is a float and display_value=True the value is displayed to the maximum precision

One proposal is to enhance the display_value parameter to the slider object so that it will accept arguments like "%3.2f" which would change how the slider value is displayed.

It would also be useful if slider was able to guess an appropriate format based on the step size (if possible). See http://ask.sagemath.org/question/926/decimal-places-in-slider

Change History (9)

comment:1 Changed 8 years ago by kcrisman

  • Cc kcrisman added

comment:2 Changed 8 years ago by benjaminfjones

  • Description modified (diff)

comment:3 Changed 8 years ago by kcrisman

  • Report Upstream changed from N/A to Reported upstream. No feedback yet.

comment:4 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:5 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:6 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:7 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:8 Changed 3 years ago by paulmasson

  • Cc paulmasson added

comment:9 Changed 3 years ago by jdemeyer

  • Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
  • Resolution set to worksforme
  • Status changed from new to closed

ipywidgets can do this.

Note: See TracTickets for help on using tickets.