Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <body>
- <div class="container">
- <div class="row">
- <div class="col-md-6">
- <div id="pie_chart" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
- </div>
- <div class="col-md-6">
- </div>
- </div>
- </div>
- </body>
- <script type="text/javascript">
- pie_chart();
- function pie_chart(){
- Highcharts.chart('pie_chart', {
- chart: {
- plotBackgroundColor: null,
- plotBorderWidth: null,
- plotShadow: false,
- type: 'pie'
- },
- title: {
- text: 'Browser market shares in January, 2018'
- },
- tooltip: {
- pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
- },
- plotOptions: {
- pie: {
- allowPointSelect: true,
- cursor: 'pointer',
- dataLabels: {
- enabled: true,
- format: '<b>{point.name}</b>: {point.percentage:.1f} %',
- style: {
- color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
- }
- }
- }
- },
- series: [{
- name: 'Brands',
- colorByPoint: true,
- data: [{
- name: 'Chrome',
- y: 61.41,
- sliced: true,
- selected: true
- }, {
- name: 'Internet Explorer',
- y: 11.84
- }, {
- name: 'Firefox',
- y: 10.85
- }, {
- name: 'Edge',
- y: 4.67
- }, {
- name: 'Safari',
- y: 4.18
- }, {
- name: 'Sogou Explorer',
- y: 1.64
- }, {
- name: 'Opera',
- y: 1.6
- }, {
- name: 'QQ',
- y: 1.2
- }, {
- name: 'Other',
- y: 2.61
- }]
- }]
- });
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement