Besterfield in his book Quality Control, sixth edition answers this question. He discusses this as a "Chart for Trends".
Chart for Trends created in Excel
The process involves regression to determine the slope of your center line. The equation is $$\overline{X}=a+bG$$ where $\overline{X}$ is the subgroup average, G is the subgroup number, a is the intercept, and b is the slope.
$$a=\frac{(\sum \overline{X})(\sum G^2)-(\sum G)(\sum G\overline{X})}{g\sum G^2-(\sum G)^2}$$
$$b=\frac{g\sum G \overline{X}-(\sum G)(\sum \overline{X})}{g\sum G^2-(\sum G)^2}$$
where g is the number of subgroups.
The coefficients of a and b are obtained by establishing by columns for G, $\overline{X}$, G$\overline{X}$, and G^2 … ; determining their sums; and inserting their sums into the equation.
Once the trend-line equation is known, it can be plotted on the chart by assuming values of G and calculating $\overline{X}$. When two points are plotted, the trend line is drawn between them. The control limits are drawn on each side of the trend line a distance (in the perpendicular direction) equal to $$A_2\overline{R}$$ …
The R chart will generally have the typical appearance… However the dispersion may also be increasing.
Besterfield also suggests having a URL and LRL or Upper Rejection Limit and Lower Rejection Limit as lines parallel to the horizontal axis and indicate times when the process would be unacceptable.
Insert the codes between the "$$" into the Online LaTeX Equation Editor if you would like to visualize the equations easier (a limitation of my reputation and this page).