I have a chart which, depending on a button group selection, will display a different data item in a line series. This is handled server-side, with the chart definition not needing to be changed.
However, I do need to change the name displayed on the value axis and legend name.
I can do this by using the following code:-
var specChart = $("#chortcategorytrendchart").data("kendoChart");
specChart.options.valueAxis[1].title.text = sName;
specChart.options.series[1].name=sName;
specChart.refresh();
This works, but I also need to call the chart datasource.read:-
$('#chortcategorytrendchart').data("kendoChart").dataSource.read();
When I do this, the value axis title remains changed correctly, but the series name in the legend reverts to the default setting in the chart definition.
It doesn't make a difference if the read is called before or after the chart refresh.
I am using version 2021.2.511. How can I stop the read call changing the series name back?