Reputation: 973
I'am using vue-apexharts to render chart, chart data comes from an api.
this.statistics = response.data;
this.statistics.consent.map((consent) => {
this.series.push(consent.count);
});
But an error is shown - TypeError: Cannot read property 'map' of undefined
Upvotes: 0
Views: 1250
Reputation: 670
Somehow when the map() function want to be executed, the this.statistics.consent
is empty/null/undefined. try to debug it by console.log(this.statistics.consent)
. Hope that helps and good luck!
Upvotes: 1