开发者

JfreeChart tooltips with HTML code inside

It is possible to use HTML in JFreeChart tooltips?

I extend StandardCategoryToolTipGenerator and override method generateToolTip

public String generateToolTip(Dataset dataset, int row,
        int column, int row) {

    return "<h1>ToolTips on line 1<\\h1> <br /> Second line tooltip"

}
开发者_如何学Go

But it is displaying whole string instead. Does anyone know how to display html text in jfrechart tooltips?


Use a CategoryURLGenerator, illustrated here for the homologous PieURLGenerator.

Addendum: As the tool tips are not Swing components, HTML is not supported. You can retrieve the result from your chosen URL generator in a ChartMouseListener to achieve any desired result.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜