<html>
<head>
<!--Load the AJAX API-->
<script type="text/javascript">
// Load the Visualization API and the piechart package.
google.load('visualization', '1.0', {'packages':['corechart']});
// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawChart);
// Callback that creates and populates a data table,
// instantiates the pie chart, passes in the data and
// draws it.
function drawChart() {
// Create the data table.
var data = google.visualization.arrayToDataTable([
[ 'Discount Amount',
'No Discount', { role: 'annotation' } ,
'1% - 10%', { role: 'annotation' } ,
'11% -24%', { role: 'annotation' } ,
'25-49%', { role: 'annotation' } ,
'50%+', { role: 'annotation' } ,
'Unsure', { role: 'style' },{ role: 'annotation' } ],
['Overall average discount',14, '14%', 15, '15%', 10,'10%', 10, '10%', 13, '13%', 39,'opacity: 0.2','39%'],
['NetApp', 13,'13%', 9, '9%', 13, '13%', 13, '13%', 35, '35%',1, 'opacity: 0.2','1%'],
['EMC', 7, '7%', 13, '13%', 7, '7%', 7, '7%', 13, '13%', 53, 'opacity: 0.2','53%'],
['Synology',33, '33%', 33,'33%',0,'',0,'',17,'17%',17, 'opacity: 0.2','17%'],
['Dell',0,'',0,'',0,'',20,'20%',0,'',80, 'opacity: 0.2','80%']
]);
var options = {
title: 'Discount threshold',
width: 1000,
height: 600,
legend: { position: 'top', maxLines: 6 },
bar: { groupWidth: '50%' },
isStacked: 'percent',
colors: ['#00CDCD', '#EEAD0E', '#FF00FF', '#32CD32', '#CD0000', '#808080'],
hAxis: { textPosition: 'none', gridlines:{color:'transparent'}},
annotations: { position: 'top'}
};
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.BarChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<!--Div that will hold the pie chart-->
<div id="chart_div"></div>
</body>
</html>