Thursday, November 24, 2016

How to easily get a pie chart in blogger

Okay, who would've known that getting a pie chart into blogger (or any website or blog) was so easy...

Yup, just put the following code into the HTML section of blogger and you are good to go. Of course, you can modify the ethnicities and percentages to match you.

<script src=""></script>
  <script src=""></script>
   <br />
<div id="myDiv" style="height: 380px; width: 480px;">
<!-- Plotly chart will be drawn inside this DIV --></div>
<script type="text/javascript">
    var data = [{
    values: [63, 13, 7, 4, 2, 6, 4, 1],
    labels: ['Italy/Greece', 'Europe West', 'Great Britian', 'Ireland', 'Iberian Peninsula', 'Caucasus', 'Middle East', 'Africa North'],
           type: 'pie'
   var layout = {
   height: 400,
   width: 500
  Plotly.newPlot('myDiv', data, layout);

No comments:

Post a Comment

OXY 3 Parts Needed

This blog post lists the parts needed to build and operate an OXY 3 .... but first an Oxy 3 unboxing video! Lynx OXY3-255 - Oxy 3 H...