HighCharts Hide Series Name from the Legend

后端 未结 5 504
耶瑟儿~
耶瑟儿~ 2021-01-31 01:19

I try to solve this problem several times and give up. Now, when I have met him again, I decided to ask for some help.

I have this code for my Legend:

lege         


        
相关标签:
5条回答
  • 2021-01-31 01:26

    showInLegend is a series-specific option that can hide the series from the legend. If the requirement is to hide the legends completely then it is better to use enabled: false property as shown below:

    legend: { enabled: false }

    More information about legend is here

    0 讨论(0)
  • 2021-01-31 01:38

    Looks like HighChart 2.2.0 has resolved this issue. I tried it here with the same code you have, and the first series is hidden now. Could you try it with HighChart 2.2.0?

    0 讨论(0)
  • 2021-01-31 01:40

    Replace return 'Legend' by return ''

    0 讨论(0)
  • 2021-01-31 01:41

    Set showInLegend to false.

    series: [{
                showInLegend: false,
                name: 'Series',
                data: value                
            }]
    
    0 讨论(0)
  • 2021-01-31 01:49

    If you don't want to show the series names in the legend you can disable them by setting showInLegend:false.

    example:

    series: [{
       showInLegend: false,             
       name: "<b><?php echo $title; ?></b>",
       data: [<?php echo $yaxis; ?>],
    }]
    

    You get other options here.

    • legend options

    • other chart options

    0 讨论(0)
提交回复
热议问题