Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Can arearange support null lower/upperbound? #8139
For arearange, if upperbound is null, just show the lower bound and highlight the upper area.
No arearange will show if either bound is missing.
Live demo with steps to reproduce
You can achieve the same by using an area with a higher
It's not perfect however, as the threshold needs to be hard-coded to the Y axis max. In practice you would need to analyze the data for its max value before creating the chart.
Yes. I came up that solution before. SO link. But I'd like to prevent the computation because the chart is so dynamic; I need to compute the
I wish I could stick my
This could be a good feature to add. If highcharts wants this feature, maybe I can help.
@pawelfus Thanks for your response.
I understand this point. But my original thought was extending the arearange. Imagine it supports thresholds being
And that's why I investigated how to contribute to highcharts and create a pull request for this feature.
One more thing I wanted to achieve was to drop using area and to only use arearange. I felt that arearange is a superset of area. Area is just a special case where the upper/lower bound are Inifity/-Infinity. I don't want to care whether I should use area or arearange. For example, currently if I get data
I need to use arearange. And current highcharts will not show the first range (-Infinity ~ 0) :(
But if I get data
I need to use area with threshold being -Infinity.
I don't want to branch between area/arearange depending on the data; just replace the nulls with Infinity/-Infinity and use arearange is good for me.
I'll try your code later. Hopefully it will allow me only use arearange for all input data.
About the jsfiddle:
To allow public access, please change
The code seems to use some internal fields/functions that I wasn't aware of. I'll have a try tomorrow.
Maybe unrelated, but this always evaluates to false.
Thanks! Updated jsFiddle demo. This
But we have: