Apexcharts It is a possibility that you may have not included 'data' property in series, Cannot read property 'labels' of undefined
See original GitHub issueI get three errors
When the map is rendered for the first time i get:
apexcharts:6 It is a possibility that you may have not included 'data' property in series
apexcharts:6 It is a possibility that you may have not included 'data' property in series
Then each time the map is rendered I get:
Uncaught (in promise) TypeError: Cannot read property 'labels' of undefined
My code:
var options = {
theme: {
mode: 'light',
palette: 'palette1',
monochrome: {
enabled: false,
color: '#31a7ec',
shadeTo: 'light',
shadeIntensity: 0.65
}
},
chart: {
height: 450,
type: 'bar',
},
plotOptions: {
bar: {
horizontal: true,
}
},
dataLabels: {
enabled: true
},
series: [{
name: "Consumption"
}],
title: {
text: 'AMR Consumption',
},
noData: {
text: 'No Data'
}
}
var chart = new ApexCharts(
document.getElementById("AMRbarchart"),
options
)
// then i do ajax requests and add / destroy the chart
//ajax
$.getJSON('http://10....', response => {
chart.render()
chart.updateOptions({
title: {
text: 'Consumption by year (' + unit + ') for ' + feature_name
},
chart: {
height: 380
}
})
chart.updateSeries([{
data: response.yearly
}])
})
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
It is a possibility that you may have not included 'data' property ...
I want to be able to CRUD the Gantt chart. But I can't even add the new data yet. I have also tried...
Read more >Series [Working with Data] - ApexCharts.js
The series expects a single array for pie/donut and radialbar charts. The names of the series values are to be provided in labels...
Read more >How to use ApexCharts.js with wpDataTables
ApexCharts.js is an open-source chart rendering engine. ... (on left) and Line chart with data labels and custom size of tick amount and...
Read more >Visualization: Column Chart - Google Developers
While users can hover over the columns to see the data values, you might want to include them on the columns themselves: This...
Read more >Uncaught (in promise) TypeError: Cannot read properties of ...
You likely have two errors. The first is that you are trying to send an email from a cacheable method (which you can't...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As the error suggests, you cannot have a
series
without a data property. Even if you don’t have anything in data, you should pass an empty arrayThe problem is that the JSON calls are ASYNC so the system will hit ApexCharts.exec before the data. is loaded.