The attached example contains a chart with linear and cubic curve fitting. The script in the chart can be modified to fit to any polynomial order (max 50).<br />
To use:<br />
Create an extra series in your chart to plot the regression line. Set the data for the series to be the untrended, values and format the series as you like. Take a note of the series name (on the Format Chart-->Series screen.)<br />
<br />
Edit the beforeGeneration script on the chart. Near the top there is a commented bit "Set your series name here".<br />
For each series you want to convert to a regression line you need a copy of the code....
if (seriesid=="name of series to be made into trend line") {
degree = n;
dofit=true;
}
<br />
Where<br />
n=1 for a straight line,<br />
n=2 for a quadratic fit,<br />
n=3 for a cubic fit etc....<br />
<br />
These numbers are the same as the polynomial order in excel. Maximum value is 50.<br />
<br />
Currently this will only work on category charts. Get in touch if you want to get it working with scatter charts (with non-uniform x spacing) as this needs some code changes.