series.trendline Object
The trendline configuration options.
The
trendline
option is supported when series.type is set to "linearTrendline", "exponentialTrendline", "logarithmicTrendline", "powerTrendline" or "movingAverageTrendline".
Example - set the trendline options
<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
dataSource: {
data: [{
date: new Date("2021-01-01"),
price: 111
}, {
date: new Date("2021-04-01"),
price: 121
}, {
date: new Date("2021-07-01"),
price: 105
}, {
date: new Date("2021-10-01"),
price: 105
}]
},
dateField: "date",
series: [{
name: "Price",
type: "line",
field: "price"
}, {
name: "Average",
type: "movingAverageTrendline",
for: "Price",
trendline: {
period: 3
}
}],
legend: {
visible: true,
position: 'bottom'
}
});
</script>