Jump to content
We've recently updated our Privacy Statement, available here ×

How to set point labes in Line Chart (XY Line) in jasper report?


ozhangulen

Recommended Posts

Hello,

I needed to show point labels on Line Chart next to each point in jasper report.

I allready visited the url below, and I know how to show "y" values next to each point.

https://stackoverflow.com/questions/6956391/how-to-add-values-legend-to-a-line-chart

But I need to show custom point labels on each point like "First Point", "Second Point" etc.

You can see my requirement in the attached image.

Best Regards.

Link to comment
Share on other sites

  • 3 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

If you could add the label values to your data, that would be easiest of course as you could select those values and just display them as you've experimented. But that's probably not possible. The only other way I know to do something like this is write a custom javascript formatter for your data labels. You can do this and even create a variable in the javascript to aid in printing the values you want...but it's not easy. And when you add javascript to HTML5 charts, you must enable the functions to work on the server by setting a property in jasperreports.properties. (see https://community.jaspersoft.com/wiki/using-functions-html5-charts-highcharts). Good luck.

-Mike

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...