Trying to basically create a sparkline(bar) in a dynamically created
<table>. I need to remove all text from the bar chart. Here is my code.
for (i=0; i<keys.length; i++){
dataTable = new google.visualization.DataTable();
dataTable.addColumn('string', 'ID')
dataTable.addColumn('number', 'Dead');
dataTable.addColumn('number', 'Closed');
dataTable.addColumn('number', 'Blocked');
dataTable.addColumn('number','Active');
var id = data[keys[i]][[0]];
var dead = data[keys[i]][[8]];
var closeditem = data[keys[i]][[7]];
var blocked = data[keys[i]][[9]];
var active = data[keys[i]][[6]];
dataTable.addRows([
[id, dead, closeditem, blocked, active]
]);
var options = {
titlePosition: 'none',
series: {
0:{
color: 'black'
},
1:{
color: 'navy'
},
2:{
color: 'red'
},
3:{
color: 'grey'
}
},
hAxis: { textPosition: 'none', textColor: '#ffffff', gridlines: { color:
'transparent' } },
vAxis: { textPosition: 'none', textColor: '#ffffff', gridlines: { color:
'transparent' } },
axisFontSize: 0,
bars: 'horizontal',
isStacked: true,
legend: {position: 'none'}
};
var element1 = data[keys[i]][[0]];
var chart = new google.charts.Bar(document.getElementById(element1));
chart.draw(dataTable,google.charts.Bar.convertOptions(options));
}
Attached is the image of the chart outputted. How do I get rid of the
numbers on the hAxis and the label on the left?
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/9160bfad-bc1f-4451-922a-1392d829048e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.