I have an axios request with some data and I just want to display that data in an apexchart from type scatter. It does not render the entry at index zero.
Here is my code from the axios function:
methods: {
foobarAxios() {
this.$api
.get("/foobarData/?last=10")
.then((result) => {
for (const item of result.data) {
this.series[0].data.push([
new Date(item.foobarDataDate).getTime(),
item.data.value,
]);
console.log(this.series[0].data);
}
})
.catch((err) => {
console.log(err);
});
},
},
mounted() {
this.foobarAxios();
},
and that's the console.log output: (as you can see the array has a length of 10)
0: (2) [1634031120000, 67, __ob__: Observer]
1: (2) [1634030880000, 64, __ob__: Observer]
2: (2) [1634030700000, 67, __ob__: Observer]
3: (2) [1630507260000, 82, __ob__: Observer]
4: (2) [1630506600000, 61, __ob__: Observer]
5: (2) [1630506300000, 62, __ob__: Observer]
6: (2) [1624292880000, 65, __ob__: Observer]
7: (2) [1624292700000, 73, __ob__: Observer]
8: (2) [1624290000000, 63, __ob__: Observer]
9: (2) [1624289760000, 60, __ob__: Observer]
and here is the rendered apexchart: (as you can see, there are just 9 values and the one at index 0 is missing)

What am I missing here? Could it be just a bug from apexcharts?