0

Not able to change title for chart during export

asked 2017-10-24 17:47:20 +0800

gowreswaran gravatar image gowreswaran
1

updated 2017-10-24 19:02:01 +0800

cor3000 gravatar image cor3000
6280 2 7

Not able to set title when exporting in Chart. When tried to use following code, exporting the chart gives me without title. Any suggestion guys ?

Map chartOptions = new HashMap<String,String>();
chartOptions.put("title", "ABC");
getExporting().setChartOptions(chartOptions);
delete flag offensive retag edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-10-24 19:38:45 +0800

cor3000 gravatar image cor3000
6280 2 7

updated 2017-10-24 19:39:40 +0800

according to the related highcharts documentation the "title" property of the export.chartOptions is another nested map, where the "text" key defines the String to be used as export title, while other keys like "align" allow different title settings.

If you change your code to this, you should see the title text in the exported chart:

Map chartOptions = new HashMap<String, Object>();
Map titleProps = Collections.singletonMap("text", "ABC");
chartOptions.put("title", titleProps);
getExporting().setChartOptions(chartOptions);
link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2017-10-24 17:47:20 +0800

Seen: 10 times

Last updated: Oct 24 '17

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More