Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: multiple y axes #857

Closed
wants to merge 1 commit into from

Conversation

scaltunsoy
Copy link

@scaltunsoy scaltunsoy commented Dec 14, 2023

Description

Related issue(s)

#855
#827

What kind of change does this PR introduce? (check at least one)

  • Bug fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • New Feature (BREAKING CHANGE which adds functionality)
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

How has This been tested?

Storybook. 4 new stories has been added in total.

Screenshots (if appropriate):

Multiple y axes:
image

Y axis on the right side:
image

The PR fulfills these requirements:

  • It's submitted to the main branch
  • When resolving a specific issue, it's referenced in the related issue section above
  • My change requires a change to the documentation. (Managed by Tremor Team)
  • I have added tests to cover my changes
  • Check the "Allow edits from maintainers" option while creating your PR.
  • Add refs #XXX or fixes #XXX to the related issue section if your PR refers to or fixes an issue.
  • By contributing to Tremor, you confirm that you have read and agreed to Tremor's CONTRIBUTING.md guideline. You also agree that your contributions will be licensed under the Apache License 2.0 license.

Copy link

vercel bot commented Dec 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tremor-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2024 0:03am

@scaltunsoy scaltunsoy changed the title feat: multiple y axes feat: multiple y axis Dec 14, 2023
@scaltunsoy scaltunsoy changed the title feat: multiple y axis feat: multiple y axes Dec 14, 2023
@scaltunsoy scaltunsoy marked this pull request as ready for review December 15, 2023 16:13
@leonlarsson
Copy link

This would absolutely come in handy

@jbergstroem
Copy link

jbergstroem commented Feb 4, 2024

My project requires two y axes as well -- anything blocking this to land?

@leonlarsson
Copy link

One feature I would love is to have multiple Y axes that are independent. Having checked the Storybook preview, it seems like one Y axis having a much higher number affects the other Y axis:
2024-02-05_10-40-24

Ideally for me, I would have something like this from MUI Charts:
Here, one axis has a very high number, but it doesn't affect the display of the other axis.
2024-02-05_10-43-28

@jbergstroem
Copy link

jbergstroem commented Feb 5, 2024

One feature I would love is to have multiple Y axes that are independent.

I think this is how it should work out of the box.

@scaltunsoy
Copy link
Author

@leonlarsson

image
image

I changed “Mar 21” data point of “Sales (blue line)” from 2000 to 15000 in Storybook.
The green line was not affected. It keeps its ratio.

@leonlarsson
Copy link

leonlarsson commented Feb 14, 2024

@scaltunsoy

If you instead edit the other line ("Successful Payments"), it affects both series
2024-02-14_15-05-05

@scaltunsoy
Copy link
Author

scaltunsoy commented Feb 14, 2024

@leonlarsson

The blue line is not affected when I changed the green line. Do you have a specific setting other than curveType="natural"?
image

@leonlarsson
Copy link

leonlarsson commented Feb 14, 2024

@scaltunsoy Oh, sorry. I just noticed you're on AreaChart and I am looking at the LineChart. LineChart seems to have the behaviour I'm describing

pass idx to valueFormatter in tooltip
@scaltunsoy
Copy link
Author

Thank you @leonlarsson.

I think I fixed the issue. It seems like I forgot to pass yAxisId to the Line component.

@leonlarsson
Copy link

Great! Hoping to see this shipped :)

@severinlandolt severinlandolt added Type: Feature New feature for existing component Type: Docs Indicates that the documentation is affected. Either add or correct docs. PR: Under Consideration Has potentially wider implications which are being discussed labels Feb 19, 2024
@gjohnsx
Copy link

gjohnsx commented Mar 7, 2024

hoping to see this implemented soon

@kalingwu
Copy link

kalingwu commented Apr 9, 2024

we would love to have this feature made available!

@severinlandolt severinlandolt changed the base branch from main to beta April 12, 2024 16:54
@severinlandolt severinlandolt deleted the branch tremorlabs:beta April 19, 2024 15:07
@severinlandolt severinlandolt self-assigned this Apr 19, 2024
@severinlandolt
Copy link
Member

Hi @scaltunsoy accidentally deleted the beta branch, would you mind creating a new PR?

@scaltunsoy scaltunsoy mentioned this pull request Apr 29, 2024
15 tasks
@scaltunsoy
Copy link
Author

Hi @scaltunsoy accidentally deleted the beta branch, would you mind creating a new PR?

Hi @severinlandolt. Here is the new PR: #1028.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Under Consideration Has potentially wider implications which are being discussed Type: Docs Indicates that the documentation is affected. Either add or correct docs. Type: Feature New feature for existing component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Multiple y-axes in AreaChart [Feature]: Change Y-Axis orientation
7 participants