Skip to content

Add support for shading area between two lines #93

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

Closed
andermoran opened this issue Oct 21, 2019 · 8 comments
Closed

Add support for shading area between two lines #93

andermoran opened this issue Oct 21, 2019 · 8 comments
Labels
enhancement New feature or request

Comments

@andermoran
Copy link

Can we get support to shade above one line until another? This is helpful if we have to lines (lower range & upper range) and we went to shade the possible values between these two lines. So far, I can see we can only cutoff to a constant value.

@imaNNeo
Copy link
Owner

imaNNeo commented Oct 22, 2019

Interesting,
We will consider it.

@imaNNeo
Copy link
Owner

imaNNeo commented Oct 22, 2019

Also if it is possible, provide an image and demonstrate your idea.
It helps me and other people.

@imaNNeo imaNNeo added the enhancement New feature or request label Oct 22, 2019
@andermoran
Copy link
Author

Screen Shot 2019-10-22 at 8 40 57 AM

This is a graph with 80% and 90% confidence intervals. See how the range of values between the confidence intervals is shaded? I'd like to be able to plot the line, a line above it, and a line below it (I can do this all right now) but I'd like to shade between the line above and the line below (I can't do this).

@imaNNeo
Copy link
Owner

imaNNeo commented Oct 22, 2019

Thank you for the details.

@krispypen
Copy link
Contributor

Hi, has anyone suggestions about how we should configure this? I just got it working, but i added a bool property "cutOffPreviousLine" on BarAreaData, so it's like the cutOffY property but then a cutOff by the previous line. Suggestions for a better naming is welcome :-)

@imaNNeo
Copy link
Owner

imaNNeo commented Dec 13, 2019

I think we can have a property outside of the BarAreaData.
I suggest to have it in the LineChartData directly, and have a new member called BetweenBarsData.
Then we can specify fromLine (index of line) , toLine (index of line), color, gradient,...
What do you think?

@imaNNeo
Copy link
Owner

imaNNeo commented Dec 28, 2019

Resolved and added betweenBarsData field in 0.6.1,
check this sample:

Sample 7 (Source Code)

@imaNNeo imaNNeo closed this as completed Dec 28, 2019
@imaNNeo
Copy link
Owner

imaNNeo commented Dec 28, 2019

It will be great if you implement your sample and submit a PR to add it to our samples.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants