Jump to content
Changes to the Jaspersoft community edition download ×

HTML5 charts-Customizing tooltip formatting


ruthran

Recommended Posts

Hi All,

     I am using HTML5 bar charts for one of the report. I have a question on tooltip formatting option we have for charts. I need to display amount values for each of the series (coutry in my case) in the graph and the amount should be formatted based on each currency. So, the decimal format will change for each value.

     Under Tooltip -> Formatting, I see an option called Value decimals which allow us to configure the decimal places. But, this is a constant value and I cannot get different decimal points for different series. I tried to use the expression in this field but it is not helping as the bar chart is present in summary band and always picks up last value. Is there any way to include custom formatting in "Point Format" option of formatting? I tried to include some HTML codes in it, but it is not working. Please do let me know if there are any other way to handle this issue. 

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Hi Andrew,

      Thank you for your reply.

       I forgot to mention about that. I am already using the series bucket property to get the required decimal points. But, we cannot use any bucket expression in the tooltip.ValueDecimals properties. We can either use a hard-coded number or some other custom expression. 

          I tried this option already but got no success. 

 

Link to comment
Share on other sites

Hi,

   As you suggested, I tried using tooltip.Formatter function, but I don't see that formatting has been applied to the chart result. Below are the values I am using in different properties.

 tooltip.formatter  - "(function() {return  this.series.name + '<b>'+ Highcharts.numberFormat(this.point.y, this.point.exponent)+ '</b>' ; } )"

tooltip.pointFormat - <span style="color:{point.color}">●</span> {series.name}: <b> {point.y} </b><br/>

(point.exponent is a bucket property I defined for each series)

Could you please let me know what I am doing wrong here ? 

  

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...