Google Chart - google chart tutorial - 3D Pie Chart - chart js - google graphs - google charts examples



What is 3D Pie Chart?

  • Origin's 3D Pie Chart gives you complete control over the look of the plot. Set the thickness of the pie slice, displacement, view angle, and size and rotation of the chart.
  • pie chart can have 3D look. To do this, you have to add two properties to the chart’s config: depth3D and angle.

Configurations:

You have used is 3D configuration to set a pie chart as donut chart.

Syntax

// Set chart options
var options = { 
   is3D:true
};
Clicking "Copy Code" button to copy the code. From - google charts tutorial - team

Example:

googlecharts-pie-3d.html

 Tryit
<html>
<head>
<title>wikitechy Google Charts tutorial </title>
   <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
   <script type="text/javascript">
     google.charts.load('current', {packages: ['corechart']});     
   </script>
</head>
<body>
<div id="container" style="width: 550px; height: 400px; margin: 0 auto"></div>
<script language="JavaScript">
function drawChart() {
   // Define the chart to be drawn.
   var data = new google.visualization.DataTable();
   data.addColumn('string', 'Browser');
   data.addColumn('number', 'Percentage');
   data.addRows([
      ['Firefox', 50.0],
      ['IE', 36.8],
      ['Chrome', 10.8],
	  ['Safari', 6.5],
      ['Opera', 10.2],
      ['Others', 0.3]
   ]);
   
   // Set chart options
   var options = {'title':'Browser market shares at a specific website, 2014',
      'width':550,
      'height':400,
       is3D:true
   };

   // Instantiate and draw the chart.
   var chart = new google.visualization.PieChart(document.getElementById('container'));
   chart.draw(data, options);
}
google.charts.setOnLoadCallback(drawChart);
</script>
</body>
</html>
Clicking "Copy Code" button to copy the code. From - google charts tutorial - team

Output:


Related Searches to Google Chart - 3D Pie Chart