Category: | Bug report |
Priority: | Normal |
Status: | New |
Project: | Severity: | Minor |
Resolution: | Open |
|
Component: | Reproducibility: | Always |
Assigned to: |
If you define a HTML table for tooltip for HTML5 chart, after running the report on Jasper Server you see that the table is totally ignored in the tooltip.
To regenerate the problem, use the following setting for a giver HTML5 (Highcharts) chart. The same setting leads to a table inside a tooltip in the same version of Highcharts but not in the Jasper Server.
<hc:chartProperty name="tooltip.footerFormat">
<hc:propertyExpression><![CDATA["myFooter"]]></hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="tooltip.headerFormat">
<hc:propertyExpression><![CDATA["<table> <tr><td>Row1</td></tr> <tr><td>Row 2</td></tr> </table>"]]></hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="tooltip.pointFormat">
<hc:propertyExpression><![CDATA["myPoint </br>"]]></hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="tooltip.shared">
<hc:propertyExpression><![CDATA[Boolean.TRUE]]></hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="tooltip.useHTML">
<hc:propertyExpression><![CDATA[Boolean.TRUE]]></hc:propertyExpression>
</hc:chartProperty>
4 Comments:
The table is there in the tooltip in JRS, but there's a CSS rule that applies to it and prevents the text in the table from showing. Manually setting font-size:12px for the table cells (as in <hc:propertyExpression><![CDATA["<table><tr><td style=\"font-size:12px\">Row1</td></tr> <tr><td>Row 2</td></tr> </table>"]]></hc:propertyExpression>) overrides the JRS CSS, but I can't say whether that's the best solution/workaround.
Regards,
Lucian
PS: Commercial Jaspersoft products are probably best managed via official support channels.
Lucian,
Thanks for your solution. It solved my problem. But do you know why it does not put line-break after </tr>? I actually had to put a <br/>, but I expected a line-break after </tr> automatically.
I again appreciate your help.
Keivan
In relation to "PS": Apparently with the license that we have for our product, help/support must be done using this website and community.
Sorry, that's my bad. Everything is alright now!
Hi I too facing the same issue.Can you please tell me how to resolve this ?
<hc:propertyExpression><![CDATA[$V{total_mins}+"<span style=\"font-family: 'AkagiPro-Bold'; color:#000000; font-size:14px;\">min</span>"]]></hc:propertyExpression>
I need to apply different styles for $V{total_mins} and min in above HighChart property. I tried above but it won't works.