Example of Trendlines in Javascript Chart Control


This sample visualizes the trend of Indian rupees and US dollar variation with trendline in the chart. The type of trend line can be changed by using TrendLine Type, forward and backward forecasting of trendlines can be changed by Forward Forecasting and Backward Forecast respectively. Polynomial and period for a trendlines can be changed by using Polynomial order and Period.

More Details...

TrendLine Type:
Forward Forecast:
Backward Forecast:
Polynomial Order:

In this example, you can see how to render and configure the Trend Lines. You can use border, fill properties to customize the area. Tooltip is enabled in this example, to see the tooltip in action, hover a point or tap on a point in touch enabled devices. Injecting Module Chart component features are segregated into individual feature-wise modules. To use Trend lines, we need to Inject Treandlines module using chart.Inject(Trendlines) method. More information on the Trend Lines can be found in this documentation section.