46
votes

I have a simple column chart that I update via AJAX, and all is working fine except I cannot change the actual title of the chart when I'm updating the data.

I've tried the obvious -

chart.title="new title";
//and
chart.title.text="New title";

etc. - to no avail, and have had no success finding a solution online.

Any help will be greatly appreciated.

1

1 Answers

94
votes

You can use setTitle(titleObj, subTitleObj) for that.

chart.setTitle({text: "New Title"});

See an example: jsfiddle

See the API Ref.