This pluggable implementation was shared by Chris Stefano: https://github.com/virtualstaticvoid/highcharts_trendline
Mokumax - I calculate it server side and the offer it up as a separate data series. In perl I used Math::NumberCruncher::BestFitph1g supported this idea ·
This would be extremely useful. If we could also calculate the trend based on the visible canvas... So if you zoom in on a chart, the trend line is calculated based on the visible values, rather than the entire dataset.
jquery includes ajax calls you can make to a server hosting a php CGI to get the data. If you are using php to generate your JS, you could just generate the page with the data embedded (the ajax method is infinitely better).