stackOrderAppearance function Stack orders Stacks
Returns a series order such that the earliest series (according to the maximum value) is at the bottom.
final stack = Stack(…)..order = stackOrderAppearance;
Implementation
List<int> stackOrderAppearance(List<List<List<num>>> series) {
var peaks = series.map(peak).toList();
return stackOrderNone(series)
..sort((a, b) {
return peaks[a] - peaks[b];
});
}