When I hover over the legend labels on my Google chart, I keep getting an error message that says "Cannot read property 'x' of null," and I'm not sure why.
The data is all in JSON format from an AJAX GET request and does not contain any null values.
My code looks something like this:
var dt = new google.visualization.DataTable(data[4]);
var options = {
vAxes: { 0: { logScale: false, title: 'Cash' } },
xAxes: { 0: { logScale: false, title: 'Months' } }
};
var chart = new google.visualization.LineChart(document.getElementById("chart_fullsite_cash")); chart.draw(dt, options);
The JSON in `data[4]` is structured as follows:
{
"cols":[
{
"type":"date",
"id":"Month",
"label":"Month"
},
...
],
"rows":[
...
]
}
I am struggling to understand what the issue might be. When I change the Date column type to String, it works fine but drastically alters the appearance of the graph.