I am using the Google API to build the bar charts. Its working fine. But I need to do some more customization to that chart. I have to increase the range of the values on the X-Axis and if possible i need to have a horizontal scroll bar for the graph, if the X-Axis value exceeds certain value.
For Example : I have X-Axis maximum value is 2500, minimum value is 2. In this case the minimum value is shown on the Chart but its not clearly visible because of the range.
var studyData = new google.visualization.DataTable();
studyData.addColumn('string','XYZ Name');
studyData.addColumn('number','Completed');
studyData.addColumn('number','Pending ');
studyData.addColumn('number','Over Due');
studyData.addRow(['ABC Doc', 2543, 15, 24]);
studyData.addRow(['GED-Doc', 34, 2, 25]);
var studyOptions = {
title: 'Study Status',
fontName: 'Times-Roman',
fontSize: 12,
vAxis: {title: 'Study Name', titleTextStyle: {color: 'red'}},
hAxis: {
title: 'Status of document', titleTextStyle: {color: 'black'}},
width:1000,height :450,
legend : {position: 'right', textStyle: {color: 'blue', fontSize: 12}},
bar : {
// chxr=0,0,2500,100
groupWidth : '45%'
},
isStacked : true,
colors: ['#31B404', '#FFBF00', '#FF0000']
};
var chartB = new google.visualization.BarChart(document.getElementById('chart_divs'));
chartB.draw(studyData, studyOptions);