Hi Chuck,
You may just add the trend layer using the last 5 (x, y) coordinates only. If you are using Axis.setLabels to configure the x-axis, the x-coordinate of a bar is its array index. (The first bar is 0, the second bar is 1, etc.)
For example, in Python:
c.addTrendLayer2(range(len(myData) - 5, len(myData)), myData[-5:], 0x0000ff, "My Trend Line")
Hope this can help.
Regards
Peter Kwan |