Reputation: 13
I have a LineChart which is breaking after upgrade to latest Highcharts 11.4.7. Getting this error in console logs like:
Cannot read properties of undefined "length".
Getting error in insertItem()
function.
insertItem: function(A, t) {
var i, e = A.options.index, o = t.length;
for (i = A.options.isInternal ? o : 0; i < o + 1; i++)
if (!t[i] || a(e) && e < T(t[i].options.index, t[i]._i) || t[i].options.isInternal) {
t.splice(i, 0, A);
break
}
return i
}
t is coming as undefined.
Not able to identify when and how the value is passed to this method causing this error.
Is there any specific change needs to be done here while upgrading highcharts?
Expected to chart load with x-axis and y-axis information
More info on the implementation : We are using highcharts in mvc and we are using the default method createChartXYComponent for instantiation. And inside this method the error is getting triggered. I believe this code is generated by HighCharts.
@using Highsoft.Web.Mvc.Charts
@{
var chart = new HighChartExtension();
chart.YAxis[0].StartOnTick = false;
}
I am assigning all the chart related properties from razor view and calling the method in Highsoft.
@Html.Highsoft().Highcharts(chart, "XYComponent")
also in script we are calling few methods for initialization in document ready but it is throwing error.
$(document).ready(function () {
createChartXYComponent();
});
But createChartXYComponent is throwing error in console. All this is happening after upgrade from 8.2 to 11.4.7.
Upvotes: 0
Views: 77