I am trying to make a Python CGI script show a Google ScatterChart with a linear trendline whose equation I can use elsewhere. The ScatterChart trendline option draws a trendline and I can find out the equation of the line by putting my pointer over the trendline, but that's no help because I need to get the coeffients from the equation programatically.
One solution I can think of is to write a function that computes the trendline and displays it on top of the ScatterChart. The problem here is that I don't know how to make a Google chart that has two series of data plotted differently (one series as dots, the other as a line).
A hybrid solution would be to use my function to compute the trendline so that I have the equation in my program, and then display the chart with its own Google-generated trendline. The issue here is that I know there is more than one way to make a linear trendline and I don't know which way Google uses.
Use the series..lineWidth option to make one series draw with a connecting line: