Thank you for the response! Mr. Mudassir Ali Khaja!
when I came across googles dev site for bar charts because it had a nice button that you can click and it renders the column chart to 'reduce' or 'expand'.
The chart doesn't even appear on the html when I bring it up on a browser..sorry sir, I'm kind of clueless..
google.load("visualization", "1", {packages: ["corechart"]});
google.charts.setOnLoadCallback(init);
function init() {
var options = {
width: 700,
height: 600,
animation:{
duration: 1000,
easing: 'out',
},
vAxis: {minValue:0, maxValue:1000}
};
var data = new google.visualization.DataTable();
data.addColumn('string', 'N');
data.addColumn('number', 'Value');
data.addRow(['V', 200]);
var chart = new google.visualization.ColumnChart(
document.getElementById('visualization'));
var button = document.getElementById('b1');
function drawChart() {
// Disabling the button while the chart is drawing.
button.disabled = true;
google.visualization.events.addListener(chart, 'ready',
function() {
button.disabled = false;
});
chart.draw(data, options);
}
button.onclick = function() {
var newValue = 1000 - data.getValue(0, 1);
data.setValue(0, 1, newValue);
drawChart();
};
drawChart();
}