Inspired by this question and solution https://github.com/oxyplot/oxyplot/issues/1186
Inspired by this question and solution
oxyplot/oxyplot#1186