Code based on https://www.arction.com/lightningchart-js-interactive-examples/#edit/lcjs_example_0000_lineSeries