Search code examples
angularjshighchartshighcharts-ng

having issue when updation Highcharts object using highcharts-ng directive


Im facing an issue with highcharts-ng directive when updating some of my hightcharts graphes. When i use this syntaxe charts is updated like charm but didn't seem to show any of my data labels:

$scope.chartRonConfig = {
    chart: {
        plotBackgroundColor: null,
        plotBorderWidth: 0,
        plotShadow: false
    },
    title: {
        text: 'Browser<br>skjdfhsjdkf<br>2019',
        align: 'center',
        verticalAlign: 'middle',
        y: 40
    },
    tooltip: {
        pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
    },
    plotOptions: {
        pie: {
            dataLabels: {
                enabled: true,
                distance: -50,
                style: {
                    fontWeight: 'bold',
                    color: 'white'
                }
            },
            startAngle: -90,
            endAngle: 90,
            center: ['50%', '75%']
        }
    },
    series: [{
        type: 'pie',
        name: 'Browser share',
        innerSize: '50%',
        data: [
            ['Firefox', 10.38],
            ['IE', 56.33],
            ['Chrome', 24.03],
            ['Safari', 4.77],
            ['Opera', 0.91],
            {
                name: 'Proprietary or Undetectable',
                y: 0.2,
                dataLabels: {
                    enabled: false
                }
            }
        ]
    }]
};

but when im using this syntaxe:

$scope.chartRonConfig = Highcharts.chart('RonContainer', { // same config } 

nothing is updating.

The view is pretty simple:

<highchart id="RonContainer" config="chartRonConfig"></highchart> 

I don't know what im i missing here. Any help would be appreciated.

THank you.enter image description here


Solution

  • thank you for your attention, i did solve it with using an early highcharts version instead of using 5.0.12 i use 5.0.11 and it did solve my problem i think it's due to highcharts-ng code that dosn't support the latest version of highcharts.

    Thank you.

    Regards Marouan