Cristiano Testai
Cristiano Testai

Reputation: 3

How to disable the circle that appears in Highcharts without data?

This example is a pie chart without data, Highcharts shows a circle. How can i do not to show this cycle on the chart?

// Build the chart
Highcharts.chart('container', {
    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: false
            },
            showInLegend: true
        }
    },
    series: [{
        name: 'Brands',
        colorByPoint: true,
        data: []
    }]
});

Upvotes: 0

Views: 384

Answers (1)

Ashu
Ashu

Reputation: 2266

You can set the borderWidth to 0 of the pie chart.

    plotOptions: {
        pie: {
            borderWidth: 0
        }
    }

// Build the chart
Highcharts.chart('container', {
  chart: {
    plotBackgroundColor: null,
    plotBorderWidth: null,
    plotShadow: false,
    type: 'pie'
  },
  plotOptions: {
    pie: {
      borderWidth: 0
    }
  },
  series: [{
    data: []
  }]
});
<script src="https://code.highcharts.com/highcharts.js"></script>


<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>

Upvotes: 2

Related Questions