I am trying to display browser visits for my site using flot pie chart. Everything is working properly except the series name displays as undefined. Data for the series is.
[
[
"Chrome",
"54"
],
[
"Firefox",
"51"
],
[
"Internet Explorer",
"9"
],
[
"Opera Mini",
"2"
],
[
"Safari",
"2"
]
]
and the JavaScript is
$('#browserVisits').css({
height: '300px',
width: '100%'
});
$.plot($('#browserVisits'), visits, {
series: {
pie: {
show: true
}
},
grid: {
hoverable: true,
clickable: true
},
legend: {
show: false
}
});
And the result for this series is like

Why the series name displays undefined instead of browser name? What am I doing wrong and what can be the solution? Thanks.