121
votes

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.

Can anybody help me out here.

How do you disable the title / subtitle in highcharts?

(if you simply leave the text blank it still carves out a whitespace in that spot where the title is, i'd like to not have this happen)

14
can you please mark the answer as accepted? ;)Plastic

14 Answers

171
votes

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.

69
votes

From the highcharts doc:

text: String The title of the chart. To disable the title, set the text to null. Defaults to Chart title.

fiddle: http://jsfiddle.net/daub10dr/

title:{
      text: null
      }
40
votes

I prefer this method :

title: {
    text: '',
    style: {
        display: 'none'
    }
},
subtitle: {
    text: '',
    style: {
        display: 'none'
    }
},
19
votes

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/

13
votes

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

13
votes

You can always do this:

chart:{
    marginTop: 30
}

title:{
    text: ''
}

That worked for me :-)

note: this answer was for version 2.*, for newer versions there are better answers.

10
votes

Set the text field to null

From the documentation at http://api.highcharts.com/highcharts#title.text

text: String

The title of the chart. To disable the title, set the text to null. Defaults to Chart title.

8
votes

According the Highcharts doc, the correct way is to set 'text' to null.

4
votes

In react-native below code worked for me,

  title: {
    style : {
      display : 'none'
    }
 }

Hope it helped.

3
votes

Here is the solution

title: {
    text: null
},
subtitle: {
    text: null
}
3
votes

For those that use Typescript you can set the Highcharts.TitleOptions to hide the chart title.

title: {
  text: undefined
},
subtitle: {
  text: undefined
}
2
votes

Just write a JSON object

title : {
  style : {
    display : 'none'
  }
}
1
votes

This works for me!!!

title:false

-1
votes

This is a bit of a hack but you can also try that:

title: {
    text: '<span class="hidden">My custom Hello</span>',
    align:"left",
    useHTML:true
}