Variable radius pie

by murgiaMarco

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/variable-pie.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
<div id= "test">


<figure class="highcharts-figure">
    <div id="container">
      
    </div>
</figure>

</div>

CSS

#test {
	height: 600px;
  width:600px;
  background-color: white;
  display: block;
  border-radius: 50%;
  margin:30px;
}

#container {
	height: 600px;
  width:600px;
}

.highcharts-background {
  fill: none;
}

.highcharts-figure, .highcharts-data-table table {
    min-width: 200px; 
    max-width: 700px;
    margin: 1em auto;
}

.highcharts-data-table table {
	font-family: Verdana, sans-serif;
	border-collapse: collapse;
	border: 1px solid #EBEBEB;
	margin: 10px auto;
	text-align: center;
	width: 100%;
	max-width: 500px;
}
.highcharts-data-table caption {
    padding: 1em 0;
    font-size: 1.2em;
    color: #555;
}
.highcharts-data-table th {
	font-weight: 600;
    padding: 0.5em;
}
.highcharts-data-table td, .highcharts-data-table th, .highcharts-data-table caption {
    padding: 0.5em;
}
.highcharts-data-table thead tr, .highcharts-data-table tr:nth-child(even) {
    background: #f8f8f8;
}
.highcharts-data-table tr:hover {
    background: #f1f7ff;
}

JavaScript

Highcharts.chart('container', {
    chart: {
        type: 'variablepie'
    },
    title: {
        text: '',
        floating: true,
        align: 'center',
        x: 0,
        y: 320,
        style: {
            color: '#000000',
            fontSize: 100
        }
    },
     exporting: {
    	enabled: false
  	},
    credits: {
    	enabled: false
		},
    tooltip: {
        headerFormat: '',
        pointFormat: '<b style="color:{point.color}"> {point.name}</b><br/>' +
            'Area (square km): <b>{point.y}</b><br/>' +
            'Population density (people per square km): <b>{point.z}</b><br/>',
       backgroundColor: '#FFFFFF' 
    },
     plotOptions: {
        series: {
            dataLabels: {
                enabled: false
            }
        }
    },
    series: [{
        minPointSize: 5,
        innerSize: '40%',
        zMin: 0,
        name: 'countries',
        data: [{
            name: 'Spain',
            y: 505370,
            z: 80
        }, {
            name: 'Italy',
            y: 301340,
            z: 80
        }, {
            name: 'Germany',
            y: 120000,
            z: 80
        }, {
            name: 'Germany',
            y: 300000,
            z: 80
        }, {
            name: 'Germany',
            y: 200000,
            z: 80
        }]
    }]
});