By default, the area in highcharts highlights the bottom area.
https://i.sstatic.net/Auo2V.png
However, I am looking to highlight the top area instead.
https://i.sstatic.net/xAHXx.png
Is there a recommended approach to achieve this?
After exploring this demo, it seems that adjusting the threshold value to 250 can yield similar results (as seen in My Expectation)
The only workaround I have considered is:
Determining the maximum y-value among all data points.
Setting
MAX = k * y_max
. (k
being a custom-defined factor, for example, 1.2; to enhance accuracy, consideringy_min
to dynamically determine a properk
is also necessary)Utilizing the following configuration.
yAxis: {
max: MAX
},
plotOptions: {
series: {
threshold: MAX
}
}
Nevertheless, this method requires some JavaScript computations and I am curious if highcharts natively supports this feature.
UPDATE:
Clarifying my initial query, I aim to accommodate 3 types of areas:
- Enclosed within Upperbound and Lowerbound
- Below the lower bound
- Above the upper bound
While I managed to implement the first type using arearange, it does not handle missing upper/lower bounds gracefully; eliminating the thresholds entirely if one bound is absent.
Does a solution exist to evade manual computation of the threshold
setting?