I have a profile page in my website and I want a hollow pie chart like in the link below through which I want to display the percentage of profile completed. The percentage will be displayed in the center and the pie chart will have only 2 colors.
Visit Link For Image http://www.telerik.com/ClientsFiles/392888_hollow.png
What I did, I used Google Charts and the code is:
<!--Load the AJAX API-->
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<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 = new google.visualization.DataTable();
data.addColumn('string', 'Profile');
data.addColumn('number', 'Percentage');
data.addRows([
['Profile Complete', 3],
['Profile Incomplete', 1]
]);
// Set chart options
var options = {'title':'Profile Complete',
'width':400,
'height':300};
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
<!--Div that will hold the pie chart-->
<div id="chart_div"></div>
But what I m getting is a complete pie chart and not a hollow one, so can anyone help me in creating a hollow pie chart. I have an algorithm to calculate the data, so you can use dummy data.
Any kind of help or guidance is welcomed.
Thank you...