I found solution to make a loop in ApexChart which I want to share with you. First, you should name your chart with id
chart {...
id: 'chart1',
...},
Second, you should make a global var just like ptr = []
Third step is to push there date.
var wynik4 =
(function () {
for(i=0; i<str.length - 1; i++){
r = r + str[i];
ptr.push(r.toFix(1));
}})();
Finally, you should update your chart with new dates using special formula.
function c() {
ApexCharts.exec('chart1', "updateOptions", {
xaxis: {
categories: ptr,
}
});
ApexCharts.exec('chart1', "updateSeries", [
{
name: 'xyz', data: ptr,
}
]);
}
That's all, so simple.