Решил выводить не data.length, а даты(date),но что то не получается.
На входе в ф-цию Grafics_Eda(), имею массив
[{"date":"2020-01-20","percent_kkal":"9.7","percent_carb":"14.0","percent_fat":"5.0","percent_prot":"15.5"},{"date":"2020-01-21","percent_kkal":"3.8","percent_carb":"1.8","percent_fat":"4.9","percent_prot":"3.5"},{"date":"2020-01-23","percent_kkal":"10.8","percent_carb":"10.2","percent_fat":"2.0","percent_prot":"34.5"},{"date":"2020-01-27","percent_kkal":"9.7","percent_carb":"7.9","percent_fat":"29.9","percent_prot":"4.6"}]
function Grafics_Eda(data1,data2,data3,data4,date) {
var dat = date.split(',')
for(var i=0; i<date.length; i++) {
date[i] = +date[i];
}
....
}
Подставляю в
xAxis: {
categories: date
}
выводит NaN