GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix: Center period labels over their own period when using ticklabelindex by my-tien · Pull Request #7934 · plotly/plotly.js Conversation
Contributor
Fixes #7876 by rewriting the way period label positioning works when using ticklabelindex. Previously, the next labeled tick was used as the period end for the previous tick. This was problematic when using ticklabelindex, because sometimes the next labeled period is not necessarily adjacent to the last labeled period.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsPreviously, the ticklabelindex property itself was used in boolean tests which can be confusing.
my-tien
marked this pull request as draft
camdecoster
requested changes
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most of this works, but there are a few changes that need to be made. I'm happy to talk through how to do some of this.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page.
Comment on lines
+1013
to
+1015
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of saving an array of end ticks for each tick, what if we save the end tick to each tick? Then you could check for an end tick on each tick and use a different code path. You'd also be able to get rid of the new arg in
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me know if I didn't implement it as you intended.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What should happen if there's a major tick that doesn't coincide with a minor tick? Should that also be included?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, when ticklabelindex is used, only minor ticks should labeled. This step is just to handle the special case when a minor tick coincides with a major tick in which case the major tick should be labeled instead (because the minor could be removed later).
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even if the major ticks aren't displayed, they're still used when determining which tick to display. From the description for
Without that major tick, the count will be off.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, now all major ticks and all non-overlapping minor ticks are in
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
This was referenced
camdecoster
reviewed
Uh oh!
There was an error while loading. Please reload this page. …odTicks - use ax._definedDelta in both cases, it would have been the same
camdecoster
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are still a couple of things to address. I added some more context to my earlier comments. ALso, could you please do a pass to make sure you're not using
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even if the major ticks aren't displayed, they're still used when determining which tick to display. From the description for
Without that major tick, the count will be off.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. If no tickformat is specified, ax._actualDelta wasn't set and so periodX was also not set inside positionPeriodTicks. …for < 1 day periods.
camdecoster
approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. [BUG]: period labels can be positioned incorrectly when using ticklabelindex with only one minor tickUh oh!
There was an error while loading. Please reload this page. 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. | |||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |