Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Implementhovertemplate forcandlestick andohlc traces#7619

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
emilykl merged 10 commits intomasterfromadd-hovertemplate-for-candlestick
Nov 13, 2025

Conversation

@emilykl
Copy link
Contributor

@emilyklemilykl commentedNov 12, 2025
edited
Loading

Closes#3437

This PR adds ahovertemplate attribute forohlc andcandlestick, allowing users to define a custom hover template for those traces.

hovertemplate:'opened at %{open}<br>closed at %{close}<extra></extra>',

Screenshot 2025-11-12 at 11 12 13 AMScreenshot 2025-11-13 at 10 41 10 AM

Notes

  • The first commit of this PR runs the biome formatter which introduces some noise into the diff. Usethis link to see only the meaningful changes.

  • This PR also adds thehovertemplatefallback attribute for the two traces in question

  • hovertemplate is ignored whenhoverlabel.split is set totrue. (Open to suggestions here but I couldn't see an obvious way to makesplit: true work with thehovertemplate API.)

  • Two Jasmine tests added

This completes the list in#3437.

Thanks to@chriddyp for putting this on my radar!

To test

  • Create a plot like this one:
Plotly.newPlot("plot",[{x:[1,2,3,4,5],low:[21,13,18,16,22],high:[34,23,25,26,24],open:[24,16,22,23,22],close:[22,18,21,21,23],type:'candlestick',// or 'ohlc'hovertemplate:'opened at %{open}<br>closed at %{close}<extra></extra>',// hoverlabel: {split: true},// if the above line is uncommented, `hovertemplate` should be ignored// and separate hover tooltips should be shown for open, high, low, and close}],);
  • Hover over the data and confirm that the hovertemplate is respected
  • Confirm that ifhoverlabel.split is set totrue, the hovertemplate is ignored and the previous behavior is unchanged

ndrezn reacted with hooray emoji
Copy link
Contributor

@camdecostercamdecoster left a comment

Choose a reason for hiding this comment

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

As we discussed, there's an issue with implementing thesplit: true logic that makes the split hover info not show up. Could you look into that?

emilykland others added3 commitsNovember 12, 2025 16:22
Co-authored-by: Cameron DeCoster <cameron.decoster@gmail.com>
Co-authored-by: Cameron DeCoster <cameron.decoster@gmail.com>
@emilyklemilyklforce-pushed theadd-hovertemplate-for-candlestick branch 2 times, most recently from6c901b2 tocd1f39eCompareNovember 13, 2025 15:04
@emilykl
Copy link
ContributorAuthor

@camdecoster The bug you found withsplit: true should be fixed now. Ready for another look. I also added a Jasmine test which testssplit: true andhovertemplate together.

@emilyklemilyklforce-pushed theadd-hovertemplate-for-candlestick branch fromcd1f39e to6800433CompareNovember 13, 2025 16:09
Copy link
Contributor

@camdecostercamdecoster left a comment

Choose a reason for hiding this comment

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

Looks good. Could you please add a draftlog before merging?

emilykl reacted with thumbs up emoji
@emilyklemilyklforce-pushed theadd-hovertemplate-for-candlestick branch from54bce31 tofb6e114CompareNovember 13, 2025 18:50
@emilyklemilykl merged commitf0d7961 intomasterNov 13, 2025
6 checks passed
@emilyklemilykl deleted the add-hovertemplate-for-candlestick branchNovember 13, 2025 19:28
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@camdecostercamdecostercamdecoster approved these changes

@alexshoealexshoeAwaiting requested review from alexshoe

@alexcjohnsonalexcjohnsonAwaiting requested review from alexcjohnson

Assignees

@camdecostercamdecoster

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Implementhovertemplate for all traces that support hover

3 participants

@emilykl@camdecoster

[8]ページ先頭

©2009-2025 Movatter.jp