Allow range selector to work for sub-second steps
I commonly have time series dataframes with sub-second frequencies (milli/micro/nano) and I would like to use Scatter plots with rangeselector to visualize them. Issue is rangeselector's buttons can only be provided with a step included in the following:
['month', 'year', 'day', 'hour', 'minute', 'second', 'all']
I would like to be able to pass as well: nanosecond, microsecond, and millisecond.
I am not familiar with the plotly.py codebase but I am happy to open a PR provided I can have some guidance.
thanks for the suggestion - we are currently working to get a release out the door, but will revisit this once that's done (probably late October). cheers - @gvwilson
Thank you, I appreciate it @gvwilson
Hi @gvwilson. Any way I can help with this? Thanks!
hi @gtauzin - apologies for the delays - we're hoping to get the delayed release out this week. if you want to dive in and create a pull request for this feature, I'll do my best to prioritize review. Thanks - @gvwilson
Thank you for the prompt reply @gvwilson.
I am not very familiar with javascript and it seems to me the actual change would happen in Plotly.js. Looking at the code, the step logic is in the getXRange function in src/components/rangeselector/get_update_object.js. The actual step is computed using the d3-time library that does not seem to allow for any sub-second steps but millisecond.
It might be hard to allow for other sub-second steps, but it seems to me milliseconds is actually already implemented and it just need to be enabled. Does it seem correct to you?