series.trendline.period Number
(default: 2)
The number of intervals to take when calculating averages. The value should be an integer greater than 2.
The period setting is supported only when series.type is set to "movingAverageTrendline".
Example - set the moving average trendline period
<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: "Sales Trend",
type: "movingAverageTrendline",
for: "Sales By Quarter",
trendline: {
period: 3
}
}]
});
</script>