Is there a way to disable the Title and Subtitle in Highcharts?

后端 未结 14 663
伪装坚强ぢ
伪装坚强ぢ 2020-12-25 09:04

I\'m just going to hardcode it in using html that is around the graph, I don\'t want to use the built in.

I don\'t see a \"disable: true\" option in the API.

相关标签:
14条回答
  • 2020-12-25 10:03

    Very simple! In the latest version of Highcharts just set title and subtitle properties to false.

    {
    title: false,
    subtitle: false
    }
    

    Find the working fiddle here: https://jsfiddle.net/samuellawrentz/hkqnvm7k/4/

    0 讨论(0)
  • 2020-12-25 10:04

    It´s simple... Only set the title´s text to null. Like this

        $(function () {
    $('#container').highcharts({
        xAxis: {
            categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
        },
        title: {
            text: null  
        },
        series: [{
            data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]        
        }]
    });
    

    });

    see@APIreference: http://api.highcharts.com/highcharts#title.text

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