-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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);
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);
Asked: 2017-10-24 17:47:20 +0800
Seen: 10 times
Last updated: Oct 24 '17