Is there an option to display a numeric value typed into a dcc.Input / daq.NumericInput component with automatic comma thousand separators? I’ve seen a few replies suggesting to keep the type as ‘text’ and to convert the format in your code (python in my case), but surely that callback is dynamic and worse is circular, in that the Input and Output components are the same…?
I’m building something for financial data where millions and billions are the norm and having to ask the user to input 1,000,000 as 1 (e.g.) and transform the data behind the scenes seems clumsy…
Perhaps I underestimate the work required for this, but would certainly make the dashboard look better, any pointers would be very welcome! Thanks.
I don’t see a way to do this right now, but it’s a good idea - I’ve made an issue for it, we’ll look into it. https://github.com/plotly/dash-core-components/issues/670
thanks Alex, sounds good. Do you see a workaround in the meantime, e.g. some variant of Dash DataTable - Thousands Separator? Or is the circularity I mention regarding Input and Output too difficult to overcome? I was thinking about using a dummy Input that is in the same location as a correctly formatted textbox, and the Input has a lower zIndex assigned after an input so that it ‘disappears’ behind the text, but then I imagine that can’t be accessed again easily unless the user reloads the page…which won’t be useful.
You can get around the circularity by using
n_blur or something as
Input. I’m not sure that’ll get you exactly the desired behavior, but might be close enough.
Any updates if this is something that is being developed or can be expected in the near future?