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

Aribtrary HTML in y-axis labels and custom area fills in the line chart? #2502

Closed
frankandrobot opened this issue Jan 26, 2024 · 1 comment
Closed
Labels

Comments

@frankandrobot
Copy link

Is it possible to (easily) do the following design with @nivo/line?

image
  1. First thing you'll notice is that the y-chart uses a very specific gradient as the y-axis. (The stops are determined by the data.)
  2. Yes, it uses area fills but notice how the y-value determines the color of the area.
  3. To confirm, we can have arbitrary components as the tooltip (as this code seems to imply.)
@plouc
Copy link
Owner

plouc commented Mar 7, 2024

Not easily.

  1. You could use a custom layer and use the computed y scale to achieve this I think.
  2. I think you could split the data into different groups to achieve this, but it causes issues with the tooltip, as you end up with some points overlapping, another option would be to use a custom layer, but it would require a bit of custom code.
  3. Yes, you can provide custom tooltips.

@plouc plouc added ℹ️ question 📈 line @nivo/line package labels Mar 8, 2024
@plouc plouc closed this as completed Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants