Skip to content

feat: wip: implement scale conversion#4075

Open
tpoisseau wants to merge 4 commits intomainfrom
4040-choose-unit-on-axis-and-store-it-in-the-view
Open

feat: wip: implement scale conversion#4075
tpoisseau wants to merge 4 commits intomainfrom
4040-choose-unit-on-axis-and-store-it-in-the-view

Conversation

@tpoisseau
Copy link
Copy Markdown
Contributor

for HorizontalAxis1D

Closes: #4040

@tpoisseau tpoisseau linked an issue Mar 30, 2026 that may be closed by this pull request
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 30, 2026

Deploying nmrium with  Cloudflare Pages  Cloudflare Pages

Latest commit: c0f0db7
Status: ✅  Deploy successful!
Preview URL: https://fadd7e0a.nmrium.pages.dev
Branch Preview URL: https://4040-choose-unit-on-axis-and.nmrium.pages.dev

View logs

for `HorizontalAxis1D`

Closes: #4040
@tpoisseau tpoisseau force-pushed the 4040-choose-unit-on-axis-and-store-it-in-the-view branch from f872eaa to f4bee33 Compare March 30, 2026 14:54
@tpoisseau
Copy link
Copy Markdown
Contributor Author

tpoisseau commented Mar 30, 2026

@lpatiny @targos I would like some feedbacks before doing the same for 2D Spectra.

I inspire myself from FooterBanner to understand how works the current display of hz, ppm, pt.
I updated the scaleX and scaleY to support a customDomain option.

I had one big limitation, to show pt or hz values, we should have only one spectrum selected (or only one spectrum visible). to be able to display ticks matching the unit selected, I choose to use the first active spectra (first selected fallback to first visible). So the ticks can be "false" when we have many visible spectra with different frequencies. But in practice the examples we have in the demo (DEPT, XTC, coffee) have the same frequency.
Do you think we should display a warning (maybe with a tooltip in the picker) about this ? Or it is OK like that and implicit ?

@lpatiny
Copy link
Copy Markdown
Member

lpatiny commented Mar 31, 2026

No need for warning you may leave it like that.

@tpoisseau tpoisseau marked this pull request as ready for review March 31, 2026 12:04
@tpoisseau tpoisseau requested review from lpatiny and targos March 31, 2026 12:04
@targos

This comment was marked as resolved.

@tpoisseau

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Choose unit on axis and store it in the view

3 participants