Ajey.Kumar Posted May 17, 2018 Share Posted May 17, 2018 Hello, I would like to show multiple values of one field in tooltip using Jaspersoft Studio. Please see below example. I have a field 'City' whose values are London, New York, SFO, Cincinnati etc. In tooltip, I want to see "City: London, New York, SFO, Cincinnati", currently, it just shows last value in the column i.e. 'City:Cincinnati'. Yes, I followed to customize tooltip.pointFormat however still, it shows last value as stated in 2nd line above. I know, I am doing something wrong and it could be a simple change. Any suggestions/code would be highly appreciated. Link to comment Share on other sites More sharing options...
riodavid Posted May 18, 2018 Share Posted May 18, 2018 Use this in your tooltip expression:org.springframework.util.StringUtils.collectionToDelimitedString($P{City},",") Link to comment Share on other sites More sharing options...
Ajey.Kumar Posted May 18, 2018 Author Share Posted May 18, 2018 Thanks for the response. Could you please elaborate a bit i.e. which place, I need to put as I already have below, I have a pie chart where category is Country and on tool tip, I want to show list of cities concatenated and with their shipment values if hover. Ex: If mouse is hover on India then tool tip should show "Hyderabad:10, Mumbai:50, Delhi:40"Here is my current tooltip.pointFormat attribute : {series.name}: <b>{point.y}</b><br/>City:{point.City}<br/>Value:{point.Value}City is showing last value only. Please advise the place to put in. Thanks much! Link to comment Share on other sites More sharing options...
riodavid Posted May 23, 2018 Share Posted May 23, 2018 In Jaspersoft Studio, Right click your Chart -> Properties -> Hyperlink -> Hyperlink Tooltip Expression -> org.springframework.util.StringUtils.collectionToDelimitedString($P{City},",") Link to comment Share on other sites More sharing options...
Ajey.Kumar Posted May 24, 2018 Author Share Posted May 24, 2018 Thanks for the response! Apologies for asking this question again, I am using version 6.4.2 and I do not see "hyperlink tooltip expression", unfortunately, I do not have an option to attach few screenshots for your reference. Also, in your provided expression, you gave $P{City}, paramater, I did not create any, can you provide some screenshots to help me with. Link to comment Share on other sites More sharing options...
riodavid Posted June 7, 2018 Share Posted June 7, 2018 You can use the image uploding website to upload screenshots.Here's a screenshot of my Jaspersoft Studio 6.4.2https://postimg.cc/image/xt5bkmksn/ 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