series.for String
The name of the parent series of the trendline.
The
for
option is supported when series.type is set to "linearTrendline
", "exponentialTrendline
", "logarithmicTrendline
", "powerTrendline
", "polynomialTrendline
" or "movingAverageTrendline
".
Example - set the trendline parent series for field
<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: "Trend (LINEAR)",
type: "linearTrendline",
for: "Price"
}],
legend: {
visible: true,
position: 'bottom'
}
});
</script>