GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add spikelines to ternary plots by Lexachoc · Pull Request #8041 · plotly/plotly.js

Conversation

@Lexachoc

@Lexachoc Lexachoc commented Sep 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Closes #7972

Demo in #7972 (comment)

Similar to Cartesian spikelines, ternary axes support the existing spikeline attributes:

  • showspikes
  • spikecolor
  • spikethickness
  • spikedash
  • spikemode
  • spikesnap

The ternary spikelines also respect spikedistance.

Note: This implementation always displays the corresponding axis value labels (commonlabel) together with the spikelines.

In Cartesian plots, these labels are controlled by hovermode. Ternary plots currently do not have a hovermode option that fits naturally to ternary vertices, and I prefer to always show the labels together with the ternary spikelines instead, which also seems more intuitive for ternary plots. And these labels help the user to quickly understand the axis values.

The axis value labels also respect the axis attribute: hoverformat, so they use the same numeric formatting consistent with the ternary hoverlabel.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Lexachoc added 4 commits September 14, 2026 16:40
@Lexachoc
add spikelines to scatterternary
eb4cff8
@Lexachoc
update schema
51d7c94
@Lexachoc
add ternary spikelines test
4bc4aaa
@Lexachoc
add draftlog
10fa7a4
@Lexachoc
Lexachoc force-pushed the scatterternary-spikelines branch from 743b2f0 to 10fa7a4 Compare September 14, 2026 17:33
@Lexachoc

Lexachoc commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Sorry about the force-push! I noticed afterward that the guideline ask not to force-push open PR branches.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@camdecoster camdecoster assigned KoolADE85 Sep 14, 2026
@camdecoster

camdecoster commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR! Our team will take a look and provide some feedback. No worries about the force push; it's mostly important for after a review starts.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@emilykl emilykl mentioned this pull request Sep 17, 2026
Fix slow scattergl hover #7998
Closed
@Lexachoc
support all ternary traces instead of just scatterternary
699eef6
@Lexachoc

Lexachoc commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

While testing scatterternarygl (for issue #7058, PR coming soon), I found that the normal hover search already returns a usable point with a finite spikeDistance, but the input pointData.spikeDistance remains Infinity because scattergl returns a new hover point object.

This caused the current ternary spike logic to run a redundant second hoverPoints() search. The next commit will reuse the normal hover result when available and only performs the fallback search when necessary, e.g. when the point is outside hoverdistance but still within spikedistance.

Below is a recording showing the spikelines feature working with a scatterternarygl trace. They work together smoothly without noticeable lag.

spikelines.with.scatterternarygl.trace.mp4
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Lexachoc
reuse normal hover result for ternary spikelines
3f9596a
@Lexachoc Lexachoc mentioned this pull request Sep 26, 2026
Add scatterternarygl trace #8083
Open
KoolADE85
KoolADE85 requested changes Oct 7, 2026
View reviewed changes

@KoolADE85 KoolADE85 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Lexachoc thanks for submitting this! I was able to dive pretty deep and have to say it works perfectly.
I have a couple of small notes just to ensure the behaviour is consistent between Cartesian/ternary plots. Otherwise, this is great!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/plots/ternary/layout_attributes.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/plots/ternary/layout_defaults.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/plots/ternary/ternary.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Lexachoc
clarify showspikes and improve spike color contrast
074e61c
@Lexachoc
Lexachoc requested a review from KoolADE85 October 7, 2026 23:21
KoolADE85
KoolADE85 previously approved these changes Oct 8, 2026
View reviewed changes

@KoolADE85 KoolADE85 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great feature @Lexachoc, thank you for the contribution! 💃

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread draftlogs/8041_add.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@KoolADE85
Update draftlogs/8041_add.md
35c4be4
@KoolADE85
KoolADE85 dismissed their stale review via 35c4be4 October 8, 2026 14:18
KoolADE85
KoolADE85 approved these changes Oct 8, 2026
View reviewed changes
@KoolADE85
KoolADE85 merged commit 4862f62 into plotly:main Oct 8, 2026
5 of 37 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Lexachoc Lexachoc mentioned this pull request Oct 17, 2026
Add modebar button for toggling ternary spikelines #8131
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@KoolADE85 KoolADE85 KoolADE85 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@KoolADE85 KoolADE85

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Spikelines in scatterternary plots

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@Lexachoc @camdecoster @KoolADE85
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.