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

后端 未结 14 743
伪装坚强ぢ
伪装坚强ぢ 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 09:59

    Setting the title text to an empty string is the way to do it.

    No space is created for the title in that case:

    without text: http://jsfiddle.net/jlbriggs/JVNjs/284/

    with text: http://jsfiddle.net/jlbriggs/JVNjs/286/

    title:{
        text:''
    }
    

    If you want less space than is left in that case, simply set your 'marginTop' to 0

    {{edit due to numerous comments:

    As pointed out a number of times below, the documentation now states text: null as the method to achieve this.

    Either method achieves the desired result.

提交回复
热议问题