stegmann Posted February 20, 2015 Share Posted February 20, 2015 Hello,using Jasperserver 5.6 on AWS.I am trying to add DataLabels to the Piecharts in Ad-Hoc EditorFor this I changed scripts/adhoc/highchart.datamapper.js as following var result = _.extend(HDM.getGeneralOptions(extraOptions), { xAxis: { categories: [] }, plotOptions: { pie: { slicedOffset: 0, dataLabels: { enabled: true }, point: { events: { legendItemClick: HDM._getLegendItemClickHandler } } } }, series: [], labels: { items: [] } });[/code] I uploaded the file and restarted tomcat7. but there is no effect in the charts.Any idea?Thanks a lot,Philipp Link to comment Share on other sites More sharing options...
stegmann Posted February 20, 2015 Author Share Posted February 20, 2015 var result = _.extend(HDM.getGeneralOptions(extraOptions), { xAxis: { categories: [] }, plotOptions: { pie: { slicedOffset: 0, dataLabels: { enabled: true }, point: { events: { legendItemClick: HDM._getLegendItemClickHandler } } } }, series: [], labels: { items: [] } }); Link to comment Share on other sites More sharing options...
Scott Andersen Posted January 2, 2018 Share Posted January 2, 2018 Starting with version 6.2 you can use advanced properties to apply labels to pie charts. You need to use "series.dataLabels.enabled" and set it to true. You can also use "series.dataLabels.distance" to control positioning of the data labels.Note that you need to use series.dataLabels... rather than plotOptions.pie.dataLabels... to apply properties to adhoc pie charts. You may try to use these properties in your dataMapper.js change. Also, if you use optimized version of scripts, you need either to add _opt=false parameter to the URL or re-compile optimized scripts after the changes as described in the doc:http://community.jaspersoft.com/documentation/jasperreports-server-ultimate-guide/v561/customizing-javascript-files Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now