Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
629 views
Welcome To Ask or Share your Answers For Others

1 Answer

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

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

See an example: jsfiddle

See the API Ref.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...