"mode" approximation for Highstock dataGrouping
I would like a new "mode" approximation that returns the most common element of an array when grouping data. Currently we have "average", "open", "low", "high", "close", "sum" and none of these work for me. So if the array is [1, 2, 3, 4, 4], I want "4" (most common), not "2.8" (average).
If the results are multi-modal [1, 1, 2, 2] or non-modal [1, 2, 3] then "open" is a good fallback.
I would also like this "mode" to be available in OHLC popups.
http://api.highcharts.com/highstock#plotOptions.series.dataGrouping.approximation
As you can see in the docs, the approximation can also be a callback function. This means you can create your own function that returns the most common element.