Closes #387: Only truncate 'category' type labels. #390
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a follow-up from #374 which unfortunately caused #387
I'm learning that using Plotly correctly is in fact wizardry.
It turns out that
ticktext
overrides any nice x-axis formatting that Plotly does by default such as avoiding overlapping labels. So this patch removes the use ofticktext
.Furthermore, stringifying and/or truncating axis types such as
datetime
also affects the pretty Plotly formatting. Since the string truncation issue originally reported in #359 was only for thecategory
type, I think it's safe/best to limit to that in this patch.The test cases in #378 should apply to this patch. Additionally, here is a test case that triggers #387. It did not work with the
datetime
axis type and also had overlapping x-axis values when usingcategory
. Both of these should now be resolved.