-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Timestamp '1970/01/01 00:00:00' formats as 'undefined' in hovertext #6751
Comments
Nice find 🥇 plotly.js/src/plots/cartesian/axes.js Lines 1770 to 1779 in 630b092
Perhaps we should modify the first if statement to be something like: if(headStr !== undefined && (dateStr === '00:00:00' || dateStr === '00:00')) { I am looking forward to reviewing your pull request. |
This patch fixes issue plotly#6751, where the epoch timestamp '1970-01-01 00:00:00', with 'hoverformat' '%H:%M:%S' is formatted as 'undefined'. This patch fixes the issue by ensuring that zeroes are only stripped if 'extraPrecision' caused trailling zeroes in the formatted date.
This patch fixes issue plotly#6751, where the epoch timestamp '1970-01-01 00:00:00', with 'hoverformat' '%H:%M:%S' is formatted as 'undefined'. Signed-off-by: adamjhawley <adamhawley99@gmail.com>
Previously, the formatting of the epoch timestamp using custom a hover format did not work as expected (plotly#6751). This patch adds a test to help prevent this issue re-occuring in a regression. Signed-off-by: adamjhawley <adamhawley99@gmail.com>
Previously, the formatting of the epoch timestamp using custom a hover format did not work as expected (plotly#6751). This patch adds a test to help prevent this issue reappearing in a regression. Signed-off-by: adamjhawley <adamhawley99@gmail.com>
Previously, the formatting of the epoch timestamp using custom a hover format did not work as expected (plotly#6751). This patch adds a test to help prevent this issue reappearing in a regression. Signed-off-by: adamjhawley <adamhawley99@gmail.com>
Previously, the formatting of the epoch timestamp using custom a hover format did not work as expected (plotly#6751). This patch adds a test to help prevent this issue reappearing in a regression. Signed-off-by: adamjhawley <adamhawley99@gmail.com>
I tried to customise the hovertext format of some timestamp data and found that the timestamp '1970/01/01 00:00:00' formats as 'undefined'.
Note: please hover over the first data point in the example below to see the issue I am describing.
Minimal example to recreate the issue (CodePen here):
I am happy to try and fix this issue myself but could benefit from someone pointing me in the right direction. I presume that the issue is caused by something like "0 seconds since epoch" is wrongly resolved as falsey at some point.
Thanks in advance for any pointers/help!
The text was updated successfully, but these errors were encountered: