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

How to apply gradient on the opposite side of the Line chart? #11778

Open
nikmace opened this issue May 19, 2024 · 1 comment
Open

How to apply gradient on the opposite side of the Line chart? #11778

nikmace opened this issue May 19, 2024 · 1 comment

Comments

@nikmace
Copy link

nikmace commented May 19, 2024

Feature Proposal

I can only apply the gradient below the line.

Currently the Line chart looks like this:
Screenshot 2024-05-19 at 14 33 49

What is the expected behavior?

The gradient appears on the opposite side of the line, meaning from the line to the top of the chart.

And I want to make the gradient like this:
(so it appears where I have drawn white lines, so it is inverted in relation to the line)
Screenshot 2024-05-19 at 14 34 11

Possible Implementation

No response

@LeeLenaleee
Copy link
Collaborator

You can specify the fill as an object and set the above property: https://www.chartjs.org/docs/4.4.3/charts/area.html#example-with-multiple-colors

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

No branches or pull requests

2 participants