To obtain complete control of the TrendLine calculations, a class inheriting from ICustomTrendLine can be implemented and instantiated. After the CustomTrendLine property is set to an instance of such an object, the chart will plot the user-defined TrendLine with the appropriate styles and legend entry.