zh3ntil Posted July 6, 2015 Share Posted July 6, 2015 Hi everyone,I am using jaspersoft Studio 6.1.0. I have a report with a chart and chart has hyperlinks which calls report itself with some parameters.I need to change the clicked part's data label color and non-clicked part's saturation in the report according to parameter. I try to make it with changing data labels color by parameter but it didn't work.plotOptions.pie.dataLabels.format:"<span style="color:" + $P{param1}=={point.name} ? red : {point.color} + ""><b>{point.name} </b></span></br><span style="color:{point.color}">{percentage:.2f}%</span>"My condition gives false all the time because I guess jasperserver replace the tagged part when svg renders the report html.Is there a way to make this?Thanks, Link to comment Share on other sites More sharing options...
hozawa Posted July 6, 2015 Share Posted July 6, 2015 Not sure what you're doing with the <span> tags but creating a chart customizer class will change the color of the label to red. Try googling "jasperreports chart customizer". JasperReports is just using JFreeChart so you'll be able to get more information from that forum too. Link to comment Share on other sites More sharing options...
zh3ntil Posted July 6, 2015 Author Share Posted July 6, 2015 Thanks for reply hozowa. I am using HTML5 charts (highcharts) in studio. Actually I am trying to make the chart looks like a filter. Selected part color remains (maybe change label color also) and make the other parts colors little pale. With this span tags I manage to make same colors with data labels and point colors. So I try to add a condition but it didn't work. Actually, I don't want to use JFreeCharts instead of highcharts. Any suggestion? Link to comment Share on other sites More sharing options...
davidiazcasta Posted July 6, 2015 Share Posted July 6, 2015 had you look server configuration to accept javascript function configuration???Because, you must enable funtion in server side.http://community.jaspersoft.com/wiki/functions-can-be-used-format-html5-datalabels-and-tooltipsand then try follow this:http://community.jaspersoft.com/blog/customizing-tooltips-jasperreports-html5-chart-componentsRegards. 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