Document how to format dates and numbers #2252
-
Hi I'm a contributor to HoloViz Panel and happy user of its I would really like to understand and document how we can support and use date + number formatting. See holoviz/panel#5066. In this issue I link to some indications on the But I cannot find any clear documentation or examples on this. It would be very helpful if you described date and number formatting in the docs and added a Just adding a few small examples to this issue would also help a lot right now. Additional Context
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Date and number formatting are both handled directly by the browser locale. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the answer. As I understand this answer there is no built in or configurable way in Perspective to specify the formatting per column. The data needs to be preformatted? If yes. The implication would be that we would have to format things "our selves" either on the Python or Javascript side? But then that could potentially destroy sorting for dates? Is there an example of data formatting?I tried finding a Perspective example with Data and number formatting. But could not. Is there one. It would help me to have an example pinning out how this should be done. Is there an example of configuring the precission?I can see in the streaming example that precission can be set manually. I know the background gradient just below can be configured in code. Is there an example configuring the precission in code? |
Beta Was this translation helpful? Give feedback.
-
I would be really helpful to have a bullet list or table containing the configuration options for somewhere. I just discovered deep inside the file That I can see it using a |
Beta Was this translation helpful? Give feedback.
-
So how to format dates? |
Beta Was this translation helpful? Give feedback.
Date and number formatting are both handled directly by the browser locale.
e.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString