1π
β
I donβt really understand the patterns in your code, like where this.promise
is initialised.
Why donβt you try something thatβs a bit easier to understand.
methods: {
async getApiChartData() {
let responseData = (await axios.get(api_url)).data.data;
return [responseData[0], responseData[1], responseData[2]];
}
}
Then in mounted
async mounted() {
let datapresent = await this.getApiChartData();
//rest of your code
}
π€Shoejep
Source:stackexchange.com