Reputation: 112
Advanced Thanks. Pretty simple, I checked the chart API guide / posts on here, but I cannot get it to work. I am trying to set Google Charts to display the first two columns in my line Chart. As the third column I use to filter the results that appear using a CategoryFilter
view: {'columns': [0,1]}
I know I need to be using this code, but I am not sure where, I tried it in the options but with no luck?
Columns: I want to plot Date, Species, which works, however currently it also plots the site too.
Date, Species, Site
12-6-2010, 1, 49
// Create a line chart, passing some options
var LineChart = new google.visualization.ChartWrapper({
'chartType': 'LineChart',
'containerId': 'chart_div',
'options': {
//'width': 600,
'height': 600,
//'pieSliceText': 'value',
'legend': 'top'
}
// 'view':{'columns':[0,1]}
});
Upvotes: 0
Views: 1564
Reputation: 654
If you are using the code above, there is a comma missing from the end of the options {}. List items should all end with a comma, apart from the last one. Here you had two items without a comma :-)
'options': {
//'width': 600,
'height': 600,
//'pieSliceText': 'value',
'legend': 'top'
},
'view':{'columns':[0,1]}
});
Upvotes: 2