score:5

Accepted answer

the highcharts way of hiding labels on a per series basis is by using the series.line.label.enabled toggle. to hide labels for all series in a chart the following can be toggled (plotoptions.series.label.enabled):

plotoptions: {
  series: {
    label: {enabled: false},
    ...
  }
}

similarly, to change the color of the label for a series the series.line.label.style can be used, or to change the color for all series in a chart (plotoptions.series.label.style):

plotoptions: {
  series: {
    label: {style: {color: 'black'}},
    ...
  }
}

which leads to this example:

highcharts.chart('container', {
    chart: {
        type: 'line'
    },
    title: { text: 'no labels' },
    plotoptions: {
      series: {
        label: {
          enabled: false
        }
      }
    },
    series: [
    {
        name: 'unites states',
        data: [7.5, 15.2, 18.7, 21.5, 25.9, 30.2, 29.0, 28.6, 27.2, 20.3, 18.6, 14.8]
    },
    {
        name: 'tokyo',
        data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
    }, {
        name: 'london',
        data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
    }]
});

highcharts.chart('container2', {
    chart: {
        type: 'line',
    },
    title: { text: 'black labels' },
    plotoptions: {
      series: {
        label: {
          style: {
            color: 'black'
          }
        }
      }
    },
    series: [
    {
        name: 'unites states',
        data: [7.5, 15.2, 18.7, 21.5, 25.9, 30.2, 29.0, 28.6, 27.2, 20.3, 18.6, 14.8]
    },
    {
        name: 'tokyo',
        data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
    }, {
        name: 'london',
        data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
    }]
});
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>

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

score:1

i think you want like this:-

highcharts.chart('container', {
    chart: {
        type: 'line'
    },   
    series: [
    {
        name: 'unites states',
        data: [7.5, 15.2, 18.7, 21.5, 25.9, 30.2, 29.0, 28.6, 27.2, 20.3, 18.6, 14.8],
	
    },
    {
        name: 'tokyo',
        data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6],
    }, {
        name: 'london',
        data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8],
    }]
});
.highcharts-label text {fill: rgb(0, 0, 0) !important;}
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>

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


Related Query

More Query from same tag