series.trendline Object
The trendline configuration options.
The
trendline
option is supported when series.type is set to "linearTrendline
", "exponentialTrendline
", "logarithmicTrendline
", "powerTrendline
", "polynomialTrendline
" or "movingAverageTrendline
".
Example - set the trendline options
<div id="chart"></div>
<script>
$("#chart").kendoChart({
dataSource: {
data: [
{
period: "2021 Q1",
count: 669590.0
},
{
period: "2021 Q2",
count: 793564.0
},
{
period: "2021 Q3",
count: 941133.0
},
{
period: "2021 Q4",
count: 1133020.0
}
]
},
series: [{
name: "Sales By Quarter",
type: "line",
field: "count",
categoryField: "period"
}, {
name: "Average",
type: "movingAverageTrendline",
for: "Sales By Quarter",
trendline: {
period: 3
}
}]
});
</script>